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
5b6a3eca
Commit
5b6a3eca
authored
Sep 10, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
没有上级页面点击返回到首页
parent
004471bc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
23 deletions
+24
-23
src/App.js
+18
-5
src/common/HeaderBar/index.js
+6
-1
src/components/search/search-result.scss
+0
-17
No files found.
src/App.js
View file @
5b6a3eca
...
...
@@ -43,7 +43,9 @@ class App extends Component {
script
.
src
=
'https://s22.cnzz.com/z_stat.php?id=1265696973&web_id=1265696973'
;
script
.
language
=
'JavaScript'
;
document
.
body
.
appendChild
(
script
);
this
.
setNavigationRecord
(
this
.
props
.
location
)
//平台信息
cookie
.
set
(
'plat'
,
'5'
,
{
domain
:
'.julyedu.com'
})
...
...
@@ -56,8 +58,9 @@ class App extends Component {
const
routeMatchRule
=
/binding-tel|forgot|set-password/
const
{
history
}
=
this
.
props
history
.
listen
(
location
=>
{
if
(
cookie
.
get
(
'uid'
)
&&
this
.
props
.
user
.
hasError
){
history
.
listen
((
location
,
action
)
=>
{
this
.
setNavigationRecord
(
location
)
if
(
cookie
.
get
(
'uid'
)
&&
this
.
props
.
user
.
hasError
)
{
this
.
getUser
()
}
const
{
pathname
}
=
location
...
...
@@ -70,9 +73,19 @@ class App extends Component {
})
}
setNavigationRecord
=
(
location
)
=>
{
let
{
location
:
_location
}
=
this
.
props
let
{
state
:
_state
=
{}}
=
_location
let
{
state
=
{}}
=
location
location
.
state
=
{
...
state
,
...{
record
:
_state
.
record
?
[...
_state
.
record
,
{
pathname
:
location
.
pathname
}]
:
[{
pathname
:
location
.
pathname
}]
}
}
}
getUser
=
()
=>
{
...
...
src/common/HeaderBar/index.js
View file @
5b6a3eca
...
...
@@ -9,10 +9,15 @@ class HeaderBar extends Component {
}
goBack
=
()
=>
{
const
{
state
}
=
this
.
props
.
location
if
(
browser
.
isWeixin
&&
getParam
(
'code'
)
&&
getParam
(
'state'
)){
window
.
history
.
go
(
-
2
)
}
window
.
history
.
go
(
-
1
);
if
(
state
.
record
&&
state
.
record
.
length
>
1
){
window
.
history
.
go
(
-
1
);
}
else
{
window
.
location
.
href
=
window
.
location
.
origin
}
}
toLink
=
()
=>
{
...
...
src/components/search/search-result.scss
View file @
5b6a3eca
.search-result
{
padding-top
:
44px
;
/*&.fixed-header{
padding-top: 44px;
.search-head{
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 10;
}
}
&.static-header{
padding-top: 0;
.search-head{
position: static;
}
}*/
.search-head
{
position
:
absolute
;
...
...
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