Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
xyxBooking-weapp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2026-01-22 09:48:13 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
21c3100a2fb404fa0d0c9febcfd6b12cdf8e7bf3
21c3100a
1 parent
e666e766
docs(api): 更新预约日期列表接口参数说明
添加reserve_full、open_time和tips参数的详细描述
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
src/api/index.js
src/pages/booking/index.vue
src/api/index.js
View file @
21c3100
/*
* @Date: 2023-08-24 09:42:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-01-2
0 11:40:31
* @LastEditTime: 2026-01-2
2 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
));
...
...
src/pages/booking/index.vue
View file @
21c3100
<!--
* @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;
...
...
Please
register
or
login
to post a comment