...
|
...
|
@@ -46,6 +46,11 @@ $('.sale-info').mouseenter(function() { |
|
|
$(this).removeClass('active').children('ul').addClass('none');
|
|
|
});
|
|
|
|
|
|
$('.side-img-dd').slider2({
|
|
|
shownum: 5,
|
|
|
isCircle: true
|
|
|
});
|
|
|
|
|
|
// 删除购物车商品,把删除的商品移入cookie中
|
|
|
function cartDel(data, delUrl, cookieList) {
|
|
|
$.ajax({
|
...
|
...
|
@@ -106,116 +111,98 @@ var togetherDialog = {}; |
|
|
|
|
|
lazyLoad($('#details-html img'));
|
|
|
|
|
|
// 凑单 顶部 轮播
|
|
|
$('.side-img-dd').slider2({
|
|
|
isCircle: true,
|
|
|
shownum: 5
|
|
|
});
|
|
|
|
|
|
// 店铺推荐
|
|
|
function loadTogetherGoods() {
|
|
|
// $.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-comment').find('.block-title .title').eq(0).removeClass('hide').addClass('cur');
|
|
|
// $('.individual-comment').find('.block-title .title').eq(1).removeClass('cur');
|
|
|
// $('.individual-comment').find('.block-title').find('.sep').removeClass('hide');
|
|
|
//
|
|
|
// $('#recommend-shop').removeClass('hide');
|
|
|
|
|
|
$('.side-img-dd').slider2({
|
|
|
shownum: 5,
|
|
|
isCircle: true
|
|
|
});
|
|
|
|
|
|
// } else {
|
|
|
// $('.individual-comment').find('.block-title .title:first-child').addClass('hide');
|
|
|
// $('.individual-comment').find('.block-title').find('.title').addClass('cur').prev('.sep').addClass('hide');
|
|
|
// $('#recommend-shop').detach();
|
|
|
// }
|
|
|
// });
|
|
|
}
|
|
|
loadTogetherGoods();
|
|
|
|
|
|
// ----------------底部 为你优选,最近浏览 begin--------------
|
|
|
|
|
|
// 推荐、优选、浏览切换
|
|
|
$('.bottom-tab-slide').on('click', '.bottom-title', function() {
|
|
|
var $this = $(this),
|
|
|
index = $this.index();
|
|
|
console.log(index);
|
|
|
$(function() {
|
|
|
var $togetherGoods = $('.individual-item-togetherGoods'),
|
|
|
$latestWalk = $('.individual-item-latestWalk'),
|
|
|
$recommendGoods = $('.individual-item-recommendGoods');
|
|
|
$recommendGoods = $('.individual-item-recommendGoods'),
|
|
|
$latestWalk = $('.individual-item-latestWalk');
|
|
|
|
|
|
if ($this.hasClass('cur')) {
|
|
|
return;
|
|
|
if ($togetherGoods.hasClass('none')) {
|
|
|
$recommendGoods.show();
|
|
|
}
|
|
|
|
|
|
$this.addClass('cur');
|
|
|
$this.siblings('.cur').removeClass('cur');
|
|
|
|
|
|
switch (index) {
|
|
|
case 0: {
|
|
|
$('.bottom-tab-slide').on('click', '.bottom-title', function() {
|
|
|
var $this = $(this),
|
|
|
index = $this.index();
|
|
|
console.log(index);
|
|
|
$togetherGoods.hide();
|
|
|
$recommendGoods.hide();
|
|
|
|
|
|
$togetherGoods.removeClass('none');
|
|
|
$recommendGoods.addClass('none');
|
|
|
$latestWalk.addClass('none');
|
|
|
break;
|
|
|
if ($this.hasClass('change')) {
|
|
|
return;
|
|
|
}
|
|
|
case 1: {
|
|
|
$togetherGoods.addClass('none');
|
|
|
$recommendGoods.removeClass('none');
|
|
|
$latestWalk.addClass('none');
|
|
|
break;
|
|
|
}
|
|
|
case 2: {
|
|
|
$togetherGoods.addClass('none');
|
|
|
$recommendGoods.addClass('none');
|
|
|
$latestWalk.removeClass('none');
|
|
|
break;
|
|
|
if ($this.hasClass('cur')) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
$this.addClass('cur');
|
|
|
$this.siblings('.cur').removeClass('cur');
|
|
|
|
|
|
switch (index) {
|
|
|
case 0: {
|
|
|
$togetherGoods.slideDown();
|
|
|
$recommendGoods.hide();
|
|
|
$latestWalk.hide();
|
|
|
break;
|
|
|
}
|
|
|
case 1: {
|
|
|
$togetherGoods.hide();
|
|
|
$recommendGoods.slideDown();
|
|
|
$latestWalk.hide();
|
|
|
break;
|
|
|
}
|
|
|
case 2: {
|
|
|
$togetherGoods.hide();
|
|
|
$recommendGoods.hide();
|
|
|
$latestWalk.slideDown();
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
|
|
// 凑单 底部 轮播
|
|
|
function loadSlideGoods() {
|
|
|
// $.ajax({
|
|
|
// type: 'GET',
|
|
|
// url: '',
|
|
|
// data: {
|
|
|
// // skn: skn,
|
|
|
// size: 20,
|
|
|
// num: 1
|
|
|
// }
|
|
|
// }).then(function(data) {
|
|
|
// var pro = data.data.products;
|
|
|
$.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;
|
|
|
// }
|
|
|
// if (data.code === 200) {
|
|
|
// if (pro.length === 0) {
|
|
|
// return;
|
|
|
// }
|
|
|
|
|
|
$('#recommend-shop').removeClass('none');
|
|
|
|
|
|
$('.individual-item ').slider2({
|
|
|
shownum: 5,
|
|
|
isCircle: true
|
|
|
});
|
|
|
|
|
|
$('.individual-item').slider2({
|
|
|
shownum: 5,
|
|
|
isCircle: true
|
|
|
// } else {
|
|
|
// $('.bottom-title').filter('.change').addClass('none');
|
|
|
// }
|
|
|
});
|
|
|
}
|
|
|
loadSlideGoods();
|
|
|
|
|
|
$(function() {
|
|
|
$('.bottom-tab .change').click(function() {
|
|
|
$('.img-brand-switch .next').trigger('click');
|
|
|
});
|
|
|
});
|
|
|
|
|
|
// ----------------底部 为你优选,最近浏览 end--------------
|
|
|
// 凑单弹框 详情切换
|
|
|
$('body').on('click', '.piclist li', function() {
|
...
|
...
|
@@ -240,6 +227,7 @@ $('body').on('click', '.pre, .next', function() { |
|
|
$(this).siblings('.con').find('li').removeClass('active').eq(pacList).addClass('active');
|
|
|
$('.detail-bigpic:not(.none) .bigpic').hide().eq(pacList).show();
|
|
|
});
|
|
|
|
|
|
$('body').on('click', '.color', function() {
|
|
|
pacList = 0;
|
|
|
$('.color').find('p').removeClass('active');
|
...
|
...
|
@@ -503,7 +491,7 @@ $paySum.on('click', '.btn-account', function() { |
|
|
|
|
|
// $('.togethor').show();
|
|
|
|
|
|
// $('.cart-togetherGoods').show();
|
|
|
$('.cart-togetherGoods').show();
|
|
|
|
|
|
});
|
|
|
|
...
|
...
|
|