erp2goods-api.js
639 Bytes
/**
* Created by TaoHuang on 2016/11/14.
*/
'use strict';
const api = global.yoho.API;
const config = global.yoho.config;
/**
* 获得产品信息
* @param pid
* @returns {Promise.<type>}
*/
const getProductBySknAsync = (skn) => {
let params = {
method: 'app.product.data',
product_skn: skn
};
return api.get('', params, config.apiCache);
};
const getProductBySkuAsync = (sku) => {
let params = {
method: 'app.shops.productListByskus',
skus: sku
};
return api.get('', params, config.apiCache);
};
module.exports = {
getProductBySknAsync,
getProductBySkuAsync
};