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 dad52426
authored
Jul 29, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix 请求配置修改
1 parent
d4c3a3c9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
src/main.js
src/main.js
View file @
dad5242
...
@@ -9,12 +9,12 @@ import VueLazyload from "vue-lazyload";
...
@@ -9,12 +9,12 @@ import VueLazyload from "vue-lazyload";
import
{
config
}
from
"@/common/baseConfig"
;
import
{
config
}
from
"@/common/baseConfig"
;
import
developConfig
from
"@/common/baseConfig.develop.json"
;
import
developConfig
from
"@/common/baseConfig.develop.json"
;
import
{
installVueMapApi
}
from
"@/common/installVueMapApi"
;
import
notice
from
"@/common/notice"
;
import
{
import
{
mergeConfigTarget
,
mergeConfigTarget
,
parseConfigCenterResponse
,
parseConfigCenterResponse
,
}
from
"@/common/parseConfigCenterResponse"
;
}
from
"@/common/parseConfigCenterResponse"
;
import
{
installVueMapApi
}
from
"@/common/installVueMapApi"
;
import
notice
from
"@/common/notice"
;
import
util
from
"@/libs/util.js"
;
import
util
from
"@/libs/util.js"
;
// 针对template模板中使用可选链操作符
// 针对template模板中使用可选链操作符
import
chaining
from
"@/plugin/chaining"
;
import
chaining
from
"@/plugin/chaining"
;
...
@@ -155,6 +155,26 @@ fetch(configCenterUrl)
...
@@ -155,6 +155,26 @@ fetch(configCenterUrl)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
console
.
log
(
"response"
,
response
?.
code
,
response
);
console
.
log
(
"response"
,
response
?.
code
,
response
);
const
parsed
=
parseConfigCenterResponse
(
response
);
const
parsed
=
parseConfigCenterResponse
(
response
);
window
.
$gscApi
=
new
Request
({
...
response
.
gsc
,
// baseURL:'http://192.168.3.145:9898/gsc-vcp-web-facade',
// baseURL: 'http://gsc.test.glsx.com.cn/gsc-vcp-web-facade',
session
:
{
requiresSession
:
true
,
sessionId
:
_
=>
util
.
cookies
.
get
(
"token"
),
},
events
:
{
error
:
(
error
,
config
)
=>
{
Vue
.
prototype
.
$message
.
error
(
error
.
msg
);
},
logout
:
(
response
,
config
)
=>
{
store
.
dispatch
(
"d2admin/user/clear"
);
util
.
cookies
.
remove
(
"token"
);
router
.
replace
(
"/login"
);
Vue
.
prototype
.
$message
.
error
(
"登录超时,请重新登录"
);
},
},
});
if
(
parsed
)
{
if
(
parsed
)
{
configCenterLoaded
=
true
;
configCenterLoaded
=
true
;
mergeConfigTarget
(
baseConfig
,
parsed
);
mergeConfigTarget
(
baseConfig
,
parsed
);
...
...
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