Skip to content

Commit ae1b424

Browse files
YunaiVgitee-org
authored andcommitted
!315 秒杀活动相关
Merge pull request !315 from halfninety/feature/1.8.0-uniapp
2 parents 4b13497 + 8f8a1a6 commit ae1b424

File tree

4 files changed

+801
-0
lines changed

4 files changed

+801
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import request from '@/utils/request'
2+
3+
// 创建秒杀活动
4+
export function createSeckillActivity(data) {
5+
return request({
6+
url: '/promotion/seckill-activity/create',
7+
method: 'post',
8+
data: data
9+
})
10+
}
11+
12+
// 更新秒杀活动
13+
export function updateSeckillActivity(data) {
14+
return request({
15+
url: '/promotion/seckill-activity/update',
16+
method: 'put',
17+
data: data
18+
})
19+
}
20+
21+
// 关闭限时折扣活动
22+
export function closeSeckillActivity(id) {
23+
return request({
24+
url: '/promotion/seckill-activity/close?id=' + id,
25+
method: 'put'
26+
})
27+
}
28+
29+
// 删除秒杀活动
30+
export function deleteSeckillActivity(id) {
31+
return request({
32+
url: '/promotion/seckill-activity/delete?id=' + id,
33+
method: 'delete'
34+
})
35+
}
36+
37+
// 获得秒杀活动
38+
export function getSeckillActivity(id) {
39+
return request({
40+
url: '/promotion/seckill-activity/get?id=' + id,
41+
method: 'get'
42+
})
43+
}
44+
45+
// 获得秒杀活动分页
46+
export function getSeckillActivityPage(query) {
47+
return request({
48+
url: '/promotion/seckill-activity/page',
49+
method: 'get',
50+
params: query
51+
})
52+
}

src/api/mall/promotion/seckillTime.js

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import request from '@/utils/request'
2+
3+
// 创建秒杀时段
4+
export function createSeckillTime(data) {
5+
return request({
6+
url: '/promotion/seckill-time/create',
7+
method: 'post',
8+
data: data
9+
})
10+
}
11+
12+
// 更新秒杀时段
13+
export function updateSeckillTime(data) {
14+
return request({
15+
url: '/promotion/seckill-time/update',
16+
method: 'put',
17+
data: data
18+
})
19+
}
20+
21+
// 删除秒杀时段
22+
export function deleteSeckillTime(id) {
23+
return request({
24+
url: '/promotion/seckill-time/delete?id=' + id,
25+
method: 'delete'
26+
})
27+
}
28+
29+
// 获得秒杀时段
30+
export function getSeckillTime(id) {
31+
return request({
32+
url: '/promotion/seckill-time/get?id=' + id,
33+
method: 'get'
34+
})
35+
}
36+
37+
// 获得秒杀时段分页
38+
export function getSeckillTimePage(query) {
39+
return request({
40+
url: '/promotion/seckill-time/page',
41+
method: 'get',
42+
params: query
43+
})
44+
}
45+
46+
// 获取所有的秒杀时段
47+
export function getSeckillTimeList() {
48+
return request({
49+
url: '/promotion/seckill-time/list',
50+
method: 'get'
51+
})
52+
}
53+
54+
// 导出秒杀时段 Excel
55+
export function exportSeckillTimeExcel(query) {
56+
return request({
57+
url: '/promotion/seckill-time/export-excel',
58+
method: 'get',
59+
params: query,
60+
responseType: 'blob'
61+
})
62+
}

0 commit comments

Comments
 (0)