DeliveryRulesController.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 app\modules\admin\models\DeliveryRulesForm;
  9. class DeliveryRulesController extends BaseController
  10. {
  11. /**
  12. * @return \yii\web\Response
  13. * 获取列表
  14. */
  15. public function actionList()
  16. {
  17. $form = new DeliveryRulesForm();
  18. $form->attributes = get_params();
  19. $res = $form->search();
  20. return $this->asJson($res);
  21. }
  22. /**
  23. * @return \yii\web\Response
  24. * 保存信息
  25. */
  26. public function actionSave()
  27. {
  28. $form = new DeliveryRulesForm();
  29. $form->attributes = post_params();
  30. $res = $form->save();
  31. return $this->asJson($res);
  32. }
  33. /**
  34. * @return \yii\web\Response
  35. * 修改状态
  36. */
  37. public function actionSetStatus()
  38. {
  39. $form = new DeliveryRulesForm();
  40. $form->attributes = get_params();
  41. $res = $form->setStatus();
  42. return $this->asJson($res);
  43. }
  44. public function actionSelectList()
  45. {
  46. $form = new DeliveryRulesForm();
  47. $form->attributes = get_params();
  48. $res = $form->getSelectList();
  49. return $this->asJson($res);
  50. }
  51. }