🐛 修复部分链接点击异常

This commit is contained in:
目棃
2024-08-16 19:58:40 +08:00
parent 926c0f4983
commit 598f5308ba
3 changed files with 24 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
/**
* @file plugins/Mys/types/Position.d.ts
* @description Mys 插件热点追踪接口
* @since Alpha v0.2.1
* @since Beta v0.5.3
*/
/**
@@ -74,10 +74,11 @@ declare namespace TGApp.Plugins.Mys.Position {
/**
* @description 渲染用的热点追踪信息
* @since Alpha v0.2.1
* @since Beta v0.5.3
* @interface RenderCard
* @property {string} title 标题
* @property {number} postId 帖子ID
* @property {string} link 链接
* @property {string} icon 图标
* @property {string} abstract 摘要
* @property time 时间
@@ -90,6 +91,7 @@ declare namespace TGApp.Plugins.Mys.Position {
interface RenderCard {
title: string;
postId: number;
link: string;
icon: string;
abstract: string;
time: {

View File

@@ -1,12 +1,12 @@
/**
* @file plugins/Mys/utils/getPositionCard.ts
* @description Mys 插件热点追踪工具
* @since Beta v0.5.0
* @since Beta v0.5.3
*/
/**
* @description 根据热点追踪信息转为渲染用的数据
* @since Beta v0.5.0
* @since Beta v0.5.3
* @param {TGApp.Plugins.Mys.Position.Data[]} positionData 列表
* @returns {TGApp.Plugins.Mys.Position.RenderCard[]} 返回列表
*/
@@ -24,6 +24,7 @@ function getPositionCard(
const card: TGApp.Plugins.Mys.Position.RenderCard = {
title: position.title,
postId: Number(position.url.split("/").pop()),
link: position.url,
icon: position.icon,
abstract: position.abstract,
time: {