...
|
...
|
@@ -311,7 +311,7 @@ function getProductByPromotionId(promotionId) { |
|
|
|
|
|
function bindGiftWinAction($el) {
|
|
|
|
|
|
$el.on('click', '.slide-img .img-list .img-item', function(){
|
|
|
$el.on('click', '.slide-img .img-list .img-item', function() {
|
|
|
|
|
|
var id = $(this).data('id');
|
|
|
var skn = $(this).data('skn');
|
...
|
...
|
@@ -321,7 +321,7 @@ function bindGiftWinAction($el) { |
|
|
$el.find('.product-detail-info').empty().append(productInfoTpl(res));
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function renderAndShowGiftWin(plist) {
|
|
|
|
...
|
...
|
@@ -644,7 +644,7 @@ var Cart = { |
|
|
$this.siblings('.dt').removeClass('active');
|
|
|
$this.addClass('active');
|
|
|
},
|
|
|
showGiftWin: function () {
|
|
|
showGiftWin: function() {
|
|
|
|
|
|
var $this = $(this);
|
|
|
var $wrap = $this.closest('[data-role="promotion-wrap"]');
|
...
|
...
|
@@ -654,11 +654,11 @@ var Cart = { |
|
|
console.log($this);
|
|
|
console.log($wrap);
|
|
|
console.log(promotionid);
|
|
|
if(!promotionInfo) {
|
|
|
if (!promotionInfo) {
|
|
|
getProductByPromotionId(promotionid).done(function(pinfo) {
|
|
|
|
|
|
|
|
|
if(!pinfo && pinfo.code !== 200) {
|
|
|
if (!pinfo && pinfo.code !== 200) {
|
|
|
return new Alert('获取商品失败,请稍后再试!').show();
|
|
|
}
|
|
|
|
...
|
...
|
@@ -741,7 +741,7 @@ var giftBtn = ['[data-role=gift-view-btn]', |
|
|
'[data-role=pg-sel-btn]',
|
|
|
'[data-role=pg-resel-btn]'];
|
|
|
|
|
|
$payWapper./*find('li[data-role="pitem"]').*/on('click', giftBtn.join(','), Cart.showGiftWin);
|
|
|
$payWapper./* find('li[data-role="pitem"]').*/on('click', giftBtn.join(','), Cart.showGiftWin);
|
|
|
/*
|
|
|
$('.shop-cart').on('click', giftBtn.join(','), function() {
|
|
|
|
...
|
...
|
|