diff --git a/src/router.types.d.ts b/src/router.types.d.ts index 144ead03..66dd5f51 100644 --- a/src/router.types.d.ts +++ b/src/router.types.d.ts @@ -126,9 +126,7 @@ export type RouterType = { content: string; cover: string; created_at: number; - }; - stat: { - view_num: number; + view_status: number; }; user: { nickname: string; diff --git a/src/routes/genshin.ts b/src/routes/genshin.ts index 41b5a4fd..1ba2cc62 100644 --- a/src/routes/genshin.ts +++ b/src/routes/genshin.ts @@ -44,9 +44,9 @@ const getList = async (options: Options, noCache: boolean) => { title: data.subject, desc: data.content, cover: data.cover, - author: v.user.nickname, + author: v.user?.nickname || null, timestamp: getTime(data.created_at), - hot: v.stat.view_num, + hot: data.view_status, url: `https://www.miyoushe.com/ys/article/${data.post_id}`, mobileUrl: `https://m.miyoushe.com/ys/#/article/${data.post_id}`, }; diff --git a/src/routes/honkai.ts b/src/routes/honkai.ts index 0be7dc38..19de96ef 100644 --- a/src/routes/honkai.ts +++ b/src/routes/honkai.ts @@ -43,10 +43,10 @@ const getList = async (options: Options, noCache: boolean) => { id: data.post_id, title: data.subject, desc: data.content, - cover: data.cover || v.image_list[0].url, - author: v.user.nickname, + cover: data.cover, + author: v.user?.nickname || null, timestamp: getTime(data.created_at), - hot: v.stat.view_num, + hot: data.view_status, url: `https://www.miyoushe.com/bh3/article/${data.post_id}`, mobileUrl: `https://m.miyoushe.com/bh3/#/article/${data.post_id}`, }; diff --git a/src/routes/starrail.ts b/src/routes/starrail.ts index c63ddda6..4b4c7daf 100644 --- a/src/routes/starrail.ts +++ b/src/routes/starrail.ts @@ -44,9 +44,9 @@ const getList = async (options: Options, noCache: boolean) => { title: data.subject, desc: data.content, cover: data.cover, - author: v.user.nickname, + author: v.user?.nickname || null, timestamp: getTime(data.created_at), - hot: v.stat.view_num, + hot: data.view_status, url: `https://www.miyoushe.com/sr/article/${data.post_id}`, mobileUrl: `https://m.miyoushe.com/sr/#/article/${data.post_id}`, }; diff --git a/src/routes/zhihu.ts b/src/routes/zhihu.ts index 7713ff52..04e2f25f 100644 --- a/src/routes/zhihu.ts +++ b/src/routes/zhihu.ts @@ -33,7 +33,7 @@ const getList = async (noCache: boolean) => { desc: data.excerpt, cover: v.children[0].thumbnail, timestamp: getTime(data.created), - hot: parseFloat(v.detail_text.split(' ')[0]) * 10000, + hot: parseFloat(v.detail_text.split(" ")[0]) * 10000, url: `https://www.zhihu.com/question/${data.id}`, mobileUrl: `https://www.zhihu.com/question/${data.id}`, };