From accc113b2ac70764608a7321f214eda248e8d6da Mon Sep 17 00:00:00 2001 From: que01 Date: Wed, 23 Sep 2026 01:42:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=A9=E9=A6=96=E9=A1=B5=E4=B8=BB?= =?UTF-8?q?=E8=A7=86=E8=A7=89=E8=B7=9F=E9=9A=8F=E5=93=81=E7=89=8C=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/miniapp/pages/index/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/miniapp/pages/index/index.js b/apps/miniapp/pages/index/index.js index 1854c1f..0938208 100644 --- a/apps/miniapp/pages/index/index.js +++ b/apps/miniapp/pages/index/index.js @@ -2,7 +2,7 @@ const { brand, trustContent, offerings } = require("../../utils/linjing-data"); const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace"); Page({ data: { brand, trustContent, offerings, modules: [], layout: [], theme: {}, hero: { image: "https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=900&q=80", eyebrow: "年度落成实景 · 莫干山庄园", title: "万籁系列 · 铸铜冷锻双轴入户门", slogan: "门高 3.4m · 德国静音地轴", cta: "探索全系作品 →" }, loading: false }, - onLoad() { this.setData({ loading: true }); loadWorkspaceWithFallback().then((workspace) => { const layout = workspace.layout?.home || ["founder-card", "brand-hero", "trust-proof", "trust-manifesto", "offering-list"]; this.setData({ brand: workspace.brand, trustContent: workspace.trustContent || trustContent, offerings: workspace.offerings || offerings, modules: workspace.modules || [], layout, theme: workspace.theme || {}, loading: false }); wx.setNavigationBarTitle({ title: workspace.brand.name || brand.name }); }); }, + onLoad() { this.setData({ loading: true }); loadWorkspaceWithFallback().then((workspace) => { const activeBrand = workspace.brand || brand; const layout = workspace.layout?.home || ["founder-card", "brand-hero", "trust-proof", "trust-manifesto", "offering-list"]; const firstOffering = (workspace.offerings || offerings)[0] || {}; this.setData({ brand: activeBrand, trustContent: workspace.trustContent || trustContent, offerings: workspace.offerings || offerings, modules: workspace.modules || [], layout, theme: workspace.theme || {}, hero: { ...this.data.hero, eyebrow: activeBrand.tagline || activeBrand.name, title: firstOffering.name || activeBrand.name, slogan: activeBrand.description || "以专业经验建立长期信任", cta: "了解业务与服务 →" }, loading: false }); wx.setNavigationBarTitle({ title: activeBrand.name || brand.name }); }); }, showModule(e) { return this.data.layout.includes(e); }, selectOffering(e) { const id = e.detail ? e.detail.id : e.currentTarget.dataset.id; wx.navigateTo({ url: "/pages/offering/detail?id=" + id }); }, goWorks() { wx.switchTab({ url: "/pages/services/index" }); },