| | |
| | | |
| | | if(userinfo) |
| | | config.headers["X-Tenant-Id"] = userinfo.loginTenantId;
|
| | | }else{ |
| | | jumpToLogin(); |
| | | }
|
| | | console.log('========================================== ')
|
| | | console.log('== 请求数据:' + JSON.stringify(config))
|
| | |
| | | console.info(err)
|
| | | uni.hideLoading()
|
| | | //登录超时,重新登录
|
| | | if (err.response.status == 401) {
|
| | | if (err.response && err.response.status == 401) {
|
| | | uni.showToast({
|
| | | title: "登录状态已失效,重新登录!",
|
| | | icon: 'none',
|
| | | mask: true,
|
| | | complete: function (res) {
|
| | | setTimeout(()=>{
|
| | | jumpToLogin();
|
| | | },1000)
|
| | | |
| | | },
|
| | | });
|
| | | |
| | | }
|
| | | //发生网络错误后会走到这里
|
| | | //return Promise.resolve("ssss")
|