| | |
| | | // window.sessionStorage.setItem('policeCameravideoIsLoginTimeout', JSON.stringify(true)) |
| | | // } |
| | | |
| | | |
| | | return res.data ? res.data : {} |
| | | |
| | | |
| | | |
| | | /* //return res.data ? res.data : {}; */ |
| | | }, |
| | |
| | | |
| | | } else { |
| | | errJson.message = '连接服务器失败!' |
| | | Notification({ |
| | | title: '', |
| | | showClose: true, |
| | | message: '连接服务器失败!', |
| | | type: 'error' |
| | | }) |
| | | |
| | | // router.push({ |
| | | // path: '/login' |
| | | // }); |
| | | } |
| | | console.log(error.response); |
| | | |
| | | if(error.response&&error.response.data&&!error.response.data.success ) { |
| | | errJson.message =error.response.data.msg |
| | | } |
| | | |
| | | Notification({ |
| | | title: '错误', |
| | | showClose: true, |
| | | message:errJson.message, |
| | | type: 'error' |
| | | }) |
| | | // 返回 response 里的错误信息 |
| | | return Promise.reject(errJson) |
| | | } |