Merge branch 'bugfixes' into refactor-lazy-components

This commit is contained in:
Hakadao
2024-01-28 02:03:50 +08:00
8 changed files with 19 additions and 10 deletions

View File

@@ -2,8 +2,6 @@
import { useDateFormat } from '@vueuse/core'
import { useI18n } from 'vue-i18n'
// import type { HistoryItem } from './types'
import type { Ref } from 'vue'
import { getCSRF, openLinkToNewTab, removeHttpFromUrl } from '~/utils/main'
import { calcCurrentTime } from '~/utils/dataFormatter'
import { Business } from '~/models/video/history'
@@ -158,8 +156,10 @@ function getHistoryUrl(item: HistoryItem): string {
return removeHttpFromUrl(item.uri)
}
// video
else if (item.history.business === 'archive') {
return removeHttpFromUrl(item.history.bvid)
else if (item.history.business === Business.ARCHIVE) {
if (item?.videos && item.videos > 0)
return `//www.bilibili.com/video/${item.history.bvid}?p=${item.history.page}`
return item.history.bvid
}
else if (item.history.business === 'live') {
return `//live.bilibili.com/${item.history.oid}`