feat: 预约时间调整
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<UseDateRange v-model:selectedDate="reservationDate"/>
|
<UseDateRange v-if="reservationEnabled" v-model:selectedDate="reservationDate"/>
|
||||||
|
|
||||||
<!-- 联系方式 -->
|
<!-- 联系方式 -->
|
||||||
<view class="bg-white rounded-12 overflow-hidden">
|
<view class="bg-white rounded-12 overflow-hidden">
|
||||||
@@ -57,6 +57,10 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
reservationEnabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(["update:modelValue", "update:reservationDate"]);
|
const emit = defineEmits(["update:modelValue", "update:reservationDate"]);
|
||||||
|
|||||||
@@ -70,6 +70,7 @@
|
|||||||
v-model="quantity"
|
v-model="quantity"
|
||||||
:userFormList="userFormList"
|
:userFormList="userFormList"
|
||||||
v-model:reservationDate="selectedReservationDate"
|
v-model:reservationDate="selectedReservationDate"
|
||||||
|
:reservationEnabled="orderData.reservationEnabled"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 酒店类型 -->
|
<!-- 酒店类型 -->
|
||||||
@@ -212,6 +213,14 @@ const validateUserForms = () => {
|
|||||||
// 处理支付点击事件
|
// 处理支付点击事件
|
||||||
const handlePayClick = ThrottleUtils.createThrottle(async (goodsData) => {
|
const handlePayClick = ThrottleUtils.createThrottle(async (goodsData) => {
|
||||||
console.log("处理支付点击事件", userFormList.value);
|
console.log("处理支付点击事件", userFormList.value);
|
||||||
|
// 预约日期,酒店类型不需要
|
||||||
|
if (orderData.value.reservationEnabled) {
|
||||||
|
if (!selectedReservationDate.value) {
|
||||||
|
uni.showToast({ title: "请选择预约日期", icon: "none" });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 校验用户姓名
|
// 校验用户姓名
|
||||||
if (!validateUserForms()) {
|
if (!validateUserForms()) {
|
||||||
return;
|
return;
|
||||||
@@ -243,11 +252,7 @@ const handlePayClick = ThrottleUtils.createThrottle(async (goodsData) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 预约日期,酒店类型不需要
|
// 预约日期,酒店类型不需要
|
||||||
if (orderData.value.orderType != 0) {
|
if (orderData.value.reservationEnabled) {
|
||||||
if (!selectedReservationDate.value) {
|
|
||||||
uni.showToast({ title: "请选择预约日期", icon: "none" });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
params.reservationDate = selectedReservationDate.value;
|
params.reservationDate = selectedReservationDate.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ onMounted(() => {
|
|||||||
|
|
||||||
const jumpClick = () => {
|
const jumpClick = () => {
|
||||||
const token = getAccessToken();
|
const token = getAccessToken();
|
||||||
|
|
||||||
|
navigateTo('http://192.168.1.14:8080/#/home', { token: token });
|
||||||
|
return;
|
||||||
if (props.toolCall.componentNameParams.jumpUrl) {
|
if (props.toolCall.componentNameParams.jumpUrl) {
|
||||||
navigateTo(props.toolCall.componentNameParams.jumpUrl, { token: token });
|
navigateTo(props.toolCall.componentNameParams.jumpUrl, { token: token });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user