Merge branch 'develop' into 'develop'
Develop 1:商品库存验证 2:商品文字超长修改 3:购物车数字不能点击 See merge request !53
Showing
5 changed files
with
20 additions
and
12 deletions
@@ -277,6 +277,10 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | @@ -277,6 +277,10 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | ||
277 | if (num === 1 || 0 === leftNum - 0) { | 277 | if (num === 1 || 0 === leftNum - 0) { |
278 | return; | 278 | return; |
279 | } | 279 | } |
280 | + if (num < 1) { | ||
281 | + $num.val(1); | ||
282 | + return; | ||
283 | + } | ||
280 | 284 | ||
281 | $num.val(num - 1); | 285 | $num.val(num - 1); |
282 | }).on('touchstart', '.btn-plus', function() { | 286 | }).on('touchstart', '.btn-plus', function() { |
@@ -294,7 +298,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | @@ -294,7 +298,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | ||
294 | } | 298 | } |
295 | 299 | ||
296 | //TODO:库存数验证 | 300 | //TODO:库存数验证 |
297 | - if (num > leftNum) { | 301 | + if (num > leftNum - 1) { |
298 | $num.val(leftNum); | 302 | $num.val(leftNum); |
299 | return; | 303 | return; |
300 | } | 304 | } |
@@ -318,6 +322,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | @@ -318,6 +322,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | ||
318 | return; | 322 | return; |
319 | } | 323 | } |
320 | 324 | ||
325 | + | ||
321 | //TODO status change | 326 | //TODO status change |
322 | if ($('#chose-btn-sure').html() === '已售罄') { | 327 | if ($('#chose-btn-sure').html() === '已售罄') { |
323 | return; | 328 | return; |
@@ -329,7 +334,10 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | @@ -329,7 +334,10 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | ||
329 | tip.show('您选择的数量超过了最大库存量~'); | 334 | tip.show('您选择的数量超过了最大库存量~'); |
330 | return; | 335 | return; |
331 | } | 336 | } |
332 | - | 337 | + if (num < 0) { |
338 | + tip.show('您选择的数量小于一件~'); | ||
339 | + return; | ||
340 | + } | ||
333 | $chosed = $('.block-list>ul>li.chosed'); | 341 | $chosed = $('.block-list>ul>li.chosed'); |
334 | 342 | ||
335 | if (2 === $chosed.length && 0 === $chosed.closest('.zero-stock').length) { | 343 | if (2 === $chosed.length && 0 === $chosed.closest('.zero-stock').length) { |
@@ -39,17 +39,18 @@ | @@ -39,17 +39,18 @@ | ||
39 | 39 | ||
40 | .thumb { | 40 | .thumb { |
41 | float: left; | 41 | float: left; |
42 | - width: 80rem / $pxConvertRem; | 42 | + width: 100rem / $pxConvertRem; |
43 | } | 43 | } |
44 | 44 | ||
45 | .text-info { | 45 | .text-info { |
46 | - position: absolute; | ||
47 | height: auto; | 46 | height: auto; |
48 | - left: pxToRem(95px); | ||
49 | - top:50%; | ||
50 | - transform: translateY(-50%); | ||
51 | .name { | 47 | .name { |
52 | font-size: 28rem / $pxConvertRem; | 48 | font-size: 28rem / $pxConvertRem; |
49 | + height: 74rem / $pxConvertRem; | ||
50 | + overflow: hidden; | ||
51 | + display: -webkit-box; | ||
52 | + -webkit-line-clamp: 2; | ||
53 | + -webkit-box-orient: vertical; | ||
53 | } | 54 | } |
54 | 55 | ||
55 | .price{ | 56 | .price{ |
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | {{/if}} | 11 | {{/if}} |
12 | {{#if isEmptyCart}} | 12 | {{#if isEmptyCart}} |
13 | <div class="cart-zero"> | 13 | <div class="cart-zero"> |
14 | - <i class="iconfont"></i> | 14 | + <i class="iconfont"></i> |
15 | <p>您的购物车暂无商品</p> | 15 | <p>您的购物车暂无商品</p> |
16 | <a href="/product/new">随便逛逛</a> | 16 | <a href="/product/new">随便逛逛</a> |
17 | </div> | 17 | </div> |
@@ -118,8 +118,7 @@ | @@ -118,8 +118,7 @@ | ||
118 | 118 | ||
119 | {{#cartInfo}} | 119 | {{#cartInfo}} |
120 | <div class="cart-bar"> | 120 | <div class="cart-bar"> |
121 | - <span class="num-tag hide"></span> | ||
122 | - <a href="{{cartUrl}}" class="num-incart iconfont"></a> | 121 | + <a href="{{cartUrl}}" class="num-incart iconfont"><span class="num-tag hide"></span></a> |
123 | 122 | ||
124 | {{#if addToCartUrl}} | 123 | {{#if addToCartUrl}} |
125 | <!-- <a id="addtoCart" href="{{addToCartUrl}}" class="addto-cart">加入购物车</a> --> | 124 | <!-- <a id="addtoCart" href="{{addToCartUrl}}" class="addto-cart">加入购物车</a> --> |
@@ -16,8 +16,8 @@ | @@ -16,8 +16,8 @@ | ||
16 | <a href="/cart/index/gift?cartType={{cartType}}"> | 16 | <a href="/cart/index/gift?cartType={{cartType}}"> |
17 | <span class="iconfont"></span> | 17 | <span class="iconfont"></span> |
18 | 赠品 | 18 | 赠品 |
19 | - <span class="count">{{count}}</span> | ||
20 | <span class="iconfont icon-right-arrow"></span> | 19 | <span class="iconfont icon-right-arrow"></span> |
20 | + <span class="count">{{count}}</span> | ||
21 | </a> | 21 | </a> |
22 | </li> | 22 | </li> |
23 | {{/ freebie}} | 23 | {{/ freebie}} |
@@ -26,8 +26,8 @@ | @@ -26,8 +26,8 @@ | ||
26 | <a href="/cart/index/advanceBuy?cartType={{cartType}}"> | 26 | <a href="/cart/index/advanceBuy?cartType={{cartType}}"> |
27 | <span class="iconfont"></span> | 27 | <span class="iconfont"></span> |
28 | 加价购 | 28 | 加价购 |
29 | - <span class="count">{{advanceBuyCount}}</span> | ||
30 | <span class="iconfont icon-right-arrow"></span> | 29 | <span class="iconfont icon-right-arrow"></span> |
30 | + <span class="count">{{advanceBuyCount}}</span> | ||
31 | </a> | 31 | </a> |
32 | </li> | 32 | </li> |
33 | {{/if}} | 33 | {{/if}} |
-
Please register or login to post a comment