Authored by jinhu.tung

cart doest not group by brand

... ... @@ -294,12 +294,13 @@ const filterCartData = (result, uid) => {
});
}
// _.groupBy(_.concat(advancedGoods, advancedSoldOutGoods), 'brand_id')
return _.merge(resData, {
hasGoods: advancedGoods.length || ordinaryGoods.length || invalidGoods.length,
preSalePros: (advancedSoldOutGoods.length || advancedGoods.length) ?
_.groupBy(_.concat(advancedGoods, advancedSoldOutGoods), 'brand_id') : [],
preSalePros: (advancedSoldOutGoods.length || advancedGoods.length) ?
_.concat(advancedGoods, advancedSoldOutGoods) : [],
commonPros: (ordinarySoldOutGoods.length || ordinaryGoods.length) ?
_.groupBy(_.concat(ordinaryGoods, ordinarySoldOutGoods), 'brand_id') : [],
_.concat(ordinaryGoods, ordinarySoldOutGoods) : [],
invalidPros: invalidGoods,
selectedNum: selectedAdvanceNum + selectedOrdinaryNum,
checkAll: totalNum === (selectedAdvanceNum + selectedOrdinaryNum),
... ...
... ... @@ -7,7 +7,7 @@
<div class="pro-list">
{{#each preSalePros}}
<div class="pros-group">
{{# each this}}
{{!-- {{# each this}} --}}
<ul>
<li class="chk" data-product_info='{"goods_type": "advance", "buy_number": {{buy_number}}, "selected": "{{selected}}", "product_sku": "{{product_sku}}", "promotion_id": 0}'>
<label class="toggle-chk-item {{#isEqual selected 'Y'}}chk-group{{/isEqual}}">
... ... @@ -49,7 +49,7 @@
</div>
</li>
</ul>
{{/each}}
{{!-- {{/each}} --}}
</div>
{{/each}}
</div>
... ... @@ -64,7 +64,7 @@
<div class="pro-list">
{{#each commonPros}}
<div class="pros-group">
{{# each this}}
{{!-- {{# each this}} --}}
<ul>
<li class="chk" data-product_info='{"goods_type": "ordinary", "buy_number": {{buy_number}}, "selected": "{{selected}}", "product_sku": "{{product_sku}}", "promotion_id": 0}'>
<label class="toggle-chk-item {{#isEqual selected 'Y'}}chk-group{{/isEqual}}">
... ... @@ -103,7 +103,7 @@
</div>
</li>
</ul>
{{/each}}
{{!-- {{/each}} --}}
</div>
{{/each}}
</div>
... ...
... ... @@ -23,7 +23,7 @@
<div class="pro-list">
{{#each preSalePros}}
<div class="pros-group">
{{# each this}}
{{!-- {{# each this}} --}}
<ul>
<li class="chk" data-product_info='{"goods_type": "advance", "buy_number": {{buy_number}}, "selected": "{{selected}}", "product_sku": "{{product_sku}}", "promotion_id": 0}'>
<label class="toggle-chk-item {{#isEqual selected 'Y'}}chk-group{{/isEqual}}">
... ... @@ -78,7 +78,7 @@
</div>
</li>
</ul>
{{/each}}
{{!-- {{/each}} --}}
</div>
{{/each}}
</div>
... ... @@ -93,7 +93,7 @@
<div class="pro-list">
{{#each commonPros}}
<div class="pros-group">
{{# each this}}
{{!-- {{# each this}} --}}
<ul>
<li class="chk" data-product_info='{"goods_type": "ordinary", "buy_number": {{buy_number}}, "selected": "{{selected}}", "product_sku": "{{product_sku}}", "promotion_id": 0}'>
<label class="toggle-chk-item {{#isEqual selected 'Y'}}chk-group{{/isEqual}}">
... ... @@ -145,7 +145,7 @@
</div>
</li>
</ul>
{{/each}}
{{!-- {{/each}} --}}
</div>
{{/each}}
</div>
... ...