Commit ebee6a80 authored by 杨思琦's avatar 杨思琦

fix: 处理首页为base功能

parent 33bc366c
Pipeline #86023 passed with stages
...@@ -205,26 +205,27 @@ export const application = global => { ...@@ -205,26 +205,27 @@ export const application = global => {
export const initSaveMicroApps = (pathName = '', global) => { export const initSaveMicroApps = (pathName = '', global) => {
/* eslint-disable */ /* eslint-disable */
event.emit('loading', false); event.emit('loading', false);
setTimeout(() => { setTimeout(() => {
const microApps = application(global); const microApps = application(global);
const micro = microApps.filter(app => !/civweb4/.test(app.name)) ?? []; pathName.indexOf('civbase/civ_base') > -1 && event.emit('loading', false)
if(/civweb4/.test(pathName) && !web4Load) { const micro = microApps.filter(app => !/civweb4/.test(app.name)) ?? [];
event.emit("initweb", true); if(/civweb4/.test(pathName) && !web4Load) {
loadMicroApps(micro, pathName); event.emit("initweb", true);
web4Load = true; loadMicroApps(micro, pathName);
} else { web4Load = true;
const target = micorManager.slice(-1)[0] ?? null; } else {
if(!target || pathName.indexOf(target.name) == -1) { const target = micorManager.slice(-1)[0] ?? null;
const microApp = microApps.filter(app => pathName.indexOf(app.name) > -1)[0] ?? null; if(!target || pathName.indexOf(target.name) == -1) {
if(microApp) micorManager.push({ const microApp = microApps.filter(app => pathName.indexOf(app.name) > -1)[0] ?? null;
...loadMicroApp(microApp, Configuration, LifeCycle), if(microApp) micorManager.push({
name: microApp?.name, ...loadMicroApp(microApp, Configuration, LifeCycle),
store: microApp?.props?.store name: microApp?.name,
}) store: microApp?.props?.store
} })
} }
}) }
})
}; };
export const loadMicroApps = (apps, pathName) => { export const loadMicroApps = (apps, pathName) => {
......
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