From 504e00da9a9898ac419e97f93fc66cc7c7c6f620 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期三, 28 二月 2024 14:30:25 +0800
Subject: [PATCH] 服务合同-去掉产品为空的判断增加保存时去掉未选择产品的对象

---
 src/common/untils/request.js |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/common/untils/request.js b/src/common/untils/request.js
index d7bf74b..7bfc4d3 100644
--- a/src/common/untils/request.js
+++ b/src/common/untils/request.js
@@ -33,7 +33,7 @@
         prod:`//${window.location.hostname}:9080`,
         test:`//192.168.20.119:9080`,
         // 鎯宠烦鍒版湰鍦板惎鍔ㄧ殑鐧诲綍椤电殑璇濋渶瑕佹妸dev鏀规垚浣犳湰鍦伴」鐩矾寰�
-        dev: `//192.168.20.158:8080`
+        dev: `//192.168.8.108:8080`
     }
 
     return loginPathMap[environmentType()]
@@ -64,7 +64,11 @@
   (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
@@ -77,6 +81,18 @@
         window.location = getApsPage()+'/login'
       }
       return Promise.reject(res.data)
+    }else if([2036].includes(res.data.code)){
+      if (isDev){
+        window.location = getApsPage()+'/commonWeb?resetPwd=true'
+      }else {
+        //   JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉
+        window.location = getApsPage()+'/commonWeb?resetPwd=true'
+      }
+      return Promise.reject(res.data)
+
+      // if(window.location.pathname && window.location.pathname !== '/login'){
+      //   window.location = window.location.origin+'/login'
+      // }
     } else {
       Message({
         message: res.data.msg,

--
Gitblit v1.8.0