// 移动端路由 import type { Route } from '@/global' const Layout = () => import('@/layouts/mobile.vue') const routes: Route.recordRaw[] = [ { path: '/home', component: Layout, redirect: '/home/index', name: 'Home', meta: { title: '首页', auth: '/mobile/dashboard', }, children: [ { path: 'index', component: () => import('@/views/mobile/dashboard/index.vue'), name: 'HomeIndex', meta: { title: '首页', isHeader: false, // 是否需要头部 isBack: false, // 是否需要返回按钮 isHome: false, // 是否需要回到首页按钮 auth: '/mobile/dashboard', }, }, ], }, { path: '/device', component: Layout, redirect: '/device/add', name: 'Device', meta: { title: '新装设备', auth: '/mobile/device', }, children: [ { path: 'add', component: () => import('@/views/mobile/device/add.vue'), name: 'DeviceAdd', meta: { title: '新装设备', isHeader: true, // 是否需要头部 isBack: true, // 是否需要返回按钮 isHome: false, // 是否需要回到首页按钮 auth: '/mobile/device', }, }, { path: 'success', component: () => import('@/views/mobile/device/success.vue'), name: 'DeviceAddSuccess', meta: { title: '新装设备', isHeader: true, // 是否需要头部 isBack: true, // 是否需要返回按钮 isHome: false, // 是否需要回到首页按钮 auth: '/mobile/device', }, }, ], }, { path: '/operation', component: Layout, redirect: '/operation/equipment', name: 'Operation', meta: { title: '设备运维', auth: '/mobile/operation', }, children: [ { path: 'equipment', component: () => import('@/views/mobile/operation/index.vue'), name: 'OperationEquipment', meta: { title: '设备运维', isHeader: true, // 是否需要头部 isBack: true, // 是否需要返回按钮 isHome: false, // 是否需要回到首页按钮 auth: '/mobile/operation', }, }, { path: 'data', component: () => import('@/views/mobile/operation/data.vue'), name: 'OperationData', meta: { title: '设备数据查看', isHeader: true, // 是否需要头部 isBack: true, // 是否需要返回按钮 isHome: false, // 是否需要回到首页按钮 auth: '/mobile/operation', }, }, { path: 'success', component: () => import('@/views/mobile/operation/success.vue'), name: 'OperationDataSuccess', meta: { title: '设备运维', isHeader: true, // 是否需要头部 isBack: true, // 是否需要返回按钮 isHome: false, // 是否需要回到首页按钮 auth: '/mobile/operation', }, }, ], }, { path: '/info', component: Layout, redirect: '/info/search', name: 'Info', meta: { title: '信息查询', auth: '/mobile/info', }, children: [ { path: 'search', component: () => import('@/views/mobile/info/search.vue'), name: 'InfoSearch', meta: { title: '信息查询', isHeader: true, // 是否需要头部 isBack: true, // 是否需要返回按钮 isHome: false, // 是否需要回到首页按钮 auth: '/mobile/info', }, }, { path: 'result', component: () => import('@/views/mobile/info/result.vue'), name: 'InfoResult', meta: { title: '信息查询', isHeader: true, // 是否需要头部 isBack: true, // 是否需要返回按钮 isHome: false, // 是否需要回到首页按钮 auth: '/mobile/info', }, }, { path: 'detail', component: () => import('@/views/mobile/info/detail.vue'), name: 'InfoDetail', meta: { title: '详情', isHeader: true, // 是否需要头部 isBack: true, // 是否需要返回按钮 isHome: false, // 是否需要回到首页按钮 auth: '/mobile/info', }, }, ], }, { path: '/record', component: Layout, redirect: '/record/search', name: 'Record', meta: { title: '运维记录', auth: '/mobile/record', }, children: [ { path: 'search', component: () => import('@/views/mobile/record/search.vue'), name: 'RecordSearch', meta: { title: '运维记录', isHeader: true, // 是否需要头部 isBack: true, // 是否需要返回按钮 isHome: false, // 是否需要回到首页按钮 auth: '/mobile/record', }, }, { path: 'detail', component: () => import('@/views/mobile/record/detail.vue'), name: 'RecordDetail', meta: { title: '详情', isHeader: true, // 是否需要头部 isBack: true, // 是否需要返回按钮 isHome: false, // 是否需要回到首页按钮 auth: '/mobile/record', }, }, ], }, ] export default routes