PcDecorateThemePageController.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeshop100%开源免费商用商城系统
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | 商业版本务必购买商业授权,以免引起法律纠纷
  8. // | 禁止对系统程序代码以任何目的,任何形式的再发布
  9. // | gitee下载:https://gitee.com/likeshop_gitee
  10. // | github下载:https://github.com/likeshop-github
  11. // | 访问官网:https://www.likeshop.cn
  12. // | 访问社区:https://home.likeshop.cn
  13. // | 访问手册:http://doc.likeshop.cn
  14. // | 微信公众号:likeshop技术社区
  15. // | likeshop团队 版权所有 拥有最终解释权
  16. // +----------------------------------------------------------------------
  17. // | author: likeshopTeam
  18. // +----------------------------------------------------------------------
  19. namespace app\adminapi\controller\theme;
  20. use app\adminapi\controller\BaseAdminController;
  21. use app\adminapi\logic\theme\DecorateThemePageLogic;
  22. use app\adminapi\logic\theme\PcDecorateThemePageLogic;
  23. use app\adminapi\validate\theme\PcDecoratePageValiadte;
  24. use app\common\enum\PcDecorateThemePageEnum;
  25. /**
  26. * pc端装修页面
  27. * Class PcDecorateThemePageController
  28. * @package app\adminapi\controller\theme
  29. */
  30. class PcDecorateThemePageController extends BaseAdminController
  31. {
  32. /**
  33. * @notes 首页主题
  34. * @return \think\response\Json
  35. * @author cjhao
  36. * @date 2021/11/30 11:55
  37. */
  38. public function index()
  39. {
  40. $result = (new PcDecorateThemePageLogic())->index();
  41. return $this->success('',$result);
  42. }
  43. /**
  44. * @notes 获取页面
  45. * @return \think\response\Json
  46. * @author cjhao
  47. * @date 2021/11/30 12:00
  48. */
  49. public function getPage()
  50. {
  51. $type = $this->request->get('type',PcDecorateThemePageEnum::TYPE_HOME);
  52. $detail = (new PcDecorateThemePageLogic())->getPage($type);
  53. return $this->success('', $detail);
  54. }
  55. /**
  56. * @notes 设置页面
  57. * @return \think\response\Json
  58. * @author cjhao
  59. * @date 2021/11/30 15:34
  60. */
  61. public function setPage()
  62. {
  63. $params = (new PcDecoratePageValiadte())->post()->goCheck();
  64. (new PcDecorateThemePageLogic())->setPage($params);
  65. return $this->success('设置成功',[],1,1);
  66. }
  67. /**
  68. * @notes pc页面
  69. * @return \think\response\Json
  70. * @author cjhao
  71. * @date 2021/12/6 17:06
  72. */
  73. public function getPcPage()
  74. {
  75. $params = $this->request->get('type','shop');
  76. $detail = (new PcDecorateThemePageLogic())->getPcPage($params);
  77. return $this->success('', $detail);
  78. }
  79. }