Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
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
baiguangyao
mr-julyedu
Commits
7ec178ee
Commit
7ec178ee
authored
Sep 20, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temp
parent
df4b76a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
+5
-1
src/App.js
+4
-1
src/common/HeaderBar/index.js
+1
-0
No files found.
src/App.js
View file @
7ec178ee
...
...
@@ -59,6 +59,8 @@ class App extends Component {
const
routeMatchRule
=
/binding-tel|forgot|set-password/
const
{
history
}
=
this
.
props
history
.
listen
((
location
)
=>
{
console
.
log
(
this
.
props
.
location
);
console
.
log
(
location
);
this
.
setNavigationRecord
(
location
)
if
(
cookie
.
get
(
'uid'
)
&&
this
.
props
.
user
.
hasError
)
{
this
.
getUser
()
...
...
@@ -68,7 +70,7 @@ class App extends Component {
if
(
routeMatchRule
.
test
(
pathname
))
{
return
}
location
.
state
=
{
from
:
this
.
previousLocation
};
location
.
state
=
{
...
location
.
state
,
...{
from
:
this
.
previousLocation
}
};
}
})
...
...
@@ -86,6 +88,7 @@ class App extends Component {
[{
pathname
:
location
.
pathname
,
search
:
''
,
hash
:
''
}]
}
}
// console.log(location.state.record);
}
getUser
=
()
=>
{
...
...
src/common/HeaderBar/index.js
View file @
7ec178ee
...
...
@@ -14,6 +14,7 @@ class HeaderBar extends Component {
window
.
history
.
go
(
-
2
)
}
if
(
state
.
record
&&
state
.
record
.
length
>
1
){
console
.
log
(
state
.
record
.
length
);
window
.
history
.
go
(
-
1
);
}
else
{
window
.
location
.
href
=
window
.
location
.
origin
...
...
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