GoodsController.php 978 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace app\modules\admin\controllers\integralAppreciation;
  3. use app\modules\admin\controllers\BaseController;
  4. use app\modules\admin\models\integralAppreciation\GoodsForm;
  5. class GoodsController extends BaseController
  6. {
  7. /**
  8. * 保存
  9. */
  10. public function actionSave() {
  11. $form = new GoodsForm();
  12. $form->attributes = post_params();
  13. $form->store_id = get_store_id();
  14. return $this->asJson($form->save());
  15. }
  16. /**
  17. * 列表
  18. */
  19. public function actionList() {
  20. $form = new GoodsForm();
  21. $form->attributes = get_params();
  22. $form->store_id = get_store_id();
  23. return $this->asJson($form->getList());
  24. }
  25. /**
  26. * 删除
  27. */
  28. public function actionDel() {
  29. $form = new GoodsForm();
  30. $form->attributes = post_params();
  31. $form->store_id = get_store_id();
  32. return $this->asJson($form->del());
  33. }
  34. }