You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.6 KiB
69 lines
2.6 KiB
import { Component } from 'vue'; |
|
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'; |
|
import { Document, Tools, UserFilled, Operation } from '@element-plus/icons-vue'; |
|
import Layout from '@/layout/index.vue'; |
|
|
|
declare module 'vue-router' { |
|
interface RouteMeta { |
|
hidden?: boolean; |
|
title?: string; |
|
icon?: Component; |
|
// requiresPermission?: string; |
|
} |
|
} |
|
export const routes: Array<RouteRecordRaw> = [ |
|
// { path: '/product', component: () => import('@/views/product/index.vue'), meta: { hidden: true } }, |
|
{ path: '/404', component: () => import('@/views/404.vue'), meta: { hidden: true } }, |
|
{ path: '/403', component: () => import('@/views/403.vue'), meta: { hidden: true } }, |
|
{ |
|
path: '', |
|
component: Layout, |
|
meta: { hidden: true }, |
|
children: [{ path: '', component: () => import('@/views/Home.vue'), meta: { title: 'menu.home' } }], |
|
}, |
|
{ |
|
path: '/product', |
|
redirect: '/product/index', |
|
component: Layout, |
|
meta: { title: '产品经理' }, |
|
children: [ |
|
{ path: 'index', component: () => import('@/views/product/List.vue'), meta: { title: '产品列表' } }, |
|
{ path: 'bank/:action', component: () => import('@/views/product/bank/CardList.vue'), meta: { title: '产品列表' } }, |
|
{ path: 'strategy/:action', component: () => import('@/views/product/strategy/CardList.vue'), meta: { title: '产品列表' } }, |
|
], |
|
}, |
|
{ |
|
path: '/finance', |
|
// redirect: '/finance/index', |
|
component: Layout, |
|
meta: { title: '金融市场' }, |
|
children: [ |
|
{ path: 'publish', component: () => import('@/views/finance/Publish.vue'), meta: { title: '发布' } }, |
|
{ path: 'account', component: () => import('@/views/finance/Account.vue'), meta: { title: '我的账户' } }, |
|
{ path: 'order', component: () => import('@/views/finance/Order.vue'), meta: { title: '我的订单' } }, |
|
{ path: 'armory', component: () => import('@/views/finance/Armory.vue'), meta: { title: '英雄榜' } }, |
|
{ path: 'bankDetail', component: () => import('@/views/finance/BankDetail.vue'), meta: { title: '银行产品详情' } }, |
|
], |
|
}, |
|
{ |
|
path: '/config', |
|
redirect: '/config/index', |
|
component: Layout, |
|
meta: { title: '产品经理' }, |
|
children: [{ path: 'index', component: () => import('@/views/config/Index.vue'), meta: { title: '参数配置' } }], |
|
}, |
|
// 404 page must be placed at the end !!! |
|
{ |
|
path: '/:pathMatch(.*)*', |
|
name: 'not-found', |
|
redirect: '/404', |
|
meta: { hidden: true }, |
|
}, |
|
]; |
|
const router = createRouter({ |
|
history: createWebHashHistory(), |
|
scrollBehavior: () => ({ top: 0 }), |
|
routes, |
|
}); |
|
|
|
export default router;
|
|
|