mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
修改loading接口超时处理问题
This commit is contained in:
@@ -34,7 +34,7 @@ const refreshToken = function(token){
|
||||
const boeLogin = function(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{
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
data(){
|
||||
return {
|
||||
curToken:'',
|
||||
toUrl:''
|
||||
toUrl:'',
|
||||
onceTimeout:false
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
@@ -51,6 +52,12 @@
|
||||
}else{
|
||||
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