feat: 增加使用日期组件

This commit is contained in:
2026-03-13 00:06:32 +08:00
parent dde9b037fe
commit 8c3f04b44a
7 changed files with 179 additions and 4 deletions

View File

@@ -67,6 +67,7 @@
v-if="orderData.commodityTypeCode !== '0'"
v-model="quantity"
:userFormList="userFormList"
v-model:reservationDate="selectedReservationDate"
/>
<!-- 酒店类型 -->
@@ -119,6 +120,7 @@ const selectedDate = ref({
totalDays: 1,
});
const quantity = ref(1);
const selectedReservationDate = ref("");
// 工具函数
const createEmptyUserForm = () => ({ visitorName: "", contactPhone: "" });
@@ -224,6 +226,13 @@ const handlePayClick = ThrottleUtils.createThrottle(async (goodsData) => {
return;
}
// 校验预约日期
if (!selectedReservationDate.value) {
uni.hideLoading();
uni.showToast({ title: "请选择预约日期", icon: "none" });
return;
}
// 购买的商品id
const commodityId = goodsData.commodityId;
// 消费者信息
@@ -234,6 +243,7 @@ const handlePayClick = ThrottleUtils.createThrottle(async (goodsData) => {
const payWay = "0";
// 支付渠道 0-app 1-小程序 2-h5
const paySource = "1";
const reservationDate = selectedReservationDate.value; // 预约日期,酒店类型可能不需要,根据实际情况调整
const params = {
commodityId,
@@ -241,6 +251,7 @@ const handlePayClick = ThrottleUtils.createThrottle(async (goodsData) => {
payWay,
paySource,
consumerInfoEntityList,
reservationDate
};
//酒店类型添加入住时间、离店时间