router.beforeEach((to, from, next) => {


  if(to.path!='/login' && localStorage.token==undefined){

      next('/login')

      return

  }

  next()

})