SaasIntegralCatController.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\modules\admin\controllers;
  8. use Yii;
  9. use Exception;
  10. use app\modules\admin\models\SaasIntegralCatForm;
  11. class SaasIntegralCatController extends BaseController
  12. {
  13. public function actionList()
  14. {
  15. $form = new SaasIntegralCatForm();
  16. return $this->asJson($form->getList());
  17. }
  18. public function actionChangeStatus()
  19. {
  20. $id = post_params('id');
  21. $form = new SaasIntegralCatForm();
  22. return $this->asJson($form->changeStatus($id));
  23. }
  24. public function actionChangeName()
  25. {
  26. $id = post_params('id');
  27. $name = post_params('name');
  28. $form = new SaasIntegralCatForm();
  29. return $this->asJson($form->changeName($id, $name));
  30. }
  31. public function actionDelete()
  32. {
  33. $id = post_params('id');
  34. $form = new SaasIntegralCatForm();
  35. return $this->asJson($form->delete($id));
  36. }
  37. public function actionAdd()
  38. {
  39. $name = post_params('name');
  40. $form = new SaasIntegralCatForm();
  41. return $this->asJson($form->add($name));
  42. }
  43. }