liiistem-miniapp/config/routes.ts

293 lines
6.9 KiB
TypeScript
Raw Normal View History

2025-09-18 10:28:15 +08:00
/**
* @name umi
* @description path,component,routes,redirect,wrappers,name,icon
* @param path path 第一种是动态参数 :id *
* @param component location path React src/pages
* @param routes layout 使
* @param redirect
* @param wrappers
* @param name menu.ts menu.xxxx name login menu.ts menu.login
* @param icon https://ant.design/components/icon-cn 注意去除风格后缀和大小写,如想要配置图标为 <StepBackwardOutlined /> 则取值应为 stepBackward 或 StepBackward如想要配置图标为 <UserOutlined /> 则取值应为 user 或者 User
* @doc https://umijs.org/docs/guides/routes
*/
export default [
{
path: '/dashboard',
name: '首页',
icon: 'Home',
component: './dashboard/workplace',
},
{
path: '/news',
name: '动态',
icon: 'FileText',
routes: [
{
path: '/news',
redirect: '/news/list',
},
{
name: '动态列表',
path: '/news/list',
component: './news/list',
},
],
},
{
path: '/banner',
name: 'banner',
icon: 'FileText',
routes: [
{
path: '/banner',
redirect: '/banner/list',
},
{
name: 'banner列表',
path: '/banner/list',
component: './banner/list',
},
],
},
// {
// path: '/coupon',
// name: '优惠券',
// icon: 'FileText',
// 'access': 'canAdmin',
// routes: [
// {
// path: '/coupon',
// redirect: '/coupon/list',
// },
// {
// name: '券类型',
// path: '/coupon/list',
// component: './coupon/list',
// },
// ],
// },
{
path: '/member',
name: '用户',
icon: 'FileText',
'access': 'canAdmin',
routes: [
{
path: '/member',
redirect: '/member/list',
},
{
name: '用户列表',
path: '/member/list',
component: './member/list',
},
],
},
// {
// path: '/ground_place',
// name: '用户',
// icon: 'FileText',
// routes: [
// {
// path: '/ground_place',
// redirect: '/ground_place/list',
// },
// {
// name: '用户列表',
// path: '/ground_place/list',
// component: './ground_place/list',
// },
// ],
// },
{
path: '/order',
name: '订单管理',
icon: 'FileText',
'access': 'canAdmin',
routes: [
{
path: '/order',
redirect: '/order/list',
},
{
name: '订单列表',
path: '/order/list',
component: './order/list',
'access': 'canAdmin',
},
],
},
// {
// path: '/groupact',
// name: '畅打活动',
// icon: 'FileText',
// routes: [
// {
// path: '/groupact',
// redirect: '/groupact/list',
// },
// {
// name: '活动列表',
// path: '/groupact/list',
// component: './groupact/list',
// },
// ],
// },
// {
// path: '/match',
// name: '赛事',
// icon: 'FileText',
// routes: [
// {
// path: '/match',
// redirect: '/match/list',
// },
// {
// name: '赛事列表',
// path: '/match/list',
// component: './match/list',
// },
// ],
// },
// {
// path: '/ground',
// name: '场馆管理',
// icon: 'FileText',
// routes: [
// {
// path: '/ground',
// redirect: '/ground/list',
// },
// {
// name: '场馆列表',
// path: '/ground/list',
// component: './ground/list',
// },
// {
// name: '场地列表',
// path: '/ground/place/list/:ground_id',
// component: './ground_place/list',
// hideInMenu: true,
// },
// {
// name: '场馆预定情况',
// path: '/ground/dashboard/:ground_id',
// component: './ground/dashboard',
// hideInMenu: true,
// },
// ],
// },
// {
// path: '/classes',
// name: '课程管理',
// icon: 'FileText',
// 'access': 'canAdmin',
// routes: [
// {
// path: '/classes',
// redirect: '/classes/list',
// },
// {
// name: '课程列表',
// path: '/classes/list',
// component: './classes/list',
// },
// ],
// },
// {
// path: '/teacher',
// name: '教练管理',
// icon: 'FileText',
// 'access': 'canAdmin',
// routes: [
// {
// path: '/teacher',
// redirect: '/teacher/list',
// },
// {
// name: '教练列表',
// path: '/teacher/list',
// component: './teacher/list',
// },
// ],
// },
{
path: '/setting',
name: '设置',
icon: 'Setting',
routes: [
{
path: '/setting',
redirect: '/setting/user/list',
},
{
name: '权限管理',
path: '/setting/user/list',
component: './setting/user/list',
'access': 'canAdmin',
},
// {
// name: '会员等级',
// path: '/setting/viplevel/list',
// component: './setting/viplevel/list',
// 'access': 'canAdmin',
// },
// {
// name: '短信匹配管理',
// path: '/setting/sms_match/list',
// component: './setting/sms_match/list',
// 'access': 'canAdmin',
// },
{
name: '基础配置',
path: '/setting/config/list',
component: './setting/config/list',
// 'access': 'canAdmin',
},
],
},
// {
// path: '/m',
// layout: false,
// routes: [
// {
// path: '/m/shenpi/list',
// layout: false,
// name: 'm_shenpi_list',
// component: './shenpi/mlist',
// },
// ],
// },
{
path: '/user',
layout: false,
routes: [
{
path: '/user/login',
layout: false,
name: 'login',
component: './user/login',
},
{
path: '/user',
redirect: '/user/login',
},
// {
// component: '404',
// path: '/*',
// },
],
},
{
path: '/',
component: './root',
},
{
component: '404',
path: '/*',
},
];