Jacob
2026-10-12 61274af2f456188fa611dd871bc2bcc1a3a85db0
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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
import request from "@/utils/request.js";
 
/**
 * 获取产品详情
 * @param int id
 * 
 */
export function getProductDetail(id, type, zoneId, seckillId) {
   return request.get('product/detail/' + id + '?type=' + type + (zoneId ? ('&zoneId=' + zoneId) : '') + (seckillId ? ('&timerId=' + seckillId) : ''), {}, {
       noAuth: true
   });
}
export function addProductView(id) {
   return request.get('product/view/' + id, {}, {
       noAuth: true
   });
}
 
 
/**
 * 产品分享二维码 推广员
 * @param int id
 */
// #ifndef MP
export function getProductCode(id) {
   return request.get('product/code/' + id, {});
}
// #endif
// #ifdef MP
export function getProductCode(id) {
   return request.get('product/code/' + id, {
       user_type: 'routine'
   });
}
// #endif
 
/**
 * 添加收藏
 * @param int id
 * @param string category product=普通产品,product_seckill=秒杀产品
 */
export function collectAdd(id, category) {
   return request.post('collect/add', {
       id: id,
       'category': category === undefined ? 'product' : category
   });
}
 
/**
 * 取消收藏产品
 * @param int id
 */
export function collectDel(proId) {
   return request.post(`collect/cancel/${proId}`);
}
 
 
/**
 * 删除收藏产品
 * @param string id
 */
export function collectDelete(ids) {
   return request.post(`collect/delete`, ids);
}
 
/**
 * 购车添加
 * 
 */
export function postCartAdd(data) {
   return request.post('cart/save', data, {});
}
/**
 * 批量购车添加
 * 
 */
export function batchPostCartAdd(data) {
   return request.post('cart/batchSave', data, {});
}
/**
 * 获取分类列表
 * 
 */
export function getCategoryList() {
   return request.get('category', {}, {
       noAuth: true
   });
}
 
/**
 * 获取产品列表
 * @param object data
 */
export function getProductslist(data) {
   return request.get('products', data, {
       noAuth: true
   });
}
/**
 * 获取推荐产品
 * 
 */
export function getProductHot(page, limit) {
   return request.get("product/hot", {
       page: page === undefined ? 1 : page,
       limit: limit === undefined ? 4 : limit
   }, {
       noAuth: true
   });
}
/**
 * 批量收藏
 * 
 * @param object id  产品编号 join(',') 切割成字符串
 * @param string category 
 */
export function collectAll(id, category) {
   return request.post('collect/all', {
       id: id,
       category: category === undefined ? 'product' : category
   });
}
 
/**
 * 首页产品的轮播图和产品信息
 * @param int type 
 * 
 */
export function getGroomList(type, data) {
   return request.get('index/product/' + type, data, {
       noAuth: true
   });
}
 
/**
 * 获取收藏列表
 * @param object data
 */
export function getCollectUserList(data) {
   return request.get('collect/user', data)
}
 
/**
 * 获取产品评论
 * @param int id
 * @param object data
 * 
 */
export function getReplyList(id, data) {
   return request.get('reply/list/' + id, data, {
       noAuth: true
   })
}
 
/**
 * 产品评价数量和好评度
 * @param int id
 */
export function getReplyConfig(id) {
   return request.get('reply/config/' + id, {}, {
       noAuth: true
   });
}
 
/**
 * 获取搜索关键字获取
 * 
 */
export function getSearchKeyword() {
   return request.get('search/keyword', {}, {
       noAuth: true
   });
}
 
/**
 * 门店列表
 * @returns {*}
 */
export function storeListApi(data) {
   return request.post("store/list", data, {}, 1);
}
 
 
/**
 * 优品推荐
 * @param object data
 */
export function getProductGood() {
   return request.get('product/good', {}, { noAuth: true });
}
 
/**
 * 详情页产品评论
 * @param int id
 * @param object data
 * 
 */
export function getReplyProduct(id) {
   return request.get('reply/product/' + id, {}, {
       noAuth: true
   })
}
export function getStoreZoneAndCouponList(data) {
   return request.get('getStoreZoneAndCouponList', data, {
       noAuth: true
   });
}
export function getLast10Order(data) {
   return request.get('getLast10Order', data, {
       noAuth: true
   });
}
export function getZoneDetail(id, data) {
   return request.get('store/zone/detail/' + id, data, {
       noAuth: true
   });
}
export function getZoneGoodList(id, data) {
   return request.get('store/zone/product/list/' + id, data, {
       noAuth: true
   });
}
/**
 * 专区促销预估
 * @param {number} zoneId - 专区ID
 * @param {number} applyNum - 专区商品总件数
 * @param {number} zoneTotalFee - 专区应付总额
 */
export function getZonePromotionPreview(zoneId, applyNum, zoneTotalFee) {
   return request.get('store/zone/promotion/preview', {
       zoneId: zoneId,
       applyNum: applyNum,
       zoneTotalFee: zoneTotalFee
   }, {
       noAuth: true
   });
}
// 检查是否已经签到
export function checkSign(data) {
   return request.get('store/zone/check/sign', data, {
       noAuth: true
   });
}
// 渠道活动 - 验证销售码是否正确
export function signInSales(data) {
   return request.get('channel/activity/signInSales', data, {
       noAuth: true
   });
}
export function getBeanRate(data) {
   return request.get('order/exchangeCareBean', data, {
       noAuth: true
   });
}
export function collectShare(data) {
   return request.post("collect/share?productId=" + data.productId, {}, {
       noAuth: true
   });
}
 
export function getZoneCouponList(id, data) {
   return request.get('coupons/zone/' + id, data, {
       noAuth: true
   });
}
 
export function getStoreZoneAndCouponPopupList(data) {
   return request.get('getStoreZoneAndCouponPopupList', data, {
       noAuth: true
   });
}
export function getProductCouponList(data) {
   return request.get('coupons/product', data, {
       noAuth: true
   });
}
// 小程序专区优惠券列表
export function getZoneCoupon(id) {
   return request.get('zone/coupon/list/' + id, {}, {
       noAuth: true
   });
}
// 查询当前用户指定优惠券可用数量
export function getZoneCouponCount(data) {
   return request.get('zone/coupon/user/count', data, {
       noAuth: true
   });
}
// 查当前用户即将到期的优惠券
export function getExpiringCoupon() {
   return request.get('coupon/expiring', {}, {
       noAuth: true
   });
}
// 小程序悦养豆兑换优惠券
export function couponExchange(data) {
   return request.post('zone/coupon/exchange', data);
}
// 当前用户悦养豆消耗记录
export function getConsumeRecord(data) {
   return request.get('care/bean/consume/record/list', data, {
       noAuth: true
   });
}
 
// 访问专区并执行券包判断
export function couponPackVisit(data) {
   return request.post('coupon-pack/visit', data);
}
 
// 生成好友券分享链接
export function couponPackSharelink(data) {
   return request.post('coupon-pack/share-link?activityId=' + data.activityId, {});
}
// 授权后恢复未授权访问
export function couponPackPendingVisitProcess(data) {
   return request.post('coupon-pack/pending-visit/process', data);
}
// 未授权访问暂存
export function couponPackPendingVisit(data) {
   return request.post('coupon-pack/pending-visit', data);
}
 
// 查询当前用户券包状态
export function getCounponPackStatus(zoneId) {
   return request.get('coupon-pack/status?zoneId=' + zoneId, {}, {
       noAuth: true
   });
}