...
|
...
|
@@ -30,21 +30,23 @@ goodsSwiper = new Swiper('.banner-swiper', { |
|
|
|
|
|
//初始化tab
|
|
|
(function() {
|
|
|
commentsNum = $('#nav-tab .comments-num').html()-0;
|
|
|
var consultsNum = $('#nav-tab .consults-num').html()-0;
|
|
|
var consultsNum = $('#nav-tab .consults-num').html() - 0;
|
|
|
|
|
|
|
|
|
commentsNum = $('#nav-tab .comments-num').html() - 0;
|
|
|
|
|
|
$('#nav-tab li').each(function() {
|
|
|
$(this).removeClass('focus');
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$('#feedback-content .content').each(function() {
|
|
|
$(this).addClass('hide');
|
|
|
$(this).addClass('hide');
|
|
|
});
|
|
|
if(0!=commentsNum) {
|
|
|
if (0 !== commentsNum) {
|
|
|
$('#nav-tab .comment-nav').addClass('focus');
|
|
|
$('#feedback-content .comment-content').removeClass('hide');
|
|
|
|
|
|
}else if(0!=consultsNum) {
|
|
|
} else if (0 !== consultsNum) {
|
|
|
$('#nav-tab .consult-nav').addClass('focus');
|
|
|
$('#feedback-content .consult-content').removeClass('hide');
|
|
|
}
|
...
|
...
|
@@ -53,9 +55,9 @@ goodsSwiper = new Swiper('.banner-swiper', { |
|
|
$('#nav-tab li').on('click', function() {
|
|
|
var index = $(this).index();
|
|
|
|
|
|
if($(this).hasClass('comment-nav')&&0==commentsNum) {
|
|
|
if ($(this).hasClass('comment-nav') && 0 === commentsNum) {
|
|
|
alert('暂无商品评价');
|
|
|
}else{
|
|
|
} else {
|
|
|
if (!$(this).hasClass('focus')) {
|
|
|
|
|
|
$('#nav-tab li').each(function() {
|
...
|
...
|
@@ -67,14 +69,14 @@ $('#nav-tab li').on('click', function() { |
|
|
|
|
|
$(this).addClass('focus');
|
|
|
$('#feedback-content .content:eq(' + index + ')').removeClass('hide');
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$('.goodsDiscount .dropdown').on('click',function() {
|
|
|
if($('.goodsDiscount .discount-folder').is(':hidden')) {
|
|
|
$('.goodsDiscount .dropdown').on('click', function() {
|
|
|
if ($('.goodsDiscount .discount-folder').is(':hidden')) {
|
|
|
$('.goodsDiscount .discount-folder').slideDown();
|
|
|
}else{
|
|
|
} else {
|
|
|
$('.goodsDiscount .discount-folder').slideUp();
|
|
|
}
|
|
|
});
|
...
|
...
|
|