Blame view

apps/home/models/coupon-new.js 810 Bytes
郭成尧 authored
1 2 3 4
class CouponNewModel extends global.yoho.BaseModel {
    constructor(ctx) {
        super(ctx);
    }
郭成尧 authored
5
郭成尧 authored
6 7 8 9 10 11 12 13 14 15 16 17
    /**
     * 优惠券数据
     */
    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
郭成尧 authored
18 19 20
            },
            param: {
                cache: false
郭成尧 authored
21
            }
郭成尧 authored
22 23
        });
    }
郭成尧 authored
24
郭成尧 authored
25 26 27 28 29 30 31 32 33
    /**
     * 优惠券数量
     */
    getCouponNums(params) {
        return this.get({
            data: {
                method: 'app.coupons.getCouponNums',
                uid: params.uid
            }
郭成尧 authored
34 35
        });
    }
郭成尧 authored
36 37 38 39
}


module.exports = CouponNewModel;