feat: 快速预定交互调整

This commit is contained in:
duanshuwen
2025-10-27 21:19:09 +08:00
parent 895aa166dd
commit 4bd151d6d1
11 changed files with 235 additions and 49 deletions

View File

@@ -43,6 +43,7 @@
<script setup>
import { defineProps } from "vue";
import { useSelectedDateStore } from "@/store";
// Props
const props = defineProps({
@@ -71,10 +72,14 @@ const handleClick = ({ commodityId }) => {
uni.navigateTo({ url: `/pages/goods/index?commodityId=${commodityId}` });
};
const selectedDateStore = useSelectedDateStore();
const handleBooking = ({ commodityId }) => {
const { startDate, endDate, totalDays } = props.selectedDate;
selectedDateStore.setData({ startDate, endDate, totalDays });
uni.navigateTo({
url: `/pages-booking/index?commodityId=${commodityId}&startDate=${startDate}&endDate=${endDate}&totalDays=${totalDays}`,
url: `/pages-booking/index?commodityId=${commodityId}`,
});
};
</script>