From 0475d53d56943c9d86b70da017cf798eb385480d Mon Sep 17 00:00:00 2001 From: wuKong Date: Mon, 29 Dec 2025 18:28:32 +0800 Subject: [PATCH] =?UTF-8?q?refactor(store):=20=E7=A7=BB=E9=99=A4=E4=B8=8D?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84=20type=20=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除不必要的 type 变量声明 - 直接使用 $platform.uniPlatform 替代变量引用 - 保持代码逻辑不变但提高代码简洁性 --- sheep/store/app.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sheep/store/app.js b/sheep/store/app.js index b1a826c0..f05e9ba7 100644 --- a/sheep/store/app.js +++ b/sheep/store/app.js @@ -182,11 +182,10 @@ const adaptTenant = async () => { /** 初始化装修模版 */ const adaptTemplate = async (appTemplate, templateId) => { - let type = $platform.uniPlatform; const { data: diyTemplate } = templateId ? // 查询指定模板,一般是预览时使用 await DiyApi.getDiyTemplate(templateId) - : await DiyApi.getUsedDiyTemplate(type); + : await DiyApi.getUsedDiyTemplate($platform.uniPlatform); // 模板不存在 if (!diyTemplate) { $router.error('TemplateError');