hookehuyr

docs(api): 更新预约日期列表接口参数说明

添加reserve_full、open_time和tips参数的详细描述
/*
* @Date: 2023-08-24 09:42:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-01-20 11:40:31
* @LastEditTime: 2026-01-22 09:41:23
* @FilePath: /xyxBooking-weapp/src/api/index.js
* @Description: 文件描述
*/
......@@ -31,7 +31,7 @@ const Api = {
/**
* @description: 可预约日期列表
* @param {Array} month 月份,格式yyyy-mm
* @param {Array} month 月份,格式yyyy-mm, reserve_full 是否可约 1=可约,0=约满,-1=没有配置预约时段, open_time 在今天,开放预约最晚可预约日期的后一天的时间点, tips 不可预约的提示信息
* @returns
*/
export const canReserveDateListAPI = (params) => fn(fetch.get(Api.CAN_RESERVE_DATE_LIST, params));
......
<!--
* @Date: 2024-01-15 13:35:51
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-01-16 17:33:27
* @LastEditTime: 2026-01-22 09:47:48
* @FilePath: /xyxBooking-weapp/src/pages/booking/index.vue
* @Description: 预约页面
-->
......@@ -65,7 +65,7 @@
<view class="text">选择参访时间段</view>
</view>
<view style="padding: 48rpx 24rpx; color: #A67939; text-align: center;">
暂未开启预约
{{ infinity_tips_text }}
</view>
</view>
</view>
......@@ -137,6 +137,7 @@ const findDatesInfo = (date) => {
text: currentDate.getDate().toString().padStart(2, '0'),
date: result?.month_date,
reserve_full: result?.reserve_full,
tips: result?.tips || '',
lunar_date: lunarDate
};
};
......@@ -203,6 +204,21 @@ const checked_day_reserve_full = ref(null);
const checked_time = ref(-1);
const timePeriod = ref([]); // 当前时间段信息
/**
* @description: 无预约提示
* @return {string} 提示信息
*/
const infinity_tips_text = computed(() => {
if (!checked_day.value || checked_day_reserve_full.value !== ReserveStatus.INFINITY) return '';
const info = findDatesInfo(checked_day.value);
if (dayjs(checked_day.value).isAfter(dayjs(), 'day')) {
const tips = (info.tips || '').trim();
if (tips) return tips;
}
return '暂未开启预约';
});
const chooseTime = (item, index) => { // 选择时间段回调
if (item.rest_qty || item.rest_qty === QtyStatus.INFINITY) { // 余量等于-1为不限制数量
checked_time.value = index;
......