Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 765e8e6c
authored
Mar 13, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
测试请求路由
1 parent
816acaac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
src/plugin/axios/index.js
src/plugin/axios/index.js
View file @
765e8e6
...
@@ -71,7 +71,7 @@ service.interceptors.request.use(
...
@@ -71,7 +71,7 @@ service.interceptors.request.use(
// config.url = baseConfig.axios.baseURL + config.url
// config.url = baseConfig.axios.baseURL + config.url
// console.log(config.data.method.includes('dj.api.common.uploadImg'))
// console.log(config.data.method.includes('dj.api.common.uploadImg'))
//
console.log(config, 'config')
console
.
log
(
config
,
'config'
)
// console.log(Object.prototype.toString.call(config.data))
// console.log(Object.prototype.toString.call(config.data))
// console.log(config.data.method)
// console.log(config.data.method)
if
(
process
.
env
.
NODE_ENV
==
"development"
)
{
if
(
process
.
env
.
NODE_ENV
==
"development"
)
{
...
@@ -86,8 +86,12 @@ service.interceptors.request.use(
...
@@ -86,8 +86,12 @@ service.interceptors.request.use(
type
==
"[object Object]"
&&
type
==
"[object Object]"
&&
methodList
.
includes
(
config
.
data
.
method
)
methodList
.
includes
(
config
.
data
.
method
)
)
{
)
{
console
.
log
(
1
)
config
.
url
=
"http://dj.test.glsx.com.cn/rop-dj-smartcarlife/router"
config
.
url
=
"http://dj.test.glsx.com.cn/rop-dj-smartcarlife/router"
}
else
{
}
else
{
console
.
log
(
2
)
console
.
log
(
config
)
if
(
config
.
isPoint
)
{
if
(
config
.
isPoint
)
{
config
.
url
=
baseConfig
.
axios2
.
baseURL
config
.
url
=
baseConfig
.
axios2
.
baseURL
}
else
if
(
config
.
isCommon
)
{
}
else
if
(
config
.
isCommon
)
{
...
@@ -98,6 +102,8 @@ service.interceptors.request.use(
...
@@ -98,6 +102,8 @@ service.interceptors.request.use(
}
}
}
else
{
}
else
{
console
.
log
(
3
)
console
.
log
(
config
)
if
(
config
.
isPoint
)
{
if
(
config
.
isPoint
)
{
config
.
url
=
baseConfig
.
axios2
.
baseURL
config
.
url
=
baseConfig
.
axios2
.
baseURL
}
else
if
(
config
.
isCommon
)
{
}
else
if
(
config
.
isCommon
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment