Authored by 陈峰

解决guang 的rss在接口数据错误时兼容

... ... @@ -35,7 +35,7 @@ const getRssArticle = (gender) => {
}
return articlePromise.then((article) => {
// 内容列表
if (article.data.list.artList) {
if (article && article.data && article.data.list && article.data.list.artList) {
let build = {};
let artListFunc = (i, len, resolve) => {
... ... @@ -43,7 +43,7 @@ const getRssArticle = (gender) => {
let value = article.data.list.artList[i];
if (typeof value.id !== 'undefined') {
build = guangProcess.formatArticle(value, false, false, true);
build.author.name = build.author.name || '';
build.author.name = (build.author && build.author.name) || '';
return _genIntro(value.id).then((intro) => {
build.intro = intro;
result.push(build);
... ...