AccountController.cs 887 B

12345678910111213141516171819202122232425262728293031323334
  1. using Microsoft.AspNetCore.Authorization;
  2. using Microsoft.AspNetCore.Mvc;
  3. using SM.Core;
  4. using SM.Services;
  5. namespace SM.Web.Controllers
  6. {
  7. ///<summary>账号服务</summary>
  8. public class AccountController : WebController
  9. {
  10. private IAccountService _AccountService;
  11. public AccountController(IAccountService ia)
  12. {
  13. _AccountService = ia;
  14. }
  15. ///<summary>登录</summary>
  16. [HttpPost]
  17. [AllowAnonymous]
  18. public async Task<IResponseOutput> Login(Account_Login_Input input)
  19. {
  20. return await _AccountService.Login(input);
  21. }
  22. ///<summary>获取秘钥</summary>
  23. [HttpPost]
  24. [AllowAnonymous]
  25. public async Task<IResponseOutput> SecretKey(Account_SecretKey_Input input)
  26. {
  27. return await _AccountService.SecretKey(input);
  28. }
  29. }
  30. }