zhangxiaoxu123456
2022-05-10 6e41ce0ab4300758ebd77ea257c3d9532e3df7e0
src/libs/axios.js
@@ -10,7 +10,7 @@
axios.interceptors.request.use(config => {
  let token = store.getters.token
  if(token) {
    config.headers['Authorization'] = token
    config.headers['token'] = token
  }
  return config
},error => {
@@ -18,6 +18,7 @@
})
axios.interceptors.response.use(config => {
  // console.log(config,'config---config')
  const status = Number(config.status)
  const message = config.data.error
  if( status !== 200) {
@@ -26,7 +27,7 @@
  }
  return config
},(error) => {
  console.log(error,'error')
  // console.log(error,'error')
  const { status, data } = error.response
  const { error : message } = data
  if(status === 503) {