Jacob
1 天以前 f7034f535b85264e0c5b18e82fc295dab2052304
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
import request from "@/utils/request.js";
 
/**
 * 获取购物车列表
 * @param numType boolean true 购物车数量,false=购物车产品数量
 */
export function getCartCounts(numType,type) {
   return request.get("cart/count?numType=" + numType + "&type=" + type,{}, {
       noAuth: true
   });
}
/**
 * 获取购物车列表
 * 
 */
export function getCartList(data) {
   return request.get("cart/list", data, {
       noAuth: true
   });
}
 
/**
 * 修改购物车数量
 * @param int cartId  购物车id
 * @param int number 修改数量
 */
export function changeCartNum(cartId, number,zoneId) {
   let q={
       id: cartId,
       number: number
   };
   if(zoneId){
       q.zoneId=zoneId;
   }
   return request.post("cart/num", q, {}, 1);
}
/**
 * 清除购物车
 * @param object ids join(',') 切割成字符串
 */
export function cartDel(ids) {
   if (typeof ids === 'object')
       ids = ids.join(',');
   return request.post('cart/delete', {
       ids: ids
   }, {}, 1);
}
 
/**
 * 购物车重选提交
 * 
 */
export function getResetCart(data) {
   return request.post('cart/resetcart', data);
}
 
/**
 * 订单列表
 * @param object data
 */
export function getOrderList(data) {
   return request.get('order/list', data);
}
 
/**
 * 订单产品信息
 * @param string unique 
 */
export function orderProduct(data) {
   return request.post('order/product', data);
}
 
/**
 * 订单评价
 * @param object data
 * 
 */
export function orderComment(data) {
   return request.post('order/comment', data);
}
 
/**
 * 订单支付
 * @param object data
 */
export function orderPay(data) {
   return request.post('order/pay', data);
}
 
/**
 * 订单统计数据
 */
export function orderData() {
   return request.get('order/data')
}
 
/**
 * 订单取消
 * @param string id
 * 
 */
export function orderCancel(id) {
   return request.post('order/cancel', {
       id: id
   }, {}, 1);
}
 
/**
 * 删除已完成订单
 * @param string uni
 * 
 */
export function orderDel(uni) {
   return request.post('order/del', {
       id: uni
   }, {}, 1);
}
 
/**
 * 订单详情
 * @param string uni 
 */
export function getOrderDetail(uni) {
   return request.get('order/detail/' + uni);
}
export function getOrderDetailForWx(orderNo) {
   return request.get('order/detail/wxpay/' + orderNo);
}
/**
 * 再次下单
 * @param string uni
 * 
 */
export function orderAgain(uni) {
   return request.post('order/again', {
       orderNo: uni
   });
}
 
/**
 * 订单收货
 * @param string uni
 * 
 */
export function orderTake(uni) {
   return request.post('order/take', {
       id: uni
   }, {}, 1);
}
 
/**
 * 订单查询物流信息
 * @returns {*}
 */
export function express(uni) {
   return request.get("order/express/" + uni);
}
export function expressInfo(id,expressNumber,expressId) {
   return request.get("order/logistics/"+id+'/' + expressNumber+'/' + expressId);
}
/**
 * 获取退款理由
 * 
 */
export function ordeRefundReason() {
   return request.get('order/refund/reason');
}
 
/**
 * 订单退款审核
 * @param object data
 */
export function orderRefundVerify(data) {
   return request.post('order/refund', data);
}
 
/**
 * 订单确认获取订单详细信息
 * @param string cartId
 */
export function orderConfirm(cartId, isNew, addAgain,secKill,combination,bargain) {
   return request.post('order/confirm', {
       cartIds: cartId,
       isNew: isNew,
       addAgain: addAgain,
       secKill: secKill,
       combination:combination,
       bargain:bargain
   });
}
 
/**
 * 获取当前金额能使用的优惠卷
 * @param string price
 * 
 */
export function getCouponsOrderPrice(preOrderNo) {
   return request.get(`coupons/order/${preOrderNo}`)
}
 
/**
 * 订单创建
 * @param string key
 * @param object data
 * 
 */
export function orderCreate(data) {
   return request.post('order/create', data);
}
 
/**
 * 计算订单金额
 * @param key
 * @param data
 * @returns {*}
 */
export function postOrderComputed(data) {
   return request.post("order/computed/price", data);
}
export function postOrderComputedSingle(data) {
   return request.post("order/computerPrice?attrValueId="+data.attrValueId+'&payCareBean='+data.payCareBean, data);
}
/**
 * 将字符串 转base64
 * @param object data
 */
export function qrcodeApi(data) {
   return request.post('qrcode/str2base64', data, {}, 1);
}
 
/**
 * 微信订单支付
 * @param object data
 */
export function wechatOrderPay(data) {
   return request.post('pay/payment', data);
}
 
/**
 * 微信查询支付结果
 * @param object data
 */
export function wechatQueryPayResult(data) {
   return request.get('pay/queryPayResult?orderNo=' + data);
}
 
/**
 * 申请退款商品详情
 * @param object data
 */
export function applyRefund(orderId) {
   return request.get(`order/apply/refund/${orderId}`);
}
 
/**
 * 预下单
 * @param object data
 */
export function preOrderApi(data) {
   return request.post(`order/pre/order`, data);
}
 
/**
 * 加载预下单
 * @param object preOrderNo
 */
export function loadPreOrderApi(preOrderNo) {
   return request.get(`order/load/pre/${preOrderNo}`);
}