fix video collect detail

This commit is contained in:
2024-02-21 16:03:34 +08:00
parent 6317699f6c
commit bd96fecf4b
5 changed files with 67 additions and 61 deletions

View File

@@ -1,5 +1,11 @@
<template> <template>
<NConfigProvider :theme-overrides="themeOverrides" :theme="theme" style="height: 100vh" :locale="zhCN" :date-locale="dateZhCN"> <NConfigProvider
:theme-overrides="themeOverrides"
:theme="theme"
style="height: 100vh"
:locale="zhCN"
:date-locale="dateZhCN"
>
<NMessageProvider> <NMessageProvider>
<NNotificationProvider> <NNotificationProvider>
<NDialogProvider> <NDialogProvider>
@@ -58,7 +64,7 @@ import TempComponent from './components/TempComponent.vue'
const route = useRoute() const route = useRoute()
const layout = computed(() => { const layout = computed(() => {
if (route.path.startsWith('/user')) { if (route.path.startsWith('/user') || route.name == 'user' || route.path.startsWith('/@')) {
document.title = route.meta.title + ' · ' + route.params.id + ' · VTsuru' document.title = route.meta.title + ' · ' + route.params.id + ' · VTsuru'
return 'viewer' return 'viewer'
} else if (route.path.startsWith('/manage')) { } else if (route.path.startsWith('/manage')) {

View File

@@ -86,9 +86,14 @@ const routes: Array<RouteRecordRaw> = [
}, },
}, },
manage, manage,
user,
obs, obs,
open_live, open_live,
{
path: '/@:id',
name: 'user',
alias: '/user/:id',
children: user,
},
{ {
path: '/:pathMatch(.*)*', path: '/:pathMatch(.*)*',
name: 'notfound', name: 'notfound',

View File

@@ -80,7 +80,6 @@ export default //管理页面
component: () => import('@/views/manage/VideoCollectDetailView.vue'), component: () => import('@/views/manage/VideoCollectDetailView.vue'),
meta: { meta: {
title: '详情 · 视频征集', title: '详情 · 视频征集',
keepAlive: true,
parent: 'manage-videoCollect', parent: 'manage-videoCollect',
}, },
}, },

View File

@@ -1,62 +1,58 @@
export default { export default [
path: '/user/:id', {
name: 'user', path: '',
children: [ name: 'user-index',
{ component: () => import('@/views/view/UserIndexView.vue'),
path: '', meta: {
name: 'user-index', title: '主页',
component: () => import('@/views/view/UserIndexView.vue'), keepAlive: true,
meta: {
title: '主页',
keepAlive: true,
},
}, },
{ },
path: 'song-list', {
name: 'user-songList', path: 'song-list',
component: () => import('@/views/view/SongListView.vue'), name: 'user-songList',
meta: { component: () => import('@/views/view/SongListView.vue'),
title: '歌单', meta: {
keepAlive: true, title: '歌单',
}, keepAlive: true,
}, },
{ },
path: 'question-box', {
name: 'user-questionBox', path: 'question-box',
component: () => import('@/views/view/QuestionBoxView.vue'), name: 'user-questionBox',
meta: { component: () => import('@/views/view/QuestionBoxView.vue'),
title: '提问箱', meta: {
keepAlive: true, title: '提问箱',
}, keepAlive: true,
}, },
{ },
path: 'schedule', {
name: 'user-schedule', path: 'schedule',
component: () => import('@/views/view/ScheduleView.vue'), name: 'user-schedule',
meta: { component: () => import('@/views/view/ScheduleView.vue'),
title: '日程', meta: {
keepAlive: true, title: '日程',
}, keepAlive: true,
children: [ },
{ children: [
path: 'ics', {
name: 'user-schedule-ics', path: 'ics',
component: () => import('@/views/view/ScheduleView.vue'), name: 'user-schedule-ics',
beforeEnter(to: any) { component: () => import('@/views/view/ScheduleView.vue'),
// 直接重定向到外部 URL beforeEnter(to: any) {
window.location.href = 'https://vtsuru.live/api/schedule/get-ics?id=' + to.query.id // 直接重定向到外部 URL
}, window.location.href = 'https://vtsuru.live/api/schedule/get-ics?id=' + to.query.id
}, },
],
},
{
path: 'goods',
name: 'user-goods',
component: () => import('@/views/pointViews/PointGoodsView.vue'),
meta: {
title: '积分兑换',
keepAlive: true,
}, },
],
},
{
path: 'goods',
name: 'user-goods',
component: () => import('@/views/pointViews/PointGoodsView.vue'),
meta: {
title: '积分兑换',
keepAlive: true,
}, },
], },
} ]

View File

@@ -60,7 +60,7 @@ const replyMessage = ref()
const showSettingCard = ref(true) const showSettingCard = ref(true)
const shareCardRef = ref() const shareCardRef = ref()
const shareUrl = computed(() => 'https://vtsuru.live/user/' + accountInfo.value?.name + '/question-box') const shareUrl = computed(() => 'https://vtsuru.live/@' + accountInfo.value?.name + '/question-box')
let isRevieveGetted = false let isRevieveGetted = false
let isSendGetted = false let isSendGetted = false