feat: There is no way the, idm 登陆验证 修改小逻辑

This commit is contained in:
super_liu
2022-04-08 08:52:50 +08:00
parent 79ed0e799a
commit 8808629f9e
+27 -22
View File
@@ -30,7 +30,7 @@
getMenu () {
return new Promise((resolve, reject) => {
this.$http.get('sarUser/user/menu', {
userId: this.$store.getters.userInfo.userId,
userId: this.$store.getters.userInfo.userId,
}, {
_this: this,
}, res => {
@@ -117,7 +117,7 @@
mounted () {
let url = window.location.search
let code = "";
if(url){
if(url && url.indexOf("code") !== -1){
url = url.substr(1);
url = url.split('&');
let info = [];
@@ -129,27 +129,32 @@
}
code = url[0].code
}
let _formData = new FormData()
_formData.append('code', code === undefined ? "" : code)
loginIdm(_formData).then(res => {
if (res.ok) {
this.loginNew(res)
} else {
if(res.respCode && res.respCode === 'r0011'){
this.$message.warning('系统无权限访问')
this.$store.dispatch('logout')
this.$alert('您没有系统访问权限,请联系管理员进行授权', '提示', {
confirmButtonText: '确定',
type: 'warning',
showClose: false,
showCancelButton: false,
}).then(() => {
window.location.href = ssoLogoutUrlDev
})
// window.location.href = 'http://sso.foton.com.cn/logout?service='
if(code !== undefined && code !== ""){
let _formData = new FormData()
_formData.append('code', code === undefined ? "" : code)
loginIdm(_formData).then(res => {
if (res.ok) {
this.loginNew(res)
} else {
if(res.respCode && res.respCode === 'r0011'){
this.$message.warning('系统无权限访问')
this.$store.dispatch('logout')
this.$alert('您没有系统访问权限,请联系管理员进行授权', '提示', {
confirmButtonText: '确定',
type: 'warning',
showClose: false,
showCancelButton: false,
}).then(() => {
window.location.href = ssoLogoutUrlDev
})
// window.location.href = 'http://sso.foton.com.cn/logout?service='
}
}
}
})
})
}else {
this.$router.push('/home2')
// window.location.href = ssoLogoutUrlDev
}
if (this.$store.state.laws_urm !== '') {
this.isRemember = true