Template.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\adminapi\controller\weapp;
  12. use app\service\admin\weapp\WeappTemplateService;
  13. use core\base\BaseAdminController;
  14. use think\Response;
  15. /**
  16. * 微信小程序订阅消息
  17. */
  18. class Template extends BaseAdminController
  19. {
  20. /**
  21. * 订阅消息
  22. * @return Response
  23. */
  24. public function lists()
  25. {
  26. $wechat_template_service = new WeappTemplateService();
  27. return success($wechat_template_service->getList());
  28. }
  29. /**
  30. * 菜单信息
  31. * @return Response
  32. */
  33. public function sync()
  34. {
  35. $data = $this->request->params([
  36. ['keys', []]
  37. ]);
  38. (new WeappTemplateService())->syncAll($data['keys']);
  39. return success('SUCCESS');
  40. }
  41. }