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 () { getMenu () {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$http.get('sarUser/user/menu', { this.$http.get('sarUser/user/menu', {
userId: this.$store.getters.userInfo.userId, userId: this.$store.getters.userInfo.userId,
}, { }, {
_this: this, _this: this,
}, res => { }, res => {
@@ -117,7 +117,7 @@
mounted () { mounted () {
let url = window.location.search let url = window.location.search
let code = ""; let code = "";
if(url){ if(url && url.indexOf("code") !== -1){
url = url.substr(1); url = url.substr(1);
url = url.split('&'); url = url.split('&');
let info = []; let info = [];
@@ -129,27 +129,32 @@
} }
code = url[0].code code = url[0].code
} }
let _formData = new FormData() if(code !== undefined && code !== ""){
_formData.append('code', code === undefined ? "" : code) let _formData = new FormData()
loginIdm(_formData).then(res => { _formData.append('code', code === undefined ? "" : code)
if (res.ok) { loginIdm(_formData).then(res => {
this.loginNew(res) if (res.ok) {
} else { this.loginNew(res)
if(res.respCode && res.respCode === 'r0011'){ } else {
this.$message.warning('系统无权限访问') if(res.respCode && res.respCode === 'r0011'){
this.$store.dispatch('logout') this.$message.warning('系统无权限访问')
this.$alert('您没有系统访问权限,请联系管理员进行授权', '提示', { this.$store.dispatch('logout')
confirmButtonText: '确定', this.$alert('您没有系统访问权限,请联系管理员进行授权', '提示', {
type: 'warning', confirmButtonText: '确定',
showClose: false, type: 'warning',
showCancelButton: false, showClose: false,
}).then(() => { showCancelButton: false,
window.location.href = ssoLogoutUrlDev }).then(() => {
}) window.location.href = ssoLogoutUrlDev
// window.location.href = 'http://sso.foton.com.cn/logout?service=' })
// 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 !== '') { if (this.$store.state.laws_urm !== '') {
this.isRemember = true this.isRemember = true