后台:修复

This commit is contained in:
luying
2021-12-18 13:13:52 +08:00
parent 0456f2339f
commit 4c41224c9b
2 changed files with 12 additions and 3 deletions

View File

@@ -77,8 +77,8 @@ export default (appInfo: EggAppInfo) => {
};
let regions = [ // 大区数据
{ id: 1, env: 'stable', name: "常山少年", domain: 'http://pinus_gm_test.trgame.cn' },
{ id: 2, env: 'alpha', name: "测试服", domain: 'http://zyz_gm.trgame.cn' },
{ id: 1, env: 'stable', name: "常山少年", domain: 'http://zyz_gm.trgame.cn' },
{ id: 2, env: 'alpha', name: "测试服", domain: 'http://pinus_gm_test.trgame.cn' },
{ id: 3, env: 'dev', name: "开发服", domain: 'http://zyzdev_gm.trgame.cn' }
];
config.regions = regions;
@@ -94,6 +94,15 @@ export default (appInfo: EggAppInfo) => {
return path.replace(`/api/${env}`, '/api')
}
}
httpProxy[`/web/${env}`] = {
target: domain,
changeOrigin: true,
secure: true,
pathRewrite: function(path) {
console.log('proxy', path, path.replace(`/web/${env}`, '/web'))
return path.replace(`/web/${env}`, '/web')
}
}
}
config.proxy = httpProxy;