mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
✨ 帖子话题内容解析跳转
This commit is contained in:
@@ -24,24 +24,24 @@ export const BBS_SALT = {
|
||||
|
||||
/**
|
||||
* @description 频道列表
|
||||
* @version 2.72.2
|
||||
* @since Beta v0.5.1
|
||||
* @since Beta v0.6.5
|
||||
* @interface ToChannelItem
|
||||
* @property {string} title - 频道名称
|
||||
* @property {string} icon - 频道图标
|
||||
* @property {string} gid - 频道 gid
|
||||
* @property {string} mini - 频道简称
|
||||
* @return ToChannelItem
|
||||
*/
|
||||
export interface ToChannelItem {
|
||||
title: string;
|
||||
icon: string;
|
||||
gid: string;
|
||||
mini: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 渠道列表
|
||||
* @version 2.72.2
|
||||
* @since Beta v0.5.1
|
||||
* @since Beta v0.6.5
|
||||
* @type {Array<ToChannelItem>}
|
||||
*/
|
||||
export const CHANNEL_LIST: ToChannelItem[] = [
|
||||
@@ -49,35 +49,42 @@ export const CHANNEL_LIST: ToChannelItem[] = [
|
||||
title: "原神",
|
||||
icon: "/platforms/mhy/ys.webp",
|
||||
gid: "2",
|
||||
mini: "ys",
|
||||
},
|
||||
{
|
||||
title: "崩坏:星穹铁道",
|
||||
icon: "/platforms/mhy/sr.webp",
|
||||
gid: "6",
|
||||
mini: "sr",
|
||||
},
|
||||
{
|
||||
title: "绝区零",
|
||||
icon: "/platforms/mhy/zzz.webp",
|
||||
gid: "8",
|
||||
mini: "zzz",
|
||||
},
|
||||
{
|
||||
title: "崩坏3",
|
||||
icon: "/platforms/mhy/bh3.webp",
|
||||
gid: "1",
|
||||
mini: "bh3",
|
||||
},
|
||||
{
|
||||
title: "崩坏2",
|
||||
icon: "/platforms/mhy/bh2.webp",
|
||||
gid: "3",
|
||||
mini: "bh2",
|
||||
},
|
||||
{
|
||||
title: "未定事件簿",
|
||||
icon: "/platforms/mhy/wd.webp",
|
||||
gid: "4",
|
||||
mini: "wd",
|
||||
},
|
||||
{
|
||||
title: "大别野",
|
||||
icon: "/platforms/mhy/dby.webp",
|
||||
gid: "5",
|
||||
mini: "dby",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -64,3 +64,13 @@ export function getGameName(gid: number): string {
|
||||
const game = TGConstant.BBS.CHANNELS.find((item) => item.gid === gid.toString());
|
||||
return game ? game.title : "未知游戏";
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取游戏id
|
||||
* @param {string} mini
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getGameId(mini: string): string {
|
||||
const game = TGConstant.BBS.CHANNELS.find((item) => item.mini === mini);
|
||||
return game ? game.gid : "0";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user