Authored by 刘传洋

m

... ... @@ -118,7 +118,9 @@
{{#if isNotReach}}
<a class="btn-clear blue" target="_blank" href="{{promotionPageUrl}}" data-together-id="1" >去凑单&nbsp;></a>
{{/if}}
<textarea data-role="gifts-cansel" class="hide" data-promotionid="{{promotionId}}">{{{giftGoodsListStr}}}</textarea>
{{> cart-sel-gift-tpl }}
<!--<textarea data-role="gifts-cansel" class="hide" data-promotionid="{{promotionId}}">{{{giftGoodsListStr}}}</textarea>-->
</p>
{{/promotionInfos}}
</div>
... ...
... ... @@ -297,6 +297,11 @@ function renderAndShowSelWin($item, pinfo) {
var Cart = {
addToCart: function(params) {
$payWapper.find('.cart-item-check').each(function() {
var $item = $(this);
var $chk = $item.find('.cart-item-check');
if ($chk.hasClass('cart-item-checked')) {
},
toggleSelectOne: function() { // 单选
... ...
... ... @@ -142,37 +142,16 @@ $payWapper.on('click', '.cart-del-btn', function() {
// 凑单图片懒加载
var togetherDialog = {};
var dialogTpl = require('hbs/cart/cart-togetherGoods.hbs');
// var dialogTpl = require('hbs/cart/cart-togetherGoods.hbs');
lazyLoad($('#details-html img'));
/*$('.shop-cart').on('click', '.gift-sell .btn-clear', function() {
var tid = $(this).attr('data-together-id');
showTogetherGoods(tid);
});*/
// 凑单
/*function showTogetherGoods(id) {
if (!id) {
return;
}
var dialog = togetherDialog[id];
if (!dialog) {
dialog = new Dialog({
content: dialogTpl(),
className: 'cart-togetherGoods'
});
togetherDialog[id] = dialog;
}
dialog.show();
}*/
}
//凑单 顶部 轮播
$('.side-img-dd').slider2({
isCircle: true,
shownum: 5
});
// 凑单弹框 详情切换
$('body').on('click', '.piclist li', function() {
... ... @@ -262,25 +241,25 @@ $('body').on('click', '.cut, .add', function() {
// 凑单弹框 商品信息弹出框,加入收藏夹
$cartGoodsDetail.on('click', '.btn-favCount', function() {
// $.ajax({
// type: 'POST',
// dataType: 'json',
// url: '',
// data: {
// productId: productId,
// type: 'add'
// }
// }).then(function(d) {
// if (d.code === 200) {
// new Alert(d.message).show();
// } else if (d.code === 403) {
// if (d.data.url) {
// window.location = d.data.url;
// }
// } else {
// new Alert(d.message).show();
// }
// });
$.ajax({
type: 'POST',
dataType: 'json',
url: '',
data: {
productId: productId,
type: 'add'
}
}).then(function(d) {
if (d.code === 200) {
new Alert(d.message).show();
} else if (d.code === 403) {
if (d.data.url) {
window.location = d.data.url;
}
} else {
new Alert(d.message).show();
}
});
});
... ... @@ -294,7 +273,7 @@ $('.shop-cart').on('click', '.gift-sell .btn-clear', function() {
});
// 购物车列表 显示
/*
function showPromotion(id) {
if (!id) {
... ... @@ -313,7 +292,7 @@ function showPromotion(id) {
dialog.show();
}
}*/
// 购物车列表 大小图切换
$('body').on('click', '.piclist li', function() {
... ...