任务列表页面

This commit is contained in:
X1627315083
2024-03-21 10:49:21 +08:00
parent c5e3a5036d
commit c8f6884e7d
23 changed files with 1353 additions and 184 deletions

View File

@@ -3,7 +3,8 @@ import { defineAsyncComponent } from 'vue'
import { getBrowserInfo, murmur } from '@/tool/util'
import { getCookie, setCookie } from "@/tool/cookie";
const _import = (path: string) => defineAsyncComponent(() => import(`../views/${path}.vue`));
const _import_custom = (path : string) => defineAsyncComponent(() => import(`../component/${path}`));
const _import_component = (path : string) => defineAsyncComponent(() => import(`../component/${path}`));
const _import_custom = (path : string) => defineAsyncComponent(() => import(`../views/${path}`));
const routes: Array<RouteRecordRaw> = [
{
@@ -22,21 +23,45 @@ const routes: Array<RouteRecordRaw> = [
name: 'upgrade',
component: _import('Upgrade'),
},
// {
// path: '/home',
// name: 'home',
// component: _import('HomeView')
// },
{
path: '/home',
name: 'home',
component: _import('HomeView')
component: _import('HomeMain'),
children:[
{
path: "",
redirect: "home/homePage"
},
{
path:'homePage',
name:'homePage',
component: _import_custom('HomeView/HomeView.vue'),
},{
path:'library',
name:'library',
component: _import_custom('HomeView/library.vue'),
},{
path:'history',
name:'history',
component: _import_custom('HomeView/history.vue'),
},
]
},
{
path: '/demo',
name: 'demo',
component: _import('Demo')
},
{
path: '/history',
name: 'history',
component: _import('HistoryPage')
},
// {
// path: '/history',
// name: 'history',
// component: _import('history')
// },
// {
// path: '/testClickData',
// name: 'testClickData',
@@ -50,17 +75,17 @@ const routes: Array<RouteRecordRaw> = [
{
path:'allUser',
name:'allUser',
component: _import_custom('Administrator/allUser.vue'),
component: _import_component('Administrator/allUser.vue'),
},
{
path:'testClickData',
name:'testClickData',
component: _import_custom('Administrator/TestClickData.vue'),
component: _import_component('Administrator/TestClickData.vue'),
},
{
path:'trialApproval',
name:'trialApproval',
component: _import_custom('Administrator/trialApproval.vue'),
component: _import_component('Administrator/trialApproval.vue'),
},
]
},
@@ -74,11 +99,11 @@ const routes: Array<RouteRecordRaw> = [
name: 'paySucceed',
component: _import('paySucceed')
},
{
path: '/library',
name: 'library',
component: _import('LibraryPage')
},
// {
// path: '/library',
// name: 'library',
// component: _import('library')
// },
// {
// path: '/trialApproval',
// name: 'trialApproval',
@@ -125,7 +150,6 @@ router.beforeEach((to, from, next) => {
return false
}
});
if (routeExists) {
if (isMurmur && murmurStr && token) {
const toName = to.name === 'login';