From 2762603d467165368f53f299b911c753f09dd563 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期六, 30 三月 2024 16:29:40 +0800
Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/crm-web into dev
---
src/common/untils/request.js | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/src/common/untils/request.js b/src/common/untils/request.js
index 9b321b2..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.8.111:8081`
+ dev: `//192.168.8.108:8080`
}
return loginPathMap[environmentType()]
@@ -74,13 +74,25 @@
return res
} else if([2012,2013,2014,2015].includes(res.data.code)){
if (isDev){
- alert("JWT澶辨晥")
- // window.location = getApsPage()+'/'
+ alert("JWT澶辨晥,鍗冲皢璺宠浆鑷崇櫥褰曢〉..")
+ window.location = getApsPage()+'/login'
}else {
// JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉
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,
@@ -93,8 +105,8 @@
(error) => {
if (error.response.status === 401){
if (isDev){
- alert("JWT澶辨晥")
- // window.location = getApsPage()+'/'
+ alert("JWT澶辨晥,鍗冲皢璺宠浆鑷崇櫥褰曢〉..")
+ window.location = getApsPage()+'/login'
}else {
// JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉
window.location = getApsPage()+'/login'
--
Gitblit v1.8.0