You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.5 KiB

2 years ago
  1. using EasyBL.WebApi.Filters;
  2. using EasyBL.WEBAPP.SYS;
  3. using Entity.ShowEasyDtos;
  4. using Entity.Sugar;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Net;
  9. using System.Net.Http;
  10. using System.Web;
  11. using System.Web.Http;
  12. namespace WebApp.Controllers
  13. {
  14. public class SystemController : ApiController
  15. {
  16. /// <summary>
  17. /// 獲取token信息
  18. /// </summary>
  19. /// <param name="orgId"></param>
  20. /// <param name="userId"></param>
  21. /// <param name="pasWd"></param>
  22. /// <returns></returns>
  23. [HttpGet]
  24. //[SEApiSecurityFilter]
  25. public HttpResponseMessage GetToken(string orgId, string userId, string pasWd)
  26. {
  27. //获取token
  28. return new SystemService().GetToken(orgId, userId, pasWd);
  29. }
  30. /// <summary>
  31. /// 會員登錄
  32. /// </summary>
  33. /// <param name="dto"></param>
  34. /// <returns></returns>
  35. [HttpPost]
  36. public HttpResponseMessage Login([FromBody] Login dto)
  37. {
  38. //登陸並返回token
  39. return new SystemService().Login(dto);
  40. }
  41. /// <summary>
  42. /// 記住密碼
  43. /// </summary>
  44. /// <param name="dto"></param>
  45. /// <returns></returns>
  46. [HttpGet]
  47. public HttpResponseMessage RememberMe(string Account)
  48. {
  49. //登陸並返回token
  50. return new SystemService().RememberMe(Account);
  51. }
  52. }
  53. }