Authored by zhangxiaoru

动态获取逛

... ... @@ -26,7 +26,9 @@ var setting = {
var $infos = $('#info-list');
require('../common');
require('./list-dynamic');
var getDynamicData = require('./list-dynamic');
getDynamicData.getDynamicData();
info.initInfosEvt($infos);
... ...
... ... @@ -22,7 +22,7 @@ var $infoList = $('#info-list'),
curType = $curNav.data('type');
require('../common');
require('./list-dynamic');
var getDynamicData = require('./list-dynamic');
var state = {};
... ... @@ -50,6 +50,8 @@ info.initInfosEvt($infoList);
end: false
};
});
getDynamicData.getDynamicData();
}());
$nav.bind('contextmenu', function(e) {
return false;
... ...
... ... @@ -19,6 +19,7 @@ var $loading = $(''),
$swiper = $('');
require('../common');
var getDynamicData = require('./list-dynamic');
var searching = false;
var mySwiper = {};
... ... @@ -251,12 +252,15 @@ function loadMore($container, opt, url) {
$loading.removeClass('hide');// 显示空屏加载时hide的隐藏
window.rePosFooter();// 插入内容后重新计算底部位置
getDynamicData.getDynamicData();
}
opt.page++;
searching = false;
delete opt.isTab;
},
error: function() {
tip.show('网络断开连接了~');
... ...
... ... @@ -71,12 +71,12 @@ function renderData(data) {
}
}
(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) {
... ... @@ -85,4 +85,8 @@ function renderData(data) {
});
getDynamicByIds(idArr.join(',')).then(renderData);
}());
};
module.exports = {
getDynamicData
};
... ...