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
ce9f5690
Commit
ce9f5690
authored
Mar 17, 2022
by
李纪文
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-cloud' into 'master'
fix: 退出client为undefined See merge request
!8
parents
591c803b
740e4d95
Pipeline
#46104
skipped with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
initConfig.js
src/initConfig.js
+3
-2
BasicLayout1.js
src/layouts/BasicLayout1.js
+1
-1
No files found.
src/initConfig.js
View file @
ce9f5690
...
...
@@ -60,7 +60,8 @@ export const initGlobalConfig = () => {
}
});
// eslint-disable-next-line react-hooks/rules-of-hooks
const
client
=
params
.
getParams
(
'client'
)
||
Cookies
.
get
(
'city'
)
let
client
=
params
.
getParams
(
'client'
)
||
Cookies
.
get
(
'city'
)
client
=
client
&&
client
!==
'undefined'
?
client
:
'city'
;
appService
.
queryConfig
({
client
:
client
||
'city'
,
...
...
@@ -72,7 +73,7 @@ export const initGlobalConfig = () => {
store
.
dispatch
(
actionCreators
.
getConfig
(
Object
.
assign
({})));
const
data
=
res
;
if
(
!
data
.
client
)
{
data
.
client
=
params
.
getParams
(
'client'
)
||
Cookies
.
get
(
'city'
)
;
data
.
client
=
client
;
}
// Cookies.set('city', data.client);
store
.
dispatch
(
...
...
src/layouts/BasicLayout1.js
View file @
ce9f5690
...
...
@@ -360,7 +360,7 @@ const BasicLayout = props => {
useEffect
(()
=>
{
siteAction
.
setGlobalConfig
(
props
.
global
);
if
(
!
Cookies
.
get
(
'token'
))
{
let
client
=
props
.
global
&&
props
.
global
.
client
;
let
client
=
props
.
global
&&
props
.
global
.
hasOwnProperty
(
'client'
)
?
props
.
global
.
get
(
'client'
)
:
null
;
client
=
client
!==
'undefined'
&&
!
_
.
isNull
(
client
)
&&
!
_
.
isUndefined
(
client
)
?
client
:
'city'
;
let
generateType
=
props
.
global
&&
props
.
global
.
hasOwnProperty
(
'get'
)
?
props
.
global
.
get
(
'generateType'
)
:
null
;
generateType
=
!
_
.
isNull
(
generateType
)
&&
!
_
.
isUndefined
(
generateType
)
&&
generateType
!==
'undefined'
?
`&generateType=
${
generateType
}
`
:
''
;
...
...
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