diff --git a/.env.production b/.env.production index 03d1f42..591b84b 100644 --- a/.env.production +++ b/.env.production @@ -1,18 +1,18 @@ -# 生产环境配置 -VITE_NODE_ENV='production' -# 生产环境 -VITE_APP_BASE_API='/api' - -# 页面 title 前缀 -VITE_APP_TITLE=生产环境 - -# 网络请求公用地址 -VITE_API_BASE_URL='http://1.95.0.111:3000' - -VITE_TITLE_NAME='五味子云存储' - -# token key -VITE_APP_TOKEN_KEY='schisandra' - -# the upload url -VITE_UPLOAD_URL='http://1.95.0.111:3000' +# 生产环境配置 +VITE_NODE_ENV='production' +# 生产环境 +VITE_APP_BASE_API='/api' + +# 页面 title 前缀 +VITE_APP_TITLE=生产环境 + +# 网络请求公用地址 +VITE_API_BASE_URL='http://1.95.0.111:5050' + +VITE_TITLE_NAME='五味子云存储' + +# token key +VITE_APP_TOKEN_KEY='schisandra' + +# the upload url +VITE_UPLOAD_URL='http://1.95.0.111:5050' diff --git a/src/router/routes.tsx b/src/router/routes.tsx index 76a1737..f007755 100644 --- a/src/router/routes.tsx +++ b/src/router/routes.tsx @@ -53,7 +53,7 @@ import MyFavorites from "@/router/modules/main/user/myFavorites"; const routes: RouteObject[] = [ { path: "/", - Component: (props) => ComponentLoading(Home, props), + element: , }, { path: "/register", diff --git a/src/router/useAuth.tsx b/src/router/useAuth.tsx index 46d5815..3b68994 100644 --- a/src/router/useAuth.tsx +++ b/src/router/useAuth.tsx @@ -14,7 +14,8 @@ export default function AuthRoute(props: { children: React.ReactNode }) { currentPath === "/404" || (currentPath === "/register" && !isLogin) || (currentPath === "/forget" && !isLogin) || - (currentPath === "/" && !isLogin); + (currentPath === "/" && !isLogin) || + (currentPath === "/home" && !isLogin); // 登录后访问login const conditionWithLogin: boolean = (currentPath === "/login" && isLogin) ||