...
|
...
|
@@ -12,7 +12,7 @@ const config = global.yoho.config; |
|
|
* @param pid
|
|
|
* @returns {Promise.<type>}
|
|
|
*/
|
|
|
const getProductAsync = (skn) => {
|
|
|
const getProductBySknAsync = (skn) => {
|
|
|
let params = {
|
|
|
method: 'app.product.data',
|
|
|
product_skn: skn
|
...
|
...
|
@@ -21,6 +21,16 @@ const getProductAsync = (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 = {
|
|
|
getProductAsync
|
|
|
getProductBySknAsync,
|
|
|
getProductBySkuAsync
|
|
|
}; |
...
|
...
|
|