text: import Vue from 'vue'
  import VueRouter from 'vue-router'
  Vue.use(VueRouter)
  import routes from './routes'
  
  
  const originalPush = VueRouter.prototype.push
  import {
      getItem
  } from '@/utils/shorage'
  VueRouter.prototype.push = function push(location) {
      return originalPush.call(this, location).catch(err => err)
  }
  
  let router = new VueRouter({
      mode: 'hash',
      routes
  })
  router.beforeEach((to, from, next) => {
      let user = getItem('user')
      if (to.path == "/top/result" || to.path == "/top/Standing"||to.path == "/top/look_ticket") {
          if (user != null || user != undefined) {
              next()
          } else {
              next({
                  path: "/Login"
              })
          }
      } else {
          next()
      }
  })
  
  export default router;