Files
persionalBrand/apps/miniapp/pages/offering/detail.js
T
que01 55989a5dfe fix: 修复模板页面跳转并移除无入口的下单页
新增运行时 openPage/takePageQuery,tabBar 页自动使用 switchTab 并传递参数
- 编译器写入 tabPages,并拒绝 navigateTo/redirectTo 到 tabBar 页或 switchTab 带参数
- 阿成首页、套餐、出摊、主理人、详情、记录、成功页跳转统一改用 openPage
- 套餐筛选改用后台业务提供项分类;详情跳咨询时携带业务提供项
- 移除 capability-booking:小程序无入口且依赖已删除的 /public/brand,需求由咨询表单覆盖"
2026-09-27 10:10:23 +08:00

24 lines
954 B
JavaScript

const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace");
const { openPage } = require("../../utils/navigation");
Page({
data: { item: null, loading: true, error: "", presentation: {} },
onLoad(options) {
loadWorkspaceWithFallback()
.then((workspace) => {
const offerings = workspace.offerings || [];
const item = offerings.find((entry) => entry.id === options.id) || offerings[0];
if (!item) return this.setData({ loading: false, error: "未找到可展示的业务提供项" });
this.setData({
item,
loading: false,
presentation: workspace.brand?.visualPresentation?.detail || {},
});
wx.setNavigationBarTitle({ title: item.category || item.name });
})
.catch((error) => this.setData({ loading: false, error: error.message }));
},
inquire() {
openPage("/pages/inquiry/index?offeringId=" + this.data.item.id);
},
});