绿满眶商城微信小程序-uniapp
xiangpei
2025-05-09 c3e6cdbb29580e77444541c7953aca33581a4267
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
/**
 * 促销相关API
 */
import { http, Method } from "@/utils/request.js";
 
/**
 * 获取当前直播列表
 *
 * @param {*}
 * @returns
 */
export function getLiveList(params) {
  return http.request({
    url: `broadcast/studio`,
    method: Method.GET,
    params,
  });
}
 
/**
 * 获取当前拼团活动的未成团的会员
 */
export function getPromotionGroupMember(pintuanId) {
  return http.request({
    url: `promotion/pintuan/${pintuanId}/members`,
    method: Method.GET,
  });
}
 
/** 获取拼团列表 */
export function getAssembleList(params) {
  return http.request({
    url: "promotion/pintuan",
    method: Method.GET,
    loading: false,
    params,
  });
}
 
/**
 * 获取积分商城分类
 */
export function getPointsCategory() {
  return http.request({
    url: "/promotion/pointsGoods/category",
    method: Method.GET,
  });
}
 
/**
 * 获取积分商城商品
 * @param params
 */
 export function getPointsGoods(params) {
  return http.request({
    url: "/promotion/pointsGoods",
    method: Method.GET,
    params,
  });
}
/**
 * 获取积分商城商品详情
 * @param params
 */
export function getPointsGoodsDetail(id) {
  return http.request({
    url: "/promotion/pointsGoods/"+id,
    method: Method.GET,
  });
}
 
 
 
/**
 * 获取限时抢购时间线 当天限时抢购信息
 */
export function getSeckillTimeLine() {
  return http.request({
    url: "promotion/seckill",
    method: Method.GET,
  });
}
 
/**
 * 获取限时抢购商品 获取某个时刻的限时抢购商品信息
 * @param params
 */
export function getSeckillTimeGoods(timeline) {
  return http.request({
    url: `promotion/seckill/${timeline}`,
    method: Method.GET,
  });
}
 
/**
 * 获取全部优惠券
 * @param params
 */
export function getAllCoupons(params) {
  return http.request({
    url: "/promotion/coupon",
    method: Method.GET,
    params,
  });
}
 
/**
 * 分页获取砍价商品
 * @param params
 */
export function getBargainList(params) {
  return http.request({
    url: "/promotion/kanjiaGoods",
    method: Method.GET,
    params,
  });
}
 
/**
 * 分页获取砍价商品
 * @param params
 */
export function getBargainDetail(id) {
  return http.request({
    url: `/promotion/kanjiaGoods/${id}`,
    method: Method.GET,
  });
}
 
/**
 * 获取砍价活动
 * @param params
 */
export function getBargainActivity(params) {
  return http.request({
    url: `/promotion/kanjiaGoods/getKanjiaActivity`,
    method: Method.POST,
    params,
  });
}
 
/**
 * 发起砍价活动
 * @param params
 */
export function openBargain(params) {
  return http.request({
    url: `/promotion/kanjiaGoods`,
    method: Method.POST,
    header: { "content-type": "application/x-www-form-urlencoded" },
    data: params,
  });
}
 
/**
 * 分页获取砍价活动-帮砍记录
 */
export function getBargainLog(params) {
  return http.request({
    url: `/promotion/kanjiaGoods/getKanjiaActivity/logs`,
    method: Method.GET,
    data: params,
  });
}
 
 
/**
 * 分页获取砍价活动-帮砍记录
 */
 export function helpBargain(kanJiaActivityId) {
  return http.request({
    url: `promotion/kanjiaGoods/help/${kanJiaActivityId}`,
    method: Method.POST,
  });
}
 
/**
 * 分页获取已参与的砍价活动
 */
export function getMineBargainLog(params) {
  return http.request({
    url: `/promotion/kanjiaGoods/kanjiaActivity/mine/`,
    method: Method.GET,
    params
  });
}