|
|
|
|
|
import type { RouteRecordRaw } from 'vue-router'
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
feat: setup core architecture (router, pinia, axios, permission)
- Vue Router 4 with navigation guards and dynamic route loading
- Pinia stores for user, permission, and app state management
- Axios API layer with request/response interceptors
- Permission control (v-hasPermi, v-hasRole directives)
- Utility functions (auth, validate, permission)
- Layout component with sidebar, navbar, and breadcrumbs
- Error pages (401, 404) and redirect view
- Login API integration with user store
3 weeks ago
|
|
|
|
* 静态路由(无需权限即可访问)
|
|
|
|
|
|
*/
|
|
|
|
|
|
export const constantRoutes: RouteRecordRaw[] = [
|
|
|
|
|
|
{
|
|
|
|
|
|
path: '/login',
|
|
|
|
|
|
name: 'Login',
|
|
|
|
|
|
component: () => import('@/views/login.vue'),
|
|
|
|
|
|
meta: { title: '登录', hidden: true },
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
feat: setup core architecture (router, pinia, axios, permission)
- Vue Router 4 with navigation guards and dynamic route loading
- Pinia stores for user, permission, and app state management
- Axios API layer with request/response interceptors
- Permission control (v-hasPermi, v-hasRole directives)
- Utility functions (auth, validate, permission)
- Layout component with sidebar, navbar, and breadcrumbs
- Error pages (401, 404) and redirect view
- Login API integration with user store
3 weeks ago
|
|
|
|
path: '/redirect/:path(.*)',
|
|
|
|
|
|
name: 'Redirect',
|
|
|
|
|
|
component: () => import('@/views/redirect.vue'),
|
|
|
|
|
|
meta: { hidden: true },
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
feat: setup core architecture (router, pinia, axios, permission)
- Vue Router 4 with navigation guards and dynamic route loading
- Pinia stores for user, permission, and app state management
- Axios API layer with request/response interceptors
- Permission control (v-hasPermi, v-hasRole directives)
- Utility functions (auth, validate, permission)
- Layout component with sidebar, navbar, and breadcrumbs
- Error pages (401, 404) and redirect view
- Login API integration with user store
3 weeks ago
|
|
|
|
path: '/404',
|
|
|
|
|
|
name: 'NotFound',
|
feat: setup core architecture (router, pinia, axios, permission)
- Vue Router 4 with navigation guards and dynamic route loading
- Pinia stores for user, permission, and app state management
- Axios API layer with request/response interceptors
- Permission control (v-hasPermi, v-hasRole directives)
- Utility functions (auth, validate, permission)
- Layout component with sidebar, navbar, and breadcrumbs
- Error pages (401, 404) and redirect view
- Login API integration with user store
3 weeks ago
|
|
|
|
component: () => import('@/views/error/404.vue'),
|
|
|
|
|
|
meta: { title: '404', hidden: true },
|
|
|
|
|
|
},
|
feat: setup core architecture (router, pinia, axios, permission)
- Vue Router 4 with navigation guards and dynamic route loading
- Pinia stores for user, permission, and app state management
- Axios API layer with request/response interceptors
- Permission control (v-hasPermi, v-hasRole directives)
- Utility functions (auth, validate, permission)
- Layout component with sidebar, navbar, and breadcrumbs
- Error pages (401, 404) and redirect view
- Login API integration with user store
3 weeks ago
|
|
|
|
{
|
|
|
|
|
|
path: '/401',
|
|
|
|
|
|
name: 'Unauthorized',
|
|
|
|
|
|
component: () => import('@/views/error/401.vue'),
|
|
|
|
|
|
meta: { title: '401', hidden: true },
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
path: '/',
|
|
|
|
|
|
component: () => import('@/layout/index.vue'),
|
|
|
|
|
|
redirect: '/index',
|
|
|
|
|
|
children: [
|
|
|
|
|
|
{
|
|
|
|
|
|
path: 'index',
|
|
|
|
|
|
name: 'Index',
|
|
|
|
|
|
component: () => import('@/views/index.vue'),
|
|
|
|
|
|
meta: { title: '首页', icon: 'HomeFilled', affix: true },
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
path: '/dashboard',
|
|
|
|
|
|
component: () => import('@/layout/index.vue'),
|
|
|
|
|
|
redirect: '/dashboard/index',
|
|
|
|
|
|
meta: { title: '行情总览', icon: 'TrendCharts' },
|
|
|
|
|
|
children: [
|
|
|
|
|
|
{
|
|
|
|
|
|
path: 'index',
|
|
|
|
|
|
name: 'DashboardIndex',
|
|
|
|
|
|
component: () => import('@/views/dashboard/index.vue'),
|
|
|
|
|
|
meta: { title: '行情总览', affix: true },
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
path: 'heatmap',
|
|
|
|
|
|
name: 'DashboardHeatmap',
|
|
|
|
|
|
component: () => import('@/views/heatmap/index.vue'),
|
|
|
|
|
|
meta: { title: '趋势热力' },
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
},
|
feat: setup core architecture (router, pinia, axios, permission)
- Vue Router 4 with navigation guards and dynamic route loading
- Pinia stores for user, permission, and app state management
- Axios API layer with request/response interceptors
- Permission control (v-hasPermi, v-hasRole directives)
- Utility functions (auth, validate, permission)
- Layout component with sidebar, navbar, and breadcrumbs
- Error pages (401, 404) and redirect view
- Login API integration with user store
3 weeks ago
|
|
|
|
// Catch-all 404 - must be added last
|
|
|
|
|
|
{
|
|
|
|
|
|
path: '/:pathMatch(.*)*',
|
|
|
|
|
|
redirect: '/404',
|
|
|
|
|
|
meta: { hidden: true },
|
|
|
|
|
|
},
|
|
|
|
|
|
]
|