Authored by OF1706

m

... ... @@ -278,7 +278,7 @@
{{#if cart.isEmpty}}
<div class="bottom-tab bottom-tab-slide">
<span class="bottom-title cur {{#unless cart.deleteShop}}none{{/unless}}">凑单商品</span>
<span class="bottom-title {{#if cart.deleteShop}}cur{{/if}} {{#unless cart.deleteShop}}none{{/unless}}">凑单商品</span>
<span class="bottom-title {{#unless cart.deleteShop}}cur{{/unless}}">为您优选</span>
<span class="bottom-title">最近浏览</span>
<span class="change">换一批
... ... @@ -293,8 +293,8 @@
{{>individual-slide}}
</ul>
<div class="img-brand-switch">
<a class="prev iconfont" href="javascript:;">&#xe609;</a>
<a class="next iconfont" href="javascript:;">&#xe608;</a>
<a class="prev iconfont" href="javascript:;"></a>
<a class="next iconfont" href="javascript:;"></a>
</div>
</div>
<div class="individual-item individual-item-recommendGoods {{#if cart.deleteShop}}none{{/if}}">
... ... @@ -307,14 +307,14 @@
<a class="next iconfont" href="javascript:;"></a>
</div>
</div>
<div class="individual-item individual-item-latestWalk none">
<div class="individual-item individual-item-latestWalk">
<input id="latest-walk-count" type="hidden" value="">
<ul id="latest-walk-goods" class="goods clearfix img-list">
{{>individual-slide}}
</ul>
<div class="img-brand-switch">
<a class="prev iconfont" href="javascript:;">&#xe609;</a>
<a class="next iconfont" href="javascript:;">&#xe608;</a>
<a class="prev iconfont" href="javascript:;"></a>
<a class="next iconfont" href="javascript:;"></a>
</div>
</div>
</div>
... ...
... ... @@ -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();
});
... ...
... ... @@ -1385,12 +1385,18 @@
width: 990px;
height: 368px;
overflow: hidden;
.individual-item-recommendGoods{
display: none;
}
.individual-item-latestWalk{
display: none;
}
.individual-item {
position: relative;
width:100%;
overflow: hidden;
font-size: 12px;
.goods {
width: 990px;
height: 338px;
... ...