hookehuyr

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

......@@ -6,13 +6,11 @@ import _ from 'lodash'
axios.interceptors.request.use(
config => {
// 发送请求前
if (config.method === 'get') {
// 绑定默认请求头
config.params = _.merge(config.params, {
f: 'voice',
client_id: '313939',
})
}
// 绑定默认请求头
config.params = _.merge(config.params, {
f: 'voice',
client_id: '313939',
})
return config;
},
error => {
......