Authored by ccbikai

商品咨询评价优化

... ... @@ -71,7 +71,7 @@ exports.intro = (req, res, next) => {
* @param {[type]} res [description]
* @return {[type]} [description]
*/
exports.preference = (req, res) => {
exports.preference = (req, res, next) => {
preference({
productskn: req.query.productSkn,
yhchannel: req.yoho.channel,
... ... @@ -80,7 +80,7 @@ exports.preference = (req, res) => {
res.render('detail/preference', Object.assign({
layout: false
}, result));
});
}).catch(next);
};
/**
... ...
... ... @@ -131,7 +131,7 @@ let getCommentInfo = (params) => {
let comments = (params) => {
return getCommentInfo({
productId: params.product_id,
limit: '20'
limit: '60'
}).then(result => {
let data = {};
... ... @@ -169,6 +169,8 @@ let consults = (params) => {
data.consults = result[1].list;
}
data.showReadMore = result[1].list.length > 2;
return data;
});
};
... ...
... ... @@ -29,7 +29,7 @@ router.get('/detail/intro/:productskn', detail.intro); // 商品内嵌页
router.get('/detail/preference', detail.preference); // 为你优选
router.get('/detail/consults', detail.consults); // 商品咨询页
router.get('/detail/consultform', auth, detail.consultform); // 商品咨询表单页
router.get('/detail/comments', detail.comments);
router.get('/detail/comments', detail.comments); // 商品评价
router.post('/detail/consultsubmit', auth, detail.consultsubmit); // 商品咨询提交接口
router.get('/sale', sale.index);
... ...
<div class="goods-comments-page yoho-page">
<div class="goods-comments" id="goods-comments">
{{log comments}}
{{# comments}}
<div class="comment-item">
<span class="user-name">{{userName}}</span>
... ...
... ... @@ -66,4 +66,4 @@
{{/ faq}}
</div>
{{/if}}
</div>
\ No newline at end of file
</div>
... ...
... ... @@ -41,6 +41,7 @@ var navtabEle = document.getElementById('nav-tab'),
$('#feedback-content .consult-content').removeClass('hide');
}
$('.goods-consults .consult-item:lt(2)').removeClass('hide');
}());
if (navtabHammer) {
... ... @@ -91,8 +92,7 @@ if ($('.goods-consults-page').length > 0) {
if (readmoreHammer) {
readmoreHammer.on('tap', function() {
$('.readmore').hide();
$('.goods-consults.customer-consults').removeClass('customer-consults');
$('.goods-consults').find('.consult-item').removeClass('hide');
return false;
});
}
... ...
... ... @@ -62,13 +62,12 @@ function wrapElements(selector, count) {
function search() {
if (searching || end) {
if (searching || end || !introUrl) {
return;
}
searching = true;
// alert($('#reference-swiper-container .swiper-wrapper').width());
loading.showLoadingMask();
$.ajax({
... ...