hookehuyr

fix

1 <!-- 1 <!--
2 * @Date: 2023-12-13 13:42:23 2 * @Date: 2023-12-13 13:42:23
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-12-21 14:07:08 4 + * @LastEditTime: 2023-12-21 14:16:26
5 * @FilePath: /meihuaApp/src/components/roomCard.vue 5 * @FilePath: /meihuaApp/src/components/roomCard.vue
6 * @Description: 房间详情组件 6 * @Description: 房间详情组件
7 --> 7 -->
...@@ -105,6 +105,12 @@ watch( ...@@ -105,6 +105,12 @@ watch(
105 const dates = getTodayAndTomorrow(); 105 const dates = getTodayAndTomorrow();
106 106
107 const handleTap = () => { 107 const handleTap = () => {
108 + if (!startDate.value) {
109 + startDate.value = dates.today;
110 + }
111 + if (!endDate.value) {
112 + endDate.value = dates.tomorrow;
113 + }
108 Taro.navigateTo({ 114 Taro.navigateTo({
109 url: `../detail/index?id=abc&start_date=${startDate.value}&end_date=${endDate.value}`, 115 url: `../detail/index?id=abc&start_date=${startDate.value}&end_date=${endDate.value}`,
110 }) 116 })
...@@ -114,9 +120,6 @@ onMounted(() => { ...@@ -114,9 +120,6 @@ onMounted(() => {
114 if (props.calenderInfo) { 120 if (props.calenderInfo) {
115 startDate.value = props.calenderInfo.startDate; 121 startDate.value = props.calenderInfo.startDate;
116 endDate.value = props.calenderInfo.endDate; 122 endDate.value = props.calenderInfo.endDate;
117 - } else {
118 - startDate.value = dates.today;
119 - endDate.value = dates.tomorrow;
120 } 123 }
121 // console.warn('选择的日期', props.calenderInfo); 124 // console.warn('选择的日期', props.calenderInfo);
122 // console.warn('房间详情的属性', props.data); 125 // console.warn('房间详情的属性', props.data);
......
1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-12-21 14:02:43 4 + * @LastEditTime: 2023-12-21 14:17:13
5 * @FilePath: /meihuaApp/src/pages/confirm/index.vue 5 * @FilePath: /meihuaApp/src/pages/confirm/index.vue
6 * @Description: 确认订单页面 6 * @Description: 确认订单页面
7 --> 7 -->
...@@ -195,7 +195,6 @@ const payData = ref({}); ...@@ -195,7 +195,6 @@ const payData = ref({});
195 195
196 onMounted(() => { 196 onMounted(() => {
197 const { id, start_date, end_date, between_date, start_date_week, end_date_week } = getCurrentPageParam(); 197 const { id, start_date, end_date, between_date, start_date_week, end_date_week } = getCurrentPageParam();
198 - // console.log(id, start_date, end_date, between_date, start_date_week, end_date_week );
199 booking_info.value.days = between_date; 198 booking_info.value.days = between_date;
200 let check_in = start_date.split('-'); 199 let check_in = start_date.split('-');
201 let check_out = end_date.split('-'); 200 let check_out = end_date.split('-');
...@@ -230,11 +229,15 @@ const goPay = () => { ...@@ -230,11 +229,15 @@ const goPay = () => {
230 }); 229 });
231 return; 230 return;
232 } else { 231 } else {
233 - console.warn(formData); 232 + // TODO: 保存订房信息
234 - // show_pay.value = true; 233 + console.warn('保存订房信息', formData);
235 - // payData.value.id = '123'; 234 + // TODO: 跳转支付页面
236 - // payData.value.price = room_price_info.value.discount * book_count.value * booking_info.value.days; 235 + setTimeout(() => {
237 - // payData.value.remain_time = '30:00'; 236 + show_pay.value = true;
237 + payData.value.id = '123';
238 + payData.value.price = room_price_info.value.discount * book_count.value * booking_info.value.days;
239 + payData.value.remain_time = '1000';
240 + }, 1000);
238 } 241 }
239 } 242 }
240 243
......
1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-12-21 10:10:57 4 + * @LastEditTime: 2023-12-21 14:21:16
5 * @FilePath: /meihuaApp/src/pages/index/index.vue 5 * @FilePath: /meihuaApp/src/pages/index/index.vue
6 * @Description: 首页 6 * @Description: 首页
7 --> 7 -->
...@@ -31,17 +31,11 @@ import { ref } from 'vue'; ...@@ -31,17 +31,11 @@ import { ref } from 'vue';
31 import roomCard from '@/components/roomCard.vue' 31 import roomCard from '@/components/roomCard.vue'
32 // import arrowDownImg from '@/assets/images/arrow-down.png' 32 // import arrowDownImg from '@/assets/images/arrow-down.png'
33 import navBar from '@/components/navBar.vue' 33 import navBar from '@/components/navBar.vue'
34 -import { useDidShow } from '@tarojs/taro' 34 +// import { useDidShow } from '@tarojs/taro'
35 // TAG: 模拟onShow事件 35 // TAG: 模拟onShow事件
36 -useDidShow(() => { 36 +// useDidShow(() => {
37 // console.warn(AUTHOR) 37 // console.warn(AUTHOR)
38 -}) 38 +// })
39 -
40 -// const goTo = (id) => {
41 -// Taro.navigateTo({
42 -// url: '../activityDetail/index?id=' + id
43 -// })
44 -// }
45 39
46 // 分享功能 40 // 分享功能
47 wx.showShareMenu({ 41 wx.showShareMenu({
......