active_discount.js
1.88 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
import request from '@/utils/request'
export function getData(data) {
return request({
url: '',
method: 'post',
data
})
}
// 限时折扣查询
/**
{
"DiscountName": "", // 活动名称
"page": 0,
"pageSize": 0,
"state": 0 // 活动状态 0-报名未开始 1-报名进行中 2-活动待开始 3-活动进行中 4-活动已结束
}
*/
// 查询限时折扣列表
export function getDiscountData(data) {
return request({
url: '/discount/getAll',
method: 'post',
data
})
}
// 查询限时折扣详情
export function getDiscountDetail(data) {
return request({
url: '/discount/getById',
method: 'post',
data
})
}
// 添加限时折扣
export function addDiscountData(data) {
return request({
url: '/discount/save',
method: 'post',
data
})
}
// 删除限时折扣
export function delDiscountData(data) {
return request({
url: '/discount/delete',
method: 'post',
data
})
}
// 修改限时折扣
export function editDiscountData(data) {
return request({
url: '/discount/update',
method: 'post',
data
})
}
// 停止限时折扣
export function stopDiscountData(data) {
return request({
url: '/discount/stop',
method: 'post',
data
})
}
// 秒杀活动数据查询
export function getDiscountChart(data) {
return request({
url: '/discount/getData',
method: 'post',
data
})
}
// 参与店铺查询
export function getDiscountShop(data) {
return request({
url: '/discount/getShops',
method: 'post',
data
})
}
// 查看商品
export function getDiscountProduct(data) {
return request({
url: '/discount/getProducts',
method: 'post',
data
})
}
// 导出商家明细
/**
{
"discountId": 0
}
*/
export function exportDiscountData(data) {
return request({
url: '/discount/excel_shop_detail',
method: 'post',
data,
responseType: 'blob'
})
}