forked from zhongyidian/super_video
refactor: 删除历史路由和视图文件,清理不再使用的代码
This commit is contained in:
1 parent
2b36342304
commit
55f45269bd
10 files changed
-428
No files matched your search
@@ -1,54 +0,0 @@
|
|||||||
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: '发现与记录'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
const router = createRouter({
|
|
||||||
history: createWebHashHistory(),
|
|
||||||
routes
|
|
||||||
})
|
|
||||||
|
|
||||||
// 路由守卫
|
|
||||||
router.beforeEach((to, _from, next) => {
|
|
||||||
// 设置页面标题
|
|
||||||
if (to.meta?.title) {
|
|
||||||
document.title = `${to.meta.title} - 短视频达人`
|
|
||||||
}
|
|
||||||
next()
|
|
||||||
})
|
|
||||||
|
|
||||||
export default router
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
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: '发现与记录'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
const router = createRouter({
|
|
||||||
history: createWebHashHistory(),
|
|
||||||
routes
|
|
||||||
})
|
|
||||||
|
|
||||||
// 路由守卫
|
|
||||||
router.beforeEach((to, _from, next) => {
|
|
||||||
// 设置页面标题
|
|
||||||
if (to.meta?.title) {
|
|
||||||
document.title = `${to.meta.title} - 短视频达人`
|
|
||||||
}
|
|
||||||
next()
|
|
||||||
})
|
|
||||||
|
|
||||||
export default router
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
<script lang="tsx" setup>
|
|
||||||
import { getBackgroundImage, IMAGE_PATHS } from '@/utils'
|
|
||||||
import { ImgButton } from '@/components/Button'
|
|
||||||
|
|
||||||
import { ref } from 'vue'
|
|
||||||
import { ProgressBar } from '@/components'
|
|
||||||
|
|
||||||
const currentStep = ref(0)
|
|
||||||
|
|
||||||
const handleComplete = () => {
|
|
||||||
console.log('完成前置条件')
|
|
||||||
// 处理完成逻辑
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleStepChange = (step: number) => {
|
|
||||||
console.log('步骤变化:', step)
|
|
||||||
// 处理步骤变化逻辑
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="w-full h-full relative">
|
|
||||||
<!-- 背景图片-center -->
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-cover bg-center bg-no-repeat"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.BG_CENTER) }"
|
|
||||||
></div>
|
|
||||||
|
|
||||||
<!-- 背景图片 -->
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-cover bg-center bg-no-repeat"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.BG) }"
|
|
||||||
></div>
|
|
||||||
|
|
||||||
<!-- 标题 -->
|
|
||||||
<div class="absolute top-2 left-1/2 -translate-x-1/2">
|
|
||||||
<ImgButton :image="IMAGE_PATHS.VLOG.TITLE" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 任务取景按钮 -->
|
|
||||||
<div
|
|
||||||
class="absolute left-24 top-24"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.TASK_CAMERA) }"
|
|
||||||
>
|
|
||||||
<ImgButton :image="IMAGE_PATHS.VLOG.TASK_BTN" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 引导任务 -->
|
|
||||||
<ImgButton class="absolute right-24 bottom-24" :image="IMAGE_PATHS.VLOG.TASK_PERSON" />
|
|
||||||
|
|
||||||
<div class="absolute bottom-0 w-full">
|
|
||||||
<ProgressBar
|
|
||||||
:current-step="currentStep"
|
|
||||||
@complete="handleComplete"
|
|
||||||
@step-change="handleStepChange"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
<script lang="tsx" setup>
|
|
||||||
import { getBackgroundImage, IMAGE_PATHS } from '@/utils'
|
|
||||||
import { ImgButton } from '@/components/Button'
|
|
||||||
|
|
||||||
import { ref } from 'vue'
|
|
||||||
import { ProgressBar } from '@/components'
|
|
||||||
|
|
||||||
const currentStep = ref(0)
|
|
||||||
|
|
||||||
const handleComplete = () => {
|
|
||||||
console.log('完成前置条件')
|
|
||||||
// 处理完成逻辑
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleStepChange = (step: number) => {
|
|
||||||
console.log('步骤变化:', step)
|
|
||||||
// 处理步骤变化逻辑
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleWorkClick = () => {
|
|
||||||
console.log('任务取景按钮点击')
|
|
||||||
// 处理任务取景按钮点击逻辑
|
|
||||||
router.push({ name: 'Work' })
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="w-full h-full relative">
|
|
||||||
<!-- 背景图片-center -->
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-cover bg-center bg-no-repeat"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.BG_CENTER) }"
|
|
||||||
></div>
|
|
||||||
|
|
||||||
<!-- 背景图片 -->
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-cover bg-center bg-no-repeat"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.BG) }"
|
|
||||||
></div>
|
|
||||||
|
|
||||||
<!-- 标题 -->
|
|
||||||
<div class="absolute top-2 left-1/2 -translate-x-1/2">
|
|
||||||
<ImgButton :image="IMAGE_PATHS.VLOG.TITLE" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 任务取景按钮 -->
|
|
||||||
<div
|
|
||||||
class="absolute left-24 top-24"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.TASK_CAMERA) }"
|
|
||||||
>
|
|
||||||
<ImgButton :image="IMAGE_PATHS.VLOG.TASK_BTN" @click="handleWorkClick" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 引导任务 -->
|
|
||||||
<ImgButton class="absolute right-24 bottom-24" :image="IMAGE_PATHS.VLOG.TASK_PERSON" />
|
|
||||||
|
|
||||||
<div class="absolute bottom-0 w-full">
|
|
||||||
<ProgressBar
|
|
||||||
:current-step="currentStep"
|
|
||||||
@complete="handleComplete"
|
|
||||||
@step-change="handleStepChange"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
<script lang="tsx" setup>
|
|
||||||
import { getBackgroundImage, IMAGE_PATHS } from '@/utils'
|
|
||||||
import { ImgButton } from '@/components/Button'
|
|
||||||
|
|
||||||
import { ref } from 'vue'
|
|
||||||
import { ProgressBar } from '@/components'
|
|
||||||
|
|
||||||
const currentStep = ref(0)
|
|
||||||
|
|
||||||
const handleComplete = () => {
|
|
||||||
console.log('完成前置条件')
|
|
||||||
// 处理完成逻辑
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleStepChange = (step: number) => {
|
|
||||||
console.log('步骤变化:', step)
|
|
||||||
// 处理步骤变化逻辑
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleWorkClick = () => {
|
|
||||||
console.log('任务取景按钮点击')
|
|
||||||
// 处理任务取景按钮点击逻辑
|
|
||||||
router.push({ name: 'Work' })
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="w-full h-full relative">
|
|
||||||
<!-- 背景图片-center -->
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-cover bg-center bg-no-repeat"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.BG_CENTER) }"
|
|
||||||
></div>
|
|
||||||
|
|
||||||
<!-- 背景图片 -->
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-cover bg-center bg-no-repeat"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.BG) }"
|
|
||||||
></div>
|
|
||||||
|
|
||||||
<!-- 标题 -->
|
|
||||||
<div class="absolute top-2 left-1/2 -translate-x-1/2">
|
|
||||||
<ImgButton :image="IMAGE_PATHS.VLOG.TITLE" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 任务取景按钮 -->
|
|
||||||
<div
|
|
||||||
class="absolute left-24 top-24"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.TASK_CAMERA) }"
|
|
||||||
>
|
|
||||||
<ImgButton :image="IMAGE_PATHS.VLOG.TASK_BTN" @click="handleWorkClick" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 引导任务 -->
|
|
||||||
<ImgButton class="absolute right-24 bottom-24" :image="IMAGE_PATHS.VLOG.TASK_PERSON" />
|
|
||||||
|
|
||||||
<div class="absolute bottom-0 w-full">
|
|
||||||
<ProgressBar
|
|
||||||
:current-step="currentStep"
|
|
||||||
@complete="handleComplete"
|
|
||||||
@step-change="handleStepChange"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
<script lang="tsx" setup>
|
|
||||||
import { getBackgroundImage, IMAGE_PATHS } from '@/utils'
|
|
||||||
import { ImgButton } from '@/components/Button'
|
|
||||||
|
|
||||||
import { ref } from 'vue'
|
|
||||||
import { ProgressBar } from '@/components'
|
|
||||||
|
|
||||||
const router = useRouter()
|
|
||||||
|
|
||||||
const currentStep = ref(0)
|
|
||||||
|
|
||||||
const handleComplete = () => {
|
|
||||||
console.log('完成前置条件')
|
|
||||||
// 处理完成逻辑
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleStepChange = (step: number) => {
|
|
||||||
console.log('步骤变化:', step)
|
|
||||||
// 处理步骤变化逻辑
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleWorkClick = () => {
|
|
||||||
console.log('任务取景按钮点击')
|
|
||||||
// 处理任务取景按钮点击逻辑
|
|
||||||
router.push({ name: 'Work' })
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="w-full h-full relative">
|
|
||||||
<!-- 背景图片-center -->
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-cover bg-center bg-no-repeat"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.BG_CENTER) }"
|
|
||||||
></div>
|
|
||||||
|
|
||||||
<!-- 背景图片 -->
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-cover bg-center bg-no-repeat"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.BG) }"
|
|
||||||
></div>
|
|
||||||
|
|
||||||
<!-- 标题 -->
|
|
||||||
<div class="absolute top-2 left-1/2 -translate-x-1/2">
|
|
||||||
<ImgButton :image="IMAGE_PATHS.VLOG.TITLE" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 任务取景按钮 -->
|
|
||||||
<div
|
|
||||||
class="absolute left-24 top-24"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.TASK_CAMERA) }"
|
|
||||||
>
|
|
||||||
<ImgButton :image="IMAGE_PATHS.VLOG.TASK_BTN" @click="handleWorkClick" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 引导任务 -->
|
|
||||||
<ImgButton class="absolute right-24 bottom-24" :image="IMAGE_PATHS.VLOG.TASK_PERSON" />
|
|
||||||
|
|
||||||
<div class="absolute bottom-0 w-full">
|
|
||||||
<ProgressBar
|
|
||||||
:current-step="currentStep"
|
|
||||||
@complete="handleComplete"
|
|
||||||
@step-change="handleStepChange"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
Whitespace-only changes.
@@ -1,29 +0,0 @@
|
|||||||
<script lang="tsx" setup>
|
|
||||||
import { getBackgroundImage, IMAGE_PATHS } from '@/utils'
|
|
||||||
import { ImgButton } from '@/components/Button'
|
|
||||||
|
|
||||||
import { ref } from 'vue'
|
|
||||||
import { ProgressBar } from '@/components'
|
|
||||||
|
|
||||||
const currentStep = ref(0)
|
|
||||||
|
|
||||||
const handleComplete = () => {
|
|
||||||
console.log('完成前置条件')
|
|
||||||
// 处理完成逻辑
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleStepChange = (step: number) => {
|
|
||||||
console.log('步骤变化:', step)
|
|
||||||
// 处理步骤变化逻辑
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="w-full h-full relative">
|
|
||||||
<!-- 背景图片-center -->
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-cover bg-center bg-no-repeat"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.BG_CENTER) }"
|
|
||||||
></div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<script lang="tsx" setup>
|
|
||||||
import { getBackgroundImage, IMAGE_PATHS } from '@/utils'
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="w-full h-full relative">
|
|
||||||
<!-- 背景图片-center -->
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-cover bg-center bg-no-repeat"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.BG_CENTER) }"
|
|
||||||
></div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<script lang="tsx" setup>
|
|
||||||
import { getBackgroundImage, IMAGE_PATHS } from '@/utils'
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="w-full h-full relative">
|
|
||||||
<!-- 背景图片-center -->
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-cover bg-center bg-no-repeat"
|
|
||||||
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.BG_CENTER) }"
|
|
||||||
></div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
Reference in new issue
Block a user