request->isAjax) { $service = new SettingService(['mall_id' => $this->mall_id]); return $this->success('ok', $service->getBackendSetting()); } return $this->render('index'); } /** * 保存更改 * * @return string */ public function actionEdit() { if ($this->request->isAjax) { $data = $this->request->getBodyParam('setting'); $service = new SettingService(['mall_id' => $this->mall_id]); unset($data['callback_url']); return $service->setSetting($data) ? $this->success('ok') : $this->error($service->error); } } }