Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈智峰
jinfa-platform
Commits
43a1de49
Commit
43a1de49
authored
Sep 01, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
a92b41ab
33df7ad3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
request.ts
src/utils/request.ts
+4
-0
No files found.
src/utils/request.ts
View file @
43a1de49
...
...
@@ -5,6 +5,7 @@ import { history } from 'umi'
import
{
message
}
from
'antd'
import
{
getAuth
,
removeAuth
}
from
'./auth'
;
import
{
GlobalConfig
}
from
'@/global/config'
;
import
qs
from
'qs'
export
type
CtlType
=
'none'
|
'message'
// 根前缀请求路径
...
...
@@ -77,6 +78,9 @@ baseRequest.interceptors.request.use((url: string, options: RequestOptionsInit):
memberId
,
token
}
options
.
paramsSerializer
=
params
=>
{
return
qs
.
stringify
(
params
,
{
arrayFormat
:
'brackets'
})
}
return
{
// 前缀如果已经带上api, 跳过自动补前缀
url
:
url
.
startsWith
(
'/api'
)
?
url
:
basePrefix
+
url
,
...
...
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