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
058fecbd
Commit
058fecbd
authored
Dec 12, 2022
by
杨思琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复首次白屏问题
parent
61d031e2
Pipeline
#65369
passed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
BasicLayout.js
src/layouts/BasicLayout.js
+8
-8
No files found.
src/layouts/BasicLayout.js
View file @
058fecbd
...
...
@@ -276,14 +276,14 @@ const Layout = props => {
const
tk
=
Cookies
.
get
(
'token'
)
||
props
.
global
.
token
;
const
isLogin
=
tk
!==
null
&&
tk
!==
'undefined'
&&
tk
!==
void
0
;
if
(
!
isLogin
)
{
//
let client = props?.global?.client || sessionStorage.getItem('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}`
//
: '';
//
history.replace(`/user/login?client=${client}${generateType}`);
let
client
=
props
?.
global
?.
client
||
sessionStorage
.
getItem
(
'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
}
`
:
''
;
history
.
replace
(
`/user/login?client=
${
client
}${
generateType
}
`
);
props
.
logout
();
}
},
[
history
,
props
,
props
.
global
,
siteAction
]);
...
...
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