request->isAjax()) { return $this->fetch('setting', compact('model')); } // 更新小程序设置 if ($model->edit($this->postData('wxapp'))) { return $this->renderSuccess('更新成功'); } return $this->renderError($model->getError() ?: '更新失败'); } }