CategoryController.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using CZFW.Framework;
  2. using CZFW.MDB;
  3. using Microsoft.AspNetCore.Mvc;
  4. using Microsoft.AspNetCore.Mvc.Filters;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Threading.Tasks;
  9. namespace CZFW.CMS.Builder.Controllers
  10. {
  11. public class CategoryController:AuthedControllerBase
  12. {
  13. string TplName;
  14. IPage _pageLogic;
  15. IMongoRepository _repository;
  16. public CategoryController(IPage page, IMongoRepository repository)
  17. {
  18. _pageLogic = page;
  19. _repository = repository;
  20. }
  21. public override void OnActionExecuting(ActionExecutingContext context)
  22. {
  23. TplName = GetSession<string>(CMSBuilderConstant.TPLNAME_SESSION_NAME);
  24. if (string.IsNullOrWhiteSpace(TplName))
  25. {
  26. context.Result = Json(Result(false, "没有指定当前要编辑的模板名称"));
  27. }
  28. base.OnActionExecuting(context);
  29. }
  30. //public IActionResult GetList()
  31. //{
  32. // var res = _pageLogic.GetListByName()
  33. //}
  34. }
  35. }