Authored by 梁志锋

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -133,15 +133,16 @@ if ($('.freebie').length > 0) { @@ -133,15 +133,16 @@ if ($('.freebie').length > 0) {
133 } 133 }
134 134
135 $('.btn-balance').on('touchend', function() { 135 $('.btn-balance').on('touchend', function() {
136 - if (shouldSelectGift()) {  
137 - showChooseGifDialog();  
138 - return false;  
139 - }  
140 if (shouldLowStocks()) { 136 if (shouldLowStocks()) {
141 tip.show('库存不足无法结算'); 137 tip.show('库存不足无法结算');
142 return false; 138 return false;
143 } 139 }
144 140
  141 + if (shouldSelectGift()) {
  142 + showChooseGifDialog();
  143 + return false;
  144 + }
  145 +
145 if (hasChecked) { 146 if (hasChecked) {
146 window.location.href = '/cart/index/orderEnsure?cartType=' + cartType; 147 window.location.href = '/cart/index/orderEnsure?cartType=' + cartType;
147 } else { 148 } else {
@@ -190,6 +190,10 @@ function bottomCheckBoxHandeler(isSelected, type, handlerAfterTouch) { @@ -190,6 +190,10 @@ function bottomCheckBoxHandeler(isSelected, type, handlerAfterTouch) {
190 190
191 //全选按钮点击事件 191 //全选按钮点击事件
192 $selectAllBtn.on('touchend', function() { 192 $selectAllBtn.on('touchend', function() {
  193 + if ($('.low-stocks').length > 0) {
  194 + tip.show('所选商品中含有库存不足的商品');
  195 + return false;
  196 + }
193 bottomCheckBoxHandeler($(this).hasClass('icon-cb-checked'), $('#cartType').val(), didUpdateAllGoodsCheckStatus); 197 bottomCheckBoxHandeler($(this).hasClass('icon-cb-checked'), $('#cartType').val(), didUpdateAllGoodsCheckStatus);
194 }); 198 });
195 199
@@ -41,7 +41,7 @@ optHammer.on('tap', function(e) { @@ -41,7 +41,7 @@ optHammer.on('tap', function(e) {
41 } 41 }
42 }).then(function(res) { 42 }).then(function(res) {
43 $('#dialog-wrapper').hide(); 43 $('#dialog-wrapper').hide();
44 - if (!res) { 44 + if ($.type(res) !== 'object') {
45 return; 45 return;
46 } 46 }
47 if (res.message) { 47 if (res.message) {
@@ -70,7 +70,7 @@ optHammer.on('tap', function(e) { @@ -70,7 +70,7 @@ optHammer.on('tap', function(e) {
70 } 70 }
71 }).then(function(res) { 71 }).then(function(res) {
72 $('#dialog-wrapper').hide(); 72 $('#dialog-wrapper').hide();
73 - if (!res) { 73 + if ($.type(res) !== 'object') {
74 return; 74 return;
75 } 75 }
76 if (res.message) { 76 if (res.message) {
@@ -28,9 +28,9 @@ @@ -28,9 +28,9 @@
28 } 28 }
29 29
30 .few-tag{ 30 .few-tag{
31 - width: 132rem / $pxConvertRem; 31 + width: 148rem / $pxConvertRem;
32 position: absolute; 32 position: absolute;
33 - left: 100rem / $pxConvertRem; 33 + left: 92rem / $pxConvertRem;
34 text-align: center; 34 text-align: center;
35 top: 75%; 35 top: 75%;
36 color: #fff; 36 color: #fff;
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 .icon-cb-checked:before { content: "\e61d"; } 5 .icon-cb-checked:before { content: "\e61d"; }
6 6
7 .shopping-cart-page { 7 .shopping-cart-page {
8 - padding-bottom: 120rem / $pxConvertRem; 8 + margin-bottom: 120rem / $pxConvertRem;
9 overflow-x: hidden; 9 overflow-x: hidden;
10 background: #f0f0f0; 10 background: #f0f0f0;
11 11
@@ -408,7 +408,7 @@ class CartModel @@ -408,7 +408,7 @@ class CartModel
408 $oneGoods['name'] = $single['product_name']; 408 $oneGoods['name'] = $single['product_name'];
409 $oneGoods['color'] = $single['color_name']; 409 $oneGoods['color'] = $single['color_name'];
410 $oneGoods['size'] = $single['size_name']; 410 $oneGoods['size'] = $single['size_name'];
411 - $oneGoods['price'] = Helpers::transPrice($single['sales_price']); 411 + $oneGoods['price'] = Helpers::transPrice($single['last_price']);
412 $oneGoods['count'] = $single['buy_number']; 412 $oneGoods['count'] = $single['buy_number'];
413 413
414 //gift=>是否赠品,advanceBuy=>是否加价购; 414 //gift=>是否赠品,advanceBuy=>是否加价购;