product-api.js 601 Bytes
/**
 * Created by TaoHuang on 2016/10/19.
 */

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

    sizeInfoAsync(skn) {
        let params = {
            method: 'h5.product.intro',
            productskn: skn
        };

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

    /**
     * 获得产品信息
     * @param pid
     * @returns {Promise.<type>}
     */
    getProductAsync(pid) {
        let params = {
            method: 'app.product.data',
            product_id: pid
        };

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