♻️ refactored code
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import PhoalbumPhoalbum from "@/views/Album/Phoalbum/Phoalbum.vue";
|
||||
import PeopleAlbumPeopleAlbum from "@/views/Album/PeopleAlbum/PeopleAlbum.vue";
|
||||
import AlbumPhoalbumIndex from "@/views/Album/Phoalbum/PhoalbumIndex.vue";
|
||||
import PeoplePeopleAlbumIndex from "@/views/Album/PeopleAlbum/PeopleAlbumIndex.vue";
|
||||
import LocationAlbum from "@/views/Album/LocationAlbum/LocationAlbumList.vue";
|
||||
import LocationAlbumIndex from "@/views/Album/LocationAlbum/LocationAlbum.vue";
|
||||
import LocationLocationAlbumIndex from "@/views/Album/LocationAlbum/LocationAlbumIndex.vue";
|
||||
import ThingAlbum from "@/views/Album/ThingAlbum/ThingAlbumList.vue";
|
||||
import ThingAlbumThingAlbum from "@/views/Album/ThingAlbum/ThingAlbum.vue";
|
||||
import ThingThingAlbumIndex from "@/views/Album/ThingAlbum/ThingAlbumIndex.vue";
|
||||
import Phoalbum from "@/views/Album/Phoalbum/PhoalbumList.vue";
|
||||
import PeopleAlbum from "@/views/Album/PeopleAlbum/PeopleAlbumList.vue";
|
||||
import PhoalbumDetail from "@/views/Album/Phoalbum/PhoalbumDetail.vue";
|
||||
@@ -14,7 +14,7 @@ import ThingAlbumDetail from "@/views/Album/ThingAlbum/ThingAlbumDetail.vue";
|
||||
export default [
|
||||
{
|
||||
path: '/main/album/albums',
|
||||
component: PhoalbumPhoalbum,
|
||||
component: AlbumPhoalbumIndex,
|
||||
redirect: '/main/album/albums',
|
||||
children: [
|
||||
{
|
||||
@@ -39,7 +39,7 @@ export default [
|
||||
},
|
||||
{
|
||||
path: '/main/album/people',
|
||||
component: PeopleAlbumPeopleAlbum,
|
||||
component: PeoplePeopleAlbumIndex,
|
||||
redirect: '/main/album/people',
|
||||
children: [
|
||||
{
|
||||
@@ -64,7 +64,7 @@ export default [
|
||||
},
|
||||
{
|
||||
path: '/main/album/location',
|
||||
component: LocationAlbumIndex,
|
||||
component: LocationLocationAlbumIndex,
|
||||
redirect: '/main/album/location',
|
||||
children: [
|
||||
{
|
||||
@@ -89,7 +89,7 @@ export default [
|
||||
},
|
||||
{
|
||||
path: '/main/album/thing',
|
||||
component: ThingAlbumThingAlbum,
|
||||
component: ThingThingAlbumIndex,
|
||||
redirect: '/main/album/thing',
|
||||
children: [
|
||||
{
|
||||
|
@@ -20,7 +20,6 @@ export default [
|
||||
...recycling_bin,
|
||||
...share,
|
||||
...upscale,
|
||||
|
||||
]
|
||||
}, {
|
||||
path: '/main/share/list/:id',
|
||||
|
84
src/router/modules/user.ts
Normal file
84
src/router/modules/user.ts
Normal file
@@ -0,0 +1,84 @@
|
||||
import UserCenterHome from "@/views/User/PersonalCenter/components/UserCenterHome/UserCenterHome.vue";
|
||||
import UserCenterDynamic from "@/views/User/PersonalCenter/components/UserCenterDynamic/UserCenterDynamic.vue";
|
||||
import UserCenterInfo from "@/views/User/PersonalCenter/components/UserCenterInfo/UserCenterInfo.vue";
|
||||
import UserCenterAnalysis from "@/views/User/PersonalCenter/components/UserCenterAnalysis/UserCenterAnalysis.vue";
|
||||
import UserCenterShare from "@/views/User/PersonalCenter/components/UserCenterShare/UserCenterShare.vue";
|
||||
import UserCenterSetting from "@/views/User/PersonalCenter/components/UserCenterSetting/UserCenterSetting.vue";
|
||||
export default [
|
||||
{
|
||||
|
||||
path: '/main/user/center',
|
||||
name: 'userCenter',
|
||||
redirect: '/main/user/center/home',
|
||||
component: () => import('@/views/User/PersonalCenter/PersonalCenter.vue'),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: '个人中心'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/main/user/center/home',
|
||||
name: 'home',
|
||||
component: UserCenterHome,
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: '主页'
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/main/user/center/dynamic',
|
||||
name: 'dynamic',
|
||||
component: UserCenterDynamic,
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: '动态'
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/main/user/center/info',
|
||||
name: 'info',
|
||||
component: UserCenterInfo,
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: '个人信息'
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/main/user/center/analysis',
|
||||
name: 'analysis',
|
||||
component: UserCenterAnalysis,
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: '数据分析'
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/main/user/center/share',
|
||||
name: 'share',
|
||||
component: UserCenterShare,
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: '我的分享'
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/main/user/center/setting',
|
||||
name: 'setting',
|
||||
component: UserCenterSetting,
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: '设置'
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/main/user/setting',
|
||||
name: 'userSetting',
|
||||
component: () => import('@/views/User/AccountSetting/AccountSetting.vue'),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: '账户设置'
|
||||
}
|
||||
}
|
||||
];
|
@@ -8,6 +8,7 @@ import landing from "./modules/landing.ts";
|
||||
import mainRouter from "./modules/main_router.ts";
|
||||
import i18n from "@/locales";
|
||||
import phone_upload from "@/router/modules/phone_upload.ts";
|
||||
import user from "@/router/modules/user.ts";
|
||||
|
||||
const routes: Array<RouteRecordRaw> = [
|
||||
...login,
|
||||
@@ -15,6 +16,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
...landing,
|
||||
...mainRouter,
|
||||
...phone_upload,
|
||||
...user,
|
||||
{
|
||||
path: '/:pathMatch(.*)',
|
||||
redirect: '/404',
|
||||
|
Reference in New Issue
Block a user