Showing
1 changed file
with
4 additions
and
2 deletions
@@ -18,6 +18,7 @@ var $chosePanel = $('#chose-panel'), | @@ -18,6 +18,7 @@ var $chosePanel = $('#chose-panel'), | ||
18 | $chosed, | 18 | $chosed, |
19 | $imgsThumb, | 19 | $imgsThumb, |
20 | $leftNum, | 20 | $leftNum, |
21 | + $leftNumHtml, | ||
21 | leftNum, | 22 | leftNum, |
22 | confirming, | 23 | confirming, |
23 | curColorIndex, | 24 | curColorIndex, |
@@ -41,6 +42,7 @@ function init() { | @@ -41,6 +42,7 @@ function init() { | ||
41 | $allChoseItems = $('.chose-items'); | 42 | $allChoseItems = $('.chose-items'); |
42 | $sizeRowList = $('.size-list ul'); | 43 | $sizeRowList = $('.size-list ul'); |
43 | $leftNum = $('#left-num'); | 44 | $leftNum = $('#left-num'); |
45 | + $leftNumHtml = | ||
44 | $sizeRowList.eq(0).toggleClass('hide'); | 46 | $sizeRowList.eq(0).toggleClass('hide'); |
45 | } | 47 | } |
46 | 48 | ||
@@ -297,7 +299,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | @@ -297,7 +299,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | ||
297 | promotionId, | 299 | promotionId, |
298 | isEdit = 0, | 300 | isEdit = 0, |
299 | numInCart = $('.num-tag').html() - 0, | 301 | numInCart = $('.num-tag').html() - 0, |
300 | - num = $num.val(); | 302 | + num = parseInt($num.val(), 10); |
301 | 303 | ||
302 | //颜色尺码没有选择 | 304 | //颜色尺码没有选择 |
303 | if (!checkColorSizeNum()) { | 305 | if (!checkColorSizeNum()) { |
@@ -309,7 +311,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | @@ -309,7 +311,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | ||
309 | return; | 311 | return; |
310 | } | 312 | } |
311 | 313 | ||
312 | - leftNum = $('#left-num').val(); | 314 | + leftNum = $('#left-num').val() - 0; |
313 | 315 | ||
314 | if (num > leftNum) { | 316 | if (num > leftNum) { |
315 | tip.show('您选择的数量超过了最大库存量~'); | 317 | tip.show('您选择的数量超过了最大库存量~'); |
-
Please register or login to post a comment