| | |
| | | res => { |
| | | /* //对响应数据做些事 */ |
| | | if (res.data && res.statusText !== 'OK' && res.status !== 200) { |
| | | console.log('听说你对相应数据做了些事', res) |
| | | Notification({ |
| | | title: '', |
| | | message: res.data.message, |
| | |
| | | // } else { |
| | | // window.sessionStorage.setItem('policeCameravideoIsLoginTimeout', JSON.stringify(true)) |
| | | // } |
| | | |
| | | return res.data ? res.data : {} |
| | | |
| | | /* //return res.data ? res.data : {}; */ |
| | |
| | | case 401: |
| | | errJson.status = error.response.status |
| | | errJson.message = '未授权,请重新登录(401)' |
| | | window.parent.postMessage({ |
| | | msg: "logout" |
| | | }, '*') |
| | | // console.log("标志位:",AuthData.isLoginout) |
| | | // if (!AuthData.isLoginout) { |
| | | // Notification({ |
| | |
| | | errJson.message = `连接出错(${error.response.status})!` |
| | | } |
| | | |
| | | if (errJson.status >= 400 && errJson.status < 500) { |
| | | // 跳转错误页面 |
| | | // router.push({ |
| | | // path: "/error", |
| | | // query: errJson |
| | | // }); |
| | | } else { |
| | | // 服务器错误退出系统,弹窗提示 |
| | | // Message({ |
| | | // showClose: true, |
| | | // message: errJson.message, |
| | | // type: "error" |
| | | // }); |
| | | // router.push({ |
| | | // path: "/login" |
| | | // }); |
| | | } |
| | | } else { |
| | | errJson.message = '连接服务器失败!' |
| | | Notification({ |