mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix(route): yicai wrong pubDate (#7137)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
const date = require('@/utils/date');
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
@@ -15,11 +16,11 @@ module.exports = async (ctx) => {
|
||||
const resList = response.data;
|
||||
const item = resList.map((obj) => {
|
||||
const { datekey, istop, url, newcontent, hm, indexTitle } = obj;
|
||||
const dateStr = `${datekey.replace('.', '-')} ${hm}`;
|
||||
const dateStr = `${datekey.replace(/\./g, '-')} ${hm}`;
|
||||
return {
|
||||
title: indexTitle.length === newcontent.length ? indexTitle : `${indexTitle}...`,
|
||||
description: [istop ? '置顶:' : '', newcontent].filter((str) => !!str).join('<br/>'),
|
||||
pubDate: new Date(dateStr).toUTCString(),
|
||||
pubDate: date(dateStr, +8),
|
||||
link: `${baseUrl}${url}`,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user