TestController.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * 测试
  3. */
  4. using System;
  5. using System.Web;
  6. using System.Collections.Generic;
  7. using Microsoft.AspNetCore.Mvc;
  8. using Microsoft.AspNetCore.Http;
  9. using MySystem.Models.Bs;
  10. using Library;
  11. using LitJson;
  12. using Microsoft.AspNetCore.Authorization;
  13. using MySystem.Service.Bs;
  14. using System.Linq;
  15. namespace MySystem.Areas.Api.Controllers.v1
  16. {
  17. [Area("Api")]
  18. [Route("Api/v1/[controller]/[action]")]
  19. public class TestController : BaseController
  20. {
  21. public TestController(IHttpContextAccessor accessor) : base(accessor)
  22. {
  23. }
  24. #region 测试方法
  25. /// <summary>
  26. /// 产品库列表
  27. /// </summary>
  28. /// <returns></returns>
  29. // [HttpPost]
  30. // [Authorize]
  31. [Route("/main/test/all")]
  32. public JsonResult List(string value)
  33. {
  34. value = PublicFunction.DesDecrypt(value);
  35. JsonData jsonObj = JsonMapper.ToObject(value);
  36. // Dictionary<string, object> obj = new Dictionary<string, object>(); //返回字段
  37. // var anths = BaseClass.GetRightJson();
  38. // obj.Add("AuthsTree", anths); //主token,用于刷新apiToken
  39. return Json(new AppResultJson() { Status = "1", Info = "" });
  40. }
  41. #endregion
  42. }
  43. }