提供新的路径
This commit is contained in:
@@ -14,7 +14,10 @@ instance.interceptors.request.use(config => {
|
|||||||
config.url = config.url.replace(/(app|auth|admin)\//, "api/")
|
config.url = config.url.replace(/(app|auth|admin)\//, "api/")
|
||||||
}
|
}
|
||||||
if (/\/grid\//.test(location.pathname)) {
|
if (/\/grid\//.test(location.pathname)) {
|
||||||
config.baseURL = '/grid'
|
config.baseURL = '/wangge'
|
||||||
|
}
|
||||||
|
if (/\/project\/police\//.test(location.pathname)) {
|
||||||
|
config.baseURL = '/hnjc'
|
||||||
}
|
}
|
||||||
if (sessionStorage.getItem("prj") == "saas") {
|
if (sessionStorage.getItem("prj") == "saas") {
|
||||||
config.url = config.url.replace(/(app|auth|admin)\//, "api/")
|
config.url = config.url.replace(/(app|auth|admin)\//, "api/")
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/online": {
|
"/online": {
|
||||||
"target": "https://test87xcxc.cunwuyun.cn",
|
"target": "http://192.168.1.34:19898",
|
||||||
"changeOrigin": true,
|
"changeOrigin": true,
|
||||||
"pathRewrite": {
|
"pathRewrite": {
|
||||||
"^/online": "/"
|
"^/online": "/"
|
||||||
@@ -57,11 +57,18 @@
|
|||||||
"^/online/tmap/": "/"
|
"^/online/tmap/": "/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/grid": {
|
"/wangge": {
|
||||||
"target": "http://192.168.1.87:12307",
|
"target": "http://192.168.1.34:10000/",
|
||||||
"changeOrigin": true,
|
"changeOrigin": true,
|
||||||
"pathRewrite": {
|
"pathRewrite": {
|
||||||
"^/grid": "/"
|
"^/wangge": "/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/hnjc": {
|
||||||
|
"target": "http://192.168.1.87:12001/",
|
||||||
|
"changeOrigin": true,
|
||||||
|
"pathRewrite": {
|
||||||
|
"^/hnjc": "/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user