From cfa352ecb7b482ff2da5bfb5765131afe18ac0d7 Mon Sep 17 00:00:00 2001 From: qsh <> Date: Tue, 13 May 2025 14:48:18 +0800 Subject: [PATCH] sc --- .env.base | 4 ++-- src/router/modules/remaining.ts | 4 ++-- src/views/Login/components/LoginForm.vue | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.env.base b/.env.base index 5a22736..0552a5a 100644 --- a/.env.base +++ b/.env.base @@ -6,9 +6,9 @@ VITE_DEV=true # 请求路径 # VITE_BASE_URL='http://localhost:48080' -VITE_BASE_URL='http://47.98.161.246:48080' +# VITE_BASE_URL='http://47.98.161.246:48080' # VITE_BASE_URL='http://114.55.169.15:48080' -# VITE_BASE_URL='http://114.215.207.150:48080' +VITE_BASE_URL='http://114.215.207.150:48080' # 上传路径 VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload' diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 6853d40..1d5f990 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -51,7 +51,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ } }, { - path: '', + path: '/', component: Layout, redirect: '/index', name: '', @@ -60,7 +60,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, children: [ { - path: 'index', + path: '/index', component: () => import('@/views/Home/index.vue'), name: 'Home', meta: { diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue index 72b313a..22b9b61 100644 --- a/src/views/Login/components/LoginForm.vue +++ b/src/views/Login/components/LoginForm.vue @@ -115,7 +115,6 @@ import { ElLoading } from 'element-plus' import { useIcon } from '@/hooks/web/useIcon' import * as authUtil from '@/utils/auth' -import { usePermissionStore } from '@/store/modules/permission' import * as LoginApi from '@/api/login' import { LoginStateEnum, useFormValid, useLoginState } from './useLogin' @@ -127,7 +126,6 @@ const formLogin = ref() const { validForm } = useFormValid(formLogin) const { setLoginState, getLoginState } = useLoginState() const { currentRoute, push } = useRouter() -const permissionStore = usePermissionStore() const redirect = ref('') const loginLoading = ref(false) const verify = ref() @@ -217,7 +215,7 @@ const handleLogin = async (params) => { if (redirect.value.indexOf('sso') !== -1) { window.location.href = window.location.href.replace('/login?redirect=', '') } else { - push({ path: redirect.value || permissionStore.addRouters[0].path }) + push({ path: redirect.value || '/index' }) } } catch { loginLoading.value = false