2024-10-09 02:53:38 +08:00
|
|
|
interface Res {
|
|
|
|
list: {
|
|
|
|
data: {
|
|
|
|
id: string
|
|
|
|
title: string
|
|
|
|
// 北京时间
|
|
|
|
url: string
|
|
|
|
publishTime: string
|
|
|
|
}
|
|
|
|
}[]
|
|
|
|
}
|
|
|
|
|
|
|
|
export default defineSource(async () => {
|
2024-10-30 15:59:59 +08:00
|
|
|
const res = await Promise.all(["zhongguo", "guandian", "gj"].map(k => myFetch(`https://china.cankaoxiaoxi.com/json/channel/${k}/list.json`) as Promise<Res>))
|
2024-10-09 02:53:38 +08:00
|
|
|
return res.map(k => k.list).flat().map(k => ({
|
|
|
|
id: k.data.id,
|
|
|
|
title: k.data.title,
|
|
|
|
extra: {
|
|
|
|
date: tranformToUTC(k.data.publishTime),
|
|
|
|
},
|
|
|
|
url: k.data.url,
|
2024-10-21 01:38:58 +08:00
|
|
|
})).sort((m, n) => m.extra.date < n.extra.date ? 1 : -1)
|
2024-10-09 02:53:38 +08:00
|
|
|
})
|