From c3aa826406d52957d6f98d0ecd4b77413d5ce908 Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Mon, 29 Aug 2022 18:23:08 +0800 Subject: [PATCH] 统计模块异步加载 --- src/config/router.config.js | 117 +++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 99 insertions(+), 18 deletions(-) diff --git a/src/config/router.config.js b/src/config/router.config.js index 48f57b5..4ce50ee 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -1,50 +1,131 @@ -import main from '../components/layouts/main.vue' -import main1 from '../components/layouts/main1-show.vue' -import main2 from '../components/layouts/main2-show.vue' -import box6 from '../components/layouts/box6-articleList.vue' -import box1 from '../components/layouts/box1-info.vue' -import box2 from '../components/layouts/box2-class.vue' +import baseLayout from '../components/layouts/baseLayout.vue' + +import articleList from '../components/group/articleListScorll.vue' + +import main1 from '../components/swichLabel/main1-home.vue' +import platform from '../components/swichLabel/main2-music-search.vue' +import main3 from '../components/swichLabel/main3-show.vue' +import link from '../components/swichLabel/main4-link.vue' +import login from '../components/swichLabel/main5-login.vue' +import comment from '../components/swichLabel/main6-comment.vue' +import edit from '../components/swichLabel/edit.vue' + +import platformGroup from '../components/group/platformGroup.vue' + +import box1 from '../components/mini/box1-info.vue' +import tagTime from '../components/mini/tagTime.vue' +import tagInfo from '../components/mini/tagInfo.vue' +import boxFriend from '../components/mini/box-friend.vue' +import mdDetail from '../components/mini/mdDetail.vue' +import videoDetail from '../components/mini/box16-videoDetail.vue' +import videoList from '../components/mini/box14-video.vue' + +import videoMiniBox from '../components/iframe/videoMiniBox.vue' export const asyncRouterMap = [{ path: '*', - // redirect: '/404', - component: () => import( /* webpackChunkName: "fail" */ '@/views/exception/404'), + redirect: '/404', + // component: () => import( /* webpackChunkName: "fail" */ '@/views/exception/404'), hidden: true }, { path: '/', - component: main, + component: baseLayout, children: [{ path: '/', component: main1, children: [{ path: '/', - component: box6, + name: "home", + component: articleList, + props: true }, { path: '/box1', component: box1, + }, + { + name: "tagTime", + path: '/tagTime', + component: tagTime, + }, + { + name: "comment", + path: '/comment', + component: comment, + }, + { + path: '/tagInfo', + component: tagInfo, + }, + { + name: "mdDetail", + path: '/mdDetail', + component: mdDetail, + }, { + path: '/link', + component: boxFriend, + }, + { + path: '/404', + component: () => import('@/views/exception/404') } ] }, { - path: '/main1', + path: '/articleList', component: main1, children: [{ path: '/', - component: box6, + name: "articleList", + component: articleList, }] }, { - path: '/main2', - component: main2, + path: '/platform', + component: platform, + children: [ + // { + // path: '/', + // name: "videoList", + // component: videoList, + // }, + { + path: '/', + name: "platformGroup", + component: platformGroup, + }, + { + path: '/videoDetail', + name: "videoDetail", + component: videoDetail, + } + ] }, + { + path: '/main3', + component: main3, + }, + { + path: '/link', + component: link, + }, { + path: '/login', + component: login, + }, { + path: '/edit', + name: 'edit', + component: edit, + }, + ], - ] }, - + { + path: '/v', + component: videoMiniBox, + } ] @@ -54,8 +135,8 @@ * @type { *[] } */ export const constantRouterMap = [{ - path: '/404', - component: () => import( /* webpackChunkName: "fail" */ '@/views/exception/404') + // path: '/404', + // component: () => import( /* webpackChunkName: "fail" */ '@/views/exception/404') } ] -- Gitblit v1.9.1