From 64e085dc4c18552332dcc4ddf6c6036f8423ad71 Mon Sep 17 00:00:00 2001 From: CalciumIon <1808837298@qq.com> Date: Wed, 11 Dec 2024 17:19:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/HeaderBar.js | 48 +++++++++++++++++++++------------ web/src/index.css | 8 ++++++ web/src/pages/Home/index.js | 2 ++ 3 files changed, 41 insertions(+), 17 deletions(-) diff --git a/web/src/components/HeaderBar.js b/web/src/components/HeaderBar.js index 4b284e26..fc879ee1 100644 --- a/web/src/components/HeaderBar.js +++ b/web/src/components/HeaderBar.js @@ -33,14 +33,6 @@ let headerButtons = [ }, ]; -let buttons = [ - { - text: '首页', - itemKey: 'home', - to: '/', - }, -]; - if (localStorage.getItem('chat_link')) { headerButtons.splice(1, 0, { name: '聊天', @@ -64,6 +56,19 @@ const HeaderBar = () => { currentDate.getDate() >= 9 && currentDate.getDate() <= 24); + let buttons = [ + { + text: '首页', + itemKey: 'home', + to: '/', + }, + { + text: '控制台', + itemKey: 'detail', + to: '/', + }, + ]; + async function logout() { await API.get('/api/user/logout'); showSuccess('注销成功!'); @@ -102,21 +107,30 @@ const HeaderBar = () => {