From a58fc40e105d1647ece86f5fbd8526272eb3fd68 Mon Sep 17 00:00:00 2001 From: jeremygan2021 Date: Fri, 27 Feb 2026 14:30:56 +0800 Subject: [PATCH] video curcse --- frontend/src/components/Layout.jsx | 11 +++++------ frontend/src/context/AuthContext.jsx | 6 +++++- frontend/src/pages/ServiceDetail.jsx | 4 ++-- frontend/src/pages/VCCourseDetail.jsx | 20 ++++++++++---------- 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/frontend/src/components/Layout.jsx b/frontend/src/components/Layout.jsx index 97b75dd..993991b 100644 --- a/frontend/src/components/Layout.jsx +++ b/frontend/src/components/Layout.jsx @@ -15,10 +15,9 @@ const Layout = ({ children }) => { const location = useLocation(); const [searchParams] = useSearchParams(); const [mobileMenuOpen, setMobileMenuOpen] = useState(false); - const [loginVisible, setLoginVisible] = useState(false); const [profileVisible, setProfileVisible] = useState(false); - const { user, login, logout } = useAuth(); + const { user, login, logout, loginModalVisible, showLoginModal, hideLoginModal } = useAuth(); // 全局监听并持久化 ref 参数 useEffect(() => { @@ -178,7 +177,7 @@ const Layout = ({ children }) => { ) : ( - + )}