From d4e6d812bf1e9fa55ea62745983f0b2a878ed8aa Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期四, 31 三月 2022 10:24:33 +0800
Subject: [PATCH] 管理中心

---
 src/scripts/httpRequest.ts |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/scripts/httpRequest.ts b/src/scripts/httpRequest.ts
index 8ac414b..5fac11d 100644
--- a/src/scripts/httpRequest.ts
+++ b/src/scripts/httpRequest.ts
@@ -78,7 +78,10 @@
     //   window.sessionStorage.setItem('policeCameravideoIsLoginTimeout', JSON.stringify(true))
     // }
 
+
     return res.data ? res.data : {}
+
+   
 
     /* //return res.data ? res.data : {}; */
   },
@@ -157,16 +160,23 @@
 
     } else {
       errJson.message = '杩炴帴鏈嶅姟鍣ㄥけ璐�!'
-      Notification({
-        title: '',
-        showClose: true,
-        message: '杩炴帴鏈嶅姟鍣ㄥけ璐�!',
-        type: 'error'
-      })
+     
       // router.push({
       //   path: '/login'
       // });
     }
+    console.log(error.response);
+    
+    if(error.response&&error.response.data&&!error.response.data.success ) {
+      errJson.message =error.response.data.msg
+    }
+    
+     Notification({
+        title: '閿欒',
+        showClose: true,
+        message:errJson.message,
+        type: 'error'
+      })
     // 杩斿洖 response 閲岀殑閿欒淇℃伅
     return Promise.reject(errJson)
   }

--
Gitblit v1.8.0