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 ++++++------
vue.config.js | 2 +-
src/router/index.js | 2 +-
3 files changed, 8 insertions(+), 8 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
diff --git a/src/router/index.js b/src/router/index.js
index 3bb911a..64070cf 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -101,7 +101,7 @@
// 瀵煎嚭璺敱 鍦� main.js 閲屼娇鐢�
const createRouter = () =>
new Router({
- mode: "history",
+ mode: "hash",
// base: window.getServerJson.context,
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
diff --git a/vue.config.js b/vue.config.js
index decc78e..ca14ef3 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,6 +1,6 @@
const path = require("path")
// 鍩虹璺緞 娉ㄦ剰鍙戝竷涔嬪墠瑕佸厛淇敼杩欓噷
-const publicPath = "/"
+const publicPath = "./"
function resolve(dir) {
return path.join(__dirname, dir)
}
--
Gitblit v1.8.0