修复冲突

Signed-off-by: Bluemark <kongdy@bluemark.cn>
This commit is contained in:
Bluemark
2023-11-09 01:29:59 +00:00
committed by Gitee
17 changed files with 173 additions and 117 deletions
+17
View File
@@ -1,4 +1,5 @@
import appApi from '@/sheep/api/app';
import diyTemplateApi from '@/sheep/api/promotion/diy/template';
import { defineStore } from 'pinia';
import $platform from '@/sheep/platform';
import $router from '@/sheep/router';
@@ -71,6 +72,8 @@ const app = defineStore({
}
this.chat = res.data.chat;
await adaptTemplate(this.template);
// 加载主题
const sysStore = sys();
sysStore.setTheme();
@@ -96,4 +99,18 @@ const app = defineStore({
},
});
// todo: @owen 先做数据适配,后期重构
const adaptTemplate = async (appTemplate) => {
const diyTemplate = await diyTemplateApi.getUsedDiyTemplate();
const tabBar = diyTemplate?.data?.property?.tabBar;
if (tabBar) {
appTemplate.basic.tabbar = tabBar
if (tabBar?.theme) {
appTemplate.basic.theme = tabBar?.theme;
}
}
appTemplate.home = diyTemplate?.data?.home;
// appTemplate.user = diyTemplate?.data?.user;
}
export default app;