Commit 9739452c authored by 崔佳豪's avatar 崔佳豪

fix: 网关修改

parent e7c64539
Pipeline #47603 skipped with stages
......@@ -13,7 +13,7 @@ instanceRequest.transformRequestURL = function(url) {
'/PandaCore/GCK/Basis/GateWayConfig',
'/CityInterface/rest/services.svc/GetConfig',
'/PandaOMS/OMS/HostManager/GetGateWay',
'/Identity/AuthorizationToken'
'/PandaCore/Identity/AuthorizationToken'
];
if (excludeURL.includes(url)) {
return url;
......@@ -35,9 +35,9 @@ instanceRequest.transformRequestURL = function(url) {
// : `/GateWay${url}`;
// }
if(window.globalConfig && window.globalConfig.hasGateWay) {
return url && /^\/GateWay/.test(url) ? url : `/GateWay${url}`
}
// if(window.globalConfig && window.globalConfig.hasGateWay) {
// return url && /^\/GateWay/.test(url) ? url : `/GateWay${url}`
// }
return url;
};
const codeMessage = {
......
......@@ -10,18 +10,18 @@ const transformGateWay = url => {
};
export const API = {
AUTHORIZATION_TOKEN: '/Identity/AuthorizationToken',
AUTHORIZATION_TOKEN: '/PandaCore/Identity/AuthorizationToken', // 授权验证,不需要走网关加前缀
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',
GENERATE_GATEWAT_TOKEN: '/PandaCore/GCK/Basis/GenerateToken',
GENERATE_IOT_TOKEN: 'cityinterface/rest/services.svc/generateGCKToken',
GENERATE_QRCODE: 'cityinterface/rest/services.svc/generatetokenByqrcode',
GENERATE_TOKEN_CHANGE: '/cityinterface/rest/services.svc/generatetokenquick',
GET_WEB_SITE_CONFIG: '/CityInterface/rest/services.svc/GetWebSiteConfig',
GET_WEB_SITE_CONFIG_GEWAY: '/GCK/Basis/GetWebSiteConfig',
GET_WEB_SITE_CONFIG_GEWAY: '/PandaCore/GCK/Basis/GetWebSiteConfig',
GET_USER_INFO: '/CityInterface/rest/services.svc/getUserInfo',
GET_GATEWAY_USER_INFO: '/GCK/Basis/GetUserInfo',
GET_GATEWAY_USER_INFO: '/PandaCore/GCK/Basis/GetUserInfo',
GET_OA: '/CityInterface/rest/services/OA.svc/getLoginInfo',
GET_LOGS: '/CityInterface/rest/services/portal.svc/OMMonitor/SaveLoginInfo',
GET_CITY:
......
......@@ -56,7 +56,7 @@ export const initGlobalConfig = () => {
const hasGateWay = !res || !res.data ? false : _.isString(res.data) ? JSON.parse(res.data) : typeof res.data === 'boolean' ? res.data : false;
return {
hasGateWay,
apiGatewayDomain: `${window.location.origin}/PandaCore`,
apiGatewayDomain: `${window.location.origin}/PandaCore/GateWay`,
};
})
.then(gateWayConfig => {
......
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