...
|
...
|
@@ -897,39 +897,49 @@ function fetchComment() { |
|
|
});
|
|
|
}
|
|
|
|
|
|
// 评价和咨询切换
|
|
|
$('.consult-comment').on('click', '.title', function() {
|
|
|
var $this = $(this),
|
|
|
index = $this.index();
|
|
|
|
|
|
var $comments = $('.comments'),
|
|
|
$consults = $('.consults');
|
|
|
|
|
|
if ($this.hasClass('cur')) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
$this.addClass('cur');
|
|
|
$this.siblings('.cur').removeClass('cur');
|
|
|
|
|
|
if (index !== 0) {
|
|
|
|
|
|
// 咨询
|
|
|
$consults.slideDown(SLIDETIME);
|
|
|
$comments.slideUp(SLIDETIME);
|
|
|
} else {
|
|
|
$consults.slideUp(SLIDETIME);
|
|
|
$comments.slideDown(SLIDETIME);
|
|
|
}
|
|
|
}).on('click', '.load-more', function() {
|
|
|
var $this = $(this);
|
|
|
|
|
|
if ($this.hasClass('load-more-comments')) {
|
|
|
loadAllComments(currentType);
|
|
|
} else {
|
|
|
loadConsults();
|
|
|
}
|
|
|
});
|
|
|
// $('.consult-comment').on('click', '.title', function() {
|
|
|
// var $this = $(this),
|
|
|
// index = $this.index();
|
|
|
//
|
|
|
// var $comments = $('.comments'),
|
|
|
// $consults = $('.consults');
|
|
|
//
|
|
|
// if ($this.hasClass('cur')) {
|
|
|
// return;
|
|
|
// }
|
|
|
//
|
|
|
// $this.addClass('cur');
|
|
|
// $this.siblings('.cur').removeClass('cur');
|
|
|
//
|
|
|
// if (index !== 0) {
|
|
|
//
|
|
|
// // 咨询
|
|
|
// $consults.slideDown(SLIDETIME);
|
|
|
// $comments.slideUp(SLIDETIME);
|
|
|
// } else {
|
|
|
// $consults.slideUp(SLIDETIME);
|
|
|
// $comments.slideDown(SLIDETIME);
|
|
|
// }
|
|
|
// }).on('click', '.load-more', function() {
|
|
|
// var $this = $(this);
|
|
|
//
|
|
|
// if ($this.hasClass('load-more-comments')) {
|
|
|
// loadAllComments(currentType);
|
|
|
// } else {
|
|
|
// loadConsults();
|
|
|
// }
|
|
|
// });
|
|
|
|
|
|
$('.consult-comment').on('click', '.load-more', function() {
|
|
|
var $this = $(this);
|
|
|
|
|
|
if ($this.hasClass('load-more-comments')) {
|
|
|
loadAllComments(currentType);
|
|
|
} else {
|
|
|
loadConsults();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// 我要咨询
|
|
|
$('#consults-btn').click(function() {
|
...
|
...
|
|