feat: add source 虎扑步行街

This commit is contained in:
ourongxing
2025-04-26 18:17:57 +08:00
parent b7724e07c6
commit ca7a7c114c
5 changed files with 35 additions and 1 deletions
+1
View File
@@ -14,6 +14,7 @@ declare module 'glob:./sources/{*.ts,**/index.ts}' {
export const ghxi: typeof import('./sources/ghxi')
export const github: typeof import('./sources/github')
export const hackernews: typeof import('./sources/hackernews')
export const hupu: typeof import('./sources/hupu')
export const ifeng: typeof import('./sources/ifeng')
export const ithome: typeof import('./sources/ithome')
export const jin10: typeof import('./sources/jin10')
+20
View File
@@ -0,0 +1,20 @@
interface Res {
data: {
title: string
hot: string
url: string
mobil_url: string
}[]
}
export default defineSource(async () => {
const r: Res = await myFetch(`https://api.vvhan.com/api/hotlist/huPu`)
return r.data.map((k) => {
return {
id: k.url,
title: k.title,
url: k.url,
mobileUrl: k.mobil_url,
}
})
})