goodsCouponApi.js
1.95 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
import { other_http } from '@/main'
const url = 'rop-scrm-coupon/router'
const defaultPath = 'scrm.api.coupon.'
/**商品分页查询*/
const getCouponsList = params => {
params.method = `${defaultPath}equity.list.merchant`
return other_http({
url,
data: params
})
}
const createCoupons = params => {
params.method = `${defaultPath}equity.batch.create`
return other_http({
url,
data: params
})
}
const getExportApi = params => {
params.method = `${defaultPath}equity.list.merchant.export`
return other_http({
url,
data: params,
sign: true
})
}
//领取记录列表
const getListReceiveRecordApi = params => {
params.method = `${defaultPath}listReceiveRecordByCouponId`
return other_http({
url,
method: 'GET',
data: params,
sign: true
})
}
//查看优惠券
const getCouponDetailApi = params => {
params.method = `${defaultPath}detail`
return other_http({
url,
method: 'GET',
data: params,
sign: true
})
}
//删除
const deleteCouponApi = params => {
params.method = `${defaultPath}delete`
return other_http({
url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 优惠券-作废
const couponUserCancelApi = params => {
params.method = `${defaultPath}user.cancel`
return other_http({
url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const detailExportApi = params => {
params.method = `${defaultPath}equity.exportReceiveRecord`
return other_http({
url,
data: params,
sign: true
})
}
//生效/失效
const effectiveCouponApi = params => {
params.method = `${defaultPath}effective`
return other_http({
url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default {
getCouponsList,
createCoupons,
getExportApi,
getListReceiveRecordApi,
getCouponDetailApi,
deleteCouponApi,
couponUserCancelApi,
detailExportApi,
effectiveCouponApi
}