Commit 72d44a52 authored by 崔佳豪's avatar 崔佳豪

fix: 切换站点无首页异常问题

parent bf8c0f9d
Pipeline #47395 passed with stages
in 12 minutes 40 seconds
......@@ -8,6 +8,16 @@ const proxyURL = 'https://panda-water.cn';
module.exports = {
assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
dev: {
'PandaWater':{
target: proxyURL,
changeOrigin: true,
headers: {
'Access-Control-Allow-Origin': '*',
},
pathRewrite: {
'/PandaWater': '/PandaWater',
},
},
'/Panda_GIS': {
target: proxyURL,
changeOrigin: true,
......@@ -52,6 +62,16 @@ module.exports = {
'/cityinterface': '/cityinterface',
},
},
'/Cityinterface': {
target: proxyURL,
changeOrigin: true,
headers: {
'Access-Control-Allow-Origin': '*',
},
pathRewrite: {
'/Cityinterface': '/CityInterface',
},
},
'/cityjson': {
target: 'https://pv.sohu.com',
// target: 'http://192.168.19.102:8055',
......
......@@ -378,11 +378,12 @@ class Site {
self.props &&
self.props.updateComplexConfig &&
self.props.updateComplexConfig({});
// 切换站点,加载首页,否则默认加载web4
self.props.history &&
self.props.history.push(
self.globalConfig.homepage
? `/${self.globalConfig.homepage}`
: `/?client=${self.globalConfig.client}`,
: `/civweb4`,
);
// window.location.reload();
window.share.event.emit('triggerMicro', this.props.global);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment