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
7afe8d8f
Commit
7afe8d8f
authored
Jun 18, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
智能选课
parent
95f355c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/App.js
+6
-6
No files found.
src/App.js
View file @
7afe8d8f
...
@@ -69,8 +69,7 @@ class App extends Component {
...
@@ -69,8 +69,7 @@ class App extends Component {
this
.
getUser
()
this
.
getUser
()
this
.
utm
()
this
.
utm
()
const
{
history
,
location
}
=
this
.
props
const
{
history
}
=
this
.
props
this
.
records
.
push
(
location
)
this
.
setNavigationRecord
(
this
.
props
.
location
,
this
.
props
.
history
.
action
)
this
.
setNavigationRecord
(
this
.
props
.
location
,
this
.
props
.
history
.
action
)
this
.
setPreviousLocation
()
this
.
setPreviousLocation
()
...
@@ -142,13 +141,12 @@ class App extends Component {
...
@@ -142,13 +141,12 @@ class App extends Component {
const
{
pathname
,
search
,
hash
}
=
location
const
{
pathname
,
search
,
hash
}
=
location
let
isLastRecord
=
location
.
pathname
===
(
this
.
records
.
length
&&
this
.
records
[
this
.
records
.
length
-
1
].
pathname
)
let
isLastRecord
=
location
.
pathname
===
(
this
.
records
.
length
&&
this
.
records
[
this
.
records
.
length
-
1
].
pathname
)
let
needHistoryMutation
=
location
.
pathname
!==
this
.
previousLocation
.
pathname
let
needHistoryMutation
=
location
.
pathname
!==
this
.
previousLocation
.
pathname
switch
(
action
)
{
switch
(
action
)
{
case
'POP'
:
case
'POP'
:
if
(
needHistoryMutation
)
{
if
(
needHistoryMutation
)
{
this
.
firstLoad
?
this
.
records
.
push
({
pathname
,
search
,
hash
})
:
this
.
records
.
pop
()
this
.
firstLoad
?
this
.
records
.
push
({
pathname
,
search
,
hash
})
:
this
.
records
.
pop
()
}
else
{
}
else
{
this
.
records
[
this
.
records
.
length
-
1
]
=
location
this
.
records
.
length
?
(
this
.
records
[
this
.
records
.
length
-
1
]
=
location
)
:
this
.
records
=
[
location
]
}
}
break
break
case
'REPLACE'
:
case
'REPLACE'
:
...
@@ -160,8 +158,10 @@ class App extends Component {
...
@@ -160,8 +158,10 @@ class App extends Component {
location
.
state
&&
location
.
state
.
records
location
.
state
&&
location
.
state
.
records
?
(
location
.
state
.
records
=
this
.
records
)
?
(
location
.
state
.
records
=
this
.
records
)
:
location
.
state
?
location
.
state
=
{...
location
.
state
,
records
:
this
.
records
}
:
location
.
state
?
location
.
state
=
{
:
(
location
.
state
=
{
records
:
this
.
records
})
...
location
.
state
,
records
:
this
.
records
,
}
:
(
location
.
state
=
{
records
:
this
.
records
})
}
}
...
...
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