Authored by Rock Zhang

修复选择和全选按钮报错的bug,以及选择状态不能保存的bug

Code Review By Rock Zhang
... ... @@ -242,7 +242,7 @@ function bottomCheckBoxHandeler(isSelected, type, handlerAfterTouch) {
}
goodInfo.goods_type = type;
goodInfo.selected = isSelected ? 'Y' : 'N';
goodInfo.selected = isSelected ? 'N' : 'Y';
$goods.each(function(idx, good) {
$good = $(good);
... ... @@ -259,9 +259,8 @@ function bottomCheckBoxHandeler(isSelected, type, handlerAfterTouch) {
//是否要全选
function willBeSelected() {
function willBeSelected($this) {
var isSelected = true;
var $this = $(this);
if ($this.hasClass('icon-cb-checked')) {
isSelected = true;
... ... @@ -274,7 +273,8 @@ function willBeSelected() {
//全选按钮点击事件
$selectAllBtn.on('touchend', function() {
bottomCheckBoxHandeler(willBeSelected(), getCartType(), didUpdateAllGoodsCheckStatus);
var $this = $(this);
bottomCheckBoxHandeler(willBeSelected($this), getCartType(), didUpdateAllGoodsCheckStatus);
});
$('.down').on('touchend', function() {
... ...
... ... @@ -15,7 +15,7 @@
<li class="freebie">
<span class="iconfont">&#xe620;</span>
赠品
<a href={{url}}>
<a href="/cart/index/gift">
<span class="count">{{count}}</span>
<span class="iconfont icon-right-arrow">&#xe614;</span>
</a>
... ... @@ -25,7 +25,7 @@
<li class="advance-buy">
<span class="iconfont">&#xe61b;</span>
加价购
<a>
<a href="/cart/index/advanceBuy">
<span class="count">{{advanceBuyCount}}</span>
<span class="iconfont icon-right-arrow">&#xe614;</span>
</a>
... ...