index.js 716 B

1234567891011121314151617181920212223
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import { constantRouterMap } from '@/config/router.config'
  4. //update-begin-author:taoyan date:20191011 for:TASK #3214 【优化】访问online功能测试 浏览器控制台抛出异常
  5. try {
  6. const originalPush = Router.prototype.push
  7. Router.prototype.push = function push(location) {
  8. return originalPush.call(this, location).catch(err => err)
  9. }
  10. } catch (e) {
  11. }
  12. //update-end-author:taoyan date:20191011 for:TASK #3214 【优化】访问online功能测试 浏览器控制台抛出异常
  13. Vue.use(Router)
  14. export default new Router({
  15. // mode: 'history',
  16. base: process.env.BASE_URL,
  17. scrollBehavior: () => ({ y: 0 }),
  18. routes: constantRouterMap
  19. })