Sina.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. namespace app\admin\controller;
  3. use think\admin\Controller;
  4. use think\admin\service\SystemService;
  5. use think\facade\Request;
  6. class Sina extends Controller
  7. {
  8. /**
  9. * 修改聚合页配置
  10. * @auth true
  11. * @menu true
  12. * @throws \think\db\exception\DataNotFoundException
  13. * @throws \think\db\exception\DbException
  14. * @throws \think\db\exception\ModelNotFoundException
  15. */
  16. public function groupPageConfig()
  17. {
  18. $this->_applyFormToken();
  19. if ($this->request->isGet()) {
  20. $this->title = '修改聚合页配置';
  21. $this->config = SystemService::instance()->getData("group:page:config");
  22. $this->fetch();
  23. } else {
  24. SystemService::instance()->setData('group:page:config', Request::post("config"));
  25. sysoplog('聚合页配置管理', "修改聚合页配置成功");
  26. $this->success('修改聚合页配置成功!');
  27. }
  28. }
  29. /**
  30. * 修改品牌任务配置
  31. * @auth true
  32. * @menu true
  33. * @throws \think\db\exception\DataNotFoundException
  34. * @throws \think\db\exception\DbException
  35. * @throws \think\db\exception\ModelNotFoundException
  36. */
  37. public function brandTaskConfig()
  38. {
  39. $this->_applyFormToken();
  40. if ($this->request->isGet()) {
  41. $this->title = '修改品牌任务配置';
  42. $this->config = SystemService::instance()->getData("brand:task:config");
  43. $this->fetch();
  44. } else {
  45. SystemService::instance()->setData('brand:task:config', Request::post("config"));
  46. sysoplog('品牌任务配置管理', "修改品牌任务配置成功");
  47. $this->success('修改品牌任务配置成功!');
  48. }
  49. }
  50. /**
  51. * 修改活动规则
  52. * @auth true
  53. * @menu true
  54. * @throws \think\db\exception\DataNotFoundException
  55. * @throws \think\db\exception\DbException
  56. * @throws \think\db\exception\ModelNotFoundException
  57. */
  58. public function rule()
  59. {
  60. $this->_applyFormToken();
  61. if ($this->request->isGet()) {
  62. $this->title = '修改活动规则配置';
  63. $this->config = SystemService::instance()->getData("activity:rule");
  64. $this->fetch();
  65. } else {
  66. SystemService::instance()->setData('activity:rule', Request::post("config"));
  67. sysoplog('品牌活动规则管理', "修改活动规则配置成功");
  68. $this->success('修改活动规则配置成功!');
  69. }
  70. }
  71. }