chore: 统一小程序代码格式

This commit is contained in:
que01 committed 2026-09-23 12:51:40 +08:00
1 parent 11dc293349
commit 1a2f179e15
48 files changed
+1701 -66

No files matched your search

+12 -2
View File
@@ -1,6 +1,16 @@
const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace");
Page({
data: { item: null, loading: true },
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 }); this.setData({ item, loading: false }); wx.setNavigationBarTitle({ title: item.category || item.name }); }); },
inquire() { wx.navigateTo({ url: "/pages/inquiry/index?offeringId=" + this.data.item.id }); },
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 });
this.setData({ item, loading: false });
wx.setNavigationBarTitle({ title: item.category || item.name });
});
},
inquire() {
wx.navigateTo({ url: "/pages/inquiry/index?offeringId=" + this.data.item.id });
},
});