src/permission.js
@@ -16,6 +16,12 @@
    to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
    /* has token*/
    if (to.path === '/login') {
      // 新增判断——当前位置未登录页面时:如果firstLogin值为0
      if(localStorage.getItem("firstLogin") == 0) {
        // 去掉token
        setToken("")
      }
      // 不为true时不变
      next({ path: '/' })
      NProgress.done()
    } else if (whiteList.indexOf(to.path) !== -1) {