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
c6f49544
Commit
c6f49544
authored
Aug 20, 2019
by
FE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
other kanjia course to detail in bargian middlle page
parent
c4a7ed38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
src/components/bargainMiddlePage/index.js
+20
-11
No files found.
src/components/bargainMiddlePage/index.js
View file @
c6f49544
...
...
@@ -10,8 +10,11 @@ import { differenceInSeconds, differenceInMinutes, differenceInHours, difference
import
Overlay
from
'../detail/overlay'
import
{
compose
}
from
"redux"
import
{
connect
}
from
"react-redux"
;
import
{
getCourses
}
from
'./../detail/actions'
;
@
connect
(
state
=>
({
user
:
state
.
user
}))
class
BargainMiddlePage
extends
Component
{
timer
...
...
@@ -267,6 +270,14 @@ class BargainMiddlePage extends Component {
})
}
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
history
.
push
(
`/detail?id=
${
id
}
`
);
return
false
;
}));
}
render
()
{
let
thirdRow
,
btn
// is_artifact 0-再邀请多少人可以使用 1-可以使用未领取 2-已领取 3-已使用
...
...
@@ -410,9 +421,12 @@ class BargainMiddlePage extends Component {
id
=
{
item
.
course_id
}
img
=
{
item
.
image_name
}
title
=
{
item
.
course_title
}
bottom
=
{
<
CourseBottom
toDetail
=
{
this
.
toCourseDetail
}
bottom
=
{
<
CourseBottom
item
=
{
item
}
toCart
=
{
this
.
toCart
}
toDetail
=
{
this
.
toCourseDetail
}
/
>
}
/
>
...
...
@@ -516,7 +530,8 @@ function CourseDes(props) {
function
CourseBottom
(
props
)
{
let
Buttons
if
(
props
.
item
.
bargain_status
===
2
)
{
Buttons
=
<
Link
to
=
{
`/detail?id=
${
props
.
item
.
course_id
}
`
}
className
=
{
'bargain'
}
>
我要砍价
<
/Link
>
// Buttons = <Link to={`/detail?id=${props.item.course_id}`} className={'bargain'}>我要砍价</Link>
Buttons
=
<
a
href
=
"javascript:;"
onClick
=
{()
=>
props
.
toDetail
(
props
.
item
.
course_id
)}
className
=
{
'bargain'
}
>
我要砍价
<
/a
>
}
else
if
(
props
.
item
.
bargain_status
===
3
)
{
Buttons
=
<
Link
to
=
{
`/play?id=
${
props
.
item
.
course_id
}
`
}
className
=
{
'bargain'
}
>
去学习
<
/Link
>
}
else
{
...
...
@@ -531,7 +546,7 @@ function CourseBottom(props) {
}
{
props
.
item
.
bargain_status
===
0
&&
<
Link
to
=
{
`/detail?id=
${
props
.
item
.
course_id
}
`
}
className
=
{
'bargain-btn'
}
>
继续砍价
<
/Link
>
<
a
href
=
"javascript:;"
onClick
=
{()
=>
props
.
toDetail
(
props
.
item
.
course_id
)}
className
=
{
'bargain-btn'
}
>
我要砍价
<
/a
>
}
...
...
@@ -655,10 +670,4 @@ function BargainSuccess(props) {
}
export
default
compose
(
connect
(
state
=>
({
user
:
state
.
user
}),
null
),
withRouter
)(
BargainMiddlePage
)
export
default
withRouter
(
BargainMiddlePage
);
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