feat: 接入小程序业务提供项详情渲染
This commit is contained in:
1 parent
5e26999c72
commit
8fd399f4c2
7 files changed
+92
-5
No files matched your search
@@ -0,0 +1,14 @@
|
||||
const { request } = require("../../utils/request");
|
||||
Page({
|
||||
data: { loading: true, error: "", item: null },
|
||||
onLoad(options) {
|
||||
request("/public/offerings/" + encodeURIComponent(options.id))
|
||||
.then((item) => this.setData({ item, loading: false }))
|
||||
.catch(() => this.setData({ loading: false, error: "详情加载失败" }));
|
||||
},
|
||||
submit() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/booking/index?serviceId=" + encodeURIComponent(this.data.item?.id || ""),
|
||||
});
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user