index.js 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. Vue.use(Router)
  4. /* Layout */
  5. import Layout from '@/layout'
  6. /**
  7. * Note: 路由配置项
  8. *
  9. * hidden: true // 当设置 true 的时候该路由不会再侧边栏出现 如401,login等页面,或者如一些编辑页面/edit/1
  10. * alwaysShow: true // 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面
  11. * // 只有一个时,会将那个子路由当做根路由显示在侧边栏--如引导页面
  12. * // 若你想不管路由下面的 children 声明的个数都显示你的根路由
  13. * // 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则,一直显示根路由
  14. * redirect: noRedirect // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
  15. * name:'router-name' // 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题
  16. * query: '{"id": 1, "name": "ry"}' // 访问路由的默认传递参数
  17. * roles: ['admin', 'common'] // 访问路由的角色权限
  18. * permissions: ['a:a:a', 'b:b:b'] // 访问路由的菜单权限
  19. * meta : {
  20. noCache: true // 如果设置为true,则不会被 <keep-alive> 缓存(默认 false)
  21. title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字
  22. icon: 'svg-name' // 设置该路由的图标,对应路径src/assets/icons/svg
  23. breadcrumb: false // 如果设置为false,则不会在breadcrumb面包屑中显示
  24. activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。
  25. }
  26. */
  27. // 公共路由
  28. export const constantRoutes = [{
  29. path: '/redirect',
  30. component: Layout,
  31. hidden: true,
  32. children: [{
  33. path: '/redirect/:path(.*)',
  34. component: () => import('@/views/redirect')
  35. }]
  36. },
  37. {
  38. path: '/login',
  39. component: () => import('@/views/login'),
  40. hidden: true
  41. },
  42. {
  43. path: '/register',
  44. component: () => import('@/views/register'),
  45. hidden: true
  46. },
  47. {
  48. path: '/404',
  49. component: () => import('@/views/error/404'),
  50. hidden: true
  51. },
  52. {
  53. path: '/401',
  54. component: () => import('@/views/error/401'),
  55. hidden: true
  56. },
  57. {
  58. path: '',
  59. component: Layout,
  60. redirect: 'index',
  61. children: [{
  62. path: 'index',
  63. component: () => import('@/views/index'),
  64. name: 'Index',
  65. meta: {
  66. title: '首页',
  67. icon: 'home',
  68. affix: true
  69. }
  70. }]
  71. },
  72. {
  73. path: '/user',
  74. component: Layout,
  75. hidden: true,
  76. redirect: 'noredirect',
  77. children: [{
  78. path: 'profile',
  79. component: () => import('@/views/system/user/profile/index'),
  80. name: 'Profile',
  81. meta: {
  82. title: '个人中心',
  83. icon: 'user'
  84. }
  85. }]
  86. }
  87. ]
  88. // 动态路由,基于用户权限动态去加载
  89. export const dynamicRoutes = [{
  90. path: '/system/user-auth',
  91. component: Layout,
  92. hidden: true,
  93. permissions: ['system:user:edit'],
  94. children: [{
  95. path: 'role/:userId(\\d+)',
  96. component: () => import('@/views/system/user/authRole'),
  97. name: 'AuthRole',
  98. meta: {
  99. title: '分配角色',
  100. activeMenu: '/system/user'
  101. }
  102. }]
  103. },
  104. {
  105. path: '/system/role-auth',
  106. component: Layout,
  107. hidden: true,
  108. permissions: ['system:role:edit'],
  109. children: [{
  110. path: 'user/:roleId(\\d+)',
  111. component: () => import('@/views/system/role/authUser'),
  112. name: 'AuthUser',
  113. meta: {
  114. title: '分配用户',
  115. activeMenu: '/system/role'
  116. }
  117. }]
  118. },
  119. {
  120. path: '/system/dict-data',
  121. component: Layout,
  122. hidden: true,
  123. permissions: ['system:dict:list'],
  124. children: [{
  125. path: 'index/:dictId(\\d+)',
  126. component: () => import('@/views/system/dict/data'),
  127. name: 'Data',
  128. meta: {
  129. title: '字典数据',
  130. activeMenu: '/system/dict'
  131. }
  132. }]
  133. },
  134. {
  135. path: '/monitor/job-log',
  136. component: Layout,
  137. hidden: true,
  138. permissions: ['monitor:job:list'],
  139. children: [{
  140. path: 'index',
  141. component: () => import('@/views/monitor/job/log'),
  142. name: 'JobLog',
  143. meta: {
  144. title: '调度日志',
  145. activeMenu: '/monitor/job'
  146. }
  147. }]
  148. },
  149. {
  150. path: '/tool/gen-edit',
  151. component: Layout,
  152. hidden: true,
  153. permissions: ['tool:gen:edit'],
  154. children: [{
  155. path: 'index/:tableId(\\d+)',
  156. component: () => import('@/views/tool/gen/editTable'),
  157. name: 'GenEdit',
  158. meta: {
  159. title: '修改生成配置',
  160. activeMenu: '/tool/gen'
  161. }
  162. }]
  163. },
  164. // 内容管理
  165. // 视频管理
  166. {
  167. path: '/content',
  168. component: Layout,
  169. hidden: true,
  170. permissions: ['content:video:list'],
  171. name: 'videoList',
  172. children: [{
  173. path: 'video/detail',
  174. component: () => import('@/views/content/video/detail'),
  175. name: 'videoDetail',
  176. meta: {
  177. title: '视频详情',
  178. activeMenu: '/content/video'
  179. }
  180. }]
  181. },
  182. // 流量套餐
  183. {
  184. path: '/vippackage',
  185. component: Layout,
  186. hidden: true,
  187. permissions: ['vip:package:list'],
  188. children: [{
  189. path: 'vippackage/detail',
  190. component: () => import('@/views/vippackage/list/detail'),
  191. name: 'vipDetail',
  192. meta: {
  193. title: '会员套餐',
  194. activeMenu: '/vippackage/list'
  195. }
  196. },
  197. ]
  198. },
  199. // 文章管理
  200. {
  201. path: '/content',
  202. component: Layout,
  203. hidden: true,
  204. permissions: ['content:articleList:list'],
  205. name: 'articleList',
  206. children: [{
  207. path: 'articleList/detail',
  208. component: () => import('@/views/content/article/detail'),
  209. name: 'articleDetail',
  210. meta: {
  211. title: '文章详情',
  212. activeMenu: '/content/articleList'
  213. }
  214. }]
  215. },
  216. // 设备管理
  217. // 设备列表
  218. {
  219. path: '/device',
  220. component: Layout,
  221. hidden: true,
  222. permissions: ['device:list:list'],
  223. name: 'deviceList',
  224. children: [{
  225. path: 'deviceList/detail',
  226. component: () => import('@/views/device/list/detail'),
  227. name: 'deviceListDetail',
  228. meta: {
  229. title: '设备详情',
  230. activeMenu: '/device/deviceList'
  231. }
  232. }]
  233. },
  234. {
  235. path: '/device',
  236. component: Layout,
  237. hidden: true,
  238. permissions: ['device:class:list'],
  239. name: 'class',
  240. children: [{
  241. path: 'class/detail',
  242. component: () => import('@/views/device/class/detail'),
  243. name: 'classDetail',
  244. meta: {
  245. title: '大类详情',
  246. activeMenu: '/device/class'
  247. }
  248. }]
  249. },
  250. // 设备升级
  251. {
  252. path: '/device',
  253. component: Layout,
  254. hidden: true,
  255. permissions: ['device:version:list'],
  256. children: [{
  257. path: 'version/detail',
  258. component: () => import('@/views/device/version/detail'),
  259. name: 'deviceVersionDetail',
  260. meta: {
  261. title: '设备升级详情',
  262. activeMenu: '/device/version'
  263. }
  264. }]
  265. },
  266. // 设备文章
  267. {
  268. path: '/device',
  269. component: Layout,
  270. hidden: true,
  271. permissions: ['device:article:list'],
  272. name: 'article',
  273. children: [{
  274. path: 'article/detail',
  275. component: () => import('@/views/device/article/detail'),
  276. name: 'devArticleDetail',
  277. meta: {
  278. title: '文章详情',
  279. activeMenu: '/device/article'
  280. }
  281. }]
  282. },
  283. // 音频管理
  284. // 歌手
  285. {
  286. path: "/music",
  287. component: Layout,
  288. hidden: true,
  289. permissions: ['music:singer:list'],
  290. name: 'singer',
  291. children: [{
  292. path: 'singer/detail',
  293. component: () => import('@/views/music/singer/detail'),
  294. name: 'musicSingerDetail',
  295. meta: {
  296. title: `歌手详情`,
  297. activeMenu: '/music/singer'
  298. }
  299. }]
  300. },
  301. // 歌曲
  302. {
  303. path: '/music',
  304. component: Layout,
  305. hidden: true,
  306. permissions: ['music:list:list'],
  307. name: 'musicList',
  308. children: [{
  309. path: 'musicList/detail',
  310. component: () => import('@/views/music/list/detail'),
  311. name: 'musicListDetail',
  312. meta: {
  313. title: `歌曲详情`,
  314. activeMenu: '/music/musicList'
  315. }
  316. }]
  317. },
  318. // 歌单
  319. {
  320. path: '/music',
  321. component: Layout,
  322. hidden: true,
  323. permissions: ['music:menu:list'],
  324. name: 'musicMenu',
  325. children: [{
  326. path: 'menu/detail',
  327. component: () => import('@/views/music/menu/detail'),
  328. name: 'menu',
  329. meta: {
  330. title: `歌单详情`,
  331. activeMenu: '/music/musicMenu'
  332. }
  333. }]
  334. },
  335. // 音乐专辑
  336. {
  337. path: '/music',
  338. component: Layout,
  339. hidden: true,
  340. permissions: ['music:album:list'],
  341. name: 'album',
  342. children: [{
  343. path: 'album/detail',
  344. component: () => import('@/views/music/album/detail'),
  345. name: 'albumDetail',
  346. meta: {
  347. title: '专辑详情',
  348. activeMenu: '/music/album'
  349. }
  350. }]
  351. },
  352. // 播客专辑
  353. {
  354. path: '/music',
  355. component: Layout,
  356. hidden: true,
  357. permissions: ['music:blog:list'],
  358. name: 'blog',
  359. children: [{
  360. path: 'blog/detail',
  361. component: () => import('@/views/music/blog/detail'),
  362. name: 'blogDetail',
  363. meta: {
  364. title: `播客详情`,
  365. activeMenu: '/music/blog'
  366. }
  367. }]
  368. },
  369. // 节目
  370. {
  371. path: '/music',
  372. component: Layout,
  373. hidden: true,
  374. permissions: ['music:program:list'],
  375. name: 'program',
  376. children: [{
  377. path: 'program/detail',
  378. component: () => import('@/views/music/program/detail'),
  379. name: 'programDetail',
  380. meta: {
  381. title: `节目详情`,
  382. activeMenu: '/music/program'
  383. }
  384. }]
  385. },
  386. // 主播
  387. {
  388. path: '/music',
  389. component: Layout,
  390. hidden: true,
  391. permissions: ['music:anchor:list'],
  392. name: 'anchor',
  393. children: [{
  394. path: 'anchor/detail',
  395. component: () => import('@/views/music/anchor/detail'),
  396. name: 'anchorDetail',
  397. meta: {
  398. title: '主播详情',
  399. activeMenu: '/music/anchor'
  400. }
  401. }]
  402. },
  403. // 广播电台
  404. {
  405. path: '/music',
  406. component: Layout,
  407. hidden: true,
  408. permissions: ['music:radio:list'],
  409. name: 'radio',
  410. children: [{
  411. path: 'radio/detail',
  412. component: () => import('@/views/music/radio/detail'),
  413. name: 'radioDetail',
  414. meta: {
  415. title: `电台详情`,
  416. activeMenu: '/music/radio'
  417. }
  418. }]
  419. },
  420. // 猫王精选电台
  421. {
  422. path: '/music',
  423. component: Layout,
  424. hidden: true,
  425. permissions: ['music:choiceness:list'],
  426. name: 'choiceness',
  427. children: [{
  428. path: 'choiceness/detail',
  429. component: () => import('@/views/music/choiceness/detail'),
  430. name: 'choicenessDetail',
  431. meta: {
  432. title: '猫王精选详情',
  433. activeMenu: '/music/choiceness'
  434. }
  435. }]
  436. },
  437. // 项目管理
  438. // 项目列表
  439. {
  440. path: '/project',
  441. component: Layout,
  442. hidden: true,
  443. permissions: ['project:list:list'],
  444. children: [{
  445. path: 'projectList/detail',
  446. component: () => import('@/views/project/list/detail'),
  447. name: 'projectListDetail',
  448. meta: {
  449. title: `项目详情`,
  450. activeMenu: '/project/projectList'
  451. }
  452. }]
  453. },
  454. // 运营管理
  455. // 启动页
  456. {
  457. path: '/operation',
  458. component: Layout,
  459. hidden: true,
  460. permissions: ['operation:startPage:list'],
  461. children: [{
  462. path: 'startPage/detail',
  463. component: () => import('@/views/operation/startPage/detail'),
  464. name: 'startPageDetail',
  465. meta: {
  466. title: '启动页详情',
  467. activeMenu: '/operation/startPage'
  468. }
  469. }]
  470. },
  471. // 说明书管理详情
  472. {
  473. path: '/operation',
  474. component: Layout,
  475. hidden: true,
  476. permissions: ['operation:explain:list'],
  477. children: [{
  478. path: 'explain/detail',
  479. component: () => import('@/views/operation/explain/detail'),
  480. name: 'explainDetail',
  481. meta: {
  482. title: '说明书管理详情',
  483. activeMenu: '/operation/explain'
  484. }
  485. }]
  486. },
  487. // 微信banner
  488. {
  489. path: '/operation',
  490. component: Layout,
  491. hidden: true,
  492. permissions: ['operation:wxbanner:list'],
  493. children: [{
  494. path: 'wxbanner/detail',
  495. component: () => import('@/views/operation/wxbanner/detail'),
  496. name: 'wxbannerDetail',
  497. meta: {
  498. title: '微信轮播图详情',
  499. activeMenu: '/operation/wxbanner'
  500. }
  501. }]
  502. },
  503. {
  504. path: '/push',
  505. component: Layout,
  506. hidden: true,
  507. permissions: ['push:update:list'],
  508. children: [{
  509. path: 'update/detail',
  510. component: () => import('@/views/push/update/detail'),
  511. name: 'updateDetail',
  512. meta: {
  513. title: '升级详情',
  514. activeMenu: '/push/update'
  515. }
  516. }]
  517. },
  518. // src/router/index.js
  519. // {
  520. // path: '/user',
  521. // component: Layout,
  522. // redirect: '/user/list',
  523. // name: 'User',
  524. // meta: { title: '用户管理', icon: 'user' },
  525. // children: [
  526. // {
  527. // path: 'list',
  528. // name: 'UserList',
  529. // component: () => import('@/views/system/user/User'),
  530. // meta: { title: '用户列表', noCache: true }
  531. // },
  532. // // 其他相关用户路由...
  533. // ]
  534. // },
  535. // 推荐管理
  536. {
  537. path: '/operation',
  538. component: Layout,
  539. hidden: true,
  540. permissions: ['operation:recommend:list'],
  541. children: [{
  542. path: 'homePage/recommend/detail',
  543. component: () => import('@/views/operation/recommend/detail'),
  544. name: 'recommendDetail',
  545. meta: {
  546. title: '推荐详情',
  547. activeMenu: '/operation/homePage/operationRecommend'
  548. }
  549. }]
  550. },
  551. // 定制频道
  552. {
  553. path: '/operation',
  554. component: Layout,
  555. hidden: true,
  556. permissions: ['operation:channel:list'],
  557. name: 'channel',
  558. children: [{
  559. path: 'channel/detail',
  560. component: () => import('@/views/operation/channel/detail'),
  561. name: 'channelDetail',
  562. meta: {
  563. title: `频道详情`,
  564. activeMenu: '/operation/channel'
  565. }
  566. }]
  567. },
  568. // 多频多台
  569. {
  570. path: '/operation',
  571. component: Layout,
  572. hidden: true,
  573. permissions: ['operation:channels:list'],
  574. name: 'channels',
  575. children: [{
  576. path: 'channels/detail',
  577. component: () => import('@/views/operation/channels/detail'),
  578. name: 'channelsDetail',
  579. meta: {
  580. title: `频道详情`,
  581. activeMenu: '/operation/channels'
  582. }
  583. }]
  584. },
  585. // 标签分类
  586. {
  587. path: '/operation',
  588. component: Layout,
  589. hidden: true,
  590. permissions: ['operation:tag:list'],
  591. name: 'tag',
  592. children: [{
  593. path: 'tag/detail',
  594. component: () => import('@/views/operation/tag/detail'),
  595. name: 'tagDetail',
  596. meta: {
  597. title: '标签详情',
  598. activeMenu: '/operation/tag'
  599. }
  600. }]
  601. },
  602. // 唤醒音
  603. {
  604. path: '/operation',
  605. component: Layout,
  606. hidden: true,
  607. permissions: ['operation:waken:list'],
  608. name: 'waken',
  609. children: [{
  610. path: 'waken/detail',
  611. component: () => import('@/views/operation/waken/detail'),
  612. name: 'wakenDetail',
  613. meta: {
  614. title: '唤醒音详情',
  615. activeMenu: '/operation/waken'
  616. }
  617. }]
  618. },
  619. // 场景专区
  620. {
  621. path: '/operation',
  622. component: Layout,
  623. hidden: true,
  624. permissions: ['operation:scene:list'],
  625. name: 'scene',
  626. children: [{
  627. path: 'scene/detail',
  628. component: () => import('@/views/operation/scene/detail'),
  629. name: 'sceneDetail',
  630. meta: {
  631. title: '场景专区详情',
  632. activeMenu: '/operation/scene'
  633. }
  634. }]
  635. },
  636. // 协议管理
  637. {
  638. path: '/operation',
  639. component: Layout,
  640. hidden: true,
  641. permissions: ['operation:agreement:list'],
  642. name: 'agreement',
  643. children: [{
  644. path: 'agreement/detail',
  645. component: () => import('@/views/operation/agreement/detail'),
  646. name: 'agreementDetail',
  647. meta: {
  648. title: '协议详情',
  649. activeMenu: '/operation/agreement'
  650. }
  651. }]
  652. },
  653. // 活动管理
  654. {
  655. path: '/operation',
  656. component: Layout,
  657. hidden: true,
  658. permissions: ['operation:activity:list'],
  659. name: 'activity',
  660. children: [{
  661. path: 'activity/detail',
  662. component: () => import('@/views/operation/activity/detail'),
  663. name: 'activityDetail',
  664. meta: {
  665. title: '活动详情',
  666. activeMenu: '/operation/activity'
  667. }
  668. }]
  669. },
  670. // 反馈列表
  671. {
  672. path: '/operation',
  673. component: Layout,
  674. hidden: true,
  675. permissions: ['operation:feedbacklist:list'],
  676. name: 'feedbacklist',
  677. children: [{
  678. path: 'feedback/feedbacklist/detail',
  679. component: () => import('@/views/operation/feedbacklist/detail'),
  680. name: 'feedbacklistDetail',
  681. meta: {
  682. title: '反馈详情',
  683. activeMenu: '/operation/feedback/feedbacklist'
  684. }
  685. }]
  686. },
  687. // 门店管理
  688. {
  689. path: '/operation',
  690. component: Layout,
  691. hidden: true,
  692. permissions: ['operation:map:list'],
  693. name: 'map',
  694. children: [{
  695. path: 'map/detail',
  696. component: () => import('@/views/operation/map/detail'),
  697. name: 'mapDetail',
  698. meta: {
  699. title: '门店详情',
  700. activeMenu: '/opertaion/map'
  701. }
  702. }]
  703. },
  704. // 商品管理
  705. // 商品推荐
  706. {
  707. path: '/goods',
  708. component: Layout,
  709. hidden: true,
  710. permissions: ['goods:list:list'],
  711. children: [{
  712. path: 'goodsList/detail',
  713. component: () => import('@/views/goods/list/detail'),
  714. name: 'goodsListDetail',
  715. meta: {
  716. title: '商品详情',
  717. activeMenu: '/goods/goodsList'
  718. }
  719. }]
  720. },
  721. // 服务管理
  722. // 音乐套餐 / 流量套餐
  723. {
  724. path: '/service',
  725. component: Layout,
  726. hidden: true,
  727. permissions: ['service:package:list'],
  728. children: [{
  729. path: 'package/detail',
  730. component: () => import('@/views/service/package/detail'),
  731. name: 'packageDetail',
  732. meta: {
  733. title: '套餐详情'
  734. }
  735. }]
  736. },
  737. // 签到管理
  738. // 抽奖配置
  739. {
  740. path: '/registration',
  741. component: Layout,
  742. hidden: true,
  743. permissions: ['registration:lotteryConfig:list'],
  744. children: [{
  745. path: 'lotteryConfig/detail',
  746. component: () => import('@/views/registration/lottery/detail'),
  747. name: 'lotteryConfigDetail',
  748. meta: {
  749. title: '配置详情',
  750. activeMenu: '/registration/lotteryConfig'
  751. }
  752. }]
  753. },
  754. // 内容配置
  755. {
  756. path: '/registration',
  757. component: Layout,
  758. hidden: true,
  759. permissions: ['registration:contentConfig:list'],
  760. children: [{
  761. path: 'contentConfig/detail',
  762. component: () => import('@/views/registration/content/detail'),
  763. name: 'contentConfigDetail',
  764. meta: {
  765. title: '配置详情',
  766. activeMenu: '/registration/contentConfig'
  767. }
  768. }]
  769. },
  770. // 兑换配置
  771. {
  772. path: '/registration',
  773. component: Layout,
  774. hidden: true,
  775. permissions: ['registration:exchangeConfig:list'],
  776. children: [{
  777. path: 'exchangeConfig/detail',
  778. component: () => import('@/views/registration/exchange/detail'),
  779. name: 'exchangeConfigDetail',
  780. meta: {
  781. title: '配置详情',
  782. activeMenu: '/registration/exchangeConfig'
  783. }
  784. }]
  785. },
  786. // App升级
  787. {
  788. path: '/push',
  789. component: Layout,
  790. hidden: true,
  791. permissions: ['push:update:list'],
  792. children: [{
  793. path: 'update/detail',
  794. component: () => import('@/views/push/update/detail'),
  795. name: 'updateDetail',
  796. meta: {
  797. title: '升级详情',
  798. activeMenu: '/push/update'
  799. }
  800. }]
  801. },
  802. // 推送弹窗
  803. {
  804. path: '/push',
  805. component: Layout,
  806. hidden: true,
  807. permissions: ['push:dialog:list'],
  808. children: [{
  809. path: 'pushDialog/detail',
  810. component: () => import('@/views/push/dialog/detail'),
  811. name: 'dialogDetail',
  812. meta: {
  813. title: '弹窗详情',
  814. activeMenu: '/push/pushDialog'
  815. }
  816. }]
  817. }
  818. ]
  819. export default new Router({
  820. mode: 'history', // 去掉url中的#
  821. scrollBehavior: () => ({
  822. y: 0
  823. }),
  824. routes: constantRoutes
  825. })