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
6fb71fb8
Commit
6fb71fb8
authored
Aug 21, 2019
by
FE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
togroup not go back after alipay
parent
c6ee5a03
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
src/common/HeaderBar/index.js
+12
-6
src/components/detail/group/togroup.js
+2
-2
src/components/detail/index.js
+1
-1
No files found.
src/common/HeaderBar/index.js
View file @
6fb71fb8
...
...
@@ -10,9 +10,10 @@ class HeaderBar extends Component {
window
.
history
.
go
(
-
1
);
}
toHref
=
()
=>
{
const
{
href
}
=
this
.
props
;
location
.
replace
(
href
)
toLink
=
()
=>
{
const
{
toHref
}
=
this
.
props
;
console
.
log
(
toHref
);
location
.
replace
(
toHref
)
}
goShop
=
()
=>
{
...
...
@@ -20,15 +21,20 @@ class HeaderBar extends Component {
}
render
()
{
const
{
toHref
}
=
this
.
props
return
(
<
div
className
=
"detail-header"
style
=
{{...
this
.
props
.
style
}}
>
{
!
t
his
.
props
.
h
ref
&&
this
.
props
.
arrow
&&
!
t
oH
ref
&&
this
.
props
.
arrow
&&
<
i
className
=
'iconfont iconiconfront-68'
onClick
=
{
this
.
goBack
}
><
/i
>
}
{
this
.
props
.
href
&&
<
i
className
=
'iconfont iconiconfront-68'
onClick
=
{
this
.
toHref
}
><
/i
>
toHref
&&
typeof
toHref
===
'function'
&&
<
i
className
=
'iconfont iconiconfront-68'
onClick
=
{
toHref
}
>
1
<
/i
>
}
{
toHref
&&
typeof
toHref
===
'string'
&&
<
i
className
=
'iconfont iconiconfront-68'
onClick
=
{
this
.
toLink
}
><
/i
>
}
<
span
className
=
'herder'
>
{
this
.
props
.
title
}
<
/span
>
{
...
...
src/components/detail/group/togroup.js
View file @
6fb71fb8
...
...
@@ -125,7 +125,7 @@ class ToGroup extends Component {
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
history
.
push
(
`/detail?id=
${
id
}
`
);
history
.
push
(
`/detail?id=
${
id
}
`
,
{
href
:
'/classify'
}
);
return
false
;
}));
}
...
...
@@ -150,7 +150,7 @@ class ToGroup extends Component {
)
return
(
<
div
className
=
'to-group-box'
>
<
HeaderBar
title
=
'拼团'
arrow
=
{
true
}
cart
=
{
false
}
><
/HeaderBar
>
<
HeaderBar
title
=
'拼团'
cart
=
{
false
}
toHref
=
{()
=>
this
.
toCourseDetail
(
course_id
)
}
><
/HeaderBar
>
{
!
is_success
&&
<
VList
...
...
src/components/detail/index.js
View file @
6fb71fb8
...
...
@@ -184,7 +184,7 @@ class Detail extends Component {
const
href
=
this
.
props
.
location
&&
this
.
props
.
location
.
state
?
this
.
props
.
location
.
state
.
href
:
undefined
;
return
(
<
div
className
=
'detail-box'
>
<
HeaderBar
title
=
'课程详情'
arrow
=
{
true
}
cart
=
{
true
}
h
ref
=
{
href
}
><
/HeaderBar
>
<
HeaderBar
title
=
'课程详情'
arrow
=
{
true
}
cart
=
{
true
}
toH
ref
=
{
href
}
><
/HeaderBar
>
<
CallApp
className
=
'toapp'
><
/CallApp
>
{
/*弹幕*/
}
<
Carouselw
><
/Carouselw
>
...
...
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