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
8c5d1cf5
Commit
8c5d1cf5
authored
Aug 22, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
6e9f7399
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
6 deletions
+19
-6
src/common/HeaderBar/index.js
+1
-1
src/components/bargainMiddlePage/index.js
+17
-4
src/components/video/index.js
+1
-1
No files found.
src/common/HeaderBar/index.js
View file @
8c5d1cf5
...
@@ -30,7 +30,7 @@ class HeaderBar extends Component {
...
@@ -30,7 +30,7 @@ class HeaderBar extends Component {
}
}
{
{
toHref
&&
typeof
toHref
===
'function'
&&
toHref
&&
typeof
toHref
===
'function'
&&
<
i
className
=
'iconfont iconiconfront-68'
onClick
=
{
toHref
}
>
1
<
/i
>
<
i
className
=
'iconfont iconiconfront-68'
onClick
=
{
toHref
}
><
/i
>
}
}
{
{
toHref
&&
typeof
toHref
===
'string'
&&
toHref
&&
typeof
toHref
===
'string'
&&
...
...
src/components/bargainMiddlePage/index.js
View file @
8c5d1cf5
...
@@ -66,7 +66,7 @@ class BargainMiddlePage extends Component {
...
@@ -66,7 +66,7 @@ class BargainMiddlePage extends Component {
limitPeople
:
res
.
data
.
data
.
course
.
limit_people
,
limitPeople
:
res
.
data
.
data
.
course
.
limit_people
,
bargainData
:
res
.
data
.
data
.
bargain
,
bargainData
:
res
.
data
.
data
.
bargain
,
width
:
(
res
.
data
.
data
.
bargain
.
bargain_price
/
res
.
data
.
data
.
bargain
.
total_price
).
toFixed
(
2
)
*
100
+
'%'
width
:
(
res
.
data
.
data
.
bargain
.
bargain_price
/
res
.
data
.
data
.
bargain
.
total_price
).
toFixed
(
2
)
*
100
+
'%'
},
},
()
=>
{
()
=>
{
if
(
this
.
state
.
bargainData
.
expire_time
)
{
if
(
this
.
state
.
bargainData
.
expire_time
)
{
let
date
=
this
.
state
.
bargainData
.
expire_time
*
1000
let
date
=
this
.
state
.
bargainData
.
expire_time
*
1000
...
@@ -147,6 +147,19 @@ class BargainMiddlePage extends Component {
...
@@ -147,6 +147,19 @@ class BargainMiddlePage extends Component {
}
}
})
})
}
}
// 我要砍价列表的去支付
toCartBottom
=
(
id
)
=>
{
let
data
=
{
course_id
:
id
}
http
.
post
(
`
${
API
.
home
}
/m/cart/add`
,
data
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
||
res
.
data
.
code
===
15001
)
{
this
.
props
.
history
.
push
(
'/shopcart'
)
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
);
}
})
}
// 查看更多
// 查看更多
getMore
=
()
=>
{
getMore
=
()
=>
{
...
@@ -425,7 +438,7 @@ class BargainMiddlePage extends Component {
...
@@ -425,7 +438,7 @@ class BargainMiddlePage extends Component {
bottom
=
{
bottom
=
{
<
CourseBottom
<
CourseBottom
item
=
{
item
}
item
=
{
item
}
toCart
=
{
this
.
toCart
}
toCart
Bottom
=
{
this
.
toCartBottom
.
bind
(
this
,
item
.
course_id
)
}
toDetail
=
{
this
.
toCourseDetail
}
toDetail
=
{
this
.
toCourseDetail
}
/
>
/
>
}
}
...
@@ -533,7 +546,7 @@ function CourseBottom(props) {
...
@@ -533,7 +546,7 @@ function CourseBottom(props) {
// 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
>
Buttons
=
<
a
href
=
"javascript:;"
onClick
=
{()
=>
props
.
toDetail
(
props
.
item
.
course_id
)}
className
=
{
'bargain'
}
>
我要砍价
<
/a
>
}
else
if
(
props
.
item
.
bargain_status
===
3
)
{
}
else
if
(
props
.
item
.
bargain_status
===
3
)
{
Buttons
=
<
Link
to
=
{
`/play/video?id=
${
props
.
item
.
course_id
}
`
}
className
=
{
'bargain'
}
>
去学习
<
/Link
>
Buttons
=
<
Link
to
=
{
`/play/video?id=
${
props
.
item
.
v_
course_id
}
`
}
className
=
{
'bargain'
}
>
去学习
<
/Link
>
}
else
{
}
else
{
Buttons
=
(
Buttons
=
(
<
div
className
=
"btns"
>
<
div
className
=
"btns"
>
...
@@ -551,7 +564,7 @@ function CourseBottom(props) {
...
@@ -551,7 +564,7 @@ function CourseBottom(props) {
}
}
<
button
onClick
=
{
props
.
toCart
}
<
button
onClick
=
{
props
.
toCart
Bottom
}
className
=
{
'purchase-btn'
}
>
¥
{
props
.
item
.
pay_price
}
去支付
className
=
{
'purchase-btn'
}
>
¥
{
props
.
item
.
pay_price
}
去支付
<
/button
>
<
/button
>
<
/div
>
<
/div
>
...
...
src/components/video/index.js
View file @
8c5d1cf5
...
@@ -454,7 +454,7 @@ class Video extends Component {
...
@@ -454,7 +454,7 @@ class Video extends Component {
activeIndex
:
videoIndex
activeIndex
:
videoIndex
})
})
let
lesson
=
videoList
[
videoIndex
]
let
lesson
=
videoList
[
videoIndex
]
if
(
lesson
[
'video_auth'
])
{
if
(
lesson
[
'video_auth'
])
{
this
.
setState
({
this
.
setState
({
isAuth
:
true
isAuth
:
true
...
...
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