PosterController.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace app\adminapi\controller\poster;
  3. use app\adminapi\controller\BaseAdminController;
  4. use app\common\logic\PosterLogic;
  5. use app\common\service\JsonService;
  6. /**
  7. * 自定义海报
  8. */
  9. class PosterController extends BaseAdminController
  10. {
  11. /**
  12. * @notes 获取商品海报配置
  13. */
  14. public function getGoodsConfig()
  15. {
  16. $id = request()->get('id');
  17. $config = PosterLogic::getGoodsConfig($id);
  18. return $this->data($config);
  19. }
  20. /**
  21. * @notes 设置商品海报配置
  22. */
  23. public function setGoodsConfig()
  24. {
  25. $params = request()->post();
  26. $config = PosterLogic::setGoodsConfig($params);
  27. return $this->success('设置成功', [], 1, 1);
  28. }
  29. /**
  30. * @notes 获取邀请海报配置
  31. */
  32. public function getDistributionConfig()
  33. {
  34. $config = PosterLogic::getDistributionConfig();
  35. return $this->data($config);
  36. }
  37. /**
  38. * @notes 设置邀请海报配置
  39. */
  40. public function setDistributionConfig()
  41. {
  42. $params = request()->post();
  43. $config = PosterLogic::setDistributionConfig($params);
  44. return $this->success('设置成功', [], 1, 1);
  45. }
  46. }