From 7924087566a4cbfc942b1d636b590edf4874efb0 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期三, 27 十二月 2023 17:38:08 +0800
Subject: [PATCH] 库存信息请求接口增加限制条件

---
 src/common/untils/request.js |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/common/untils/request.js b/src/common/untils/request.js
index 0911d0d..9b321b2 100644
--- a/src/common/untils/request.js
+++ b/src/common/untils/request.js
@@ -64,14 +64,18 @@
   (res) => {
     /* //瀵瑰搷搴旀暟鎹仛浜涗簨 */
     if (res.data.code === 200) {
-      return res.data ? res.data : {}
+      if(res.config.IsHeader){
+        return res;
+      }else{
+        return res.data ? res.data : {}
+      }
     } else if (res.data.code === 700001 || res.data.code === 700005) {
       console.log("瀹㈡埛鍚嶇О閲嶅")
       return res
     } else if([2012,2013,2014,2015].includes(res.data.code)){
       if (isDev){
         alert("JWT澶辨晥")
-        window.location = getApsPage()+'/'
+        // window.location = getApsPage()+'/'
       }else {
         //   JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉
         window.location = getApsPage()+'/login'
@@ -90,7 +94,7 @@
     if (error.response.status === 401){
       if (isDev){
         alert("JWT澶辨晥")
-        window.location = getApsPage()+'/'
+        // window.location = getApsPage()+'/'
       }else {
         //   JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉
         window.location = getApsPage()+'/login'

--
Gitblit v1.8.0