@@ -52,6 +52,7 @@
class="tpc-forum"
v-if="card.forum && card.forum.name !== ''"
:title="`频道: ${card.forum.name}`"
+ @click="toForum(card.forum)"
>
{{ card.forum.name }}
@@ -193,12 +194,13 @@ function getPostCover(item: TGApp.Plugins.Mys.Post.FullData): string {
* @returns {TGApp.Plugins.Mys.News.RenderCard} 渲染用咨讯列表项
*/
function getCommonCard(item: TGApp.Plugins.Mys.Post.FullData): TGApp.Plugins.Mys.News.RenderCard {
- let forum = null;
- let data = null;
+ let forum: TGApp.Plugins.Mys.News.RenderForum | null = null;
+ let data: TGApp.Plugins.Mys.News.RenderData | null = null;
if (item.forum !== null) {
forum = {
name: item.forum.name,
icon: item.forum.icon,
+ id: item.forum.id,
};
}
if (item.stat !== null) {
@@ -248,7 +250,12 @@ async function shareCard(): Promise
{
async function toTopic(topic: TGApp.Plugins.Mys.Topic.Info): Promise {
const gid = props.modelValue.post.game_id;
- await emit("active_deep_link", `router?path=/posts/${gid}/${topic.id}`);
+ await emit("active_deep_link", `router?path=/posts/topic/${gid}/${topic.id}`);
+}
+
+async function toForum(forum: TGApp.Plugins.Mys.News.RenderForum): Promise {
+ const gid = props.modelValue.post.game_id;
+ await emit("active_deep_link", `router?path=/posts/forum/${gid}/${forum.id}`);
}