Commit a8bf29d7 authored by 李纪文's avatar 李纪文

fix: 修改web4首页

parent 4e97166b
Pipeline #42371 passed with stages
in 1 minute 34 seconds
...@@ -222,13 +222,8 @@ export const defaultApp = () => { ...@@ -222,13 +222,8 @@ export const defaultApp = () => {
// setDefaultMountApp(`/${pkg.name.toLocaleLowerCase()}/${basePath}${homepage}`); // setDefaultMountApp(`/${pkg.name.toLocaleLowerCase()}/${basePath}${homepage}`);
// createStoreage.set('init_web4', true) // createStoreage.set('init_web4', true)
// } // }
setDefaultMountApp(`/civbase/${config.homepage.replace(/^\//, '')}`); let homepage = config.homepage.replace('civweb4/', '');
// if(/civweb4/.test(config.homepage)) { setDefaultMountApp(`/civbase/${homepage.replace(/^\//, '')}`);
// setDefaultMountApp(`/civbase/${config.homepage.replace(/^\//, '')}`);
// } else {
// setDefaultMountApp(`/civbase/${config.home.path.replace(/^\//, '')}`);
// }
//setDefaultMountApp(`/civbase/${config.homepage.replace(/^\//, '')}`);
if(config.homepage.indexOf('civweb4') > -1) createStoreage.set('init_web4', true); if(config.homepage.indexOf('civweb4') > -1) createStoreage.set('init_web4', true);
} }
}; };
......
...@@ -218,12 +218,12 @@ class Login { ...@@ -218,12 +218,12 @@ class Login {
: response; : response;
if (result && result.length > 0) { if (result && result.length > 0) {
const config = result.shift(); const config = result.shift();
const homeType = (config.productType && config.productType !== 'civweb4') ? (config.productType + '/') : ''; const homeType = config.productType || 'civweb4';
self.globalConfig = Object.assign(self.globalConfig, config, { self.globalConfig = Object.assign(self.globalConfig, config, {
theme: self.globalConfig.theme, theme: self.globalConfig.theme,
menu: self.globalConfig.menu, menu: self.globalConfig.menu,
style: self.globalConfig.style, style: self.globalConfig.style,
homepage: homeType + (params.getParams('redirect') || self.globalConfig.homepage || config.homepage), homepage: homeType + '/' + (params.getParams('redirect') || self.globalConfig.homepage || config.homepage),
}); });
if(self.globalConfig.hasOwnProperty('webConfig')) { if(self.globalConfig.hasOwnProperty('webConfig')) {
......
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