Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-05-06 09:51:41 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a2f65c8f07726557fcdb7652c6fede97cfe848cd
a2f65c8f
1 parent
ac658bf6
✨ feat(axios): 加入请求默认头
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
src/utils/axios.js
src/utils/axios.js
View file @
a2f65c8
...
...
@@ -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
=>
{
...
...
Please
register
or
login
to post a comment