currency-api.js 911 Bytes
/**
 * @author: weiqingting<qingting.wei@yoho.cn>
 */
'use strict';

module.exports = class extends global.yoho.BaseModel {
    constructor(ctx) {
        super(ctx);
    }

    yohoCoinList(uid, condition) {
        condition = condition || {};
        let data = {
            method: 'app.yohocoin.lists',
            uid: uid,
            page: 1,
            limit: 15
        };

        Object.assign(data, condition);
        return this.get({
            data: data
        });
    }

    yohoCoinTotal(uid) {
        let data = {
            method: 'app.yoho.yohocoin',
            uid: uid
        };

        return this.get({
            data: data
        });
    }

    getProduct(skn, limit) {
        let data = {
            method: 'h5.product.batch',
            productSkn: skn,
            limit: limit
        };

        return this.get({
            data: data
        });
    }

};