WXL
4 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
utils/request.js
@@ -31,8 +31,8 @@
  // 添加白名单配置(不需要校验token的接口)
  whiteList: [
    '/login', // 登录接口
    '/dingtalk/auth/login', // 钉钉授权登录接口
    '/dingtalk/auth/bind' // 钉钉授权登录绑定接口
    // '/dingtalk/auth/login', // 钉钉授权登录接口
    // '/dingtalk/auth/bind' // 钉钉授权登录绑定接口
  ]
}
@@ -95,6 +95,8 @@
  }
  // 如果未登录且不是白名单接口,跳转登录
  console.log(token,'token');
  if (!token) {
    navigateToLogin()
    throw new Error('未登录')