Authored by 梁志锋

购物车功能

... ... @@ -78,6 +78,23 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
tip.show('网络错误');
});
}).on('touchstart', '.icon-edit', function() {
//var $this = $(this);
//
//var $cartgood = $this.closest('.shopping-cart-good');
//
////var id = $this.closest('.shopping-cart-good').data('id');
//
//var $viewGood = $cartgood.find('.deps');
// $editGoot = $cartgood.find('.calculate-num');
//
//if ($viewGood.hasClass('show')) {
// $viewGood.removeClass('show').addClass('hide');
// $editGoot.removeClass('hide').addClass('show');
//} else {
// $viewGood.removeClass('hide').addClass('show');
// $editGoot.removeClass('show').addClass('hide');
//}
}).on('touchstart', '.icon-del', function(e) {
var $this = $(this);
... ... @@ -151,7 +168,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
$('.btn-balance').on('touchend', function() {
window.location.href = '/shoppingCart/orderEnsure?cartType=';
window.location.href = '/shoppingCart/orderEnsure?cartType='+'ordinary';
});
$('.down').on('touchend', function() {
... ...
... ... @@ -199,25 +199,13 @@
font-size: 52em / $pxConvertRem;
font-weight: bold;
}
.count{
.count {
position: absolute;
right: 20rem / $pxConvertRem;;
top: 20rem / $pxConvertRem;;
font-size: 52em / $pxConvertRem;
.good-detail-img {
.few-tag {
position: absolute;
bottom: 0;
width: 100%;
height: 28rem / $pxConvertRem;
background: #ffac5b;
font-size: 18rem / $pxConvertRem;
color: #fff;
line-height: 28rem / $pxConvertRem;
text-align: center;
}
}
}
... ...
... ... @@ -66,7 +66,6 @@
<a href="">随便逛逛</a>
</div>
{{> product/recommend-for-you}}
{{> shopping-cart/chose-panel}}
</div>
{{> shopping-cart/chose-panel}}
... ...
... ... @@ -9,10 +9,6 @@
{{/if}}
<div class="info">
<img class="thumb lazy" data-original={{thumb}}>
<!-- <div class="deps">
<div class="">
<a class="" href="{{url}}">
<img class="thumb lazy" data-original="{{thumb}}">
... ... @@ -29,7 +25,7 @@
{{/if}}
</div>
<div class="deps">
<div class="deps show">
<p class="name row">{{name}}</p>
<p class="row">
{{#if color}}
... ... @@ -76,8 +72,8 @@
</span>
{{/if}}
</p>
</div> -->
<div class="calculate-num">
</div>
<div class="calculate-num hide">
<div class="calculate">
<p><i class="iconfont cut">&#xe625;</i><span>{{count}}</span><i class="iconfont add">&#xe624;</i></p>
<p><span>颜色:{{color}}尺码:{{size}}{{name}}</span><i class="iconfont down">&#xe616;</i></p>
... ...