| | |
| | | return Promise.reject(config) |
| | | }) |
| | | |
| | | uni.showLoading({ |
| | | title:"加载中..." |
| | | }) |
| | | // uni.showLoading({ |
| | | // title:"加载中..." |
| | | // }) |
| | | |
| | | http.interceptors.response.use((response) => { |
| | | |
| | | // 若有数据返回则通过 |
| | | if (response.data.access_token || response.data.key) { |
| | | return response.data |
| | |
| | | const currentPage = pages[pages.length - 1] |
| | | uni.setStorageSync("responIndex", 0) |
| | | uni.clearStorageSync() |
| | | |
| | | uni.redirectTo({ |
| | | url: `/pages/login/login-account?redirect=/${currentPage.route}` |
| | | }) |
| | |
| | | // } |
| | | // } |
| | | // }) |
| | | |
| | | |
| | | |
| | | }else { |
| | | uni.showToast({ |
| | | title: '系统繁忙,请稍后再试', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | return Promise.reject(response) |
| | | }) |