Authored by 郝肖肖

潮流优选,商品列表去除重复的skn

... ... @@ -46,9 +46,12 @@ const getAllChannels = (params) => {
* @return {[array]}
*/
const getProductBatch = (productSkn, options) => {
productSkn = _.isArray(productSkn) ? productSkn : [productSkn];
productSkn = _.uniq(_.isArray(productSkn) ? productSkn : [productSkn]);
return api.get('', {
method: 'h5.product.batch',
limit: productSkn.length,
page: 1,
productSkn: productSkn.join(',')
}).then(result => {
return result && result.data ? productProcess.processProductList(result.data.product_list, options) : [];
... ...