修改loading接口超时处理问题

This commit is contained in:
nisen
2023-11-22 17:00:12 +08:00
parent 8105682cd0
commit 0ae85485a4
2 changed files with 9 additions and 2 deletions

View File

@@ -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{

View File

@@ -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()
}
})
}
}