const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace"); const { openPage } = require("../../utils/navigation"); Page({ data: { brand: {}, presentation: {}, trustItems: [], offerings: [], error: "" }, onLoad() { loadWorkspaceWithFallback() .then((workspace) => { this.setData({ brand: workspace.brand || {}, presentation: workspace.brand?.visualPresentation?.home || {}, trustItems: workspace.trustItems || [], offerings: workspace.offerings || [], }); wx.setNavigationBarTitle({ title: workspace.brand?.name || "ๅ“็‰Œ้ฆ–้กต" }); }) .catch((error) => this.setData({ error: error.message })); }, selectOffering(event) { openPage("/pages/offering/detail?id=" + event.detail.id); }, goWorks() { openPage("/pages/services/index"); }, goInquiry() { openPage("/pages/inquiry/index"); }, goService() { openPage("/pages/stall-service/index"); }, });