Просмотр исходного кода

Merge branch 'dev' of http://192.168.1.41:3000/outaozhen/cldV2react into dev

outaozhen 4 лет назад
Родитель
Сommit
0e8cf77275
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      src/app.tsx

+ 3 - 2
src/app.tsx

@@ -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 {