🐞 fix: 修复米游社系列接口出错

This commit is contained in:
imsyy
2024-07-09 09:35:27 +08:00
parent f213d9810b
commit a742f9df78
5 changed files with 9 additions and 11 deletions

View File

@@ -126,9 +126,7 @@ export type RouterType = {
content: string;
cover: string;
created_at: number;
};
stat: {
view_num: number;
view_status: number;
};
user: {
nickname: string;

View File

@@ -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}`,
};

View File

@@ -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}`,
};

View File

@@ -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}`,
};

View File

@@ -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}`,
};