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

This commit is contained in:
super_liu
2022-06-09 11:55:33 +08:00
parent d866424f2e
commit 82441268a1
5 changed files with 25 additions and 47 deletions
+13 -33
View File
@@ -8,7 +8,7 @@
import axios from 'axios'
import util from 'util'
import { get_verify_by_instance,loginIdm,getMenu,checkPageNoEncryption } from 'api/process'
import { getUserInfoByAuthCode,getIftappCodeByWelinkCode } from 'api/phoneWeLink'
import { getTokenToWeLink } from 'api/phoneWeLink'
import { ssoLoginUrlDev,ssoLogoutUrlDev,ssoLoginUrl,webLoginType,devWebUrl } from '@/sysConfig'
import HWH5 from '../../api/hwh5-cloudonline.js';
@@ -105,40 +105,20 @@
console.log(data)
if(data){
let code = data.code
console.log(code)
getIftappCodeByWelinkCode({
getTokenToWeLink({
code: code,
name: encodeURIComponent("standards regulations"),
name: encodeURIComponent("standards"+"-"+"regulations"),
type:"",
corpCode:"",
}, {
_this: this
}).then(res => {
console.log(res)
if(res.data){
getUserInfoByAuthCode({
code: code,
}).then(res => {
console.log(res)
if(res.data){
let userName = res.data.username;
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 {
this.logout()
}
})
if (res.ok) {
this.loginNew(res)
} else {
if(res.respCode && res.respCode === 'r0011'){
this.logout()
}
}
})
}