...
|
...
|
@@ -46,47 +46,6 @@ $('.sale-info').mouseenter(function() { |
|
|
$(this).removeClass('active').children('ul').addClass('none');
|
|
|
});
|
|
|
|
|
|
// 推荐、优选、浏览切换
|
|
|
$('.bottom-tab-slide').on('click', '.bottom-title', function() {
|
|
|
var $this = $(this),
|
|
|
index = $this.index();
|
|
|
console.log(index);
|
|
|
var $togetherGoods = $('.individual-item-togetherGoods'),
|
|
|
$latestWalk = $('.individual-item-latestWalk'),
|
|
|
$recommendGoods = $('.individual-item-recommendGoods');
|
|
|
|
|
|
if ($this.hasClass('cur')) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
$this.addClass('cur');
|
|
|
$this.siblings('.cur').removeClass('cur');
|
|
|
|
|
|
switch (index) {
|
|
|
case 0: {
|
|
|
|
|
|
$togetherGoods.removeClass('none');
|
|
|
$recommendGoods.addClass('none');
|
|
|
$latestWalk.addClass('none');
|
|
|
break;
|
|
|
}
|
|
|
case 1: {
|
|
|
$togetherGoods.addClass('none');
|
|
|
$recommendGoods.removeClass('none');
|
|
|
$latestWalk.addClass('none');
|
|
|
break;
|
|
|
}
|
|
|
case 2: {
|
|
|
$togetherGoods.addClass('none');
|
|
|
$recommendGoods.addClass('none');
|
|
|
$latestWalk.removeClass('none');
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
// 删除购物车商品,把删除的商品移入cookie中
|
|
|
function cartDel(data, delUrl, cookieList) {
|
|
|
$.ajax({
|
...
|
...
|
@@ -191,6 +150,73 @@ function loadTogetherGoods() { |
|
|
}
|
|
|
loadTogetherGoods();
|
|
|
|
|
|
// ----------------底部 为你优选,最近浏览 begin--------------
|
|
|
// 推荐、优选、浏览切换
|
|
|
$('.bottom-tab-slide').on('click', '.bottom-title', function() {
|
|
|
var $this = $(this),
|
|
|
index = $this.index();
|
|
|
console.log(index);
|
|
|
var $togetherGoods = $('.individual-item-togetherGoods'),
|
|
|
$latestWalk = $('.individual-item-latestWalk'),
|
|
|
$recommendGoods = $('.individual-item-recommendGoods');
|
|
|
|
|
|
if ($this.hasClass('cur')) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
$this.addClass('cur');
|
|
|
$this.siblings('.cur').removeClass('cur');
|
|
|
|
|
|
switch (index) {
|
|
|
case 0: {
|
|
|
|
|
|
$togetherGoods.removeClass('none');
|
|
|
$recommendGoods.addClass('none');
|
|
|
$latestWalk.addClass('none');
|
|
|
break;
|
|
|
}
|
|
|
case 1: {
|
|
|
$togetherGoods.addClass('none');
|
|
|
$recommendGoods.removeClass('none');
|
|
|
$latestWalk.addClass('none');
|
|
|
break;
|
|
|
}
|
|
|
case 2: {
|
|
|
$togetherGoods.addClass('none');
|
|
|
$recommendGoods.addClass('none');
|
|
|
$latestWalk.removeClass('none');
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
function loadSlideGoods() {
|
|
|
// $.ajax({
|
|
|
// type: 'GET',
|
|
|
// url: '',
|
|
|
// data: {
|
|
|
// // skn: skn,
|
|
|
// size: 20,
|
|
|
// num: 1
|
|
|
// }
|
|
|
// }).then(function(data) {
|
|
|
// var pro = data.data.products;
|
|
|
|
|
|
// if (data.code === 200) {
|
|
|
// if (pro.length === 0) {
|
|
|
// return;
|
|
|
// }
|
|
|
|
|
|
$('.individual-item').slider2({
|
|
|
shownum: 5,
|
|
|
isCircle: true
|
|
|
});
|
|
|
}
|
|
|
loadSlideGoods();
|
|
|
|
|
|
// ----------------底部 为你优选,最近浏览 end--------------
|
|
|
// 凑单弹框 详情切换
|
|
|
$('body').on('click', '.piclist li', function() {
|
|
|
pacList = $(this).index();
|
...
|
...
|
@@ -474,6 +500,7 @@ $paySum.on('click', '.btn-account', function() { |
|
|
// }
|
|
|
// }
|
|
|
$('.cart-preSell-dialog').show();
|
|
|
|
|
|
// $('.togethor').show();
|
|
|
|
|
|
// $('.cart-togetherGoods').show();
|
...
|
...
|
@@ -492,7 +519,7 @@ $('.shop-cart').on('click', giftBtn, function() { |
|
|
$win.show();
|
|
|
});
|
|
|
|
|
|
$('.shop-cart').on('click', '[data-role="cart-gift-win"] .close', function(){
|
|
|
$('.shop-cart').on('click', '[data-role="cart-gift-win"] .close', function() {
|
|
|
$(this).closest('[data-role="cart-gift-win"]').hide();
|
|
|
});
|
|
|
|
...
|
...
|
|