PtActivityController.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\modules\admin\controllers\pt;
  8. use app\modules\admin\controllers\BaseController;
  9. use app\modules\admin\models\AboutArticleForm;
  10. use app\modules\admin\models\pt\PtActivityForm;
  11. class PtActivityController extends BaseController
  12. {
  13. /**
  14. * @return \yii\web\Response
  15. * 获取列表活动
  16. */
  17. public function actionList()
  18. {
  19. $form = new PtActivityForm();
  20. $form->attributes = get_params();
  21. $res = $form->search();
  22. return $this->asJson($res);
  23. }
  24. /**
  25. * @return \yii\web\Response
  26. * 保存信息
  27. */
  28. public function actionSave()
  29. {
  30. $form = new PtActivityForm();
  31. $form->attributes = post_params();
  32. $res = $form->save();
  33. return $this->asJson($res);
  34. }
  35. /**
  36. * @return \yii\web\Response
  37. * 获取信息
  38. */
  39. public function actionGetInfo()
  40. {
  41. $form = new PtActivityForm();
  42. $form->attributes = get_params();
  43. $res = $form->getInfo();
  44. return $this->asJson($res);
  45. }
  46. /**
  47. * @return \yii\web\Response
  48. * 获取普通商品
  49. */
  50. public function actionGetGoods()
  51. {
  52. $form = new PtActivityForm();
  53. $form->attributes = get_params();
  54. $res = $form->getGoods();
  55. return $this->asJson($res);
  56. }
  57. /**
  58. * @return \yii\web\Response
  59. * 获取拼团商品分类
  60. */
  61. public function actionGetPtGoodsCat()
  62. {
  63. $form = new PtActivityForm();
  64. $form->attributes = get_params();
  65. $res = $form->getGoodsCat();
  66. return $this->asJson($res);
  67. }
  68. /**
  69. * @return \yii\web\Response
  70. * 修改状态
  71. */
  72. public function actionSetStatus()
  73. {
  74. $form = new PtActivityForm();
  75. $form->attributes = get_params();
  76. $res = $form->setStatus();
  77. return $this->asJson($res);
  78. }
  79. /**
  80. * @return \yii\web\Response
  81. * 保存规则
  82. */
  83. public function actionSaveAritcle()
  84. {
  85. $form = new PtActivityForm();
  86. $form->attributes = post_params();
  87. $res = $form->saveArticle();
  88. return $this->asJson($res);
  89. }
  90. /**
  91. * 获取规则
  92. */
  93. public function actionGetArticle() {
  94. $form = new PtActivityForm();
  95. $form->attributes = get_params();
  96. $res = $form->getArticle();
  97. return $this->asJson($res);
  98. }
  99. /**
  100. * 联盟审核列表
  101. */
  102. public function actionGetAuditList() {
  103. $form = new PtActivityForm();
  104. $form->attributes = get_params();
  105. $res = $form->auditList();
  106. return $this->asJson($res);
  107. }
  108. /**
  109. * 活动审核状态修改
  110. */
  111. public function actionAuditHandle() {
  112. $form = new PtActivityForm();
  113. $form->attributes = post_params();
  114. $res = $form->auditHandle();
  115. return $this->asJson($res);
  116. }
  117. }