refactor(store): 移除不必要的 type 变量声明

- 移除不必要的 type 变量声明
- 直接使用 $platform.uniPlatform 替代变量引用
- 保持代码逻辑不变但提高代码简洁性
pull/174/head
wuKong 2025-12-29 18:28:32 +08:00
parent db95ed1a90
commit 0475d53d56
1 changed files with 1 additions and 2 deletions

View File

@ -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');