Authored by Lynnic

购物车逻辑修改

@@ -207,7 +207,7 @@ $('.yoho-page').on('touchstart', '.chose-panel', function(e) { @@ -207,7 +207,7 @@ $('.yoho-page').on('touchstart', '.chose-panel', function(e) {
207 $siblingBlock.find('.block').eq(i).addClass('zero-stock'); 207 $siblingBlock.find('.block').eq(i).addClass('zero-stock');
208 } 208 }
209 } 209 }
210 - numArray = $siblingBlock.find('.chosed').data('numstr').split('/'); 210 + numArray = ($siblingBlock.find('.chosed').data('numstr') + '').split('/');
211 $that.find('.num .left-num').html('剩余' + numArray[index] + '件'); 211 $that.find('.num .left-num').html('剩余' + numArray[index] + '件');
212 if (2 === $chosed.closest('.zero-stock').length) { 212 if (2 === $chosed.closest('.zero-stock').length) {
213 $('#chose-btn-sure').css('background-color', '#c0c0c0'); 213 $('#chose-btn-sure').css('background-color', '#c0c0c0');