order.js
3.5 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
const http = uni.$u.http
/**
* 创建订单
* @param {
groundId: "场地ID",
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"
}
*/
export const createOrde = (data, config= {}) => http.post('/ground-business/ground/createOrder', data, {custom: {auth: true}})
/**
* 确定订单
* @param {
orderId: "订单ID"
}
*/
export const confirmOrder = (data) => http.get('/ground-business/ground/confirmOrder', { params: data, custom: {auth: true}})
/**
* 商户取消订单
* @param {
orderId: "订单ID",
type: "0取消订单1不满足开场条件取消"
}
*/
export const cancelOrder = (data) => http.post('/ground-business/ground/businessCancelOrder', data, {custom: {auth: true}})
/**
* 查询实时订单列表
* @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"
}
*/
export const getOrderList = (data) => http.get('/ground-order/order/list', {params: data, custom: {auth: true}})
/**
* 商家查询退款订单列表
* @param {
businessId: "商家ID",
pageNum: "页码",
pageSize: "页数"
}
*/
export const getAftersalesOrder = (data) => http.get('/ground-order/aftersales/list', { params: data, custom: {auth: true}})
/**
* 商家查询订单评价列表
* @param {
businessId: "商家ID",
pageNum: "页码",
pageSize: "页数"
}
*/
export const getCommentOrder = (data) => http.get('/ground-order/comment/list', { params: data, custom: {auth: true}})
/**
* 获取订单状态
*/
export const getOrderState = (data) => http.get('/system/dict/data/type/order_state', { params: data, custom: {auth: true}})
/**
* 获取退货订单状态
*/
export const getRefundState = (data) => http.get('/system/dict/data/type/aftersales_state', { params: data, custom: {auth: true}})
/**
* 获取订单评价状态
*/
export const getCommentState = (data) => http.get('/system/dict/data/type/order_comment_state', { params: data, custom: {auth: true}})
/**
* 商家审核申请退款
* @param {
salesId: "售后ID",
state: "0拒绝退款1退全款2发起人退50%其余退全款"
}
*/
export const businessLookRefund = (data) => http.post('/ground-order/myOrder/approveAfterSale', data, { custom: {auth: true}})
/**
* 商家回复评价
* @param {
commentId: "评论ID",
reply: "回复内容"
}
*/
export const businessReply = (data) => http.post('/ground-order/comment/replyComment', data, { custom: {auth: true}})
/**
* 商家申诉恶意评价
* @param {
commentId: "评论ID",
appealReason: "申诉原因"
}
*/
export const businessAppealReason = (data) => http.post('/ground-order/comment/appealComment', data, { custom: {auth: true}})