Showing
1 changed file
with
7 additions
and
12 deletions
| 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:16:26 | 4 | + * @LastEditTime: 2023-12-21 14:41:48 |
| 5 | * @FilePath: /meihuaApp/src/components/roomCard.vue | 5 | * @FilePath: /meihuaApp/src/components/roomCard.vue |
| 6 | * @Description: 房间详情组件 | 6 | * @Description: 房间详情组件 |
| 7 | --> | 7 | --> |
| ... | @@ -73,11 +73,11 @@ const getTodayAndTomorrow = () => { | ... | @@ -73,11 +73,11 @@ const getTodayAndTomorrow = () => { |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | const props = defineProps({ | 75 | const props = defineProps({ |
| 76 | - data: { | 76 | + data: { // 房间详情 |
| 77 | type: Object, | 77 | type: Object, |
| 78 | default: {}, | 78 | default: {}, |
| 79 | }, | 79 | }, |
| 80 | - calenderInfo: { | 80 | + calenderInfo: { // 日历信息 |
| 81 | type: Object, | 81 | type: Object, |
| 82 | default: { | 82 | default: { |
| 83 | startDate: '', | 83 | startDate: '', |
| ... | @@ -105,6 +105,7 @@ watch( | ... | @@ -105,6 +105,7 @@ watch( |
| 105 | const dates = getTodayAndTomorrow(); | 105 | const dates = getTodayAndTomorrow(); |
| 106 | 106 | ||
| 107 | const handleTap = () => { | 107 | const handleTap = () => { |
| 108 | + let id = 'abc'; | ||
| 108 | if (!startDate.value) { | 109 | if (!startDate.value) { |
| 109 | startDate.value = dates.today; | 110 | startDate.value = dates.today; |
| 110 | } | 111 | } |
| ... | @@ -112,18 +113,12 @@ const handleTap = () => { | ... | @@ -112,18 +113,12 @@ const handleTap = () => { |
| 112 | endDate.value = dates.tomorrow; | 113 | endDate.value = dates.tomorrow; |
| 113 | } | 114 | } |
| 114 | Taro.navigateTo({ | 115 | Taro.navigateTo({ |
| 115 | - url: `../detail/index?id=abc&start_date=${startDate.value}&end_date=${endDate.value}`, | 116 | + url: `../detail/index?id=${id}&start_date=${startDate.value}&end_date=${endDate.value}`, |
| 116 | - }) | 117 | + }); |
| 117 | } | 118 | } |
| 118 | 119 | ||
| 119 | onMounted(() => { | 120 | onMounted(() => { |
| 120 | - if (props.calenderInfo) { | 121 | +}); |
| 121 | - startDate.value = props.calenderInfo.startDate; | ||
| 122 | - endDate.value = props.calenderInfo.endDate; | ||
| 123 | - } | ||
| 124 | - // console.warn('选择的日期', props.calenderInfo); | ||
| 125 | - // console.warn('房间详情的属性', props.data); | ||
| 126 | -}) | ||
| 127 | 122 | ||
| 128 | </script> | 123 | </script> |
| 129 | 124 | ... | ... |
-
Please register or login to post a comment