update 优化 三方登录不同域名问题 采用新方案
This commit is contained in:
@ -17,8 +17,9 @@ const loading = ref(true);
|
||||
const code = route.query.code as string;
|
||||
const state = route.query.state as string;
|
||||
const source = route.query.source as string;
|
||||
const tenantId = route.query.tenantId as string ? route.query.tenantId as string : '000000';
|
||||
const domain = route.query.domain as string;
|
||||
const stateJson = JSON.parse(atob(state));
|
||||
const tenantId = stateJson.tenantId as string ? stateJson.tenantId as string : '000000';
|
||||
const domain = stateJson.domain as string;
|
||||
|
||||
const processResponse = async (res: any) => {
|
||||
if (res.code !== 200) {
|
||||
@ -67,6 +68,7 @@ const init = async () => {
|
||||
let urlFull = new URL(window.location.href);
|
||||
urlFull.host = domain;
|
||||
window.location.href = urlFull.toString();
|
||||
return;
|
||||
}
|
||||
|
||||
const data: LoginData = {
|
||||
|
Reference in New Issue
Block a user