diff --git a/src/App.vue b/src/App.vue index d0911b674..369bd74f9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -217,7 +217,8 @@ export default { && this.$route.name !== 'nuoBLogin' && this.$route.name !== 'sTLogin' && this.$route.name !== 'StandardSearch' && this.$route.name !== 'phoneIndex' && this.$route.name !== 'AdvancedSearchExternal' && this.$route.name !== 'LoginVerifyNoEncryption' - && this.$route.name !== 'blankPage' && this.$route.name !== 'processedPage') { + && this.$route.name !== 'blankPage' && this.$route.name !== 'processedPage' + && this.$route.name !== 'loginStandDetails' && this.$route.name !== 'error') { this.isBoolean = true } else { this.isBoolean = false diff --git a/src/main.js b/src/main.js index 901cd0ebd..a9c6ae19b 100644 --- a/src/main.js +++ b/src/main.js @@ -72,15 +72,11 @@ router.beforeEach(function (to, from, next) { } let toName = to.name - if (toName === 'CheckPage') { + if (toName === 'CheckPage' || toName === 'loginStandDetails' || toName === 'error') { next() return } - if (toName === 'loginStandDetails') { - next() - } - if(webLoginType === 'idm' && toName === 'Login'){ window.location.href = ssoLoginUrlDev } diff --git a/src/pages/loginStandDetails/common/error.vue b/src/pages/loginStandDetails/common/error.vue new file mode 100644 index 000000000..8169bf6a4 --- /dev/null +++ b/src/pages/loginStandDetails/common/error.vue @@ -0,0 +1,46 @@ + + + + + + diff --git a/src/pages/loginStandDetails/index.vue b/src/pages/loginStandDetails/index.vue index a8f390bb7..22679b85f 100644 --- a/src/pages/loginStandDetails/index.vue +++ b/src/pages/loginStandDetails/index.vue @@ -22,15 +22,7 @@ }, methods: { logout(){ - this.$store.dispatch('logout') - this.$alert('您没有系统访问权限,请联系管理员进行授权', '提示', { - confirmButtonText: '确定', - type: 'warning', - showClose: false, - showCancelButton: false, - }).then(() => { - window.location.href = ssoLogoutUrlDev - }) + this.$router.push('error') }, /** * @description: 获取菜单logout @@ -166,7 +158,7 @@ if (res.ok) { this.loginNew(res) } else { - if(res.respCode && res.respCode === 'r0011'){ + if(res.respCode && (res.respCode === 'r0011' || res.respCode === '-1')){ this.logout() } } diff --git a/src/pages/loginVerifyNoEncryption/index.vue b/src/pages/loginVerifyNoEncryption/index.vue index 0a3cf1066..88221cd38 100644 --- a/src/pages/loginVerifyNoEncryption/index.vue +++ b/src/pages/loginVerifyNoEncryption/index.vue @@ -23,15 +23,7 @@ }, methods: { logout(){ - this.$store.dispatch('logout') - this.$alert('您没有系统访问权限,请联系管理员进行授权', '提示', { - confirmButtonText: '确定', - type: 'warning', - showClose: false, - showCancelButton: false, - }).then(() => { - window.location.href = ssoLogoutUrlDev - }) + this.$router.push('error') }, /** * @description: 获取菜单logout diff --git a/src/router/index.js b/src/router/index.js index 4cc9bfae4..aba27e034 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -66,6 +66,12 @@ const routes = [ component: () => import('@/pages/loginStandDetails') }, + { + path: '/error', + name: 'error', + component: () => + import('@/pages/loginStandDetails/common/error.vue') + }, { path: '/loginVerifyNoEncryption', name: 'LoginVerifyNoEncryption',