...
|
...
|
@@ -34,7 +34,7 @@ const getRssArticle = (gender) => { |
|
|
break;
|
|
|
}
|
|
|
return articlePromise.then((article) => {
|
|
|
// 内容列表
|
|
|
// 内容列表
|
|
|
if (article.data.list.artList) {
|
|
|
let build = {};
|
|
|
|
...
|
...
|
@@ -48,17 +48,17 @@ const getRssArticle = (gender) => { |
|
|
build.intro = intro;
|
|
|
result.push(build);
|
|
|
artListFunc(++i, len, resolve);
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
resolve(result);
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
};
|
|
|
return new Promise((resolve) => {
|
|
|
artListFunc(0, article.data.list.artList.length, resolve);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
...
|
...
|
@@ -75,20 +75,20 @@ const _genIntro = (id) => { |
|
|
resData.data.forEach((value) => {
|
|
|
if (value.text) { // 文字
|
|
|
result += htmlProcess.removeHtml(htmlProcess.escapeToHtml(value.text.data.text)) + '<br/>';
|
|
|
} else if (value.singleImage) { // 单张图
|
|
|
result += `<img src="${helpers.image(value.singleImage.data[0].src, 640, 640)}"/><br/>`;
|
|
|
} else if (value.smallPic && value.smallPic.data) { // 多张小图
|
|
|
value.smallPic.data.forEach((small) => {
|
|
|
result += `<img src="${helpers.image(small.src, 315, 420)}"/>`;
|
|
|
});
|
|
|
result += '<br/>';
|
|
|
}
|
|
|
});
|
|
|
} else if (value.singleImage) { // 单张图
|
|
|
result += `<img src="${helpers.image(value.singleImage.data[0].src, 640, 640)}"/><br/>`;
|
|
|
} else if (value.smallPic && value.smallPic.data) { // 多张小图
|
|
|
value.smallPic.data.forEach((small) => {
|
|
|
result += `<img src="${helpers.image(small.src, 315, 420)}"/>`;
|
|
|
});
|
|
|
result += '<br/>';
|
|
|
}
|
|
|
});
|
|
|
return result;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
};
|
|
|
module.exports = {
|
|
|
getRssArticle
|
|
|
}; |
|
|
}; |
|
|
\ No newline at end of file |
...
|
...
|
|