111
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Application.Domain
|
||||
{
|
||||
public class LoginParms
|
||||
{
|
||||
public string name { get; set; }
|
||||
public string pwd { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -17,19 +17,24 @@ namespace Application.Web.Controllers.Login
|
||||
{
|
||||
_hubContext = hubContext;
|
||||
}
|
||||
/// <summary>
|
||||
/// 登录接口
|
||||
/// </summary>
|
||||
/// <param name="parms"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// 登录接口
|
||||
/// </summary>
|
||||
/// <param name="parms"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IPoAction> Login([FromBody] LoginParms parms)
|
||||
{
|
||||
return PoAction.Ok(parms.name);
|
||||
return PoAction.Ok(parms.code);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测试接口
|
||||
/// </summary>
|
||||
/// <param name="name">测试名</param>
|
||||
/// <param name="ttt">测试2</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<IPoAction> Test(string name)
|
||||
public async Task<IPoAction> Test(string name,string ttt)
|
||||
{
|
||||
await _hubContext.Clients.All.SendAsync("ReceiveMessage", "系统");
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Application.Web
|
||||
{
|
||||
/// <summary>
|
||||
/// 登录请求参数
|
||||
/// </summary>
|
||||
public class LoginParms
|
||||
{
|
||||
/// <summary>
|
||||
/// 登录名/手机号
|
||||
/// </summary>
|
||||
public string name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
public string pwd { get; set; }= string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 验证码
|
||||
/// </summary>
|
||||
public string code { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user