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
d462f7f1
Commit
d462f7f1
authored
Apr 25, 2022
by
崔佳豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 未选中记住密码时仍然记住密码
parent
a0f7a260
Pipeline
#48610
skipped with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
BasicLayout.js
src/layouts/BasicLayout.js
+4
-4
SecurityLayout.js
src/layouts/SecurityLayout.js
+3
-3
login.js
src/pages/user/login/login.js
+0
-1
No files found.
src/layouts/BasicLayout.js
View file @
d462f7f1
...
@@ -45,8 +45,7 @@ const ArrowIcon = props => <Icon component={arrowSvg} {...props} />;
...
@@ -45,8 +45,7 @@ const ArrowIcon = props => <Icon component={arrowSvg} {...props} />;
const
optionsWith
=
[{
label
:
'按站点'
,
value
:
'site'
},
{
label
:
'按城市'
,
value
:
'city'
}];
const
optionsWith
=
[{
label
:
'按站点'
,
value
:
'site'
},
{
label
:
'按城市'
,
value
:
'city'
}];
const
HOT
=
[
'HOT'
,
'县'
,
'市'
,
'New'
];
const
HOT
=
[
'HOT'
,
'县'
,
'市'
,
'New'
];
const
StationsItem
=
(
item
,
action
,
onChangeVisible
)
=>
{
const
StationsItem
=
(
item
,
action
,
onChangeVisible
)
=>
{
const
changeGroup
=
(
event
,
data
)
=>
{
const
changeGroup
=
(
event
,
data
)
=>
{
debugger
;
action
.
changeGroup
&&
action
.
changeGroup
(
event
,
data
,
onChangeVisible
);
action
.
changeGroup
&&
action
.
changeGroup
(
event
,
data
,
onChangeVisible
);
};
};
return
(
return
(
...
@@ -190,8 +189,9 @@ const Layout = props => {
...
@@ -190,8 +189,9 @@ const Layout = props => {
// const basename = getBaseName();
// const basename = getBaseName();
const
history
=
useHistory
();
const
history
=
useHistory
();
useEffect
(()
=>
{
useEffect
(()
=>
{
siteAction
.
setGlobalConfig
(
props
.
global
);
const
tk
=
Cookies
.
get
(
'token'
)
||
props
.
global
.
token
;
if
(
!
Cookies
.
get
(
'token'
))
{
const
isLogin
=
tk
!==
null
&&
tk
!==
'undefined'
&&
tk
!==
(
void
0
);
if
(
!
isLogin
)
{
let
client
=
props
.
global
&&
props
.
global
.
hasOwnProperty
(
'client'
)
?
props
.
global
.
get
(
'client'
)
:
null
;
let
client
=
props
.
global
&&
props
.
global
.
hasOwnProperty
(
'client'
)
?
props
.
global
.
get
(
'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
;
...
...
src/layouts/SecurityLayout.js
View file @
d462f7f1
...
@@ -45,8 +45,8 @@ class SecurityLayout extends React.Component {
...
@@ -45,8 +45,8 @@ class SecurityLayout extends React.Component {
render
()
{
render
()
{
const
{
isReady
}
=
this
.
state
;
const
{
isReady
}
=
this
.
state
;
const
{
children
,
global
,
loading
}
=
this
.
props
;
const
{
children
,
global
,
loading
}
=
this
.
props
;
const
isLogin
=
Cookies
.
get
(
'token'
)
!==
null
&&
global
.
token
!==
null
;
const
tk
=
Cookies
.
get
(
'token'
)
||
global
.
token
;
const
isLogin
=
tk
!==
null
&&
tk
!==
'undefined'
&&
tk
!==
(
void
0
);
if
(
!
isLogin
&&
window
.
location
.
pathname
!==
'/civbase/user/login'
)
{
if
(
!
isLogin
&&
window
.
location
.
pathname
!==
'/civbase/user/login'
)
{
const
{
query
=
{},
search
,
pathname
}
=
history
.
location
;
const
{
query
=
{},
search
,
pathname
}
=
history
.
location
;
const
{
redirect
}
=
query
;
const
{
redirect
}
=
query
;
...
@@ -54,7 +54,7 @@ class SecurityLayout extends React.Component {
...
@@ -54,7 +54,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
(
'c
ity
'
);
let
client
=
global
.
client
||
Cookies
.
get
(
'c
lient
'
);
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 @
d462f7f1
...
@@ -914,7 +914,6 @@ class Login {
...
@@ -914,7 +914,6 @@ class Login {
const
self
=
this
;
const
self
=
this
;
const
token
=
response
&&
(
response
.
token
?
response
.
token
:
(
response
.
access_token
!==
null
&&
response
.
user_token
!==
null
)
?
response
.
user_token
:
''
);
const
token
=
response
&&
(
response
.
token
?
response
.
token
:
(
response
.
access_token
!==
null
&&
response
.
user_token
!==
null
)
?
response
.
user_token
:
''
);
if
(
token
)
{
if
(
token
)
{
Cookies
.
set
(
'token'
,
token
);
const
exp
=
86400000
;
const
exp
=
86400000
;
self
.
globalConfig
.
token
=
token
;
self
.
globalConfig
.
token
=
token
;
if
(
response
.
access_token
!==
""
)
{
if
(
response
.
access_token
!==
""
)
{
...
...
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