Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
d12887b6
authored
Aug 05, 2023
by
芋道源码
Committed by
GitHub
Aug 05, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18 from SupGiant/master
request支持传递axios原生参数,例如超时:request(method:'GET',url:'',timeout:1000)
parents
ee802d63
0c334ff4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
src/config/axios/index.ts
+2
-1
No files found.
src/config/axios/index.ts
View file @
d12887b6
...
@@ -5,12 +5,13 @@ import { config } from './config'
...
@@ -5,12 +5,13 @@ import { config } from './config'
const
{
default_headers
}
=
config
const
{
default_headers
}
=
config
const
request
=
(
option
:
any
)
=>
{
const
request
=
(
option
:
any
)
=>
{
const
{
url
,
method
,
params
,
data
,
headersType
,
responseType
}
=
option
const
{
url
,
method
,
params
,
data
,
headersType
,
responseType
,
...
config
}
=
option
return
service
({
return
service
({
url
:
url
,
url
:
url
,
method
,
method
,
params
,
params
,
data
,
data
,
...
config
,
responseType
:
responseType
,
responseType
:
responseType
,
headers
:
{
headers
:
{
'Content-Type'
:
headersType
||
default_headers
'Content-Type'
:
headersType
||
default_headers
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment