往生殿供奉的支付功能
This commit is contained in:
parent
f63c334aeb
commit
365284dd5f
|
|
@ -107,17 +107,21 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("this.durationOptions", this.durationOptions);
|
||||||
|
|
||||||
// 获取选中的时长选项
|
// 获取选中的时长选项
|
||||||
const selectedOption = this.durationOptions.find(
|
const selectedOption = this.durationOptions.find(
|
||||||
(option) => option.value === this.selectedDuration,
|
(option) => option.id === this.selectedDuration,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log("selectedOption", selectedOption);
|
||||||
|
|
||||||
// 触发确认事件
|
// 触发确认事件
|
||||||
this.$emit("confirm", {
|
this.$emit("confirm", {
|
||||||
duration: this.selectedDuration,
|
thaliId: this.selectedDuration,
|
||||||
durationLabel: selectedOption.label,
|
// durationLabel: selectedOption.name,
|
||||||
price: selectedOption.price,
|
payAmount: selectedOption.amount,
|
||||||
offererName: this.offererName.trim(),
|
worName: this.offererName.trim(),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,7 @@ import BottomButton from "../../components/bottom-button/bottom-button.vue";
|
||||||
import OfferingModal from "./compositons/offeringModal.vue";
|
import OfferingModal from "./compositons/offeringModal.vue";
|
||||||
|
|
||||||
import { getPackageList } from "../../api/memorial/memorial";
|
import { getPackageList } from "../../api/memorial/memorial";
|
||||||
|
import { ordersEnshrined } from "../../api/order/order";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -228,6 +229,8 @@ export default {
|
||||||
|
|
||||||
this.PackageList = response.data;
|
this.PackageList = response.data;
|
||||||
|
|
||||||
|
console.log("this.PackageList", this.PackageList);
|
||||||
|
|
||||||
console.log("获取的套餐数据:", this.PackageList);
|
console.log("获取的套餐数据:", this.PackageList);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -399,7 +402,8 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 确认供奉
|
// 确认供奉
|
||||||
handleOfferingConfirm(offeringData) {
|
async handleOfferingConfirm(offeringData) {
|
||||||
|
offeringData = { ...offeringData, memorialId: this.selectedUnitId };
|
||||||
console.log("确认供奉:", offeringData);
|
console.log("确认供奉:", offeringData);
|
||||||
|
|
||||||
// 这里可以调用供奉API
|
// 这里可以调用供奉API
|
||||||
|
|
@ -407,19 +411,18 @@ export default {
|
||||||
title: "正在提交供奉...",
|
title: "正在提交供奉...",
|
||||||
});
|
});
|
||||||
|
|
||||||
// 模拟API调用
|
let res = await ordersEnshrined(offeringData);
|
||||||
setTimeout(() => {
|
uni.hideLoading();
|
||||||
uni.hideLoading();
|
if (res.code === 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "供奉成功!",
|
title: "供奉成功!",
|
||||||
icon: "success",
|
icon: "success",
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
// 关闭弹窗
|
||||||
|
this.closeOfferingModal();
|
||||||
|
|
||||||
// 关闭弹窗
|
// 可以在这里刷新数据或跳转到其他页面
|
||||||
this.closeOfferingModal();
|
|
||||||
|
|
||||||
// 可以在这里刷新数据或跳转到其他页面
|
|
||||||
}, 2000);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 刷新数据
|
// 刷新数据
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user