fix installation for beta5

This commit is contained in:
xiaomlove
2021-04-30 15:10:31 +08:00
parent 654419deec
commit 3737d684ee
14 changed files with 71 additions and 65 deletions

View File

@@ -8,13 +8,14 @@ axios.defaults.withCredentials = true
axios.defaults.headers['X-Requested-With'] = 'XMLHttpRequest'
axios.defaults.headers['Content-Type'] = 'application/json'
axios.defaults.headers['Accept'] = 'application/json'
axios.defaults.headers['Authorization'] = 'Bearer ' + localGet('token')
// axios.defaults.headers['Authorization'] = 'Bearer ' + localGet('token')
// axios.interceptors.request.use(config => {
// // console.log('before request', config)
// config.headers['Authorization'] = 'Bearer ' + localGet('token')
// return config
// })
axios.interceptors.request.use(config => {
config.headers['Authorization'] = 'Bearer ' + localGet('token')
return config
}, error => {
return Promise.reject(error)
})
axios.interceptors.response.use(res => {
console.log(res)