mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
修改loading接口超时处理问题
This commit is contained in:
@@ -34,7 +34,7 @@ const refreshToken = function(token){
|
|||||||
const boeLogin = function(token){
|
const boeLogin = function(token){
|
||||||
//return ajax.post('/xboe/account/boelogin',{token:token});
|
//return ajax.post('/xboe/account/boelogin',{token:token});
|
||||||
//登录时,新的用户接口调用查询用户信息
|
//登录时,新的用户接口调用查询用户信息
|
||||||
return ajax.post('/xboe/account/boenewlogin',{token:token});
|
return ajax.post('/xboe/account/boenewlogin',{token:token},{timeout: 20000});
|
||||||
}
|
}
|
||||||
|
|
||||||
export default{
|
export default{
|
||||||
|
|||||||
@@ -33,7 +33,8 @@
|
|||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
curToken:'',
|
curToken:'',
|
||||||
toUrl:''
|
toUrl:'',
|
||||||
|
onceTimeout:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
@@ -51,6 +52,12 @@
|
|||||||
}else{
|
}else{
|
||||||
this.$message.error("登录失败:"+rs.message);
|
this.$message.error("登录失败:"+rs.message);
|
||||||
}
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
console.log(error);
|
||||||
|
if(!this.onceTimeout){
|
||||||
|
this.onceTimeout = true;
|
||||||
|
this.boeLogin()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user