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

const api = global.yoho.API;

const sizeInfoAsync = skn => {
    return api.get('', {
        method: 'h5.product.intro',
        productskn: skn
    });

};

/**
 * 获得产品信息
 * @param pid
 * @returns {Promise.<type>}
 */
const getProductAsync = (pid) => {

    return api.get('', {
        method: 'app.product.data',
        product_id: pid
    });
};

module.exports = {
    sizeInfoAsync,
    getProductAsync
};