Commit 13a3830d authored by 李纪文's avatar 李纪文

fix: 首页跳转问题

parent 99535258
Pipeline #42011 passed with stages
in 1 minute 33 seconds
...@@ -211,22 +211,22 @@ export const defaultApp = () => { ...@@ -211,22 +211,22 @@ export const defaultApp = () => {
const config = createStoreage.get('globalConfig'); const config = createStoreage.get('globalConfig');
if (config && config.token) { if (config && config.token) {
// const basePath =config.homepage !== '' && FILTER_FOLER_REG.test(config.homepage) ?'civweb4' :'civweb4'; const basePath =config.homepage !== '' && FILTER_FOLER_REG.test(config.homepage) ?'civweb4' :'civweb4';
// if(config && config.home) { if(config && config.home) {
// setDefaultMountApp(`/civbase/${config.home.path.replace(/^\//, '')}`); setDefaultMountApp(`/civbase/${config.home.path.replace(/^\//, '')}`);
// } else {
// const homepage = _.isNull(config.homepage) ? '/index': '/' + config.homepage;
// setDefaultMountApp(`/${pkg.name.toLocaleLowerCase()}/${basePath}${homepage}`);
// createStoreage.set('init_web4', true)
// }
if(config.productType && config.productType !== 'civweb4') {
setDefaultMountApp(`/civbase/${config.productType}/${config.homepage.replace(/^\//, '')}`);
} else { } else {
const homepage = _.isNull(config.productType) ? '/index': '/' + config.homepage;
setDefaultMountApp(`/${pkg.name.toLocaleLowerCase()}/civweb4${homepage}`); const homepage = _.isNull(config.homepage) ? '/index': '/' + config.homepage;
setDefaultMountApp(`/${pkg.name.toLocaleLowerCase()}/${basePath}${homepage}`);
createStoreage.set('init_web4', true) createStoreage.set('init_web4', true)
} }
// if(config.productType && config.productType !== 'civweb4') {
// setDefaultMountApp(`/civbase/${config.productType}/${config.homepage.replace(/^\//, '')}`);
// } else {
// const homepage = _.isNull(config.productType) ? '/index': '/' + config.homepage;
// setDefaultMountApp(`/${pkg.name.toLocaleLowerCase()}/civweb4${homepage}`);
// createStoreage.set('init_web4', true)
// }
} }
}; };
......
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