Skip to content

Commit

Permalink
🐞 fix: 修复米游社系列接口出错
Browse files Browse the repository at this point in the history
  • Loading branch information
imsyy committed Jul 9, 2024
1 parent f213d98 commit a742f9d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
4 changes: 1 addition & 3 deletions src/router.types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ export type RouterType = {
content: string;
cover: string;
created_at: number;
};
stat: {
view_num: number;
view_status: number;
};
user: {
nickname: string;
Expand Down
4 changes: 2 additions & 2 deletions src/routes/genshin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
};
Expand Down
6 changes: 3 additions & 3 deletions src/routes/honkai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
};
Expand Down
4 changes: 2 additions & 2 deletions src/routes/starrail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
};
Expand Down
2 changes: 1 addition & 1 deletion src/routes/zhihu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
};
Expand Down

0 comments on commit a742f9d

Please sign in to comment.