Authored by htoooth

Merge remote-tracking branch 'origin/feature/new-product-detail' into feature/new-product-detail

# Conflicts:
#	config/common.js
... ... @@ -33,4 +33,3 @@ const getShareOrderListAsync = (pid, page, size, filterId) => {
module.exports = {
getShareOrderListAsync
};
... ...
... ... @@ -23,8 +23,8 @@ module.exports = {
//api: 'http://api-test2.yohops.com:9999/',
//service: 'http://service-test2.yohops.com:9999/',
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
//api: 'http://api.yoho.cn/',
//service: 'http://service.yoho.cn/',
// api: 'http://dev-api.yohops.com:9999/',
// service: 'http://dev-service.yohops.com:9999/',
... ...
... ... @@ -999,7 +999,8 @@ function loadComment() {
data: {
productId: id,
page: nowPage,
filterId: type
filterId: type,
size: 15
}
});
}
... ... @@ -1039,13 +1040,14 @@ function loadComment() {
});
}
totalnum = Math.ceil(totalnum / 10) * 20;
totalnum = Math.ceil(totalnum / 15) * 20;
$ul.empty().append(commentsTpl({
comments: res
}));
baseUrl = '/product/detail/comment?productId=' + id + '&filterId=7';
if(totalnum > 20){
$ul.append(setPager({
baseUrl: baseUrl,
totalRecords: totalnum,
... ... @@ -1053,6 +1055,7 @@ function loadComment() {
type: 'ellipsis',
theme: 'msg-pager'
}));
}
}
}).always(function() {
... ... @@ -1161,7 +1164,8 @@ function loadConsult() {
url: '/product/detail/consult',
data: {
productId: id,
page: nowPage
page: nowPage,
size: 15
}
}).then(function(data) {
var res;
... ... @@ -1178,7 +1182,7 @@ function loadConsult() {
// 更新总数显示
$consultNum.text(res[0].total);
totalNum = Math.ceil(res[0].total / 10) * 20;
totalNum = Math.ceil(res[0].total / 15) * 20;
$consultsUl.empty().append(consultsTpl({
consults: res
... ... @@ -1230,7 +1234,7 @@ function loadConsult() {
});
baseUrl = '/product/detail/consult?productId=' + id;
if(totalNum > 20){
$('.consults-pager').empty().append(
setPager({
baseUrl: baseUrl,
... ... @@ -1240,6 +1244,7 @@ function loadConsult() {
theme: 'msg-pager'
})
);
}
}
}).always(function() {
loadingConsults = false;
... ...