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

fix: 处理首页为base功能

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