3f535f30
杨鑫
'初始'
|
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
|
import request from '@/utils/request'
export function getData(data) {
return request({
url: '',
method: 'post',
data
})
}
// 平台优惠券活动管理查询
/**
{
"activityName": "", // 活动名称
"discountMode": 0, // 优惠方式 1-满减 2-优惠券
"page": 0,
"pageSize": 0,
"state": 0 // 审核状态 0-待审核 1-报名成功 2-报名失败
}
*/
export function getCouponData(data) {
return request({
url: '/activity/getAll',
method: 'post',
data
})
}
/**
{
"activityId": 0
}
*/
export function getCouponDetail(data) {
return request({
url: '/activity/getById',
method: 'post',
data
})
}
export function getCharts (data) {
return request({
url: '/activity/getActivityCharts',
method: 'POST',
data
})
}
export function getStats (data) {
return request({
url: '/activity/getActivityStats',
method: 'get'
})
}
export function getShopDatas (data) {
return request({
url: '/activity/getActivityShopDatas',
method: 'POST',
data
})
}
// export function Chartdat (data) {
// this.cities = data.cities // 分布情况
// this.cityPeople = data.cityPeople // 前五省份访问占比
// this.classifies = data.classifies // 销售类别分布
// this.newOlds = data.newOlds // 新老访客占比
// this.productRankings = data.productRankings // 畅销商品排行榜
// this.shopRankings = data.shopRankings // 商家成交排行榜
// this.systems = data.systems // 系统访客占比
// this.terminals = data.terminals // 终端访客占比
// this.trend = data.trend // 趋势图
// this.describe = data.describe
// }
// 添加
export function addCoupon(data) {
return request({
url: '/activity/save',
method: 'post',
data
})
}
// 修改平台优惠券
/**
{
"activityEndTime": "",
"activityId": 0,
"activityIntroduce": "",
"activityName": "",
"activityStartTime": "",
"bondMoney": 0,
"couponContent": 0,
"discountMode": 0, // 优惠方式 1-满减 2-折扣
"frequency": 0,
"ifBond": 0,
"number": 0,
"promotionDetail": [
{
"activityId": 0,
"couponId": 0,
"fullMoney": 0,
"reduceMoney": 0
}
],
"receiveType": 0,
"signEndTime": "",
"signStartTime": "",
"threshold": 0
}
*/
export function editCoupon(data) {
return request({
url: '/activity/update',
method: 'post',
data
})
}
// 结束
/**
{
"activityId": 0
}
*/
export function endCoupon(data) {
return request({
url: '/activity/end',
method: 'post',
data
})
}
// 删除
/**
{
"activityId": 0
}
*/
export function delCoupon(data) {
return request({
url: '/activity/delete',
method: 'post',
data
})
}
// 活动数据查询
export function getChartData(data) {
return request({
url: '/activity/getActivitys',
method: 'post',
data
})
}
export function getCouponShops(data) {
return request({
url: '/activity/getShops',
method: 'post',
data
})
}
export function exportCouponData(data) {
return request({
url: '/activity/excel_shop_detail',
method: 'post',
data,
responseType: 'blob'
})
}
|