service = new SettingService($this->mall_id); } /** * 设置页面 * * @return void */ public function actionIndex() { if ($this->request->isPost) { $data = $this->request->post(); unset($data['_csrf']); return $this->service->setSetting($data) ? $this->success('ok') : $this->error($this->service->getErrorMsg()); } return $this->render('index'); } /** * 获取配置 * * @return void */ public function actionRead() { return $this->success( 'ok', ['setting' => $this->service->getSetting()] ); } }