Commit 81b90a4e authored by 张瑶's avatar 张瑶

fix:云平台兼容

parent 37f7c768
Pipeline #86365 waiting for manual action with stages
......@@ -64,14 +64,17 @@ class Login {
if (res.success === 'OK') {
const tk = res.token;
self.globalConfig.token = tk;
getUserInfo(
{
identity: tk,
subOID: 'subOID',
site: this.getLocalSiteBytoken(tk),
ignoreSite: true,
},
)
let param = {
subOID: 'subOID',
site: this.getLocalSiteBytoken(tk),
ignoreSite: true,
};
if (window.location?.host === 'panda-water.cn') {
param.token = tk;
} else {
param.identity = tk;
}
getUserInfo(param)
.then(response => {
try {
if (response && response.code === 0) {
......@@ -251,13 +254,18 @@ class Login {
this.globalConfig.token = token;
const self = this;
// eslint-disable-next-line no-undef
getUserInfo({
identity: this.globalConfig.token,
let param = {
subOID: 'subOID',
site: noTokenSite ?? this.getLocalSiteBytoken(token),
'request.preventCache': Date.now(),
ignoreSite: true,
})
};
if (window.location?.host === 'panda-water.cn') {
param.token = this.globalConfig.token;
} else {
param.identity = this.globalConfig.token;
}
getUserInfo(param)
.then(response => {
if (response && response.code === 0) {
self.globalConfig.userInfo = window?.globalConfig?.transformUserInfo?.(response.data) ?? {};
......@@ -997,13 +1005,18 @@ class Login {
const tk = response.token;
self.globalConfig.token = tk;
// eslint-disable-next-line no-undef,no-debugger
let param = {
subOID: 'subOID',
site: this.getLocalSiteBytoken(tk),
ignoreSite: true,
};
if (window.location?.host === 'panda-water.cn') {
param.token = tk;
} else {
param.identity = tk;
}
getUserInfo(
{
identity: tk,
subOID: 'subOID',
site: this.getLocalSiteBytoken(tk),
ignoreSite: true,
},
param,
// eslint-disable-next-line no-shadow
)
// eslint-disable-next-line no-shadow
......@@ -1112,8 +1125,7 @@ class Login {
}
if (self.isSignIn || !!industry) {
// eslint-disable-next-line no-undef
getUserInfo({
identity: token,
let param = {
subOID: 'subOID',
industry,
site: _industrySite || this.getLocalSiteBytoken(token),
......@@ -1121,7 +1133,13 @@ class Login {
'request.preventCache': Date.now(),
// self.globalConfig.userInfo.site ? self.globalConfig.userInfo.site: this.getLocalSiteBytoken(token),
// industrySite ? _industrySite : this.getLocalSiteBytoken(token),
})
};
if (window.location?.host === 'panda-water.cn') {
param.token = token;
} else {
param.identity = token;
}
getUserInfo(param)
.then(response => {
try {
if (response && response.code === 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment