Authored by 毕凯

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

... ... @@ -277,6 +277,10 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
if (num === 1 || 0 === leftNum - 0) {
return;
}
if (num < 1) {
$num.val(1);
return;
}
$num.val(num - 1);
}).on('touchstart', '.btn-plus', function() {
... ... @@ -294,7 +298,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
}
//TODO:库存数验证
if (num > leftNum) {
if (num > leftNum - 1) {
$num.val(leftNum);
return;
}
... ... @@ -318,6 +322,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
return;
}
//TODO status change
if ($('#chose-btn-sure').html() === '已售罄') {
return;
... ... @@ -329,7 +334,10 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
tip.show('您选择的数量超过了最大库存量~');
return;
}
if (num < 0) {
tip.show('您选择的数量小于一件~');
return;
}
$chosed = $('.block-list>ul>li.chosed');
if (2 === $chosed.length && 0 === $chosed.closest('.zero-stock').length) {
... ...
... ... @@ -39,17 +39,18 @@
.thumb {
float: left;
width: 80rem / $pxConvertRem;
width: 100rem / $pxConvertRem;
}
.text-info {
position: absolute;
height: auto;
left: pxToRem(95px);
top:50%;
transform: translateY(-50%);
.name {
font-size: 28rem / $pxConvertRem;
height: 74rem / $pxConvertRem;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.price{
... ...
... ... @@ -11,7 +11,7 @@
{{/if}}
{{#if isEmptyCart}}
<div class="cart-zero">
<i class="iconfont">&#xe62c</i>
<i class="iconfont">&#xe640;</i>
<p>您的购物车暂无商品</p>
<a href="/product/new">随便逛逛</a>
</div>
... ...
... ... @@ -118,8 +118,7 @@
{{#cartInfo}}
<div class="cart-bar">
<span class="num-tag hide"></span>
<a href="{{cartUrl}}" class="num-incart iconfont">&#xe62c;</a>
<a href="{{cartUrl}}" class="num-incart iconfont"><span class="num-tag hide"></span>&#xe62c;</a>
{{#if addToCartUrl}}
<!-- <a id="addtoCart" href="{{addToCartUrl}}" class="addto-cart">加入购物车</a> -->
... ...
... ... @@ -16,8 +16,8 @@
<a href="/cart/index/gift?cartType={{cartType}}">
<span class="iconfont">&#xe620;</span>
赠品
<span class="count">{{count}}</span>
<span class="iconfont icon-right-arrow">&#xe614;</span>
<span class="count">{{count}}</span>
</a>
</li>
{{/ freebie}}
... ... @@ -26,8 +26,8 @@
<a href="/cart/index/advanceBuy?cartType={{cartType}}">
<span class="iconfont">&#xe61b;</span>
加价购
<span class="count">{{advanceBuyCount}}</span>
<span class="iconfont icon-right-arrow">&#xe614;</span>
<span class="count">{{advanceBuyCount}}</span>
</a>
</li>
{{/if}}
... ...