mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-17 02:07:29 +08:00
🦄 refactor: 重构整个项目 优化打包 修改后台服务为本地运行 添加更新版本检测功能
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
const layoutRouter = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
meta: {
|
||||
title: '首页',
|
||||
icon: 'icon-Home',
|
||||
keepAlive: true,
|
||||
isMobile: true
|
||||
},
|
||||
component: () => import('@/views/home/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/search',
|
||||
name: 'search',
|
||||
meta: {
|
||||
title: '搜索',
|
||||
noScroll: true,
|
||||
icon: 'icon-Search',
|
||||
keepAlive: true,
|
||||
isMobile: true
|
||||
},
|
||||
component: () => import('@/views/search/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/list',
|
||||
name: 'list',
|
||||
meta: {
|
||||
title: '歌单',
|
||||
icon: 'icon-Paper',
|
||||
keepAlive: true,
|
||||
isMobile: true
|
||||
},
|
||||
component: () => import('@/views/list/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/mv',
|
||||
name: 'mv',
|
||||
meta: {
|
||||
title: 'MV',
|
||||
icon: 'icon-recordfill',
|
||||
keepAlive: true,
|
||||
isMobile: true
|
||||
},
|
||||
component: () => import('@/views/mv/index.vue')
|
||||
},
|
||||
// {
|
||||
// path: '/history',
|
||||
// name: 'history',
|
||||
// meta: {
|
||||
// title: '历史',
|
||||
// icon: 'icon-a-TicketStar',
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// component: () => import('@/views/history/index.vue'),
|
||||
// },
|
||||
{
|
||||
path: '/history',
|
||||
name: 'history',
|
||||
component: () => import('@/views/historyAndFavorite/index.vue'),
|
||||
meta: {
|
||||
title: '收藏历史',
|
||||
icon: 'icon-a-TicketStar',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
name: 'user',
|
||||
meta: {
|
||||
title: '用户',
|
||||
icon: 'icon-Profile',
|
||||
keepAlive: true,
|
||||
noScroll: true,
|
||||
isMobile: true
|
||||
},
|
||||
component: () => import('@/views/user/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/set',
|
||||
name: 'set',
|
||||
meta: {
|
||||
title: '设置',
|
||||
icon: 'ri-settings-3-fill',
|
||||
keepAlive: true,
|
||||
noScroll: true
|
||||
},
|
||||
component: () => import('@/views/set/index.vue')
|
||||
}
|
||||
];
|
||||
export default layoutRouter;
|
||||
@@ -0,0 +1,43 @@
|
||||
import { createRouter, createWebHashHistory } from 'vue-router';
|
||||
|
||||
import AppLayout from '@/layout/AppLayout.vue';
|
||||
import homeRouter from '@/router/home';
|
||||
|
||||
const loginRouter = {
|
||||
path: '/login',
|
||||
name: 'login',
|
||||
mate: {
|
||||
keepAlive: true,
|
||||
title: '登录',
|
||||
icon: 'icon-Home'
|
||||
},
|
||||
component: () => import('@/views/login/index.vue')
|
||||
};
|
||||
|
||||
const setRouter = {
|
||||
path: '/set',
|
||||
name: 'set',
|
||||
mate: {
|
||||
keepAlive: true,
|
||||
title: '设置',
|
||||
icon: 'icon-Home'
|
||||
},
|
||||
component: () => import('@/views/set/index.vue')
|
||||
};
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
component: AppLayout,
|
||||
children: [...homeRouter, loginRouter, setRouter]
|
||||
},
|
||||
{
|
||||
path: '/lyric',
|
||||
component: () => import('@/views/lyric/index.vue')
|
||||
}
|
||||
];
|
||||
|
||||
export default createRouter({
|
||||
routes,
|
||||
history: createWebHashHistory()
|
||||
});
|
||||
Reference in New Issue
Block a user