| | |
| | | // 添加响应拦截器 |
| | | service.interceptors.response.use( |
| | | (response) => { |
| | | // if (response.config.url?.indexOf('/lingyang/login') == -1 && response.config.url?.indexOf('/edgp/loginDemo') == -1 && response.config.url?.indexOf('/lingyang/loginDemo') == -1 && response.config.url?.indexOf('/edgp/login') == -1) { |
| | | if (response.config.url?.indexOf('/lingyang/login') == -1 && response.config.url?.indexOf('/edgp/loginDemo') == -1 && response.config.url?.indexOf('/lingyang/loginDemo') == -1 && response.config.url?.indexOf('/edgp/login') == -1) { |
| | | loading.clear(); |
| | | // } |
| | | } |
| | | if (response.data.code === 401) { // 处理登录过期 |
| | | Toast.fail({ message: '登录过期,准备自动重新登录', duration: 2000, forbidClick: true }) |
| | | setTimeout(() => { |