营销:装修模板,底部导航适配APP

This commit is contained in:
owen
2023-11-03 06:47:45 +08:00
parent 06943e821e
commit 8bd5f9f3cc
4 changed files with 40 additions and 16 deletions
+12
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,17 @@ const app = defineStore({
}
this.chat = res.data.chat;
const diyTemplate = await diyTemplateApi.getUsedDiyTemplate();
if (diyTemplate?.data?.property) {
const templateProperty = JSON.parse(diyTemplate?.data?.property)
this.template.basic.tabbar = templateProperty.tabBar
if (templateProperty?.tabBar.theme) {
this.template.basic.theme = templateProperty?.tabBar.theme;
}
} else {
$router.error('TemplateError');
}
// 加载主题
const sysStore = sys();
sysStore.setTheme();