index.js 20 KB

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