SaasCategoryController.php 1010 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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\SaasCategoryForm;
  11. class SaasCategoryController extends BaseController
  12. {
  13. public function actionList()
  14. {
  15. $form = new SaasCategoryForm();
  16. return $this->asJson($form->getList());
  17. }
  18. public function actionChangeStatus()
  19. {
  20. $id = post_params('id');
  21. $form = new SaasCategoryForm();
  22. return $this->asJson($form->changeStatus($id));
  23. }
  24. public function actionDelete()
  25. {
  26. $id = post_params('id');
  27. $form = new SaasCategoryForm();
  28. return $this->asJson($form->delete($id));
  29. }
  30. public function actionEdit()
  31. {
  32. $params = all_params();
  33. $form = new SaasCategoryForm();
  34. return $this->asJson($form->edit($params));
  35. }
  36. }