hookehuyr

✨ feat(axios): 加入请求默认头

...@@ -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 => {
......