From b5e74659697c463d0221b21c6d19652a90308e7e Mon Sep 17 00:00:00 2001 From: starknt <1431880400@qq.com> Date: Sat, 27 Jan 2024 17:37:23 +0800 Subject: [PATCH] fix: handle top bar video part --- src/components/TopBar/components/HistoryPop.vue | 2 ++ src/components/TopBar/types.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/components/TopBar/components/HistoryPop.vue b/src/components/TopBar/components/HistoryPop.vue index f196a27a..35f29a54 100644 --- a/src/components/TopBar/components/HistoryPop.vue +++ b/src/components/TopBar/components/HistoryPop.vue @@ -115,6 +115,8 @@ function getHistoryUrl(item: HistoryItem) { if (activatedTab.value === 0) { if (item.history.business === HistoryType.PGC) return item.uri + if (item.history.business === HistoryType.Archive && item?.videos && item.videos > 0) + return `//www.bilibili.com/video/${item.history.bvid}?p=${item.history.page}` return `//www.bilibili.com/video/${item.history.bvid}` } // Live diff --git a/src/components/TopBar/types.ts b/src/components/TopBar/types.ts index 07617036..27b6a6a8 100644 --- a/src/components/TopBar/types.ts +++ b/src/components/TopBar/types.ts @@ -93,9 +93,11 @@ export interface HistoryItem { epid?: number bvid?: string part?: string + page?: number oid: number cid: number } + videos?: number author_name: string author_face: string author_mid: string