...
|
...
|
@@ -21,10 +21,10 @@ function getDynamicByIds(ids) { |
|
|
|
|
|
// 标签列表
|
|
|
data.query = qs.query;
|
|
|
} else if (qs.type) {
|
|
|
} else if (qs.id) {
|
|
|
|
|
|
// 逛首页type
|
|
|
data.type = qs.type;
|
|
|
data.type = qs.id;
|
|
|
} else if (!qs.author_id) {
|
|
|
|
|
|
// 非编辑页的情况下,为逛首页默认type=0
|
...
|
...
|
@@ -59,27 +59,27 @@ function renderData(data) { |
|
|
|
|
|
// 点赞状态
|
|
|
if (it.isPraise === 'Y') {
|
|
|
$it.find('.like-btn').addClass('liked');
|
|
|
$it.find('.like-btn').addClass('like');
|
|
|
} else {
|
|
|
$it.find('.like-btn').removeClass('liked');
|
|
|
$it.find('.like-btn').removeClass('like');
|
|
|
}
|
|
|
|
|
|
// 点赞数目
|
|
|
$it.find('.like-count').text(it.praise_num);
|
|
|
|
|
|
// 评论数目
|
|
|
$it.find('.like-count').text(it.comment_num);
|
|
|
// $it.find('.like-count').text(it.comment_num);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
(function() {
|
|
|
function getDynamicData() {
|
|
|
'use strict';
|
|
|
|
|
|
var idArr = [];
|
|
|
|
|
|
$msgs.find('.guang-info').each(function() {
|
|
|
$('.info-list').not('.hide').find('.guang-info').each(function() {
|
|
|
var id = $(this).data('id');
|
|
|
|
|
|
if (id) {
|
...
|
...
|
@@ -88,4 +88,8 @@ function renderData(data) { |
|
|
});
|
|
|
|
|
|
getDynamicByIds(idArr.join(',')).then(renderData);
|
|
|
}()); |
|
|
}
|
|
|
|
|
|
module.exports = {
|
|
|
getDynamicData
|
|
|
}; |
...
|
...
|
|