feat: 按业务提供项配置分流行动入口
This commit is contained in:
1 parent
888a504423
commit
4754230e5b
2 files changed
+9
-2
No files matched your search
@@ -8,12 +8,18 @@ Page({
|
||||
},
|
||||
submit() {
|
||||
const cta = this.data.item?.cta || {};
|
||||
if (cta.type === "inquiry") {
|
||||
const formId = cta.config?.formId;
|
||||
const form = this.data.item?.inquiryForms?.[0];
|
||||
if (cta.type === "inquiry" || form?.submissionAction === "create-inquiry") {
|
||||
const formId = form?.id || cta.config?.formId;
|
||||
return wx.navigateTo({
|
||||
url: "/pages/inquiry/index" + (formId ? "?formId=" + encodeURIComponent(formId) : ""),
|
||||
});
|
||||
}
|
||||
if (form?.submissionAction === "create-booking" || cta.type === "booking") {
|
||||
return wx.navigateTo({
|
||||
url: "/pages/booking/index?offeringId=" + encodeURIComponent(this.data.item?.id || ""),
|
||||
});
|
||||
}
|
||||
if (cta.type === "external-link") {
|
||||
return wx.showToast({ title: "请在支持外链的环境打开", icon: "none" });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user