feat: There is no way the, weblink 免登陆

This commit is contained in:
super_liu
2022-06-08 16:28:29 +08:00
parent 9b63fdc306
commit fce741acfc
+30 -18
View File
@@ -114,25 +114,37 @@
"Content-Type": "application/json",
},
}).then(res => {
if(res.code){
let userName = res.data.access_token;
if(userName !== undefined && userName !== ""){
checkPageNoEncryption({
username: userName
}, {
_this: this
}).then(res => {
if (res.ok) {
this.loginNew(res)
} else {
if(res.respCode && res.respCode === 'r0011'){
this.logout()
}
if(res.data){
axios.request({
url: 'https://iftappwelink.foton.com.cn/devserver/welink/getUserInfoByAuthCode?code='+code,
method: 'post',
headers: {
"Content-Type": "application/json",
},
}).then(res => {
if(res.data){
let userName = res.data.access_token;
if(userName !== undefined && userName !== ""){
checkPageNoEncryption({
username: userName
}, {
_this: this
}).then(res => {
if (res.ok) {
this.loginNew(res)
} else {
if(res.respCode && res.respCode === 'r0011'){
this.logout()
}
}
})
}else {
// window.location.href = ssoLogoutUrlDev
}
})
}else {
// window.location.href = ssoLogoutUrlDev
}
}else {
this.logout()
}
})
}
})
}