Authored by 郝肖肖

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

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