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
fa4fc674
Commit
fa4fc674
authored
Aug 22, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单集购买
parent
d9fd9539
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
src/components/detail/index.js
+1
-0
src/components/detail/single/index.js
+5
-4
No files found.
src/components/detail/index.js
View file @
fa4fc674
...
@@ -306,6 +306,7 @@ class Detail extends Component {
...
@@ -306,6 +306,7 @@ class Detail extends Component {
singleBox
=
{
this
.
state
.
singleBox
}
singleBox
=
{
this
.
state
.
singleBox
}
boxHide
=
{
this
.
boxHide
}
boxHide
=
{
this
.
boxHide
}
data
=
{
this
.
state
.
singMess
}
data
=
{
this
.
state
.
singMess
}
vcourseId
=
{
course_info
.
v_course_id
}
videoId
=
{
this
.
state
.
singMess
.
video_id
}
videoId
=
{
this
.
state
.
singMess
.
video_id
}
title
=
{
course_info
.
course_title
}
title
=
{
course_info
.
course_title
}
/
>
/
>
...
...
src/components/detail/single/index.js
View file @
fa4fc674
...
@@ -129,7 +129,7 @@ class Single extends Component {
...
@@ -129,7 +129,7 @@ class Single extends Component {
clearInterval
(
_this
.
intervalPayStatus
);
clearInterval
(
_this
.
intervalPayStatus
);
_this
.
intervalPayStatus
=
null
;
_this
.
intervalPayStatus
=
null
;
// 获取课程类型
// 获取课程类型
http
.
get
(
`
${
API
.
home
}
/sys/orderStatus/
${
getParam
(
'oid'
)}
`
).
then
((
res
)
=>
{
http
.
get
(
`
${
API
[
'base-api'
]
}
/sys/orderStatus/
${
getParam
(
'oid'
)}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
data
.
errno
==
'200'
)
{
if
(
res
.
data
.
data
.
errno
==
'200'
)
{
// 正常购买单集成功
// 正常购买单集成功
this
.
setState
({
this
.
setState
({
...
@@ -192,7 +192,7 @@ class Single extends Component {
...
@@ -192,7 +192,7 @@ class Single extends Component {
clearInterval
(
_this
.
intervalPayStatus
);
clearInterval
(
_this
.
intervalPayStatus
);
_this
.
intervalPayStatus
=
null
;
_this
.
intervalPayStatus
=
null
;
// 获取课程类型
// 获取课程类型
http
.
get
(
`
${
API
.
home
}
/sys/orderStatus/
${
getParam
(
'oid'
)}
`
).
then
((
res
)
=>
{
http
.
get
(
`
${
API
[
'base-api'
]
}
/sys/orderStatus/
${
getParam
(
'oid'
)}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
data
.
errno
==
'200'
)
{
if
(
res
.
data
.
data
.
errno
==
'200'
)
{
// 正常购买单集成功
// 正常购买单集成功
this
.
setState
({
this
.
setState
({
...
@@ -311,6 +311,7 @@ class Single extends Component {
...
@@ -311,6 +311,7 @@ class Single extends Component {
}
}
return
(
return
(
<
div
>
<
div
>
{
{
this
.
props
.
singleBox
&&
this
.
props
.
singleBox
&&
...
@@ -359,7 +360,7 @@ class Single extends Component {
...
@@ -359,7 +360,7 @@ class Single extends Component {
<
/div
>
<
/div
>
<
div
className
=
"dec"
>
·
3
天内购买全集,可直接抵扣该集费用,
{
this
.
state
.
nowPrice
}
元购买。
<
/div
>
<
div
className
=
"dec"
>
·
3
天内购买全集,可直接抵扣该集费用,
{
this
.
state
.
nowPrice
}
元购买。
<
/div
>
<
div
className
=
"dec"
>
·
超过
3
天,按照未够集数
/
全部集数等比例计费,
{
this
.
state
.
laterPrice
}
元购买全集。
<
/div
>
<
div
className
=
"dec"
>
·
超过
3
天,按照未够集数
/
全部集数等比例计费,
{
this
.
state
.
laterPrice
}
元购买全集。
<
/div
>
<
div
className
=
'btn btn-18B4ED'
>
开始学习
<
/div
>
<
Link
to
=
{
`/play/video?id=
${
this
.
props
.
vcourseId
}
&video_id=
${
this
.
props
.
data
.
video_id
}
`
}
className
=
'btn btn-18B4ED'
>
开始学习
<
/Link
>
<
div
className
=
'btn btn-FF4000'
onclick
=
{
this
.
toBuyAll
()}
>
¥
{
this
.
state
.
nowPrice
}
购买全集
<
div
className
=
'btn btn-FF4000'
onclick
=
{
this
.
toBuyAll
()}
>
¥
{
this
.
state
.
nowPrice
}
购买全集
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -393,7 +394,7 @@ class Single extends Component {
...
@@ -393,7 +394,7 @@ class Single extends Component {
<
i
className
=
'iconfont icondanseshixintubiao-5'
><
/i
>
<
i
className
=
'iconfont icondanseshixintubiao-5'
><
/i
>
<
span
>
购买成功
<
/span
>
<
span
>
购买成功
<
/span
>
<
/div
>
<
/div
>
<
Link
to
=
{
`/play/video?id=
${
getParam
(
'id'
)
}
`
}
className
=
'btn btn-18B4ED'
>
去学习
<
/Link
>
<
Link
to
=
{
`/play/video?id=
${
this
.
props
.
vcourseId
}
&video_id=
${
this
.
props
.
data
.
video_id
}
`
}
className
=
'btn btn-18B4ED'
>
去学习
<
/Link
>
<
/div
>
<
/div
>
}
}
{
{
...
...
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