hookehuyr

fix

1 <!-- 1 <!--
2 * @Date: 2024-01-15 13:35:51 2 * @Date: 2024-01-15 13:35:51
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-01-26 15:35:52 4 + * @LastEditTime: 2024-01-26 15:40:32
5 * @FilePath: /xysBooking/src/views/booking.vue 5 * @FilePath: /xysBooking/src/views/booking.vue
6 * @Description: 预约页面 6 * @Description: 预约页面
7 --> 7 -->
...@@ -138,7 +138,7 @@ onMounted(async () => { ...@@ -138,7 +138,7 @@ onMounted(async () => {
138 /** 138 /**
139 * @description: 根据日期获取信息 139 * @description: 根据日期获取信息
140 * @param {string} date 140 * @param {string} date
141 - * @return {object} {text: 日期, date: 日期, price: 价格, reserve_full: 是否可约 1=可约,0=约满,-1=无需预约 overdue=过期日期 } 141 + * @return {object} {text: 日期, date: 日期, reserve_full: 是否可约 1=可约,0=约满,-1=无需预约 overdue=过期日期 }
142 */ 142 */
143 const findDatesInfo = (date) => { 143 const findDatesInfo = (date) => {
144 const result = dates_list.value.find((item) => item.month_date === date); 144 const result = dates_list.value.find((item) => item.month_date === date);
...@@ -147,7 +147,6 @@ const findDatesInfo = (date) => { ...@@ -147,7 +147,6 @@ const findDatesInfo = (date) => {
147 return { 147 return {
148 text: currentDate.getDate().toString().padStart(2, '0'), 148 text: currentDate.getDate().toString().padStart(2, '0'),
149 date: result?.month_date, 149 date: result?.month_date,
150 - price: result?.price,
151 reserve_full: result?.reserve_full, 150 reserve_full: result?.reserve_full,
152 lunar_date: lunarDate 151 lunar_date: lunarDate
153 }; 152 };
...@@ -215,6 +214,7 @@ const timePeriod = ref([]); // 当前时间段信息 ...@@ -215,6 +214,7 @@ const timePeriod = ref([]); // 当前时间段信息
215 const chooseTime = (item, index) => { // 选择时间段回调 214 const chooseTime = (item, index) => { // 选择时间段回调
216 if (item.rest_qty || item.rest_qty === QtyStatus.INFINITY) { // 余量等于-1为不限制数量 215 if (item.rest_qty || item.rest_qty === QtyStatus.INFINITY) { // 余量等于-1为不限制数量
217 checked_time.value = index; 216 checked_time.value = index;
217 + checked_day_price.value = item.price; // 当前价格
218 } 218 }
219 }; 219 };
220 220
...@@ -230,7 +230,6 @@ const QtyStatus = { ...@@ -230,7 +230,6 @@ const QtyStatus = {
230 const chooseDay = async (date) => { // 点击日期回调 230 const chooseDay = async (date) => { // 点击日期回调
231 if (findDatesInfo(date).reserve_full === ReserveStatus.AVAILABLE || findDatesInfo(date).reserve_full === ReserveStatus.INFINITY) { // 状态 1可约 || -1不限制 231 if (findDatesInfo(date).reserve_full === ReserveStatus.AVAILABLE || findDatesInfo(date).reserve_full === ReserveStatus.INFINITY) { // 状态 1可约 || -1不限制
232 checked_day.value = date; // 当前日期 232 checked_day.value = date; // 当前日期
233 - checked_day_price.value = findDatesInfo(date).price; // 当前价格
234 checked_day_reserve_full.value = findDatesInfo(date).reserve_full; // 当前状态 233 checked_day_reserve_full.value = findDatesInfo(date).reserve_full; // 当前状态
235 if (findDatesInfo(date).reserve_full === ReserveStatus.AVAILABLE) { 234 if (findDatesInfo(date).reserve_full === ReserveStatus.AVAILABLE) {
236 // 选择日期后,查询时间段信息 235 // 选择日期后,查询时间段信息
......