service = new ReviewService(['mall_id' => $this->mall_id]); } /** * 首页 * * @return string */ public function actionIndex() { if ($this->request->isAjax) { $params = $this->request->get(); return $this->success('ok', $this->service->getPageList($params)); } return $this->render($this->action->id); } /** * 通过 * * @return string */ public function actionPass() { $id = $this->request->get('id'); $level_id = $this->request->post('level'); return $this->service->pass($id, $level_id) ? $this->success('ok') : $this->error($this->service->getError()); } /** * 驳回 * * @return string */ public function actionReject() { $id = $this->request->get('id'); $content = $this->request->post('content'); return $this->service->reject($id, $content) ? $this->success('ok') : $this->error($this->service->getError()); } }