coupon-new.js
810 Bytes
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
class CouponNewModel extends global.yoho.BaseModel {
constructor(ctx) {
super(ctx);
}
/**
* 优惠券数据
*/
couponGet(params) {
return this.get({
data: {
method: 'app.coupons.get',
uid: params.uid,
type: params.type || 'notuse',
filter: params.filter || 0,
limit: 20,
page: params.page || 1
},
param: {
cache: false
}
});
}
/**
* 优惠券数量
*/
getCouponNums(params) {
return this.get({
data: {
method: 'app.coupons.getCouponNums',
uid: params.uid
}
});
}
}
module.exports = CouponNewModel;