From 254c8f31057070d0a20bf28e24bc65b977ab726e Mon Sep 17 00:00:00 2001 From: root Date: Wed, 19 Aug 2026 10:43:04 +0800 Subject: [PATCH] =?utf8?q?feat:=20=E9=A1=B5=E9=9D=A2=E5=BA=95=E9=83=A8?= =?utf8?q?=E5=B1=95=E7=A4=BA=20ICP=20=E5=A4=87=E6=A1=88=E5=8F=B7(=E9=99=95?= =?utf8?q?ICP=E5=A4=872026022239=E5=8F=B7-1),=20=E9=93=BE=E6=8E=A5?= =?utf8?q?=E5=B7=A5=E4=BF=A1=E9=83=A8=E5=A4=87=E6=A1=88=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- frontend/src/App.js | 33 +++++++++++++++++------------- frontend/src/components/Footer.css | 18 ++++++++++++++++ frontend/src/components/Footer.js | 13 ++++++++++++ frontend/src/components/Login.css | 2 +- frontend/src/index.css | 7 +++++++ 5 files changed, 58 insertions(+), 15 deletions(-) create mode 100644 frontend/src/components/Footer.css create mode 100644 frontend/src/components/Footer.js diff --git a/frontend/src/App.js b/frontend/src/App.js index eac1cdc..d17f71d 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -7,25 +7,30 @@ import GroupView from './components/GroupView'; import StudyCalendar from './components/StudyCalendar'; import SyncNotifications from './components/SyncNotifications'; import Login from './components/Login'; +import Footer from './components/Footer'; import { isLoggedIn } from './auth'; function App() { const [loggedIn, setLoggedIn] = useState(isLoggedIn()); - // 未登录:只显示登录页,应用其余部分完全不加载 - if (!loggedIn) { - return setLoggedIn(true)} />; - } return ( - - - - } /> - } /> - } /> - } /> - } /> - - +
+ {loggedIn ? ( + + + + } /> + } /> + } /> + } /> + } /> + + + ) : ( + // 未登录:只显示登录页,应用其余部分完全不加载 + setLoggedIn(true)} /> + )} +
+
); } diff --git a/frontend/src/components/Footer.css b/frontend/src/components/Footer.css new file mode 100644 index 0000000..478346c --- /dev/null +++ b/frontend/src/components/Footer.css @@ -0,0 +1,18 @@ +.site-footer { + margin-top: auto; + padding: 14px 15px; + text-align: center; + font-size: 12px; + color: #8a94a6; + border-top: 1px solid #e6ebf2; + background: #f7f9fc; +} + +.site-footer a { + color: #6b7785; + text-decoration: none; +} + +.site-footer a:hover { + text-decoration: underline; +} diff --git a/frontend/src/components/Footer.js b/frontend/src/components/Footer.js new file mode 100644 index 0000000..25f2154 --- /dev/null +++ b/frontend/src/components/Footer.js @@ -0,0 +1,13 @@ +import React from 'react'; +import './Footer.css'; + +// 页面底部 ICP 备案号(合规要求:中国大陆网站须公开展示备案号并链接到工信部备案查询) +export default function Footer() { + return ( + + ); +} diff --git a/frontend/src/components/Login.css b/frontend/src/components/Login.css index d215673..a7b52cb 100644 --- a/frontend/src/components/Login.css +++ b/frontend/src/components/Login.css @@ -1,5 +1,5 @@ .login-wrap { - min-height: 100vh; + flex: 1 0 auto; display: flex; align-items: center; justify-content: center; diff --git a/frontend/src/index.css b/frontend/src/index.css index ec2585e..19f30f7 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -11,3 +11,10 @@ code { font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } + +/* 全站外壳:纵向 flex,min-height 撑满视口,使页脚自然贴底 */ +.app-shell { + display: flex; + flex-direction: column; + min-height: 100vh; +} -- 2.43.0