giftApi.js
2.94 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
115
116
117
118
119
120
121
122
123
const url = '/rop-scrm-coupon/router'
const pageSize = 10
export default {
/**根据条件获取可发送列表(企微) */
getGiftList (data) {
data.method = 'scrm.api.coupon.weChat.directional.gift.list'
data.pageSize = pageSize
return window.$HTTP({
url,
data
})
},
/**根据条件获取待完善发送列表(企微) */
getUnPerfectGiftList (data) {
data.method = 'scrm.api.coupon.weChat.unPerfect.directional.gift.list'
data.pageSize = pageSize
return window.$HTTP({
url,
data
})
},
/**根据条件获取已领取列表(企微) */
getReceivedGiftList (data) {
data.method = 'scrm.api.coupon.weChat.user.directional.gift.list'
data.pageSize = pageSize
return window.$HTTP({
url,
data
})
},
/** 获取审批中列表 */
getInApproveGiftList (data) {
data.method = 'scrm.api.coupon.weChat.directional.gift.approve.in.list'
data.pageSize = pageSize
return window.$HTTP({
url,
data
})
},
/** 获取审批中列表 */
toApproveById (data) {
data.method = 'scrm.api.coupon.directional.gift.commit.approve'
return window.$HTTP({
url,
data
})
},
/** 根据id删除定向礼包 */
deleteGift (data) {
data.method = 'scrm.api.coupon.directional.gift.delete'
return window.$HTTP({
url,
data
})
},
/**根据id获取定向礼包详情(企微) */
getGiftDetail (params) {
let data = {
method: 'scrm.api.coupon.weChat.directional.gift.detail',
...params
}
return window.$HTTP({
url,
data
})
},
/**根据id获取从审批中进入定向礼包详情(企微) */
getApproveGiftDetail (params) {
let data = {
method: 'scrm.api.coupon.weChat.directional.gift.approve.in.detail',
...params
}
return window.$HTTP({
url,
data
})
},
/**根据id获取已领取列表定向礼包详情(企微) */
getUserGiftDetail (params) {
let data = {
method: 'scrm.api.coupon.weChat.user.directional.gift.detail',
...params
}
return window.$HTTP({
url,
data
})
},
/**定向礼包专用优惠券列表(嘀加后台和企微) */
getCouponList (data) {
data.method = 'scrm.api.coupon.directional.gift.coupon.list'
data.pageSize = 9999
return window.$HTTP({
url,
data
})
},
/**创建或修改礼包,修改时礼包id必传 */
createOrupdataGift (data) {
data.method = 'scrm.api.coupon.directional.gift.create'
return window.$HTTP({
url,
data
})
},
// 指定条件创建
createPerfectGift (data) {
data.method = 'scrm.api.coupon.weChat.perfect.directional.gift'
return window.$HTTP({
url,
data
})
},
/**根据定向礼包id获取二维码路径 */
createQr (data) {
data.method = 'scrm.api.coupon.directional.gift.qr.code'
return window.$HTTP({
url,
data
})
}
}