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