fix: 修正小黑盒游戏新闻全文无法显示图片 (#2189)

This commit is contained in:
WenryXu
2019-05-22 10:51:12 +08:00
committed by DIYgod
parent e921254745
commit ee680ddf3f
+3 -1
View File
@@ -32,7 +32,9 @@ module.exports = async (ctx) => {
});
// 解析html内容
const $ = cheerio.load(article.data);
const content = $('.article-content').html();
const content = $('.article-content')
.html()
.replace(/data-original/g, 'src');
// 存放到缓存区
ctx.cache.set(cacheKey, content);
news.description = content;