|
@@ -282,14 +282,12 @@ service.interceptors.response.use(
|
|
const _index = errorData.findIndex(e => e.url === config.url && e.time === +config.headers.timestamp)
|
|
const _index = errorData.findIndex(e => e.url === config.url && e.time === +config.headers.timestamp)
|
|
if (_index > -1) {
|
|
if (_index > -1) {
|
|
const _d = errorData.splice(_index, 1)
|
|
const _d = errorData.splice(_index, 1)
|
|
- // const _item = JSON.parse(JSON.stringify(errorData[_index]))
|
|
|
|
const _item = _d[0]
|
|
const _item = _d[0]
|
|
// 保存错误信息
|
|
// 保存错误信息
|
|
if (code === 400) {
|
|
if (code === 400) {
|
|
sendError({ content: JSON.stringify(_item.content), mark: _item.time + '' })
|
|
sendError({ content: JSON.stringify(_item.content), mark: _item.time + '' })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // errorData.splice(_index, 1)
|
|
|
|
if (code !== 200) {
|
|
if (code !== 200) {
|
|
Snackbar.error(msg)
|
|
Snackbar.error(msg)
|
|
return Promise.reject(msg)
|
|
return Promise.reject(msg)
|