feat: 前端

This commit is contained in:
Leon
2025-12-25 22:40:56 +08:00
parent 027df9d32b
commit ce0aec6110
42 changed files with 6170 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import VideoView from '../views/VideoView.vue'
import VideoDetailView from '../views/VideoDetailView.vue'
import AccountView from '../views/AccountView.vue'
import ChangePasswordView from '../views/ChangePasswordView.vue'
import RegisterView from '../views/RegisterView.vue'
import SettingsView from '../views/SettingsView.vue'
import UserProfileView from '../views/UserProfileView.vue'
const router = createRouter({
history: createWebHistory(),
routes: [
{ path: '/', name: 'home', component: HomeView },
{ path: '/feed', redirect: '/' },
{ path: '/video', name: 'video', component: VideoView },
{ path: '/video/:id', name: 'video-detail', component: VideoDetailView, props: true },
{ path: '/account', name: 'account', component: AccountView },
{ path: '/account/register', name: 'account-register', component: RegisterView },
{ path: '/account/change-password', name: 'account-change-password', component: ChangePasswordView },
{ path: '/settings', name: 'settings', component: SettingsView },
{ path: '/u/:id', name: 'user-profile', component: UserProfileView, props: true },
],
})
export default router