feat: update

This commit is contained in:
landaiqing
2024-07-23 11:00:17 +08:00
parent 757f494f1f
commit 8fa1c50fb3
3 changed files with 21 additions and 20 deletions

View File

@@ -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'

View File

@@ -53,7 +53,7 @@ import MyFavorites from "@/router/modules/main/user/myFavorites";
const routes: RouteObject[] = [
{
path: "/",
Component: (props) => ComponentLoading(Home, props),
element: <Navigate to={"/home"} />,
},
{
path: "/register",

View File

@@ -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) ||