index.js 20 KB

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