index.js 21 KB

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