renderSuccess(compact('info')); } public function editConfig(): Json { $data = $this->postForm(); if (!$data) { return $this->renderError('缺少必要参数'); } $model = new InviteConfig(); if ($model->add($data)) { return $this->renderSuccess('编辑成功'); } return $this->renderError($model->getError() ?: '编辑失败'); } }