From a742f9df78a9558f82e981d108fbfca2f96eb74d Mon Sep 17 00:00:00 2001 From: imsyy Date: Tue, 9 Jul 2024 09:35:27 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=B1=B3=E6=B8=B8=E7=A4=BE=E7=B3=BB=E5=88=97=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router.types.d.ts | 4 +--- src/routes/genshin.ts | 4 ++-- src/routes/honkai.ts | 6 +++--- src/routes/starrail.ts | 4 ++-- src/routes/zhihu.ts | 2 +- 5 files changed, 9 insertions(+), 11 deletions(-) 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}`, };