Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
xysBooking
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
2024-01-26 15:41:17 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2f3952a22dc8bc7b598c5c196b8ecdb79e81d896
2f3952a2
1 parent
5c8699a6
fix
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
src/views/booking.vue
src/views/booking.vue
View file @
2f3952a
<!--
* @Date: 2024-01-15 13:35:51
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-26 15:
35:5
2
* @LastEditTime: 2024-01-26 15:
40:3
2
* @FilePath: /xysBooking/src/views/booking.vue
* @Description: 预约页面
-->
...
...
@@ -138,7 +138,7 @@ onMounted(async () => {
/**
* @description: 根据日期获取信息
* @param {string} date
* @return {object} {text: 日期, date: 日期,
price: 价格,
reserve_full: 是否可约 1=可约,0=约满,-1=无需预约 overdue=过期日期 }
* @return {object} {text: 日期, date: 日期, reserve_full: 是否可约 1=可约,0=约满,-1=无需预约 overdue=过期日期 }
*/
const findDatesInfo = (date) => {
const result = dates_list.value.find((item) => item.month_date === date);
...
...
@@ -147,7 +147,6 @@ const findDatesInfo = (date) => {
return {
text: currentDate.getDate().toString().padStart(2, '0'),
date: result?.month_date,
price: result?.price,
reserve_full: result?.reserve_full,
lunar_date: lunarDate
};
...
...
@@ -215,6 +214,7 @@ const timePeriod = ref([]); // 当前时间段信息
const chooseTime = (item, index) => { // 选择时间段回调
if (item.rest_qty || item.rest_qty === QtyStatus.INFINITY) { // 余量等于-1为不限制数量
checked_time.value = index;
checked_day_price.value = item.price; // 当前价格
}
};
...
...
@@ -230,7 +230,6 @@ const QtyStatus = {
const chooseDay = async (date) => { // 点击日期回调
if (findDatesInfo(date).reserve_full === ReserveStatus.AVAILABLE || findDatesInfo(date).reserve_full === ReserveStatus.INFINITY) { // 状态 1可约 || -1不限制
checked_day.value = date; // 当前日期
checked_day_price.value = findDatesInfo(date).price; // 当前价格
checked_day_reserve_full.value = findDatesInfo(date).reserve_full; // 当前状态
if (findDatesInfo(date).reserve_full === ReserveStatus.AVAILABLE) {
// 选择日期后,查询时间段信息
...
...
Please
register
or
login
to post a comment