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
af13f5fa
Commit
af13f5fa
authored
Aug 25, 2022
by
崔佳豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 登录缓存client参数
parent
0e2aedb8
Pipeline
#58513
passed with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
3 deletions
+4
-3
BasicLayout.js
src/layouts/BasicLayout.js
+1
-1
SecurityLayout.js
src/layouts/SecurityLayout.js
+1
-1
login.js
src/pages/user/login/login.js
+1
-0
render.js
src/render.js
+1
-1
No files found.
src/layouts/BasicLayout.js
View file @
af13f5fa
...
@@ -276,7 +276,7 @@ const Layout = (props) => {
...
@@ -276,7 +276,7 @@ const Layout = (props) => {
const
tk
=
Cookies
.
get
(
'token'
)
||
props
.
global
.
token
;
const
tk
=
Cookies
.
get
(
'token'
)
||
props
.
global
.
token
;
const
isLogin
=
tk
!==
null
&&
tk
!==
'undefined'
&&
tk
!==
(
void
0
);
const
isLogin
=
tk
!==
null
&&
tk
!==
'undefined'
&&
tk
!==
(
void
0
);
if
(
!
isLogin
)
{
if
(
!
isLogin
)
{
let
client
=
props
.
global
&&
props
.
global
.
hasOwnProperty
(
'client'
)
?
props
.
global
.
get
(
'client'
)
:
null
;
let
client
=
props
?.
global
?.
client
||
sessionStorage
.
getItem
(
'client'
)
||
null
;
client
=
client
!==
'undefined'
&&
!
_
.
isNull
(
client
)
&&
!
_
.
isUndefined
(
client
)
?
client
:
'city'
;
client
=
client
!==
'undefined'
&&
!
_
.
isNull
(
client
)
&&
!
_
.
isUndefined
(
client
)
?
client
:
'city'
;
let
generateType
=
props
.
global
&&
props
.
global
.
hasOwnProperty
(
'get'
)
?
props
.
global
.
get
(
'generateType'
)
:
null
;
let
generateType
=
props
.
global
&&
props
.
global
.
hasOwnProperty
(
'get'
)
?
props
.
global
.
get
(
'generateType'
)
:
null
;
generateType
=
generateType
=
...
...
src/layouts/SecurityLayout.js
View file @
af13f5fa
...
@@ -57,7 +57,7 @@ class SecurityLayout extends React.Component {
...
@@ -57,7 +57,7 @@ class SecurityLayout extends React.Component {
// redirect: pathname + search,
// redirect: pathname + search,
// });
// });
this
.
props
.
updateCurrentIndex
&&
this
.
props
.
updateCurrentIndex
(
0
);
this
.
props
.
updateCurrentIndex
&&
this
.
props
.
updateCurrentIndex
(
0
);
let
client
=
global
.
client
||
Cookies
.
get
(
'client'
);
let
client
=
global
.
client
||
sessionStorage
.
getItem
(
'client'
);
client
=
client
!==
'undefined'
&&
!
_
.
isNull
(
client
)
&&
!
_
.
isUndefined
(
client
)
?
client
:
'city'
;
client
=
client
!==
'undefined'
&&
!
_
.
isNull
(
client
)
&&
!
_
.
isUndefined
(
client
)
?
client
:
'city'
;
let
{
generateType
}
=
global
;
let
{
generateType
}
=
global
;
generateType
=
!
_
.
isNull
(
generateType
)
&&
!
_
.
isUndefined
(
generateType
)
&&
generateType
!==
'undefined'
?
`&generateType=
${
generateType
}
`
:
''
;
generateType
=
!
_
.
isNull
(
generateType
)
&&
!
_
.
isUndefined
(
generateType
)
&&
generateType
!==
'undefined'
?
`&generateType=
${
generateType
}
`
:
''
;
...
...
src/pages/user/login/login.js
View file @
af13f5fa
...
@@ -966,6 +966,7 @@ class Login {
...
@@ -966,6 +966,7 @@ class Login {
path
:
'/'
,
path
:
'/'
,
});
});
}
}
sessionStorage
.
setItem
(
'client'
,
self
.
globalConfig
.
client
);
self
.
isSignIn
=
true
;
self
.
isSignIn
=
true
;
self
.
updateConfig
&&
self
.
updateConfig
(
self
.
globalConfig
);
self
.
updateConfig
&&
self
.
updateConfig
(
self
.
globalConfig
);
self
.
getUserInfoAndConfig
();
self
.
getUserInfoAndConfig
();
...
...
src/render.js
View file @
af13f5fa
...
@@ -72,7 +72,7 @@ export const AppInitState = () => {
...
@@ -72,7 +72,7 @@ export const AppInitState = () => {
const
getClient
=
()
=>
{
const
getClient
=
()
=>
{
const
value
=
params
.
getParams
(
'client'
)
||
Cookies
.
get
(
'client'
);
const
value
=
params
.
getParams
(
'client'
)
||
sessionStorage
.
getItem
(
'client'
);
const
client
=
value
&&
value
!==
'undefined'
?
value
:
'city'
;
const
client
=
value
&&
value
!==
'undefined'
?
value
:
'city'
;
return
client
;
return
client
;
}
}
...
...
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