feat: 快速预定页面调整
This commit is contained in:
@@ -61,6 +61,10 @@ const props = defineProps({
|
||||
stockUnitLabel: "", // 库存单位
|
||||
}),
|
||||
},
|
||||
selectedDate: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
|
||||
const handleClick = ({ commodityId }) => {
|
||||
@@ -68,7 +72,10 @@ const handleClick = ({ commodityId }) => {
|
||||
};
|
||||
|
||||
const handleBooking = ({ commodityId }) => {
|
||||
uni.navigateTo({ url: `/pages/booking/index?commodityId=${commodityId}` });
|
||||
const { startDate, endDate, totalDays } = props.selectedDate;
|
||||
uni.navigateTo({
|
||||
url: `/pages-booking/index?commodityId=${commodityId}&startDate=${startDate}&endDate=${endDate}&totalDays=${totalDays}`,
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -50,7 +50,12 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<Card v-for="(item, index) in dataList" :key="index" :item="item" />
|
||||
<Card
|
||||
v-for="(item, index) in dataList"
|
||||
:key="index"
|
||||
:item="item"
|
||||
:selectedDate="selectedDate"
|
||||
/>
|
||||
</z-paging>
|
||||
|
||||
<!-- 日历组件 -->
|
||||
|
||||
Reference in New Issue
Block a user