mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-16 09:58:13 +08:00
🐛 修复link_card_ids字段不识别
This commit is contained in:
53
src/plugins/Mys/types/Post.d.ts
vendored
53
src/plugins/Mys/types/Post.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file plugins/Mys/types/post.d.ts
|
||||
* @description Mys 插件帖子类型定义文件
|
||||
* @since Beta v0.6.3
|
||||
* @since Beta v0.6.7
|
||||
*/
|
||||
|
||||
declare namespace TGApp.Plugins.Mys.Post {
|
||||
@@ -13,15 +13,11 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {FullData} data.post 帖子数据
|
||||
* @return Response
|
||||
*/
|
||||
interface Response extends TGApp.BBS.Response.BaseWithData {
|
||||
data: {
|
||||
post: FullData;
|
||||
};
|
||||
}
|
||||
type Response = TGApp.BBS.Response.BaseWithData & { data: { post: FullData } };
|
||||
|
||||
/**
|
||||
* @description 帖子数据
|
||||
* @since Beta v0.5.0
|
||||
* @since Beta v0.6.7
|
||||
* @interface FullData
|
||||
* @property {Post} post 帖子信息
|
||||
* @property {Forum|null} forum 所属版块,可能为 null
|
||||
@@ -42,7 +38,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {unknown[]} vod_list 视频列表,可能为空
|
||||
* @property {boolean} is_block_on 是否被屏蔽
|
||||
* @property {unknown} forum_rank_info 版块排行信息,可能为 null
|
||||
* @property {unknown[]} link_card_list 链接卡片列表,可能为空
|
||||
* @property {LinkCard[]} link_card_list 链接卡片列表,可能为空
|
||||
* @property {TGApp.Plugins.Mys.News.Meta} news_meta 咨讯元数据,可能为 null
|
||||
* @return FullData
|
||||
*/
|
||||
@@ -66,7 +62,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
vod_list: Vod[];
|
||||
is_block_on: boolean;
|
||||
forum_rank_info: unknown | null;
|
||||
link_card_list: unknown[];
|
||||
link_card_list: LinkCard[];
|
||||
news_meta: TGApp.Plugins.Mys.News.Meta | null | undefined;
|
||||
recommend_reason: unknown | null;
|
||||
villa_card: unknown | null;
|
||||
@@ -302,6 +298,45 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
next_post_view_type: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 链接卡片信息
|
||||
* @since Beta v0.6.7
|
||||
* @interface LinkCard
|
||||
* @property {string} button_text 按钮文本
|
||||
* @property {string} card_id 卡片 ID
|
||||
* @property {unknown} card_meta 卡片元数据
|
||||
* @property {number} card_status 卡片状态
|
||||
* @property {string} cover 封面图 URL
|
||||
* @property {string} landing_url 落地页 URL
|
||||
* @property {number} landing_url_type 落地页类型
|
||||
* @property {number} link_type 链接类型
|
||||
* @property {string} market_price 市场价
|
||||
* @property {string} origin_url 原始 URL
|
||||
* @property {string} origin_user_avatar 原始用户头像 URL
|
||||
* @property {string} origin_user_avatar_url 原始用户头像 URL
|
||||
* @property {string} origin_user_nickname 原始用户名
|
||||
* @property {string} price 价格
|
||||
* @property {string} title 标题
|
||||
* @returns LinkCard
|
||||
*/
|
||||
type LinkCard = {
|
||||
button_text: string;
|
||||
card_id: string;
|
||||
card_meta: unknown;
|
||||
card_status: number;
|
||||
cover: string;
|
||||
landing_url: string;
|
||||
landing_url_type: number;
|
||||
link_type: number;
|
||||
market_price: string;
|
||||
origin_url: string;
|
||||
origin_user_avatar: string;
|
||||
origin_user_avatar_url: string;
|
||||
origin_user_nickname: string;
|
||||
price: string;
|
||||
title: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 视频信息
|
||||
* @since Beta v0.3.7
|
||||
|
||||
29
src/plugins/Mys/types/SctPost.d.ts
vendored
29
src/plugins/Mys/types/SctPost.d.ts
vendored
@@ -1,15 +1,9 @@
|
||||
/**
|
||||
* @file plugins/Mys/types/SctPost.d.ts
|
||||
* @description Mys 插件 结构化帖子类型声明文件
|
||||
* @since Beta v0.4.5
|
||||
* @since Beta v0.6.7
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description 结构化帖子类型命名空间
|
||||
* @since Beta v0.4.5
|
||||
* @namespace TGApp.Plugins.Mys.SctPost
|
||||
* @memberof TGApp.Plugins.Mys
|
||||
*/
|
||||
declare namespace TGApp.Plugins.Mys.SctPost {
|
||||
/**
|
||||
* @description 帖子结构化数据-基础类型
|
||||
@@ -20,11 +14,7 @@ declare namespace TGApp.Plugins.Mys.SctPost {
|
||||
* @property {Base[]} children - 子帖子
|
||||
* @return Base
|
||||
*/
|
||||
interface Base {
|
||||
insert: any;
|
||||
attributes?: any;
|
||||
children?: Base[];
|
||||
}
|
||||
type Base = { insert: any; attributes?: any; children?: Base[] };
|
||||
|
||||
/**
|
||||
* @description 帖子结构化数据-空类型
|
||||
@@ -34,22 +24,17 @@ declare namespace TGApp.Plugins.Mys.SctPost {
|
||||
* @property {never} attributes - 帖子属性
|
||||
* @return Empty
|
||||
*/
|
||||
interface Empty {
|
||||
insert: never;
|
||||
attributes?: never;
|
||||
}
|
||||
type Empty = { insert: never; attributes?: never };
|
||||
|
||||
/**
|
||||
* @description 帖子结构化数据-其他类型
|
||||
* @since Beta v0.3.4
|
||||
* @since Beta v0.6.7
|
||||
* @property {string} describe - 描述
|
||||
* @property {string[]} imgs - 图片链接
|
||||
* @property {string[]} link_card_ids - 关联卡片ID
|
||||
* @return Other
|
||||
*/
|
||||
interface Other {
|
||||
describe: string;
|
||||
imgs: string[];
|
||||
|
||||
type Other = { describe: string; imgs: string[]; link_card_ids?: string[] } & {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user