From 9d3f1aa7571cd532c0c27bf8376ebf4b2178a252 Mon Sep 17 00:00:00 2001 From: charles <981744753@qq.com> Date: 星期三, 24 七月 2024 17:45:45 +0800 Subject: [PATCH] fix:解决srm之前改了域名,处理各种异常状态,跳转也会出现异常等问题。 --- src/common/untils/request.js | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/untils/request.js b/src/common/untils/request.js index db1b3ec..10a0e72 100644 --- a/src/common/untils/request.js +++ b/src/common/untils/request.js @@ -67,10 +67,10 @@ } else if([2012,2013,2014,2015].includes(res.data.code)){ if (isDev){ alert("JWT澶辨晥,鍗冲皢璺宠浆鑷崇櫥褰曢〉..") - window.location = getApsPage()+'/login' + window.location ='http://'+ getApsPage()+'/login' }else { // JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉 - window.location = getApsPage()+'/login' + window.location ='http://'+ getApsPage()+'/login' } // Message({ // message: res.data.msg, @@ -80,10 +80,10 @@ return Promise.reject(res.data) }else if([2036].includes(res.data.code)){ if (isDev){ - window.location = getApsPage()+'/commonWeb?resetPwd=true' + window.location ='http://'+ getApsPage()+'/commonWeb?resetPwd=true' }else { // JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉 - window.location = getApsPage()+'/commonWeb?resetPwd=true' + window.location ='http://'+ getApsPage()+'/commonWeb?resetPwd=true' } return Promise.reject(res.data) @@ -96,10 +96,10 @@ if(error.response.status === 401){ if (isDev){ alert("JWT澶辨晥,鍗冲皢璺宠浆鑷崇櫥褰曢〉..") - window.location = getApsPage()+'/login' + window.location ='http://'+ getApsPage()+'/login' }else { // JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉 - window.location = getApsPage()+'/login' + window.location ='http://'+ getApsPage()+'/login' } } let { message } = error -- Gitblit v1.8.0