往生殿供奉的支付功能

This commit is contained in:
WindowBird 2025-09-18 15:14:08 +08:00
parent f63c334aeb
commit 365284dd5f
2 changed files with 21 additions and 14 deletions

View File

@ -107,17 +107,21 @@ export default {
return;
}
console.log("this.durationOptions", this.durationOptions);
//
const selectedOption = this.durationOptions.find(
(option) => option.value === this.selectedDuration,
(option) => option.id === this.selectedDuration,
);
console.log("selectedOption", selectedOption);
//
this.$emit("confirm", {
duration: this.selectedDuration,
durationLabel: selectedOption.label,
price: selectedOption.price,
offererName: this.offererName.trim(),
thaliId: this.selectedDuration,
// durationLabel: selectedOption.name,
payAmount: selectedOption.amount,
worName: this.offererName.trim(),
});
},
},

View File

@ -144,6 +144,7 @@ import BottomButton from "../../components/bottom-button/bottom-button.vue";
import OfferingModal from "./compositons/offeringModal.vue";
import { getPackageList } from "../../api/memorial/memorial";
import { ordersEnshrined } from "../../api/order/order";
export default {
components: {
@ -228,6 +229,8 @@ export default {
this.PackageList = response.data;
console.log("this.PackageList", 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);
// API
@ -407,19 +411,18 @@ export default {
title: "正在提交供奉...",
});
// API
setTimeout(() => {
uni.hideLoading();
let res = await ordersEnshrined(offeringData);
uni.hideLoading();
if (res.code === 200) {
uni.showToast({
title: "供奉成功!",
icon: "success",
});
}
//
this.closeOfferingModal();
//
this.closeOfferingModal();
//
}, 2000);
//
},
//