index.js 409 B

1234567891011121314151617181920
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import home from './map/home'
  4. import login from "./map/login";
  5. Vue.use(Router)
  6. const originalPush = Router.prototype.push
  7. Router.prototype.push = function push(location) {
  8. return originalPush.call(this, location).catch(err => err)
  9. }
  10. export default new Router({
  11. mode: 'hash',
  12. base: process.env.BASE_URL,
  13. routes: [
  14. home,
  15. ...login
  16. ]
  17. })