From 51cffa4e03a9bd0af8cfa03b4090b8f25493de96 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 28 Dec 2024 20:30:51 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E7=99=BB=E5=BD=95=E7=95=8C=E9=9D=A2=EF=BC=8C=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E7=A6=81=E7=94=A8=E9=AA=8C=E8=AF=81=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=88=9D=E5=A7=8B=E5=8C=96=20Verify=20=E7=BB=84?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login/index.ts | 1 + src/views/Login/SocialLogin.vue | 1 + src/views/Login/components/LoginForm.vue | 8 ++++---- src/views/Login/components/RegisterForm.vue | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/api/login/index.ts b/src/api/login/index.ts index dec14fb3..33fddcab 100644 --- a/src/api/login/index.ts +++ b/src/api/login/index.ts @@ -77,6 +77,7 @@ export const socialAuthRedirect = (type: number, redirectUri: string) => { } // 获取验证图片以及 token export const getCode = (data) => { + debugger return request.postOriginal({ url: 'system/captcha/get', data }) } diff --git a/src/views/Login/SocialLogin.vue b/src/views/Login/SocialLogin.vue index 37c50da1..e0caace8 100644 --- a/src/views/Login/SocialLogin.vue +++ b/src/views/Login/SocialLogin.vue @@ -133,6 +133,7 @@ { } const loading = ref() // ElLoading.service 返回的实例 // 登录 -const handleLogin = async (params) => { +const handleLogin = async (params: any) => { loginLoading.value = true try { await getTenantId() @@ -273,7 +274,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 }) + await push({ path: redirect.value || permissionStore.addRouters[0].path }) } } finally { loginLoading.value = false @@ -313,8 +314,7 @@ const doSocialLogin = async (type: number) => { encodeURIComponent(`type=${type}&redirect=${redirect.value || '/'}`) // 进行跳转 - const res = await LoginApi.socialAuthRedirect(type, encodeURIComponent(redirectUri)) - window.location.href = res + window.location.href = await LoginApi.socialAuthRedirect(type, encodeURIComponent(redirectUri)) } } watch( diff --git a/src/views/Login/components/RegisterForm.vue b/src/views/Login/components/RegisterForm.vue index 334887da..73f276ca 100644 --- a/src/views/Login/components/RegisterForm.vue +++ b/src/views/Login/components/RegisterForm.vue @@ -85,6 +85,7 @@