ActivityWechatRoomController.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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\models\Goods;
  9. use app\models\Option;
  10. use app\constants\OptionSetting;
  11. use app\modules\admin\models\ActivityWechatRoomForm;
  12. class ActivityWechatRoomController extends BaseController
  13. {
  14. /**
  15. * @return \yii\web\Response
  16. * 获取列表
  17. */
  18. public function actionList()
  19. {
  20. $form = new ActivityWechatRoomForm();
  21. $form->attributes = get_params();
  22. $res = $form->search();
  23. return $this->asJson($res);
  24. }
  25. public function actionListSelect()
  26. {
  27. $form = new ActivityWechatRoomForm();
  28. $form->attributes = get_params();
  29. $res = $form->listSelect();
  30. return $this->asJson($res);
  31. }
  32. /**
  33. * @return \yii\web\Response
  34. * 保存信息
  35. */
  36. public function actionSave()
  37. {
  38. $form = new ActivityWechatRoomForm();
  39. $form->attributes = post_params();
  40. $res = $form->save();
  41. return $this->asJson($res);
  42. }
  43. /**
  44. * @return \yii\web\Response
  45. * 获取信息
  46. */
  47. public function actionGetInfo()
  48. {
  49. $form = new ActivityWechatRoomForm();
  50. $form->attributes = get_params();
  51. $res = $form->getInfo();
  52. return $this->asJson($res);
  53. }
  54. /**
  55. * @return \yii\web\Response
  56. * 修改状态
  57. */
  58. public function actionDel()
  59. {
  60. $form = new ActivityWechatRoomForm();
  61. $form->attributes = post_params();
  62. $res = $form->del();
  63. return $this->asJson($res);
  64. }
  65. /**
  66. * @return \yii\web\Response
  67. * 修改状态
  68. */
  69. public function actionClose()
  70. {
  71. $form = new ActivityWechatRoomForm();
  72. $form->attributes = post_params();
  73. $res = $form->close();
  74. return $this->asJson($res);
  75. }
  76. }