index.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. import Vue from 'vue'
  2. import VueRouter from 'vue-router'
  3. import Layout from '@/views/Layout.vue'
  4. import axios from 'axios'
  5. import { getEffectivePermissions, hasPermission } from '@/utils/permissions'
  6. Vue.use(VueRouter)
  7. const routes = [
  8. {
  9. path: '/login',
  10. name: 'Login',
  11. component: () => import('@/views/Login.vue')
  12. },
  13. {
  14. path: '/403',
  15. name: 'Forbidden',
  16. component: { template: '<div style="text-align:center;padding:100px"><h1>403</h1><p>权限不足</p><router-link to="/">返回首页</router-link></div>' },
  17. meta: { title: '权限不足' }
  18. },
  19. {
  20. path: '/',
  21. component: Layout,
  22. redirect: '/dashboard',
  23. children: [
  24. {
  25. path: 'dashboard',
  26. name: 'Dashboard',
  27. component: () => import('@/views/Dashboard.vue'),
  28. meta: { title: '首页', perm: 'dashboard' }
  29. },
  30. {
  31. path: 'admin/dashboard',
  32. name: 'AdminDashboard',
  33. component: () => import('@/views/admin/Dashboard'),
  34. meta: { title: '数据大屏', roles: ['admin'] }
  35. },
  36. // 家庭管理
  37. {
  38. path: 'families',
  39. name: 'Families',
  40. component: () => import('@/views/Families.vue'),
  41. meta: { title: '家庭列表', perm: 'family:list' }
  42. },
  43. {
  44. path: 'children',
  45. name: 'Children',
  46. component: () => import('@/views/Children.vue'),
  47. meta: { title: '孩子管理', perm: 'family:children' }
  48. },
  49. {
  50. path: 'points',
  51. name: 'Points',
  52. component: () => import('@/views/Points.vue'),
  53. meta: { title: '积分管理', perm: 'family:points' }
  54. },
  55. {
  56. path: 'points-log',
  57. name: 'PointsLog',
  58. component: () => import('@/views/admin/PointsLog.vue'),
  59. meta: { title: '积分记录', perm: 'family:points' }
  60. },
  61. {
  62. path: 'membership-center',
  63. name: 'MembershipCenter',
  64. component: () => import('@/views/admin/MembershipCenter.vue'),
  65. meta: { title: '会员中心', perm: 'system:config' }
  66. },
  67. // 任务管理
  68. {
  69. path: 'tasks',
  70. name: 'Tasks',
  71. component: () => import('@/views/Tasks.vue'),
  72. meta: { title: '任务列表', perm: 'task:list' }
  73. },
  74. {
  75. path: 'task-templates',
  76. name: 'TaskTemplates',
  77. component: () => import('@/views/TaskTemplates.vue'),
  78. meta: { title: '任务模板', perm: 'task:templates' }
  79. },
  80. {
  81. path: 'growth-task',
  82. name: 'GrowthTaskManagement',
  83. component: () => import('@/views/admin/GrowthTaskManagement'),
  84. meta: { title: '成长任务管理', perm: 'task:list' }
  85. },
  86. // 奖励管理
  87. {
  88. path: 'rewards',
  89. name: 'Rewards',
  90. component: () => import('@/views/Rewards.vue'),
  91. meta: { title: '奖励列表', perm: 'family:rewards' }
  92. },
  93. {
  94. path: 'wishes',
  95. name: 'Wishes',
  96. component: () => import('@/views/Wishes.vue'),
  97. meta: { title: '心愿管理', perm: 'family:wishes' }
  98. },
  99. // 成长规划师管理
  100. {
  101. path: 'guide-packages',
  102. name: 'GuidePackages',
  103. component: () => import('@/views/GuidePackages.vue'),
  104. meta: { title: '成长规划师套餐', requiresTeacher: true, perm: 'biz:packages' }
  105. },
  106. {
  107. path: 'guide-family-task',
  108. name: 'GuideFamilyTask',
  109. component: () => import('@/views/GuideFamilyTask.vue'),
  110. meta: { title: '家庭任务管理', requiresTeacher: true, perm: 'service:families' }
  111. },
  112. {
  113. path: 'teacher-consult',
  114. name: 'TeacherConsult',
  115. component: () => import('@/views/TeacherConsult.vue'),
  116. meta: { title: '家长咨询', requiresTeacher: true, perm: 'assessment:consult' }
  117. },
  118. {
  119. path: 'teacher-families',
  120. name: 'TeacherFamilies',
  121. component: () => import('@/views/teacher/TeacherFamilies.vue'),
  122. meta: { title: '我的家庭', requiresTeacher: true, perm: 'service:families' }
  123. },
  124. {
  125. path: 'teacher-team',
  126. name: 'TeacherTeam',
  127. component: () => import('@/views/teacher/TeacherTeam.vue'),
  128. meta: { title: '我的团队', requiresTeacher: true, perm: 'service:team' }
  129. },
  130. {
  131. path: 'teacher-packages',
  132. name: 'TeacherPackages',
  133. component: () => import('@/views/teacher/TeacherPackages.vue'),
  134. meta: { title: '套餐管理', requiresTeacher: true, perm: 'biz:packages' }
  135. },
  136. {
  137. path: 'teacher-orders',
  138. name: 'TeacherOrders',
  139. component: () => import('@/views/teacher/TeacherOrders.vue'),
  140. meta: { title: '订单与佣金', requiresTeacher: true, perm: 'biz:orders' }
  141. },
  142. // 系统管理
  143. {
  144. path: 'users',
  145. name: 'Users',
  146. component: () => import('@/views/Users.vue'),
  147. meta: { title: '用户管理', perm: 'system:users' }
  148. },
  149. {
  150. path: 'package-audit',
  151. name: 'PackageAudit',
  152. component: () => import('@/views/PackageAudit.vue'),
  153. meta: { title: '套餐审核', perm: 'audit:package' }
  154. },
  155. {
  156. path: 'guide-audit',
  157. name: 'GuideAudit',
  158. component: () => import('@/views/GuideAudit.vue'),
  159. meta: { title: '成长规划师审核', perm: 'audit:guide' }
  160. },
  161. {
  162. path: 'operation-logs',
  163. name: 'OperationLogs',
  164. component: () => import('@/views/OperationLogs.vue'),
  165. meta: { title: '操作日志', perm: 'system:logs' }
  166. },
  167. // 服务管理(管理员)
  168. {
  169. path: 'service-types',
  170. name: 'ServiceTypes',
  171. component: () => import('@/views/admin/ServiceTypes.vue'),
  172. meta: { title: '服务类型管理', perm: 'system:config' }
  173. },
  174. {
  175. path: 'service-contents',
  176. name: 'ServiceContents',
  177. component: () => import('@/views/admin/ServiceContents.vue'),
  178. meta: { title: '服务内容管理', perm: 'system:config' }
  179. },
  180. {
  181. path: 'package-templates',
  182. name: 'PackageTemplates',
  183. component: () => import('@/views/admin/PackageTemplates.vue'),
  184. meta: { title: '套餐模板管理', perm: 'system:config' }
  185. },
  186. {
  187. path: 'teacher-messages',
  188. name: 'TeacherMessages',
  189. component: () => import('@/views/teacher/TeacherMessages.vue'),
  190. meta: { title: '消息中心', requiresTeacher: true, perm: 'messages' }
  191. },
  192. {
  193. path: 'teacher-assessment',
  194. name: 'TeacherAssessment',
  195. component: () => import('@/views/teacher/TeacherAssessment.vue'),
  196. meta: { title: 'DAN测评管理', requiresTeacher: true, perm: 'assessment:dan' }
  197. },
  198. {
  199. path: 'assessment-admin',
  200. name: 'AssessmentAdmin',
  201. component: () => import('@/views/admin/Assessment.vue'),
  202. meta: { title: '测评管理', perm: 'assessment:dan' }
  203. },
  204. {
  205. path: 'vendor-review',
  206. name: 'VendorReview',
  207. component: () => import('@/views/admin/VendorReview.vue'),
  208. meta: { title: '服务商审核', perm: 'audit:vendor' }
  209. },
  210. {
  211. path: 'product-manage',
  212. name: 'ProductManage',
  213. component: () => import('@/views/admin/ProductManage.vue'),
  214. meta: { title: '商品管理', perm: 'commerce:products' }
  215. },
  216. {
  217. path: 'product-edit',
  218. name: 'ProductEdit',
  219. component: () => import('@/views/admin/ProductEdit.vue'),
  220. meta: { title: '商品编辑', perm: 'commerce:products' }
  221. },
  222. {
  223. path: 'category-manage',
  224. name: 'CategoryManage',
  225. component: () => import('@/views/admin/CategoryManage.vue'),
  226. meta: { title: '商品分类', perm: 'commerce:category' }
  227. },
  228. {
  229. path: 'order-manage',
  230. name: 'OrderManage',
  231. component: () => import('@/views/admin/OrderManage.vue'),
  232. meta: { title: '订单管理', perm: 'commerce:orders' }
  233. },
  234. {
  235. path: 'order-detail/:orderNo',
  236. name: 'OrderDetail',
  237. component: () => import('@/views/admin/OrderDetail.vue'),
  238. meta: { title: '订单详情', perm: 'commerce:orders' }
  239. },
  240. {
  241. path: 'sys-config',
  242. name: 'SysConfig',
  243. component: () => import('@/views/admin/SysConfig.vue'),
  244. meta: { title: '系统配置', perm: 'system:config' }
  245. },
  246. {
  247. path: 'energy-sandbox',
  248. name: 'EnergySandbox',
  249. component: () => import('@/views/admin/EnergySandbox.vue'),
  250. meta: { title: '五维能量', perm: 'energy' }
  251. },
  252. {
  253. path: 'energy-rule',
  254. name: 'EnergyRuleManagement',
  255. component: () => import('@/views/admin/EnergyRuleManagement.vue'),
  256. meta: { title: '能量规则管理', perm: 'energy' }
  257. },
  258. // ========== 文章管理 ==========
  259. {
  260. path: 'article-categories',
  261. name: 'ArticleCategory',
  262. component: () => import('@/views/admin/ArticleCategory.vue'),
  263. meta: { title: '文章分类', perm: 'articles:categories' }
  264. },
  265. {
  266. path: 'article-manage',
  267. name: 'ArticleManage',
  268. component: () => import('@/views/admin/ArticleManage.vue'),
  269. meta: { title: '文章管理', perm: 'articles:manage' }
  270. },
  271. {
  272. path: 'article-edit',
  273. name: 'ArticleEdit',
  274. component: () => import('@/views/admin/ArticleEdit.vue'),
  275. meta: { title: '文章编辑', perm: 'articles:manage' }
  276. },
  277. {
  278. path: 'knowledge-tags',
  279. name: 'KnowledgeTag',
  280. component: () => import('@/views/admin/KnowledgeTag.vue'),
  281. meta: { title: '知识标签', perm: 'articles:categories' }
  282. },
  283. // ========== 分佣裂变系统 ==========
  284. {
  285. path: 'product-profit-rate',
  286. name: 'ProductProfitRate',
  287. component: () => import('@/views/admin/ProductProfitRate.vue'),
  288. meta: { title: '产品利润率', perm: 'commerce:profit-rate' }
  289. },
  290. {
  291. path: 'withdraw-audit',
  292. name: 'WithdrawAudit',
  293. component: () => import('@/views/admin/WithdrawAudit.vue'),
  294. meta: { title: '提现审核', perm: 'audit:withdraw' }
  295. },
  296. {
  297. path: 'education-systems',
  298. name: 'EducationSystems',
  299. component: () => import('@/views/admin/EducationSystems.vue'),
  300. meta: { title: '教育体系管理', perm: 'system:education' }
  301. },
  302. {
  303. path: 'supply-system',
  304. name: 'SupplySystemList',
  305. component: () => import('@/views/admin/supply-system/List.vue'),
  306. meta: { title: '供应商体系', perm: 'system:supply' }
  307. },
  308. {
  309. path: 'supply-system/create',
  310. name: 'SupplySystemCreate',
  311. component: () => import('@/views/admin/supply-system/Form.vue'),
  312. meta: { title: '新建体系', perm: 'system:supply' }
  313. },
  314. {
  315. path: 'supply-system/:id',
  316. name: 'SupplySystemDetail',
  317. component: () => import('@/views/admin/supply-system/Detail.vue'),
  318. meta: { title: '体系详情', perm: 'system:supply' },
  319. props: true
  320. },
  321. {
  322. path: 'supply-system/:id/edit',
  323. name: 'SupplySystemEdit',
  324. component: () => import('@/views/admin/supply-system/Form.vue'),
  325. meta: { title: '编辑体系', perm: 'system:supply' },
  326. props: true
  327. },
  328. // ========== 供应商管理 (supplier_admin) ==========
  329. {
  330. path: 'supply-manage',
  331. name: 'SupplyManage',
  332. component: () => import('@/views/admin/supply-manage/List.vue'),
  333. meta: { title: '供应商管理', perm: 'supply:manage' }
  334. },
  335. {
  336. path: 'supply-manage/create',
  337. name: 'SupplyManageCreate',
  338. component: () => import('@/views/admin/supply-manage/Form.vue'),
  339. meta: { title: '新增供应商', perm: 'supply:manage' }
  340. },
  341. {
  342. path: 'supply-manage/:id',
  343. name: 'SupplyManageDetail',
  344. component: () => import('@/views/admin/supply-manage/Detail.vue'),
  345. meta: { title: '供应商详情', perm: 'supply:manage' },
  346. props: true
  347. },
  348. {
  349. path: 'supply-manage/:id/edit',
  350. name: 'SupplyManageEdit',
  351. component: () => import('@/views/admin/supply-manage/Form.vue'),
  352. meta: { title: '编辑供应商', perm: 'supply:manage' },
  353. props: true
  354. },
  355. {
  356. path: 'zodiac-configs',
  357. name: 'ZodiacConfigs',
  358. component: () => import('@/views/admin/ZodiacConfigs.vue'),
  359. meta: { title: '星座配置', perm: 'system:config' }
  360. },
  361. {
  362. path: 'bazi-configs',
  363. name: 'BaziConfigs',
  364. component: () => import('@/views/admin/BaziConfigs.vue'),
  365. meta: { title: '八字配置', perm: 'system:config' }
  366. },
  367. {
  368. path: 'blood-type-configs',
  369. name: 'BloodTypeConfigs',
  370. component: () => import('@/views/admin/BloodTypeConfigs.vue'),
  371. meta: { title: '血型配置', perm: 'system:config' }
  372. },
  373. {
  374. path: 'relationship-types',
  375. name: 'RelationshipTypes',
  376. component: () => import('@/views/admin/RelationshipTypes.vue'),
  377. meta: { title: '关系类型配置', perm: 'system:config' }
  378. },
  379. // ========== 饮食管理 (admin) ==========
  380. {
  381. path: 'foods',
  382. name: 'Foods',
  383. component: () => import('@/views/admin/Foods.vue'),
  384. meta: { title: '食材管理', perm: 'diet:foods' }
  385. },
  386. {
  387. path: 'recipes',
  388. name: 'Recipes',
  389. component: () => import('@/views/admin/Recipes.vue'),
  390. meta: { title: '食谱管理', perm: 'diet:recipes' }
  391. },
  392. {
  393. path: 'seasonal-foods',
  394. name: 'SeasonalFoods',
  395. component: () => import('@/views/admin/SeasonalFoods.vue'),
  396. meta: { title: '应季食材', perm: 'diet:seasonal' }
  397. },
  398. {
  399. path: 'my-families',
  400. name: 'MyFamilies',
  401. component: () => import('@/views/teacher/FamilyList.vue'),
  402. meta: { title: '我的家庭', perm: 'service:family' }
  403. },
  404. {
  405. path: 'growth-records',
  406. name: 'GrowthRecords',
  407. component: () => import('@/views/teacher/GrowthRecords.vue'),
  408. meta: { title: '成长记录', perm: 'growth:records' }
  409. },
  410. {
  411. path: 'growth-plans',
  412. name: 'GrowthPlans',
  413. component: () => import('@/views/teacher/GrowthPlans.vue'),
  414. meta: { title: '成长计划', perm: 'growth:plans' }
  415. },
  416. {
  417. path: 'health-reports',
  418. name: 'HealthReports',
  419. component: () => import('@/views/nutritionist/HealthReports.vue'),
  420. meta: { title: '健康报告', perm: 'health:reports' }
  421. },
  422. {
  423. path: 'health-indicators',
  424. name: 'HealthIndicators',
  425. component: () => import('@/views/nutritionist/HealthIndicators.vue'),
  426. meta: { title: '健康指标', perm: 'health:indicators' }
  427. },
  428. {
  429. path: 'health-checkins',
  430. name: 'HealthCheckins',
  431. component: () => import('@/views/nutritionist/HealthCheckins.vue'),
  432. meta: { title: '健康打卡', perm: 'health:checkins' }
  433. },
  434. {
  435. path: 'emotion-alert',
  436. name: 'EmotionAlertManage',
  437. component: () => import('@/views/admin/EmotionAlertManage.vue'),
  438. meta: { title: '情绪告警管理', perm: 'health:checkins' }
  439. },
  440. {
  441. path: 'nutrition-mappings',
  442. name: 'NutritionMappings',
  443. component: () => import('@/views/nutritionist/NutritionMappings.vue'),
  444. meta: { title: '营养素映射管理', perm: 'health:mappings' }
  445. },
  446. {
  447. path: 'activities',
  448. name: 'Activities',
  449. component: () => import('@/views/admin/Activities.vue'),
  450. meta: { title: '活动列表', perm: 'activity:list' }
  451. },
  452. {
  453. path: 'activity-edit',
  454. name: 'ActivityEdit',
  455. component: () => import('@/views/admin/ActivityEdit.vue'),
  456. meta: { title: '活动编辑', perm: 'activity:list' }
  457. },
  458. {
  459. path: 'activity-review',
  460. name: 'ActivityReview',
  461. component: () => import('@/views/admin/ActivityReview.vue'),
  462. meta: { title: '活动审核', perm: 'activity:review' }
  463. },
  464. {
  465. path: 'activity-registration-review',
  466. name: 'ActivityRegistrationReview',
  467. component: () => import('@/views/admin/ActivityRegistrationReview.vue'),
  468. meta: { title: '活动报名审核', perm: 'activity:review' }
  469. },
  470. // ========== 维度配置 + 知识库管理 ==========
  471. {
  472. path: 'coupon',
  473. name: 'CouponManagement',
  474. component: () => import('@/views/admin/CouponManagement'),
  475. meta: { title: '优惠券管理', perm: 'marketing:coupon' }
  476. },
  477. {
  478. path: 'promotion',
  479. name: 'PromotionManagement',
  480. component: () => import('@/views/admin/PromotionManagement'),
  481. meta: { title: '推广管理', perm: 'marketing:promotion' }
  482. },
  483. {
  484. path: 'dimension-config',
  485. name: 'DimensionConfig',
  486. component: () => import('@/views/admin/dimension'),
  487. meta: { title: '维度配置', perm: 'system:config' }
  488. },
  489. {
  490. path: 'knowledge-base',
  491. name: 'KnowledgeBase',
  492. component: () => import('@/views/admin/knowledge'),
  493. meta: { title: '知识库管理', perm: 'system:config' }
  494. },
  495. // ========== 健康维度配置 ==========
  496. {
  497. path: 'health-norm-config',
  498. name: 'HealthNormConfig',
  499. component: () => import('@/views/admin/dimension-config'),
  500. meta: { title: '健康常模配置', perm: 'system:config' }
  501. },
  502. {
  503. path: 'health-data-source',
  504. name: 'HealthDataSource',
  505. component: () => import('@/views/admin/data-source-config'),
  506. meta: { title: '健康数据源配置', perm: 'system:config' }
  507. },
  508. {
  509. path: 'health-energy-config',
  510. name: 'HealthEnergyConfig',
  511. component: () => import('@/views/admin/HealthEnergyConfig'),
  512. meta: { title: '七维能量配置', perm: 'system:config' }
  513. },
  514. {
  515. path: 'indicators',
  516. name: 'IndicatorManage',
  517. component: () => import('@/views/admin/indicators'),
  518. meta: { title: '指标管理', perm: 'system:config' }
  519. },
  520. // ========== 虚拟服务商团队管理 ==========
  521. {
  522. path: 'virtual-teams',
  523. name: 'VirtualTeamList',
  524. component: () => import('@/views/admin/VirtualTeamList'),
  525. meta: { title: '虚拟团队管理', perm: 'system:config' }
  526. },
  527. {
  528. path: 'virtual-team-detail/:systemId',
  529. name: 'VirtualTeamDetail',
  530. component: () => import('@/views/admin/VirtualTeamDetail'),
  531. meta: { title: '团队成员管理', perm: 'system:config' },
  532. props: true
  533. }
  534. ]
  535. }
  536. ]
  537. const router = new VueRouter({
  538. mode: 'history',
  539. base: process.env.BASE_URL,
  540. routes
  541. })
  542. // Token 验证缓存:避免 redirect 链中重复调用 /api/admin-auth/info
  543. let tokenValidationCache = { token: '', timestamp: 0 }
  544. const TOKEN_CACHE_TTL = 30000 // 30秒内不重复验证
  545. async function validateToken(token) {
  546. try {
  547. const baseURL = process.env.VUE_APP_BASE_API || ''
  548. const res = await axios.post(`${baseURL}/api/admin-auth/info`, {}, {
  549. headers: { Authorization: `Bearer ${token}` },
  550. validateStatus: () => true
  551. })
  552. return res.status === 200 && res.data?.code === 200
  553. } catch (e) {
  554. return false
  555. }
  556. }
  557. router.beforeEach(async (to, from, next) => {
  558. const token = localStorage.getItem('token')
  559. const role = localStorage.getItem('role')
  560. // 1. 登录页允许访问
  561. if (to.path === '/login') {
  562. // 如果已有token和role,直接跳转到对应首页
  563. if (token && role === 'teacher') {
  564. return next('/dashboard')
  565. }
  566. return next()
  567. }
  568. // 2. 无Token强制跳转
  569. if (!token) {
  570. return next('/login')
  571. }
  572. // 3. Token有效性验证 (使用缓存避免 redirect 链重复调用)
  573. const now = Date.now()
  574. let isValid = false
  575. if (tokenValidationCache.token === token && (now - tokenValidationCache.timestamp) < TOKEN_CACHE_TTL) {
  576. isValid = true
  577. } else {
  578. isValid = await validateToken(token)
  579. if (isValid) {
  580. tokenValidationCache = { token, timestamp: now }
  581. }
  582. }
  583. if (!isValid) {
  584. tokenValidationCache = { token: '', timestamp: 0 }
  585. localStorage.clear()
  586. return next('/login')
  587. }
  588. // 4. 权限检查:如果路由有 perm 要求,检查用户权限
  589. const requiredPerm = to.meta && to.meta.perm
  590. if (requiredPerm) {
  591. const rolesStr = localStorage.getItem('roles')
  592. const roles = rolesStr ? JSON.parse(rolesStr) : [localStorage.getItem('role')]
  593. const perms = getEffectivePermissions(roles)
  594. if (!hasPermission(perms, requiredPerm)) {
  595. console.warn('Access denied: insufficient permissions for', to.name)
  596. return next({ path: '/', query: { accessDenied: 'no-permission' }, replace: true })
  597. }
  598. }
  599. return next()
  600. })
  601. // Suppress navigation guard redirect errors (teacher/admin route cross-access)
  602. const originalPush = VueRouter.prototype.push
  603. VueRouter.prototype.push = function push(location) {
  604. return originalPush.call(this, location).catch(err => err)
  605. }
  606. export default router