|
@@ -67,9 +67,31 @@
|
|
|
created() {
|
|
|
let url = window.location.href
|
|
|
if (url.indexOf('token') != -1) {
|
|
|
- console.log('找到了====>')
|
|
|
+ // console.log('找到了====>token')
|
|
|
setToken(url.split('=')[1])
|
|
|
this.getInfo();
|
|
|
+ } else if (url.indexOf('code') != -1) {
|
|
|
+ // console.log('找到了====>code')
|
|
|
+ //异常状态处理
|
|
|
+ if(url.split('=')[1] == '10100'){
|
|
|
+ //10100 用户信息不存在
|
|
|
+ this.$alert('当前用户不存在,请联系管理员!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ callback: action => {
|
|
|
+ localStorage.removeItem('serviceType');
|
|
|
+ store.dispatch('LogOut').then(() => {})
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else if(url.split('=')[1] == '500'){
|
|
|
+ //用户服务异常
|
|
|
+ this.$alert('服务异常,请稍候再试!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ callback: action => {
|
|
|
+ localStorage.removeItem('serviceType');
|
|
|
+ store.dispatch('LogOut').then(() => {})
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
console.log('没找到---->')
|
|
|
// this.ssoGetLoginUser()
|