sport.js
6.8 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
const http = uni.$u.http
/**
* 获取运动类型
* @param {
pageNum: 1
pageSize: 10
}
*/
export const getSportList = (data) => http.get('/system/sports/list', {params: data, custom: {auth: true} })
/**
* 获取营业周次和单价
*/
export const getPriods = () => http.get('/system/dict/data/type/periods', {custom: {auth: true} })
/**
* 新增场地
* @param {
groundCode: "场地码",
groundNum: "场地号",
isOutdoor: "是否为户外",
address: "地址",
sportsRange: "球类",
weekday: "周时间",
orderHours: "订单时长",
discount: "折扣",
longitude: "经度(用于定位)",
latitude: "纬度(用于定位)",
groundPicture: "场地图片",
weekdayList: [
{
weekday: 星期,
hourList: [
{
startHour: "开始时间",
endHour: "结束时间",
price: "价格"
}
]
}
]
}
*/
export const addGround = (data, config= {}) => http.post('/ground-business/ground', data, {custom: {auth: true}})
/**
* 根据ID获取场地详情
* @@return {
groundId: "场地ID",
belongGym: "附属球馆",
groundCode: "场地码",
groundNum: "场地号",
isOutdoor: "是否为户外",
address: "地址",
sportsRange: "球类",
weekday: "周时间",
orderHours: "订单时长",
discount: "折扣",
longitude: "经度(用于定位)",
latitude: "纬度(用于定位)",
groundPicture: "场地图片",
hourList: {
hourId: "时长ID",
startHour: "开始时间",
endHour: "结束时间",
price: "价格",
groundId: "场地ID",
isLocked: "是否上锁"
}
}
*/
export const getGroundDetail = (groundId) => http.get(`/ground-business/ground/${groundId}`, {custom: {auth: true}})
/**
* 更新场地信息
* @param {
groundCode: "场地码",
groundNum: "场地号",
isOutdoor: "是否为户外",
address: "地址",
sportsRange: "球类",
weekday: "周时间",
orderHours: "订单时长",
discount: "折扣",
longitude: "经度(用于定位)",
latitude: "纬度(用于定位)",
groundPicture: "场地图片",
weekdayList: {
weekday: 1,
hourList: {
startHour: "开始时间",
endHour: "结束时间",
price: "价格"
}
}
}
*/
export const updateGroundInfo = (data, config= {}) => http.put('/ground-business/ground', data, {custom: {auth: true}})
/**
* 删除场地列表
*/
export const delGroundInfo = (groundId) => http.delete(`/ground-business/ground/${groundId}`, {}, {custom: {auth: true}})
/**
* 锁定场地
* @param {
groundId: "场地id",
orderDate: "锁定日期",
hourList: {
startHour: "开始时间",
endHour: "结束时间",
isLocked: "0解锁1锁定"
}
}
*/
export const lockGround = (data) => http.post('/ground-business/ground/lockGround', data, {custom: {auth: true}})
/**
* 营业时间列表查询
* @param {
currentDate: "时间范围",
groundId: "场地ID不传就是查全部"
}
*@return {
endHour: "结束时间",
startHour: "开始时间",
lockDate: "锁定日期",
groundId: "场地id",
groundCode: 场地编号,
lockby: "操作人",
operateTime: "操作时间",
isLocked: "0未锁定1已锁"
}
*/
export const businessTimeList = (data) => http.post('/ground-business/ground/businessHourList', data, {custom: {auth: true}})
/**
* 查询场地列表
*@return {
groundId: "场地ID",
belongGym: "附属球馆",
groundCode: "场地码",
groundNum: "场地号",
isOutdoor: "是否为户外",
address: "地址",
sportsRange: "球类",
weekday: "周时间",
businessId: "球馆ID"
orderHours: "订单时长",
discount: "折扣",
longitude: "经度(用于定位)",
latitude: "纬度(用于定位)",
groundPhotos: "场地图片",
distance: "距离千米"
}
*/
export const getGroundList = (data) => http.get('/ground-business/ground/list', {params: data, custom: {auth: true}})
/**
* 查询球馆列表
* @param {
longitude: "经度",
latitude: "纬度"
}
*@return {
groundId: "场地ID"
businessName: "商家名称",
businessLicenseNo: "社会统一码",
gymName: "球馆名称",
contacts: "联系人",
contactsPhone: "联系人电话",
province: "省",
city: "市",
county: "县",
address: "地址",
gymPicture: "球馆图片"
gymNum: "球馆号",
serviceCharge: "服务费",
commission: "佣金",
username: "用户名"
businessLicensePicture: "商家许可证照片"
belongGym: "附属球馆"
groundCode: "场地码",
groundNum: "场地号",
isOutdoor: "是否为户外",
sportsRange: "球类",
rank: "评分",
price: "平均价格",
businessTime: "营业时间"
businessId: "球馆ID"
longitude: "经度(用于定位)",
latitude: "纬度(用于定位)",
distance: "距离千米"
}
*/
export const getBusinessList = (data, config= {}) => http.get('/ground-business/business/list', {params: data, custom: {auth: true}})
/**
* 选择时间段页面营业时间列表
* @param {
groundId: "场地id",
currentDate: "选择日期",
}
* @return {
discountHours: "连续x小时打折",
discount: "打折",
data: [
{
startHour: "开始时间",
endHour: "结束时间",
price: "价格"
}
]
}
*/
export const getOrderHourList = (data, config= {}) => http.post('/ground-business/ground/orderHourList', data, config)
/**
* 发起约球
* @param {
groundId: "场地id",
peopleNum: "参与人数(不包括发起人)",
orderDate: "订场日期",
hourList: [
{
startHour: "开始时间",
endHour: "结束时间",
}
]
}
* @return {
orderId: "订单id",
orderNo: "订单编号",
belongGym: "所属球馆",
groundNum: "场地号",
orderTime: "下单时间",
appointmentStartTime: "预约开始时间",
appointmentEndTime : "预约结束时间",
payAmount: "支付金额",
peopleNum: "参与人数",
serviceCharge: "手续费",
commission: "抽佣",
orderType: "0整租1约球",
state: "0待确定1已确定2取消3不满足开场条件取消",
businessId: "商家id",
clientId: "客户id"
groundId: "场地ID"
}
*/
export const sendBooking = (data, config= {}) => http.post('/ground-business/ground/createDateOrder', data, config)
/**
* 待拼场场地列表
* @return {
orderId: "订单id",
orderNo: "订单编号",
belongGym: "球馆名称",
groundNum: "场地号",
address: "地址",
orderTime: "下单时间",
appointmentStartTime: "拼场时间段-开始时间",
appointmentEndTime : "拼场时间段-结束时间",
price: "价格",
peopleNum: "需求人数",
rank: "整体评分",
envRank: "环境评分",
serviceRank: "服务评分",
priceRank : "性价比评分",
organizer: "发起人",
joinPeopleNum: "已拼场人数",
clientList: [
{
createTime: "参与时间",
clientId: "客户id",
clientName: "客户名称"
}
]
}
*/
export const selectDateGroundList = (data, config= {}) => http.post('/ground-business/ground/selectDateGroundList', data, config)