const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace"); Page({ data: { brand: {}, presentation: {}, offerings: [], error: "" }, onLoad() { loadWorkspaceWithFallback() .then((workspace) => this.setData({ brand: workspace.brand || {}, presentation: workspace.brand?.visualPresentation?.offerings || {}, offerings: workspace.offerings || [], }), ) .catch((error) => this.setData({ error: error.message })); }, open(event) { wx.navigateTo({ url: "/pages/offering/detail?id=" + event.detail.id }); }, inquire() { wx.navigateTo({ url: "/pages/inquiry/index" }); }, });