diff --git a/routes/pixiv/user.js b/routes/pixiv/user.js index 2df8d52ec..463b2c909 100644 --- a/routes/pixiv/user.js +++ b/routes/pixiv/user.js @@ -133,9 +133,17 @@ module.exports = async (ctx) => { description: `${username} 的 Pixiv 最新动态`, lastBuildDate: new Date().toUTCString(), item: illusts.map((illust) => { + const images = []; + if (illust.page_count === 1) { + images.push(`

`); + } else { + for (let i = 0; i < illust.page_count; i++) { + images.push(`

`); + } + } return { title: illust.title, - description: `

画师:${username} - 上传于:${new Date(illust.create_date).toLocaleString('zh-cn')} - 阅览数:${illust.total_view} - 收藏数:${illust.total_bookmarks}

`, + description: `

画师:${username} - 上传于:${new Date(illust.create_date).toLocaleString('zh-cn')} - 阅览数:${illust.total_view} - 收藏数:${illust.total_bookmarks}

${images.join('')}`, link: `https://www.pixiv.net/member_illust.php?mode=medium&illust_id=${illust.id}` }; })