diff --git a/src/permission.ts b/src/permission.ts index ca35b04..bb60701 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -59,6 +59,7 @@ const whiteList = [ // 路由加载前 router.beforeEach(async (to, from, next) => { + debugger start() loadStart() if (getAccessToken()) { diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue index 8591aef..b336472 100644 --- a/src/views/Login/components/LoginForm.vue +++ b/src/views/Login/components/LoginForm.vue @@ -82,7 +82,6 @@ mode="pop" @success="handleLogin" /> - @@ -173,7 +172,6 @@ const getCookie = () => { } } - // 根据域名,获得租户信息 const getTenantByWebsite = async () => { const website = location.host @@ -188,7 +186,6 @@ const loading = ref() // ElLoading.service 返回的实例 const handleLogin = async (params) => { loginLoading.value = true try { - const data = await validForm() if (!data) return @@ -209,9 +206,8 @@ const handleLogin = async (params) => { authUtil.removeLoginForm() } authUtil.setToken(res) - debugger + debugger if (!redirect.value) { - redirect.value = '/' } // 判断是否为SSO登录 @@ -234,6 +230,7 @@ const handleLogin = async (params) => { + } } finally { loginLoading.value = false