index.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793
  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: sub-menu only appear when route children.length >= 1
  8. * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
  9. *
  10. * hidden: true if set true, item will not show in the sidebar(default is false)
  11. * alwaysShow: true if set true, will always show the root menu
  12. * if not set alwaysShow, when item has more than one children route,
  13. * it will becomes nested mode, otherwise not show the root menu
  14. * redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
  15. * name:'router-name' the name is used by <keep-alive> (must set!!!)
  16. * meta : {
  17. roles: ['admin','editor'] control the page roles (you can set multiple roles)
  18. title: 'title' the name show in sidebar and breadcrumb (recommend set)
  19. icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
  20. breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
  21. activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
  22. }
  23. */
  24. /**
  25. * constantRoutes
  26. * a base page that does not have permission requirements
  27. * all roles can be accessed
  28. */
  29. // export const constantRoutes = [{
  30. // path: '/login',
  31. // component: () => import('@/views/login/index'),
  32. // hidden: true
  33. // },
  34. // {
  35. // path: '/404',
  36. // component: () => import('@/views/404'),
  37. // hidden: true
  38. // },
  39. // // 商家管理
  40. // {
  41. // path: '/',
  42. // component: Layout,
  43. // redirect: '/businessList',
  44. // meta: {
  45. // title: '商家管理',
  46. // icon: 'el-icon-s-help'
  47. // },
  48. // children: [{
  49. // path: 'businessList',
  50. // name: 'businessList',
  51. // component: () => import('@/views/business/businessList/index'),
  52. // meta: {
  53. // title: '商家列表',
  54. // icon: 'table'
  55. // }
  56. // },
  57. // {
  58. // path: 'settlement',
  59. // name: 'settlement',
  60. // component: () => import('@/views/business/settlement/index'),
  61. // meta: {
  62. // title: '入驻申请',
  63. // icon: 'tree'
  64. // }
  65. // },
  66. // {
  67. // hidden: true,
  68. // path: 'addSettlement',
  69. // name: 'addSettlement',
  70. // component: () => import('@/views/business/settlement/addSettlement'),
  71. // meta: {
  72. // title: '入驻申请详情',
  73. // icon: 'tree'
  74. // }
  75. // }
  76. // ]
  77. // },
  78. // // 平台装修
  79. // {
  80. // path: '/renovation',
  81. // component: Layout,
  82. // name: 'renovation',
  83. // meta: {
  84. // title: '平台装修',
  85. // icon: 'el-icon-s-help'
  86. // },
  87. // children: [{
  88. // path: 'wechatApp',
  89. // name: 'wechatApp',
  90. // component: () => import('@/views/renovation/wechatApp/index'),
  91. // meta: {
  92. // title: '小程序',
  93. // icon: 'table'
  94. // }
  95. // },
  96. // {
  97. // path: 'custom',
  98. // name: 'custom',
  99. // component: () => import('@/views/renovation/custom/index'),
  100. // meta: {
  101. // title: '自定义页面',
  102. // icon: 'tree'
  103. // }
  104. // },
  105. // {
  106. // path: 'commdityClass',
  107. // name: 'commdityClass',
  108. // component: () => import('@/views/renovation/commdityClass/index'),
  109. // meta: {
  110. // title: '商品类别',
  111. // icon: 'tree'
  112. // }
  113. // },
  114. // {
  115. // path: 'commoditySystem',
  116. // name: 'commoditySystem',
  117. // component: () => import('@/views/renovation/commoditySystem/index'),
  118. // meta: {
  119. // title: '商品管理',
  120. // icon: 'tree'
  121. // }
  122. // },
  123. // {
  124. // hidden: true, // (默认 false)
  125. // path: 'addCommodity',
  126. // name: 'addCommodity',
  127. // component: () => import('@/views/renovation/commoditySystem/addCommodity'),
  128. // meta: {
  129. // title: '查看详情',
  130. // icon: 'table'
  131. // }
  132. // }
  133. // ]
  134. // },
  135. // // 平台活动
  136. // {
  137. // path: '/active',
  138. // component: Layout,
  139. // redirect: '/active/seckilllist',
  140. // meta: {
  141. // title: '平台活动',
  142. // icon: 'el-icon-s-help'
  143. // },
  144. // children: [
  145. // // {
  146. // // path: '/active/index',
  147. // // name: 'active',
  148. // // component: () => import('@/views/active/index'),
  149. // // meta: {
  150. // // title: '平台活动',
  151. // // icon: 'dashboard'
  152. // // }
  153. // // },
  154. // // {
  155. // // hidden: true,
  156. // // path: '/active/add',
  157. // // name: 'addActive',
  158. // // component: () => import('@/views/active/addActive'),
  159. // // meta: {
  160. // // title: '新增活动',
  161. // // icon: 'dashboard'
  162. // // }
  163. // // },
  164. // // {
  165. // // hidden: true,
  166. // // path: '/active/activeDetails',
  167. // // name: 'activeDetails',
  168. // // component: () => import('@/views/active/activeDetails'),
  169. // // meta: {
  170. // // title: '活动详情',
  171. // // icon: 'dashboard'
  172. // // }
  173. // // },
  174. // {
  175. // path: '/active/couponlist',
  176. // name: 'couponlist',
  177. // component: () => import('@/views/active/coupon/index.vue'),
  178. // meta: {
  179. // title: '优惠券活动',
  180. // icon: 'dashboard'
  181. // }
  182. // },
  183. // {
  184. // hidden: true,
  185. // path: '/active/couponlist/add',
  186. // name: 'couponlistAdd',
  187. // component: () => import('@/views/active/coupon/couponAdd.vue'),
  188. // meta: {
  189. // title: '新增优惠券活动',
  190. // icon: 'dashboard'
  191. // }
  192. // },
  193. // {
  194. // hidden: true,
  195. // path: '/active/couponlist/couponDetail',
  196. // name: 'couponDetail',
  197. // component: () => import('@/views/active/coupon/couponDetail.vue'),
  198. // meta: {
  199. // title: '优惠券活动详情',
  200. // icon: 'dashboard'
  201. // }
  202. // },
  203. // {
  204. // path: '/active/seckilllist',
  205. // name: 'seckilllist',
  206. // component: () => import('@/views/active/seckill/index.vue'),
  207. // meta: {
  208. // title: '秒杀活动',
  209. // icon: 'dashboard'
  210. // }
  211. // },
  212. // {
  213. // hidden: true,
  214. // path: '/active/seckilllist/add',
  215. // name: 'seckilllistAdd',
  216. // component: () => import('@/views/active/seckill/seckillAdd.vue'),
  217. // meta: {
  218. // title: '新增秒杀活动',
  219. // icon: 'dashboard'
  220. // }
  221. // },
  222. // {
  223. // hidden: true,
  224. // path: '/active/seckilllist/seckillDetail',
  225. // name: 'seckillDetail',
  226. // component: () => import('@/views/active/seckill/seckillDetail.vue'),
  227. // meta: {
  228. // title: '秒杀活动详情',
  229. // icon: 'dashboard'
  230. // }
  231. // },
  232. // {
  233. // path: '/active/discountlist',
  234. // name: 'discountlist',
  235. // component: () => import('@/views/active/discount/index.vue'),
  236. // meta: {
  237. // title: '限时折扣',
  238. // icon: 'dashboard'
  239. // }
  240. // },
  241. // {
  242. // hidden: true,
  243. // path: '/active/discount/add',
  244. // name: 'discountAdd',
  245. // component: () => import('@/views/active/discount/discountAdd.vue'),
  246. // meta: {
  247. // title: '新增折扣活动',
  248. // icon: 'dashboard'
  249. // }
  250. // },
  251. // {
  252. // hidden: true,
  253. // path: '/active/discount/discountDetail',
  254. // name: 'discountDetail',
  255. // component: () => import('@/views/active/discount/discountDetail.vue'),
  256. // meta: {
  257. // title: '折扣活动详情',
  258. // icon: 'dashboard'
  259. // }
  260. // },
  261. // {
  262. // path: '/active/politelist',
  263. // name: 'politelist',
  264. // component: () => import('@/views/active/polite/index.vue'),
  265. // meta: {
  266. // title: '支付有礼',
  267. // icon: 'dashboard'
  268. // }
  269. // },
  270. // {
  271. // hidden: true,
  272. // path: '/active/politelist/add',
  273. // name: 'politelistAdd',
  274. // component: () => import('@/views/active/polite/politeAdd.vue'),
  275. // meta: {
  276. // title: '新增支付有礼活动',
  277. // icon: 'dashboard'
  278. // }
  279. // },
  280. // {
  281. // hidden: true,
  282. // path: '/active/politelist/politeDetail',
  283. // name: 'politeDetail',
  284. // component: () => import('@/views/active/polite/politeDetail.vue'),
  285. // meta: {
  286. // title: '支付有礼活动详情',
  287. // icon: 'dashboard'
  288. // }
  289. // }
  290. // ]
  291. // },
  292. // // Redis延时任务
  293. // {
  294. // path: '/pay',
  295. // component: Layout,
  296. // children: [{
  297. // path: '/',
  298. // name: 'pay',
  299. // component: () => import('@/views/pay/index'),
  300. // meta: {
  301. // title: 'Redis延时任务',
  302. // icon: 'dashboard'
  303. // }
  304. // }]
  305. // },
  306. // // 财务
  307. // {
  308. // path: '/finance',
  309. // component: Layout,
  310. // meta: {
  311. // title: '财务',
  312. // icon: 'dashboard'
  313. // },
  314. // children: [{
  315. // path: 'withdrawal',
  316. // name: 'withdrawal',
  317. // component: () => import('@/views/finance/withdrawal/index'),
  318. // meta: {
  319. // title: '提现申请',
  320. // icon: 'dashboard'
  321. // }
  322. // },
  323. // {
  324. // path: 'overview',
  325. // name: 'overview',
  326. // component: () => import('@/views/finance/overview/index'),
  327. // meta: {
  328. // title: '财务概况',
  329. // icon: 'dashboard'
  330. // }
  331. // },
  332. // {
  333. // path: 'bond',
  334. // name: 'bond',
  335. // component: () => import('@/views/finance/bond/index'),
  336. // meta: {
  337. // title: '财务概况',
  338. // icon: 'dashboard'
  339. // }
  340. // },
  341. // {
  342. // path: 'application',
  343. // name: 'application',
  344. // component: () => import('@/views/finance/application/index'),
  345. // meta: {
  346. // title: '用户提现申请',
  347. // icon: 'dashboard'
  348. // }
  349. // }
  350. // ]
  351. // },
  352. // // {
  353. // // path: '/after',
  354. // // component: Layout,
  355. // // children: [{
  356. // // path: 'after',
  357. // // name: 'after',
  358. // // component: () => import('@/views/after/index'),
  359. // // meta: {
  360. // // title: '售后处理',
  361. // // icon: 'dashboard'
  362. // // }
  363. // // },
  364. // // {
  365. // // path: 'afterDetails',
  366. // // name: 'afterDetails',
  367. // // component: () => import('@/views/after/details'),
  368. // // meta: {
  369. // // title: '售后详情',
  370. // // icon: 'dashboard'
  371. // // }
  372. // // }
  373. // // ]
  374. // // },
  375. // // 订单
  376. // {
  377. // path: '/order',
  378. // component: Layout,
  379. // redirect: '/order',
  380. // name: 'order',
  381. // meta: {
  382. // title: '订单',
  383. // icon: 'el-icon-s-help'
  384. // },
  385. // children: [{
  386. // path: 'pending',
  387. // name: 'pending',
  388. // component: () => import('@/views/order/pending/index'),
  389. // meta: {
  390. // title: '待处理订单',
  391. // icon: 'table'
  392. // }
  393. // },
  394. // {
  395. // path: 'after',
  396. // name: 'after',
  397. // component: () => import('@/views/order/after/index'),
  398. // meta: {
  399. // title: '售后处理',
  400. // icon: 'dashboard'
  401. // }
  402. // },
  403. // {
  404. // path: 'afterDetails',
  405. // name: 'afterDetails',
  406. // component: () => import('@/views/order/after/details'),
  407. // meta: {
  408. // title: '售后详情',
  409. // icon: 'dashboard'
  410. // }
  411. // }
  412. // ]
  413. // },
  414. // // {
  415. // // path: '/system',
  416. // // component: Layout,
  417. // // children: [{
  418. // // hidden: true, // (默认 false)
  419. // // path: '/system/editShopSys',
  420. // // component: () => import('@/views/system/shopSys/edit'), // Parent router-view
  421. // // name: 'editShopSys',
  422. // // meta: {
  423. // // title: '编辑店铺信息'
  424. // // },
  425. // // },
  426. // // {
  427. // // path: '/system/shopSys',
  428. // // component: () => import('@/views/system/shopSys/index'), // Parent router-view
  429. // // name: 'dict',
  430. // // meta: {
  431. // // title: '店铺设置',
  432. // // icon: 'dashboard'
  433. // // },
  434. // // },
  435. // // ]
  436. // // },
  437. // // 评论
  438. // {
  439. // path: '/comment',
  440. // component: Layout,
  441. // redirect: '/comment/commentSys',
  442. // name: 'comment',
  443. // meta: {
  444. // title: '评论',
  445. // icon: 'el-icon-s-help'
  446. // },
  447. // children: [{
  448. // path: 'commentSys',
  449. // name: 'commentSys',
  450. // component: () => import('@/views/comment/commentSys/index'),
  451. // meta: {
  452. // title: '评论管理',
  453. // icon: 'tree'
  454. // }
  455. // },
  456. // {
  457. // path: 'sensitive',
  458. // name: 'sensitive',
  459. // component: () => import('@/views/comment/sensitive/index'),
  460. // meta: {
  461. // title: '敏感词管理',
  462. // icon: 'table'
  463. // }
  464. // },
  465. // {
  466. // path: 'keyWord',
  467. // name: 'keyWord',
  468. // component: () => import('@/views/comment/keyword/index'),
  469. // meta: {
  470. // title: '关键词管理',
  471. // icon: 'tree'
  472. // }
  473. // }
  474. // ]
  475. // },
  476. // // 客户管理
  477. // {
  478. // path: '/customer',
  479. // component: Layout,
  480. // redirect: '/customer/customerMage',
  481. // name: 'customer',
  482. // meta: {
  483. // title: '客户管理',
  484. // icon: 'el-icon-s-help'
  485. // },
  486. // children: [{
  487. // path: 'customerMage',
  488. // name: 'customerMage',
  489. // component: () => import('@/views/customer/customerMage/index'),
  490. // meta: {
  491. // title: '客户管理',
  492. // icon: 'table'
  493. // }
  494. // },
  495. // {
  496. // hidden: true,
  497. // path: 'customerDetails',
  498. // name: 'customerDetails',
  499. // component: () => import('@/views/customer/customerMage/customerDetails'),
  500. // meta: {
  501. // title: '客户详情',
  502. // icon: 'table'
  503. // }
  504. // },
  505. // {
  506. // path: 'tips',
  507. // name: 'tips',
  508. // component: () => import('@/views/customer/tips/index'),
  509. // meta: {
  510. // title: '标签管理',
  511. // icon: 'tree'
  512. // }
  513. // },
  514. // {
  515. // hidden: true,
  516. // path: 'addTips',
  517. // name: 'addTips',
  518. // component: () => import('@/views/customer/tips/addTips'),
  519. // meta: {
  520. // title: '创建标签',
  521. // icon: 'tree'
  522. // }
  523. // }
  524. // ]
  525. // },
  526. // // 系统管理
  527. // {
  528. // path: '/setup',
  529. // component: Layout,
  530. // redirect: '/setup/user',
  531. // name: 'setup',
  532. // meta: {
  533. // title: '系统管理',
  534. // icon: 'el-icon-s-help'
  535. // },
  536. // children: [{
  537. // path: 'user',
  538. // name: 'user',
  539. // component: () => import('@/views/setup/user/index'),
  540. // meta: {
  541. // title: '用户管理',
  542. // icon: 'table'
  543. // }
  544. // },
  545. // {
  546. // path: 'role',
  547. // name: 'role',
  548. // component: () => import('@/views/setup/role/index'),
  549. // meta: {
  550. // title: '角色管理',
  551. // icon: 'tree'
  552. // }
  553. // },
  554. // {
  555. // path: 'tabs',
  556. // name: 'tabs',
  557. // component: () => import('@/views/setup/tabs/index'),
  558. // meta: {
  559. // title: '菜单管理',
  560. // icon: 'tree'
  561. // }
  562. // },
  563. // {
  564. // path: 'businessMenus',
  565. // name: 'businessMenus',
  566. // component: () => import('@/views/setup/businessMenus/index'),
  567. // meta: {
  568. // title: '商家菜单',
  569. // icon: 'tree'
  570. // }
  571. // },
  572. // {
  573. // path: 'dict',
  574. // name: 'dict',
  575. // component: () => import('@/views/setup/dict/index'),
  576. // meta: {
  577. // title: '字典管理',
  578. // icon: 'tree'
  579. // }
  580. // }
  581. // ]
  582. // },
  583. // // 消息中心
  584. // {
  585. // path: '/notice',
  586. // component: Layout,
  587. // redirect: '/notice/history',
  588. // name: 'notice',
  589. // meta: {
  590. // title: '消息中心',
  591. // icon: 'el-icon-chat-square'
  592. // },
  593. // children: [{
  594. // path: 'history',
  595. // name: 'history',
  596. // component: () => import('@/views/notice/history'),
  597. // meta: {
  598. // title: '历史消息',
  599. // icon: 'el-icon-chat-dot-square'
  600. // }
  601. // },
  602. // {
  603. // path: 'push',
  604. // name: 'push',
  605. // component: () => import('@/views/notice/push'),
  606. // meta: {
  607. // title: '消息推送',
  608. // icon: 'el-icon-chat-line-square'
  609. // }
  610. // }
  611. // ]
  612. // },
  613. // // 会员中心
  614. // {
  615. // path: '/member',
  616. // component: Layout,
  617. // redirect: '/member/memberList',
  618. // name: 'member',
  619. // meta: {
  620. // title: '会员管理',
  621. // icon: 'el-icon-s-help'
  622. // },
  623. // children: [{
  624. // path: 'memberList',
  625. // name: 'memberList',
  626. // component: () => import('@/views/member/memberList/index'),
  627. // meta: {
  628. // title: '会员管理',
  629. // icon: 'table'
  630. // }
  631. // },
  632. // {
  633. // path: 'equity',
  634. // name: 'equity',
  635. // component: () => import('@/views/member/equity/index'),
  636. // meta: {
  637. // title: '会员权益',
  638. // icon: 'table'
  639. // }
  640. // },
  641. // {
  642. // hidden: true,
  643. // path: 'customerDetails',
  644. // name: 'customerDetails',
  645. // component: () => import('@/views/member/customerMage/customerDetails'),
  646. // meta: {
  647. // title: '会员详情',
  648. // icon: 'table'
  649. // }
  650. // },
  651. // {
  652. // path: 'tips',
  653. // name: 'tips',
  654. // component: () => import('@/views/member/tips/index'),
  655. // meta: {
  656. // title: '标签管理',
  657. // icon: 'tree'
  658. // }
  659. // },
  660. // {
  661. // path: 'levelList',
  662. // name: 'levelList',
  663. // component: () => import('@/views/member/levelList/index'),
  664. // meta: {
  665. // title: '会员等级',
  666. // icon: 'tree'
  667. // }
  668. // },
  669. // {
  670. // hidden: true,
  671. // path: 'addTips',
  672. // name: 'addTips',
  673. // component: () => import('@/views/member/tips/addTips'),
  674. // meta: {
  675. // title: '创建标签',
  676. // icon: 'tree'
  677. // }
  678. // }
  679. // ]
  680. // },
  681. // // 直播管理
  682. // {
  683. // path: '/liveMenu',
  684. // component: Layout,
  685. // redirect: '/member/memberList',
  686. // name: 'liveMenu',
  687. // meta: {
  688. // title: '直播管理',
  689. // icon: 'el-icon-s-help'
  690. // },
  691. // children: [
  692. // {
  693. // path: '/liveMenu/liveRoom',
  694. // name: 'liveRoom',
  695. // component: () => import('@/views/liveMenu/liveRoom/index.vue'),
  696. // meta: {
  697. // title: '直播间管理',
  698. // icon: 'table'
  699. // }
  700. // },
  701. // {
  702. // path: '/liveMenu/liveProduct',
  703. // name: 'liveProduct',
  704. // component: () => import('@/views/liveMenu/liveProduct/index.vue'),
  705. // meta: {
  706. // title: '直播商品管理',
  707. // icon: 'tree'
  708. // }
  709. // }
  710. // ]
  711. // }
  712. // // 404 page must be placed at the end !!!
  713. // // {
  714. // // path: '*',
  715. // // redirect: '/404',
  716. // // hidden: true
  717. // // }
  718. // ]
  719. export const mainRoutes = [
  720. {
  721. path: '/login',
  722. component: () => import('@/views/login/index'),
  723. hidden: true
  724. },
  725. {
  726. path: '/404',
  727. component: () => import('@/views/404'),
  728. hidden: true
  729. },
  730. {
  731. path: '/',
  732. component: Layout,
  733. redirect: '/dashboard',
  734. meta: {
  735. title: '总览',
  736. icon: 'el-icon-monitor'
  737. },
  738. children: [ {
  739. path: 'dashboard',
  740. name: 'dashboard',
  741. component: () => import('@/views/dashboard/index.vue'),
  742. meta: {
  743. title: '总览',
  744. icon: 'el-icon-monitor'
  745. }
  746. } ]
  747. }
  748. // {
  749. // path: '/marketingManagement',
  750. // component: Layout,
  751. // redirect: '/marketingManagement/voucher',
  752. // resourceType: 'catalog',
  753. // alwaysShow: true, // 这个代表为目录
  754. // meta: {
  755. // title: '营销管理',
  756. // icon: 'el-icon-monitor'
  757. // },
  758. // children: [ {
  759. // path: 'voucher',
  760. // name: 'voucher',
  761. // component: () => import('@/views/marketingManagement/voucher/index.vue'),
  762. // meta: {
  763. // title: '代金卷管理',
  764. // icon: 'el-icon-monitor'
  765. // }
  766. // } ]
  767. // }
  768. ]
  769. const createRouter = () => new Router({
  770. // mode: 'history', // require service support
  771. scrollBehavior: () => ({
  772. y: 0
  773. }),
  774. // routes: constantRoutes
  775. routes: mainRoutes
  776. })
  777. const router = createRouter()
  778. // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
  779. export function resetRouter() {
  780. const newRouter = createRouter()
  781. router.matcher = newRouter.matcher // reset router
  782. }
  783. export default router