Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
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
ReactWeb5
CivWeb
Commits
9739452c
Commit
9739452c
authored
Apr 11, 2022
by
崔佳豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 网关修改
parent
e7c64539
Pipeline
#47603
skipped with stages
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
index.js
src/api/index.js
+4
-4
base.js
src/api/service/base.js
+4
-4
initConfig.js
src/initConfig.js
+1
-1
No files found.
src/api/index.js
View file @
9739452c
...
@@ -13,7 +13,7 @@ instanceRequest.transformRequestURL = function(url) {
...
@@ -13,7 +13,7 @@ instanceRequest.transformRequestURL = function(url) {
'/PandaCore/GCK/Basis/GateWayConfig'
,
'/PandaCore/GCK/Basis/GateWayConfig'
,
'/CityInterface/rest/services.svc/GetConfig'
,
'/CityInterface/rest/services.svc/GetConfig'
,
'/PandaOMS/OMS/HostManager/GetGateWay'
,
'/PandaOMS/OMS/HostManager/GetGateWay'
,
'/Identity/AuthorizationToken'
'/
PandaCore/
Identity/AuthorizationToken'
];
];
if
(
excludeURL
.
includes
(
url
))
{
if
(
excludeURL
.
includes
(
url
))
{
return
url
;
return
url
;
...
@@ -35,9 +35,9 @@ instanceRequest.transformRequestURL = function(url) {
...
@@ -35,9 +35,9 @@ instanceRequest.transformRequestURL = function(url) {
// : `/GateWay${url}`;
// : `/GateWay${url}`;
// }
// }
if
(
window
.
globalConfig
&&
window
.
globalConfig
.
hasGateWay
)
{
//
if(window.globalConfig && window.globalConfig.hasGateWay) {
return
url
&&
/^
\/
GateWay/
.
test
(
url
)
?
url
:
`/GateWay
${
url
}
`
//
return url && /^\/GateWay/.test(url) ? url : `/GateWay${url}`
}
//
}
return
url
;
return
url
;
};
};
const
codeMessage
=
{
const
codeMessage
=
{
...
...
src/api/service/base.js
View file @
9739452c
...
@@ -10,18 +10,18 @@ const transformGateWay = url => {
...
@@ -10,18 +10,18 @@ const transformGateWay = url => {
};
};
export
const
API
=
{
export
const
API
=
{
AUTHORIZATION_TOKEN
:
'/
Identity/AuthorizationToken'
,
AUTHORIZATION_TOKEN
:
'/
PandaCore/Identity/AuthorizationToken'
,
// 授权验证,不需要走网关加前缀
GET_GATEWAY_CONFIG
:
'/PandaOMS/OMS/HostManager/GetGateWay'
,
GET_GATEWAY_CONFIG
:
'/PandaOMS/OMS/HostManager/GetGateWay'
,
GET_CONFIG
:
'/CityInterface/rest/services.svc/GetConfig'
,
GET_CONFIG
:
'/CityInterface/rest/services.svc/GetConfig'
,
GENERATE_TOKEN
:
'/cityinterface/rest/services.svc/generatetoken'
,
GENERATE_TOKEN
:
'/cityinterface/rest/services.svc/generatetoken'
,
GENERATE_GATEWAT_TOKEN
:
'/GCK/Basis/GenerateToken'
,
GENERATE_GATEWAT_TOKEN
:
'/
PandaCore/
GCK/Basis/GenerateToken'
,
GENERATE_IOT_TOKEN
:
'cityinterface/rest/services.svc/generateGCKToken'
,
GENERATE_IOT_TOKEN
:
'cityinterface/rest/services.svc/generateGCKToken'
,
GENERATE_QRCODE
:
'cityinterface/rest/services.svc/generatetokenByqrcode'
,
GENERATE_QRCODE
:
'cityinterface/rest/services.svc/generatetokenByqrcode'
,
GENERATE_TOKEN_CHANGE
:
'/cityinterface/rest/services.svc/generatetokenquick'
,
GENERATE_TOKEN_CHANGE
:
'/cityinterface/rest/services.svc/generatetokenquick'
,
GET_WEB_SITE_CONFIG
:
'/CityInterface/rest/services.svc/GetWebSiteConfig'
,
GET_WEB_SITE_CONFIG
:
'/CityInterface/rest/services.svc/GetWebSiteConfig'
,
GET_WEB_SITE_CONFIG_GEWAY
:
'/GCK/Basis/GetWebSiteConfig'
,
GET_WEB_SITE_CONFIG_GEWAY
:
'/
PandaCore/
GCK/Basis/GetWebSiteConfig'
,
GET_USER_INFO
:
'/CityInterface/rest/services.svc/getUserInfo'
,
GET_USER_INFO
:
'/CityInterface/rest/services.svc/getUserInfo'
,
GET_GATEWAY_USER_INFO
:
'/GCK/Basis/GetUserInfo'
,
GET_GATEWAY_USER_INFO
:
'/
PandaCore/
GCK/Basis/GetUserInfo'
,
GET_OA
:
'/CityInterface/rest/services/OA.svc/getLoginInfo'
,
GET_OA
:
'/CityInterface/rest/services/OA.svc/getLoginInfo'
,
GET_LOGS
:
'/CityInterface/rest/services/portal.svc/OMMonitor/SaveLoginInfo'
,
GET_LOGS
:
'/CityInterface/rest/services/portal.svc/OMMonitor/SaveLoginInfo'
,
GET_CITY
:
GET_CITY
:
...
...
src/initConfig.js
View file @
9739452c
...
@@ -56,7 +56,7 @@ export const initGlobalConfig = () => {
...
@@ -56,7 +56,7 @@ export const initGlobalConfig = () => {
const
hasGateWay
=
!
res
||
!
res
.
data
?
false
:
_
.
isString
(
res
.
data
)
?
JSON
.
parse
(
res
.
data
)
:
typeof
res
.
data
===
'boolean'
?
res
.
data
:
false
;
const
hasGateWay
=
!
res
||
!
res
.
data
?
false
:
_
.
isString
(
res
.
data
)
?
JSON
.
parse
(
res
.
data
)
:
typeof
res
.
data
===
'boolean'
?
res
.
data
:
false
;
return
{
return
{
hasGateWay
,
hasGateWay
,
apiGatewayDomain
:
`
${
window
.
location
.
origin
}
/PandaCore`
,
apiGatewayDomain
:
`
${
window
.
location
.
origin
}
/PandaCore
/GateWay
`
,
};
};
})
})
.
then
(
gateWayConfig
=>
{
.
then
(
gateWayConfig
=>
{
...
...
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