|
@@ -131,13 +131,14 @@ const errorHandler = error => {
|
|
|
default:
|
|
default:
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
|
|
+ return Promise.reject(data)
|
|
|
} else {
|
|
} else {
|
|
|
notification.error({
|
|
notification.error({
|
|
|
description: '您的网络发生异常,无法连接服务器',
|
|
description: '您的网络发生异常,无法连接服务器',
|
|
|
message: '网络异常'
|
|
message: '网络异常'
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
- return data
|
|
|
|
|
|
|
+ return Promise.reject(error)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const authHeaderInterceptor = (url, options) => {
|
|
const authHeaderInterceptor = (url, options) => {
|
|
@@ -163,7 +164,7 @@ export const request: RequestConfig = {
|
|
|
cache: 'no-cache',
|
|
cache: 'no-cache',
|
|
|
errorConfig: {
|
|
errorConfig: {
|
|
|
adaptor: resData => {
|
|
adaptor: resData => {
|
|
|
- if (resData.code === consts.RET_CODE.SUCCESS) {
|
|
|
|
|
|
|
+ if (notificationLimit !== 0 && resData.code === consts.RET_CODE.SUCCESS) {
|
|
|
notificationLimit = 0
|
|
notificationLimit = 0
|
|
|
}
|
|
}
|
|
|
return {
|
|
return {
|