src/common/utils/request.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/common/utils/request.ts
@@ -16,11 +16,12 @@ (config) => { // 若是有做鉴权token , 就给头部带上token const token = getToken() if (token) { config.headers.Authorization = 'Bearer ' + token } else { if (token == null || token == '' || token == 'undefined') { router.push('/login') return config // window.location = `//${window.location.hostname}:9080`+'/login' } else if (token) { config.headers.Authorization = 'Bearer ' + token } return config