|
@@ -76,6 +76,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<Verify
|
|
<Verify
|
|
|
|
+ v-if="loginData.captchaEnable === 'true'"
|
|
ref="verify"
|
|
ref="verify"
|
|
:captchaType="captchaType"
|
|
:captchaType="captchaType"
|
|
:imgSize="{ width: '400px', height: '200px' }"
|
|
:imgSize="{ width: '400px', height: '200px' }"
|
|
@@ -241,7 +242,7 @@ const getTenantByWebsite = async () => {
|
|
}
|
|
}
|
|
const loading = ref() // ElLoading.service 返回的实例
|
|
const loading = ref() // ElLoading.service 返回的实例
|
|
// 登录
|
|
// 登录
|
|
-const handleLogin = async (params) => {
|
|
|
|
|
|
+const handleLogin = async (params: any) => {
|
|
loginLoading.value = true
|
|
loginLoading.value = true
|
|
try {
|
|
try {
|
|
await getTenantId()
|
|
await getTenantId()
|
|
@@ -273,7 +274,7 @@ const handleLogin = async (params) => {
|
|
if (redirect.value.indexOf('sso') !== -1) {
|
|
if (redirect.value.indexOf('sso') !== -1) {
|
|
window.location.href = window.location.href.replace('/login?redirect=', '')
|
|
window.location.href = window.location.href.replace('/login?redirect=', '')
|
|
} else {
|
|
} else {
|
|
- push({ path: redirect.value || permissionStore.addRouters[0].path })
|
|
|
|
|
|
+ await push({ path: redirect.value || permissionStore.addRouters[0].path })
|
|
}
|
|
}
|
|
} finally {
|
|
} finally {
|
|
loginLoading.value = false
|
|
loginLoading.value = false
|
|
@@ -313,8 +314,7 @@ const doSocialLogin = async (type: number) => {
|
|
encodeURIComponent(`type=${type}&redirect=${redirect.value || '/'}`)
|
|
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(
|
|
watch(
|