...
|
...
|
@@ -837,20 +837,6 @@ function fetchComment() { |
|
|
loadingComments,
|
|
|
loadingConsults;
|
|
|
|
|
|
$('.comments ul').on('click', 'a', function() {
|
|
|
|
|
|
var $this = $(this);
|
|
|
var href = $this.data('page');
|
|
|
var data = href.split('?')[1].split('&');
|
|
|
|
|
|
var result = data.map(function(i) {
|
|
|
return i.split('=')[1];
|
|
|
});
|
|
|
|
|
|
loadAllComments(currentType, result[2]);
|
|
|
|
|
|
});
|
|
|
|
|
|
function loadComments(type, nowPage) {
|
|
|
if (loadingComments) {
|
|
|
return;
|
...
|
...
|
@@ -873,7 +859,7 @@ function fetchComment() { |
|
|
// 购买评价
|
|
|
function loadAllComments(type, nowPage) {
|
|
|
loadComments(type, nowPage).then(function(data) {
|
|
|
var res, filter, $ul, totalnum;
|
|
|
var res, filter, $ul, totalnum, baseUrl;
|
|
|
|
|
|
if (data.code === 200) {
|
|
|
res = data.data;
|
...
|
...
|
@@ -897,7 +883,7 @@ function fetchComment() { |
|
|
|
|
|
}
|
|
|
|
|
|
if (fit.filterId == type) {
|
|
|
if (fit.filterId === type) {
|
|
|
totalnum = fit.num;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -911,8 +897,10 @@ function fetchComment() { |
|
|
comments: res
|
|
|
}));
|
|
|
|
|
|
var baseUrl = '/product/detail/comment?productId=' + id + '&filterId=' + '7';
|
|
|
$ul.append(setPager({baseUrl: baseUrl, totalRecords: totalnum, page: nowPage, type: 'ellipsis', theme: 'msg-pager'}));
|
|
|
baseUrl = '/product/detail/comment?productId=' + id + '&filterId=7';
|
|
|
$ul.append(
|
|
|
setPager({baseUrl: baseUrl, totalRecords: totalnum, page: nowPage, type: 'ellipsis', theme: 'msg-pager'})
|
|
|
);
|
|
|
|
|
|
}
|
|
|
}).always(function() {
|
...
|
...
|
@@ -920,6 +908,19 @@ function fetchComment() { |
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
$('.comments ul').on('click', 'a', function() {
|
|
|
var $this = $(this);
|
|
|
var href = $this.data('page');
|
|
|
var data = href.split('?')[1].split('&');
|
|
|
var result = data.map(function(i) {
|
|
|
return i.split('=')[1];
|
|
|
});
|
|
|
|
|
|
loadAllComments(currentType, result[2]);
|
|
|
|
|
|
});
|
|
|
|
|
|
// 顾客咨询
|
|
|
function loadConsults() {
|
|
|
if (loadingConsults) {
|
...
|
...
|
|