Authored by 郭成尧

scroll-modified

... ... @@ -437,7 +437,6 @@ const getComments = (req, res, next) => {
article_id: req.query.article_id,
page: req.query.page
}).then(result => {
console.log(result);
return res.render('info/comments', {
comments: result,
layout: false
... ...
... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2017-05-25 14:36:33
* @Last Modified by: Targaryen
* @Last Modified time: 2017-06-02 10:27:40
* @Last Modified time: 2017-06-02 10:51:56
*/
const $ = require('yoho-jquery');
const article_id = $('#guangDetail').data('id');
... ... @@ -52,7 +52,7 @@ const getComments = () => {
* 当scroll到1/2$goodsContainer高度后继续请求下一页数据
*/
const scrollHandler = function() {
if ($(window).scrollTop() > $comments.height() * 0.6) {
if ($(window).scrollTop() > $('#guangDetail').height() * 0.6) {
getComments();
}
};
... ...
... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2017-05-25 15:49:46
* @Last Modified by: Targaryen
* @Last Modified time: 2017-06-02 10:39:09
* @Last Modified time: 2017-06-02 10:43:21
*/
.guang-detail-page .comments {
... ... @@ -55,7 +55,11 @@
.comments-list {
padding-bottom: 40px;
margin: 30px;
border-bottom: 1px solid #eee;
border-bottom: 1px solid #b0b0b0;
&:last-child {
border-bottom: none;
}
.avatar {
float: left;
... ...