coupon-new.js 745 Bytes
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
            }
        });
    }

    /**
     * 优惠券数量
     */
    getCouponNums(params) {
        return this.get({
            data: {
                method: 'app.coupons.getCouponNums',
                uid: params.uid
            }
        });
    }
}


module.exports = CouponNewModel;