更新系统公告

This commit is contained in:
yaooo 2023-10-28 18:08:42 +08:00
parent c09e2873b6
commit 88727a0f30
1 changed files with 3 additions and 0 deletions

View File

@ -51,6 +51,9 @@ class NoteIndex extends ApiController
$this->checkAuth();
$id = empty(get_params('id')) ? 0 : get_params('id');
$note = Db::name('Note')->where(['id' => $id])->find();
if (empty($note)) {
$this->apiError('公告不存在');
}
$note['cate_title'] = Db::name('NoteCate')->where(['id' => $note['cate_id']])->value('title');
$this->apiSuccess('获取成功', $note);
}