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-15 16:48:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3177a990ab46b872ab0e8c3d8a65c5492876d3cb
3177a990
1 parent
0060be61
docs(booking): 更新预约状态和日期回调的注释说明
更新ReserveStatus对象的注释,更清晰地描述各状态含义 添加chooseDay函数的注释说明
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
src/pages/booking/index.vue
src/pages/booking/index.vue
View file @
3177a99
<!--
* @Date: 2024-01-15 13:35:51
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-01-1
3 14:15
:29
* @LastEditTime: 2026-01-1
5 16:47
:29
* @FilePath: /xyxBooking-weapp/src/pages/booking/index.vue
* @Description: 预约页面
-->
...
...
@@ -143,7 +143,7 @@ const findDatesInfo = (date) => {
/**
* @description: 预约状态
* @return {object} {INFINITY: -1
, FULL: 0, AVAILABLE: 1, OVERDUE: 'overdue'
}
* @return {object} {INFINITY: -1
无需预约, FULL: 0 约满, AVAILABLE: 1 可约, OVERDUE: 'overdue' 过期日期
}
*/
const ReserveStatus = {
INFINITY: -1, // 无需预约
...
...
@@ -219,12 +219,19 @@ const QtyStatus = {
INFINITY: -1, // 无限制
}
/**
* @description: 点击日期回调
* @param {string} date
* @return {void}
*/
const chooseDay = async (date) => { // 点击日期回调
if (!date) return;
const info = findDatesInfo(date);
//
if (info.reserve_full === ReserveStatus.AVAILABLE || info.reserve_full === ReserveStatus.INFINITY) { // 状态 1可约 || -1不限制
checked_day.value = date; // 当前日期
checked_day_reserve_full.value = info.reserve_full; // 当前状态
// 如果可约,查询时间段信息
if (info.reserve_full === ReserveStatus.AVAILABLE) {
// 选择日期后,查询时间段信息
const { code, data } = await canReserveTimeListAPI({ month_date: checked_day.value});
...
...
Please
register
or
login
to post a comment