fuliqi
2024-07-09 fc757b7e8dd314e0ea58de4b3605eb4bf9d68364
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) {