| | |
| | | |
| | | // 注册开关 |
| | | const register = ref(false); |
| | | const redirect = ref(undefined); |
| | | const redirect = ref('/'); |
| | | const loginRef = ref<ElFormInstance>(); |
| | | // 租户列表 |
| | | const tenantList = ref<TenantVO[]>([]); |
| | |
| | | watch( |
| | | () => router.currentRoute.value, |
| | | (newRoute: any) => { |
| | | redirect.value = newRoute.query && newRoute.query.redirect; |
| | | redirect.value = newRoute.query && decodeURIComponent(newRoute.query.redirect); |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | |
| | | * @param type |
| | | */ |
| | | const doSocialLogin = (type: string) => { |
| | | authBinding(type).then((res: any) => { |
| | | authBinding(type, loginForm.value.tenantId).then((res: any) => { |
| | | if (res.code === HttpStatus.SUCCESS) { |
| | | // 获取授权地址跳转 |
| | | window.location.href = res.data + '&tenantId=' + loginForm.value.tenantId; |
| | | window.location.href = res.data; |
| | | } else { |
| | | ElMessage.error(res.msg); |
| | | } |