Bläddra i källkod

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

outaozhen 4 år sedan
förälder
incheckning
0e8cf77275
1 ändrade filer med 3 tillägg och 2 borttagningar
  1. 3 2
      src/app.tsx

+ 3 - 2
src/app.tsx

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