Authored by zhangxiaoru

逛修改*

... ... @@ -330,7 +330,7 @@ const getDynamicDataByIds = (ids, udid, other) => {
});
}
return serviceAPI.get('guang/api/*/article/getSimpleArticleList', params, {cache: true});
return serviceAPI.get('guang/api/v6/article/getSimpleArticleList', params, {cache: true});
};
/**
... ... @@ -340,7 +340,7 @@ const getDynamicDataByIds = (ids, udid, other) => {
* @returns {Promise.<T>|*}
*/
const getDynamicDataById = (id, uid, udid) => {
return serviceAPI.get('/gateway/guang/api/*/article/getArticlePraiseAndFavor', {
return serviceAPI.get('/gateway/guang/api/v6/article/getArticlePraiseAndFavor', {
id: id,
uid: uid,
udid: udid
... ...
... ... @@ -24,9 +24,11 @@ var setting = {
};
var $infos = $('#info-list');
var getDynamicData = require('./list-dynamic');
require('../common');
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;
... ...
... ... @@ -24,6 +24,7 @@ var searching = false;
var mySwiper = {};
var isLoading = false;
var getDynamicData = require('./list-dynamic');
ellipsis.init();
... ... @@ -251,6 +252,8 @@ function loadMore($container, opt, url) {
$loading.removeClass('hide');// 显示空屏加载时hide的隐藏
window.rePosFooter();// 插入内容后重新计算底部位置
getDynamicData.getDynamicData();
}
opt.page++;
... ...
... ... @@ -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
... ... @@ -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
};
... ...