Skip to content

Commit

Permalink
refactor(utils): modify axios interceptors config
Browse files Browse the repository at this point in the history
  • Loading branch information
baboon-king committed Apr 23, 2021
1 parent 321503b commit 9161473
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ const axios = Axios.create({

// 前置拦截器(发起请求之前的拦截)
axios.interceptors.request.use(
(response) => {
(config) => {
/**
* 根据你的项目实际情况来对 config 做处理
* 这里对 config 不做任何处理,直接返回
*/
return response
return config
},
(error) => {
return Promise.reject(error)
Expand Down

0 comments on commit 9161473

Please sign in to comment.