From 222ceb4d131756ba98a19d994dd1a0016629f42a Mon Sep 17 00:00:00 2001
From: 12451 <12451@example.com>
Date: Thu, 2 Jul 2026 18:34:39 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=B7=AF=E7=94=B1?=
=?UTF-8?q?=E8=B7=AF=E5=BE=84=E4=B8=BA=E7=9B=B8=E5=AF=B9=E8=B7=AF=E5=BE=84?=
=?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E9=87=8D=E5=AE=9A=E5=90=91=E5=88=B0?=
=?UTF-8?q?=E6=A0=B9=E7=9B=AE=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
software/web/src/App.tsx | 6 +++---
software/web/src/layouts/AdminLayout.tsx | 2 +-
software/web/src/pages/Login.tsx | 2 +-
software/web/src/pages/devices/cabinet.tsx | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/software/web/src/App.tsx b/software/web/src/App.tsx
index 73c1ea8..259db39 100644
--- a/software/web/src/App.tsx
+++ b/software/web/src/App.tsx
@@ -31,7 +31,7 @@ function RequireAuth({ children }: { children: React.ReactNode }) {
return null; // 等待恢复完成
}
if (!isAuthenticated) {
- return ;
+ return ;
}
return <>{children}>;
}
@@ -40,7 +40,7 @@ function RequireAuth({ children }: { children: React.ReactNode }) {
function RedirectIfAuth({ children }: { children: React.ReactNode }) {
const { isAuthenticated } = useAuthStore();
if (isAuthenticated) {
- return ;
+ return ;
}
return <>{children}>;
}
@@ -86,7 +86,7 @@ export default function App() {
{/* 默认重定向到 Dashboard */}
- } />
+ } />
);
diff --git a/software/web/src/layouts/AdminLayout.tsx b/software/web/src/layouts/AdminLayout.tsx
index 6883816..7c4fee9 100644
--- a/software/web/src/layouts/AdminLayout.tsx
+++ b/software/web/src/layouts/AdminLayout.tsx
@@ -81,7 +81,7 @@ export default function AdminLayout() {
const handleLogout = () => {
logout();
- navigate('/login');
+ navigate('login');
};
const dropList = (
diff --git a/software/web/src/pages/Login.tsx b/software/web/src/pages/Login.tsx
index 5490025..21b18f4 100644
--- a/software/web/src/pages/Login.tsx
+++ b/software/web/src/pages/Login.tsx
@@ -16,7 +16,7 @@ export default function Login() {
try {
await login(values);
Message.success('登录成功');
- navigate('/dashboard', { replace: true });
+ navigate('dashboard', { replace: true });
} catch {
Message.error('手机号或密码错误');
} finally {
diff --git a/software/web/src/pages/devices/cabinet.tsx b/software/web/src/pages/devices/cabinet.tsx
index 68ff9e7..402b386 100644
--- a/software/web/src/pages/devices/cabinet.tsx
+++ b/software/web/src/pages/devices/cabinet.tsx
@@ -138,7 +138,7 @@ export default function CabinetDetail() {
}
- onClick={() => navigate('/devices')}
+ onClick={() => navigate('devices')}
>
返回