Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
8 changed files
with
23 additions
and
11 deletions
@@ -191,7 +191,7 @@ class Helpers | @@ -191,7 +191,7 @@ class Helpers | ||
191 | */ | 191 | */ |
192 | public static function transPrice($price) | 192 | public static function transPrice($price) |
193 | { | 193 | { |
194 | - return (!empty($price) && !is_float($price)) ? $price . '.00' : number_format($price, 2, '.', ''); | 194 | + return number_format($price, 2, '.', ''); |
195 | } | 195 | } |
196 | 196 | ||
197 | /** | 197 | /** |
@@ -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 |
@@ -137,6 +137,13 @@ | @@ -137,6 +137,13 @@ | ||
137 | color: #999; | 137 | color: #999; |
138 | } | 138 | } |
139 | } | 139 | } |
140 | + | ||
141 | + .checkbox { | ||
142 | + display: inline-block; | ||
143 | + width: 80rem / $pxConvertRem; | ||
144 | + text-align: center; | ||
145 | + margin-right: -20rem / $pxConvertRem; | ||
146 | + } | ||
140 | 147 | ||
141 | .coin-check { | 148 | .coin-check { |
142 | float: right; | 149 | float: right; |
@@ -412,7 +412,7 @@ class CartModel | @@ -412,7 +412,7 @@ class CartModel | ||
412 | $oneGoods['name'] = $single['product_name']; | 412 | $oneGoods['name'] = $single['product_name']; |
413 | $oneGoods['color'] = $single['color_name']; | 413 | $oneGoods['color'] = $single['color_name']; |
414 | $oneGoods['size'] = $single['size_name']; | 414 | $oneGoods['size'] = $single['size_name']; |
415 | - $oneGoods['price'] = Helpers::transPrice($single['sales_price']); | 415 | + $oneGoods['price'] = Helpers::transPrice($single['last_price']); |
416 | $oneGoods['count'] = $single['buy_number']; | 416 | $oneGoods['count'] = $single['buy_number']; |
417 | 417 | ||
418 | //gift=>是否赠品,advanceBuy=>是否加价购; | 418 | //gift=>是否赠品,advanceBuy=>是否加价购; |
-
Please register or login to post a comment