Showing
1 changed file
with
5 additions
and
7 deletions
| ... | @@ -6,13 +6,11 @@ import _ from 'lodash' | ... | @@ -6,13 +6,11 @@ import _ from 'lodash' |
| 6 | axios.interceptors.request.use( | 6 | axios.interceptors.request.use( |
| 7 | config => { | 7 | config => { |
| 8 | // 发送请求前 | 8 | // 发送请求前 |
| 9 | - if (config.method === 'get') { | 9 | + // 绑定默认请求头 |
| 10 | - // 绑定默认请求头 | 10 | + config.params = _.merge(config.params, { |
| 11 | - config.params = _.merge(config.params, { | 11 | + f: 'voice', |
| 12 | - f: 'voice', | 12 | + client_id: '313939', |
| 13 | - client_id: '313939', | 13 | + }) |
| 14 | - }) | ||
| 15 | - } | ||
| 16 | return config; | 14 | return config; |
| 17 | }, | 15 | }, |
| 18 | error => { | 16 | error => { | ... | ... |
-
Please register or login to post a comment