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

perf: websiteconfig接口替换

parent 6af6df30
Pipeline #48775 passed with stages
in 2 minutes 29 seconds
...@@ -18,8 +18,7 @@ export const API = { ...@@ -18,8 +18,7 @@ export const API = {
GENERATE_IOT_TOKEN: 'cityinterface/rest/services.svc/generateGCKToken', GENERATE_IOT_TOKEN: 'cityinterface/rest/services.svc/generateGCKToken',
GENERATE_QRCODE: 'cityinterface/rest/services.svc/generatetokenByqrcode', GENERATE_QRCODE: 'cityinterface/rest/services.svc/generatetokenByqrcode',
GENERATE_TOKEN_CHANGE: '/cityinterface/rest/services.svc/generatetokenquick', GENERATE_TOKEN_CHANGE: '/cityinterface/rest/services.svc/generatetokenquick',
GET_WEB_SITE_CONFIG: '/CityInterface/rest/services.svc/GetWebSiteConfig', GET_WEB_SITE_CONFIG: '/PandaOMS/OMS/WebSite/GetWebSiteConfig',
GET_WEB_SITE_CONFIG_GEWAY: '/PandaCore/GCK/Basis/GetWebSiteConfig',
GET_USER_INFO: '/CityInterface/rest/services.svc/getUserInfo', GET_USER_INFO: '/CityInterface/rest/services.svc/getUserInfo',
GET_GATEWAY_USER_INFO: '/PandaCore/GCK/Basis/GetUserInfo', GET_GATEWAY_USER_INFO: '/PandaCore/GCK/Basis/GetUserInfo',
GET_OA: '/CityInterface/rest/services/OA.svc/getLoginInfo', GET_OA: '/CityInterface/rest/services/OA.svc/getLoginInfo',
...@@ -78,12 +77,7 @@ const services = { ...@@ -78,12 +77,7 @@ const services = {
}, },
getWebSiteConfig: { getWebSiteConfig: {
url: () => url: API.GET_WEB_SITE_CONFIG,
window.globalConfig &&
window.globalConfig &&
window.globalConfig.hasGateWay
? API.GET_WEB_SITE_CONFIG_GEWAY
: API.GET_WEB_SITE_CONFIG,
method: constants.REQUEST_METHOD_GET, method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP, type: constants.REQUEST_HTTP,
}, },
...@@ -235,10 +229,7 @@ export const getUserInfo = params => { ...@@ -235,10 +229,7 @@ export const getUserInfo = params => {
}; };
export const getWebSiteConfig = params => { export const getWebSiteConfig = params => {
const url = const url = API.GET_WEB_SITE_CONFIG;
window.globalConfig && window.globalConfig && window.globalConfig.hasGateWay
? API.GET_WEB_SITE_CONFIG_GEWAY
: API.GET_WEB_SITE_CONFIG;
return request({ return request({
url, url,
method: constants.REQUEST_METHOD_GET, method: constants.REQUEST_METHOD_GET,
......
...@@ -321,15 +321,6 @@ class Login { ...@@ -321,15 +321,6 @@ class Login {
// mapsettings: config.mapsettings // mapsettings: config.mapsettings
}); });
// eslint-disable-next-line no-prototype-builtins
if (self.globalConfig.hasOwnProperty('webConfig')) {
self.globalConfig = Object.assign(self.globalConfig, {
// ...self.globalConfig,
...self.globalConfig.webConfig.basicConfig,
...self.globalConfig.webConfig.optionalConfig,
});
}
self.updateConfig && self.updateConfig(self.globalConfig); self.updateConfig && self.updateConfig(self.globalConfig);
self.getProjectItems().then(res => { self.getProjectItems().then(res => {
window.subSysCfg = {}; window.subSysCfg = {};
......
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