Authored by 梁志锋

结算提示

@@ -8,7 +8,8 @@ var $ = require('jquery'), @@ -8,7 +8,8 @@ var $ = require('jquery'),
8 lazyLoad = require('yoho.lazyload'), 8 lazyLoad = require('yoho.lazyload'),
9 Hammer = require('yoho.hammer'); 9 Hammer = require('yoho.hammer');
10 10
11 -var chosePanel = require('./chose-panel'); 11 +var chosePanel = require('./chose-panel'),
  12 + tip = require('../plugin/tip');
12 13
13 var $cartContent = $('.cart-content'); 14 var $cartContent = $('.cart-content');
14 15
@@ -46,7 +47,11 @@ if ($('.cart-nav').length > 0) { @@ -46,7 +47,11 @@ if ($('.cart-nav').length > 0) {
46 } 47 }
47 48
48 $('.btn-balance').on('touchend', function() { 49 $('.btn-balance').on('touchend', function() {
49 - window.location.href = '/cart/index/orderEnsure?cartType=' + cartType; 50 + if($('.balance span').hasClass('icon-cb-checked')){
  51 + window.location.href = '/cart/index/orderEnsure?cartType=' + cartType;
  52 + } else {
  53 + tip.show('请先勾选商品~');
  54 + }
50 }); 55 });
51 56
52 $('.chose').on('touchend', function() { 57 $('.chose').on('touchend', function() {
@@ -52,7 +52,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { @@ -52,7 +52,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
52 this.selected = properties.selected; 52 this.selected = properties.selected;
53 } 53 }
54 54
55 - goodInfo.goods_type = getCartType(); 55 + goodInfo.goods_type = cartType;
56 goodInfo.selected = isSelected ? 'N' : 'Y'; 56 goodInfo.selected = isSelected ? 'N' : 'Y';
57 goodInfo.product_sku = id; 57 goodInfo.product_sku = id;
58 goodInfo.buy_number = $good.find('.count').eq(0).text().trim().replace('×', ''); 58 goodInfo.buy_number = $good.find('.count').eq(0).text().trim().replace('×', '');