feat: 快速预定交互调整
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user