Commit c8e8f510 authored by 崔佳豪's avatar 崔佳豪

fix: 获取网关配置接口修改

parent e6fddbf1
Pipeline #47486 skipped with stages
......@@ -8,7 +8,17 @@ const proxyURL = 'https://panda-water.cn';
module.exports = {
assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
dev: {
'PandaWater':{
'/PandaOMS':{
target: proxyURL,
changeOrigin: true,
headers: {
'Access-Control-Allow-Origin': '*',
},
pathRewrite: {
'/PandaOMS': '/PandaOMS',
},
},
'/PandaWater':{
target: proxyURL,
changeOrigin: true,
headers: {
......
......@@ -12,25 +12,31 @@ instanceRequest.transformRequestURL = function(url) {
const excludeURL = [
'/PandaCore/GCK/Basis/GateWayConfig',
'/CityInterface/rest/services.svc/GetConfig',
'/PandaOMS/OMS/HostManager/GetGateWay',
'/Identity/AuthorizationToken'
];
if (excludeURL.includes(url)) {
return url;
}
if (
window.globalConfig &&
window.globalConfig.hasGateWay &&
/^\/(cityinterface|CityInterface|Cityinterface|CityServer|PandaInformatization)/.test(
url,
)
) {
return /\/CityInterface\/rest\/services.svc\/GetConfig/.test(url)
? url
? /^\/GateWay/.test(url)
? url
: `/GateWay${url}`
: `/GateWay${url}`
: `/GateWay${url}`;
// if (
// window.globalConfig &&
// window.globalConfig.hasGateWay &&
// /^\/(cityinterface|CityInterface|Cityinterface|CityServer|PandaInformatization)/.test(
// url,
// )
// ) {
// return /\/CityInterface\/rest\/services.svc\/GetConfig/.test(url)
// ? url
// ? /^\/GateWay/.test(url)
// ? url
// : `/GateWay${url}`
// : `/GateWay${url}`
// : `/GateWay${url}`;
// }
if(window.globalConfig && window.globalConfig.hasGateWay) {
return url && /^\/GateWay/.test(url) ? url : `/GateWay${url}`
}
return url;
};
......
......@@ -11,7 +11,7 @@ const transformGateWay = url => {
export const API = {
AUTHORIZATION_TOKEN: '/Identity/AuthorizationToken',
GET_GATEWAY_CONFIG: '/PandaCore/GCK/Basis/GateWayConfig',
GET_GATEWAY_CONFIG: '/PandaOMS/OMS/HostManager/GetGateWay',
GET_CONFIG: '/CityInterface/rest/services.svc/GetConfig',
GENERATE_TOKEN: '/cityinterface/rest/services.svc/generatetoken',
GENERATE_GATEWAT_TOKEN: '/GCK/Basis/GenerateToken',
......
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