redpac.js 1.22 KB
/**
 * Created by qiujun on 2018/10/9.
 */

class RedpacModel extends global.yoho.BaseModel {
    constructor(ctx) {
        super(ctx);
    }

    /**
     * 领取红包
     * @param uid
     * @param actSource
     * @param redpacToken
     */
    getRedpac(uid, udid, actSource, redpacToken) {
        return this.get({
            url: '',
            data: {
                method: 'app.redpac.addRedpac',
                uid: uid,
                udid: udid,
                actSource: actSource,
                redpacToken: redpacToken
            }
        });
    }

    /**
     * 获取我的红包列表
     * @param uid
     */
    getMyRedpac(uid) {
        return this.get({
            url: '',
            data: {
                method: 'app.redpac.redpacNum',
                uid: uid
            }
        });
    }

    /**
     * 获取红包token
     * @param udid
     * @param actSource
     */
    getRedpacToken(udid, actSource) {
        // console.log(udid, actSource);
        return this.get({
            url: '',
            data: {
                method: 'app.redpac.redpacToken',
                actSource: actSource,
                udid: udid
            }
        });
    }

}

module.exports = RedpacModel;