Files
super_video/src/router/index.ts
T

227 lines
4.6 KiB
TypeScript

import { createRouter, createWebHashHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'
const routes: RouteRecordRaw[] = [
{
path: '/',
name: 'Home',
component: () => import('@/views/home/index.vue'),
meta: {
title: '首页'
}
},
{
path: '/guide',
name: 'Guide',
component: () => import('@/views/guide/index.vue'),
meta: {
title: '使用引导'
}
},
{
path: '/action',
name: 'Action',
component: () => import('@/views/home/action.vue'),
meta: {
title: '开始拍摄'
}
},
// vlog 发现与记录
{
path: '/vlog',
name: 'Vlog',
component: () => import('@/views/vlog/index.vue'),
meta: {
title: '发现与记录'
}
},
// vlog 发现与记录
{
path: '/work',
name: 'Work',
component: () => import('@/views/vlog/work/index.vue'),
meta: {
title: '发现与记录'
}
},
{
path: '/video',
name: 'Video',
component: () => import('@/views/vlog/video/index.vue'),
meta: {
title: '视频'
}
},
//技能树
{
path: '/skill',
name: 'Skill',
component: () => import('@/views/skill/index.vue'),
meta: {
title: '技能树'
}
},
{
path: '/skill/video',
name: 'SkillVdieo',
component: () => import('@/views/skill/video.vue'),
meta: {
title: '技能树视频'
}
},
//中期拍摄
{
path: '/midterm',
name: 'midterm',
component: () => import('@/views/midterm-shooting/midterm/index.vue'),
meta: {
title: '中期拍摄'
}
},
{
path: '/equipment',
name: 'equipment',
component: () => import('@/views/midterm-shooting/equipment/index.vue'),
meta: {
title: '设备准备'
}
},
{
path: '/prepare',
name: 'Prepare',
component: () => import('@/views/prepare/index.vue'),
meta: {
title: '脚本准备'
}
},
{
path: '/shooting',
name: 'shooting',
component: () => import('@/views/midterm-shooting/shooting/index.vue'),
meta: {
title: '设备准备'
}
},
{
path: '/filmingLocation-a',
name: 'filmingLocation-a',
component: () => import('@/views/midterm-shooting/shooting/filmingLocation-a/index.vue'),
meta: {
title: '设备准备'
}
},
{
path: '/filmingLocation-b',
name: 'filmingLocation-b',
component: () => import('@/views/midterm-shooting/shooting/filmingLocation-b/index.vue'),
meta: {
title: ''
}
},
{
path: '/a-1',
name: 'a-1',
component: () => import('@/views/midterm-shooting/shooting/filmingLocation-a/a-1.vue'),
meta: {
title: ''
}
},
{
path: '/a-2',
name: 'a-2',
component: () => import('@/views/midterm-shooting/shooting/filmingLocation-a/a-2.vue'),
meta: {
title: ''
}
},
{
path: '/a-3',
name: 'a-3',
component: () => import('@/views/midterm-shooting/shooting/filmingLocation-a/a-3.vue'),
meta: {
title: ''
}
},
{
path: '/b-1',
name: 'b-1',
component: () => import('@/views/midterm-shooting/shooting/filmingLocation-b/b-1.vue'),
meta: {
title: ''
}
},
{
path: '/b-2',
name: 'b-2',
component: () => import('@/views/midterm-shooting/shooting/filmingLocation-b/b-2.vue'),
meta: {
title: ''
}
},
{
path: '/b-3',
name: 'b-3',
component: () => import('@/views/midterm-shooting/shooting/filmingLocation-b/b-3.vue'),
meta: {
title: ''
}
},
{
path: '/preparedetail',
name: 'Preparedetail',
component: () => import('@/views/preparedetail/index.vue'),
meta: {
title: '脚本准备详情'
}
},
// 后期剪辑
{
path: '/afterditing',
name: 'afterditing',
component: () => import('@/views/afterditing/index.vue'),
meta: {
title: '后期剪辑'
}
},
{
path: '/editing',
name: 'editing',
component: () => import('@/views/afterditing/editing.vue'),
meta: {
title: '剪辑'
}
},
{
path: '/adjustmentColor',
name: 'adjustmentColor',
component: () => import('@/views/afterditing/adjustmentColor.vue'),
meta: {
title: '调色'
}
},
{
path: '/script-writing',
name: 'script-writing',
component: () => import('@/views/prepare/script-writing/index.vue'),
meta: {
title: '脚本撰写'
}
}
]
const router = createRouter({
history: createWebHashHistory(),
routes
})
// 路由守卫
router.beforeEach((to, _from, next) => {
// 设置页面标题
if (to.meta?.title) {
document.title = `${to.meta.title} - 短视频达人`
}
next()
})
export default router