[ 'class' => LoginBehavior::className(), ], ]); } //卡券推送渲染 public function actionSend() { $coupon = Coupon::find()->where(['is_delete' => 0])->asArray()->all(); return $this->render('send',[ 'coupon' => $coupon ]); } //搜索用户 public function actionSearchUser() { $form = new UserListForm(); $form->attributes = \Yii::$app->request->get(); $form->is_admin = 0; $data = $form->search_user(); return $this->responseHandler($data); } //卡券推送 public function actionEdit() { if(!\Yii::$app->request->isPost){ $data = $this->invaildRequest(); return $this->responseHandler($data); } $form = new UserCouponEditForm(); $form->attributes = \Yii::$app->request->post(); $data = $form->edit(); return $this->responseHandler($data); } }