TeamGoodsController.php 959 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\modules\admin\controllers\team_grades;
  3. use app\modules\admin\controllers\BaseController;
  4. use app\modules\admin\models\team_grades\TeamGoodsForm;
  5. class TeamGoodsController extends BaseController
  6. {
  7. //设置分红商品
  8. public function actionSetGoods() {
  9. $model = new TeamGoodsForm();
  10. $model->attributes = post_params();
  11. $model->store_id = get_store_id();
  12. return $this->asJson($model->setGoods());
  13. }
  14. //获取分红商品
  15. public function actionList() {
  16. $model = new TeamGoodsForm();
  17. $model->attributes = get_params();
  18. $model->store_id = get_store_id();
  19. return $this->asJson($model->list());
  20. }
  21. //删除
  22. public function actionDel() {
  23. $model = new TeamGoodsForm();
  24. $model->attributes = get_params();
  25. $model->store_id = get_store_id();
  26. return $this->asJson($model->del());
  27. }
  28. }