test.js
1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* @Date: 2026-01-10
* @Description: 从原始文档转换生成的 API 接口文件
*/
import { fn, fetch } from '@/api/fn'
const Api = {
CAN_RESERVE_DATE_LIST: '/srv/?a=api&t=can_reserve_date_list',
CAN_RESERVE_TIME_LIST: '/srv/?a=api&t=can_reserve_time_list'
}
/**
* @description: 可预约日期列表
* @param {String} month 月份,格式yyyy-mm
* @returns {Promise<{
* code: number,
* msg: string,
* data: Array<{
* month_date: string, // 日期,格式yyyy-mm-dd
* week_day: string, // 星期几
* full: string, // 是否约满,1=约满,0=未约满
* }>
* }>}
*/
export const canReserveDateListAPI = params => fn(fetch.get(Api.CAN_RESERVE_DATE_LIST, params))
/**
* @description: 可预约时段列表
* @param {String} month_date 日期,格式yyyy-mm-dd
* @returns {Promise<{
* code: number,
* msg: string,
* data: Array<{
* month_date: string, // 日期
* begin_time: string, // 时段起始时间
* end_time: string, // 时段结束时间
* price: string, // 价格
* rest_qty: string // 余量 说明: >0表示有余量,可约;=0表示没有余量,约满不可约;<0表示不限,无需续约;
* }>
* }>}
*/
export const canReserveTimeListAPI = params => fn(fetch.get(Api.CAN_RESERVE_TIME_LIST, params))