feat: 接入配置驱动的动态咨询表单
This commit is contained in:
1 parent
8872316ad3
commit
02966cf65c
9 files changed
+232
-3
No files matched your search
@@ -7,6 +7,19 @@ Page({
|
||||
.catch(() => this.setData({ loading: false, error: "详情加载失败" }));
|
||||
},
|
||||
submit() {
|
||||
const cta = this.data.item?.cta || {};
|
||||
if (cta.type === "inquiry") {
|
||||
const formId = cta.config?.formId;
|
||||
return wx.navigateTo({
|
||||
url: "/pages/inquiry/index" + (formId ? "?formId=" + encodeURIComponent(formId) : ""),
|
||||
});
|
||||
}
|
||||
if (cta.type === "external-link") {
|
||||
return wx.showToast({ title: "请在支持外链的环境打开", icon: "none" });
|
||||
}
|
||||
if (cta.type === "contact") {
|
||||
return wx.showToast({ title: "请从品牌主页查看联系方式", icon: "none" });
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: "/pages/booking/index?serviceId=" + encodeURIComponent(this.data.item?.id || ""),
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user