|
@@ -272,20 +272,18 @@ service.interceptors.response.use(
|
|
// 未注册过的手机号将code码返回
|
|
// 未注册过的手机号将code码返回
|
|
return Promise.reject(data)
|
|
return Promise.reject(data)
|
|
}
|
|
}
|
|
- if (code !== 200) {
|
|
|
|
- const _index = errorData.findIndex(e => e.url === config.url && e.time === +config.headers.timestamp)
|
|
|
|
- if (_index > -1) {
|
|
|
|
- const _item = errorData.splice(_index, 1)
|
|
|
|
- // 保存错误信息
|
|
|
|
|
|
+ const _index = errorData.findIndex(e => e.url === config.url && e.time === +config.headers.timestamp)
|
|
|
|
+ if (_index > -1) {
|
|
|
|
+ const _item = errorData.splice(_index, 1)
|
|
|
|
+ // 保存错误信息
|
|
|
|
+ if (code === 400) {
|
|
sendError({ content: JSON.stringify(_item.content), mark: _item.time + '' })
|
|
sendError({ content: JSON.stringify(_item.content), mark: _item.time + '' })
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+ if (code !== 200) {
|
|
Snackbar.error(msg)
|
|
Snackbar.error(msg)
|
|
return Promise.reject(msg)
|
|
return Promise.reject(msg)
|
|
}
|
|
}
|
|
- const _index = errorData.findIndex(e => e.url === config.url && e.time === +config.headers.timestamp)
|
|
|
|
- if (_index > -1) {
|
|
|
|
- errorData.splice(_index, 1)
|
|
|
|
- }
|
|
|
|
// 请求成功后触发获取积分
|
|
// 请求成功后触发获取积分
|
|
if (response.config.headers?.Authorization) {
|
|
if (response.config.headers?.Authorization) {
|
|
const url = getSuffixAfterPrefix(response.config.url)
|
|
const url = getSuffixAfterPrefix(response.config.url)
|