public function actionReply() { $request = Yii::$app->request; if ($request->isPost) { $serviceId = $request->post('serviceId'); $reply = CommonFunctions::text2Html($request->post('reply')); $publish = $request->post('publish'); if ($publish == 'publish') { Service::replyService($serviceId, $reply, true); } else { Service::replyService($serviceId, $reply); } } else { CommonFunctions::createAlertMessage("非正常请求,错误!", 'error'); } return $this->redirect(['service/index']); }