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
57b9163f
Commit
57b9163f
authored
Aug 22, 2019
by
FE
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.julyedu.com:baiguangyao/mr-julyedu
parents
0bfb832f
93e8a451
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
src/components/detail/index.js
+0
-6
src/components/detail/single/index.js
+17
-12
No files found.
src/components/detail/index.js
View file @
57b9163f
...
@@ -99,11 +99,6 @@ class Detail extends Component {
...
@@ -99,11 +99,6 @@ class Detail extends Component {
})
})
}
}
}
}
showSingleBox
=
()
=>
{
this
.
setState
({
singleBox
:
true
})
}
// componentWillReceiveProps(nextProps) {
// componentWillReceiveProps(nextProps) {
// let _this = this;
// let _this = this;
...
@@ -309,7 +304,6 @@ class Detail extends Component {
...
@@ -309,7 +304,6 @@ class Detail extends Component {
{
/*单集购买弹窗*/
}
{
/*单集购买弹窗*/
}
<
Single
<
Single
singleBox
=
{
this
.
state
.
singleBox
}
singleBox
=
{
this
.
state
.
singleBox
}
showSingleBox
=
{
this
.
showSingleBox
}
boxHide
=
{
this
.
boxHide
}
boxHide
=
{
this
.
boxHide
}
data
=
{
this
.
state
.
singMess
}
data
=
{
this
.
state
.
singMess
}
vcourseId
=
{
course_info
.
v_course_id
}
vcourseId
=
{
course_info
.
v_course_id
}
...
...
src/components/detail/single/index.js
View file @
57b9163f
...
@@ -69,7 +69,7 @@ class Single extends Component {
...
@@ -69,7 +69,7 @@ class Single extends Component {
componentWillReceiveProps
(
nextProps
,
nextContext
)
{
componentWillReceiveProps
(
nextProps
,
nextContext
)
{
this
.
setState
({
this
.
setState
({
singleBox
:
nextProps
.
singleBox
,
singleBox
:
nextProps
.
singleBox
})
})
}
}
...
@@ -152,30 +152,32 @@ class Single extends Component {
...
@@ -152,30 +152,32 @@ class Single extends Component {
clearInterval
(
_this
.
intervalPayStatus
);
clearInterval
(
_this
.
intervalPayStatus
);
_this
.
intervalPayStatus
=
null
;
_this
.
intervalPayStatus
=
null
;
// 获取课程类型
// 获取课程类型
this
.
props
.
showSingleBox
();
http
.
get
(
`
${
API
[
'base-api'
]}
/class_order_status/
${
getParam
(
'oid'
)}
`
).
then
((
res
)
=>
{
http
.
get
(
`
${
API
[
'base-api'
]}
/class_order_status/
${
getParam
(
'oid'
)}
`
).
then
((
res
)
=>
{
Toast
.
info
(
Number
(
res
.
data
.
data
.
errno
));
if
(
Number
(
res
.
data
.
data
.
errno
)
===
200
)
{
if
(
Number
(
res
.
data
.
data
.
errno
)
===
200
)
{
// 正常购买单集成功
// 正常购买单集成功
this
.
setState
({
this
.
setState
({
status
:
6
status
:
6
,
showSingleBox
:
true
,
})
})
}
else
if
(
Number
(
res
.
data
.
data
.
errno
)
===
201
)
{
}
else
if
(
Number
(
res
.
data
.
data
.
errno
)
===
201
)
{
// 0元参团
// 0元参团
this
.
setState
({
this
.
setState
({
status
:
4
status
:
4
,
showSingleBox
:
true
,
})
})
}
else
if
(
Number
(
res
.
data
.
data
.
errno
)
===
202
)
{
}
else
if
(
Number
(
res
.
data
.
data
.
errno
)
===
202
)
{
// 0元购
// 0元购
this
.
setState
({
this
.
setState
({
status
:
3
status
:
3
,
showSingleBox
:
true
,
})
})
}
else
if
(
Number
(
res
.
data
.
data
.
errno
)
===
203
)
{
}
else
if
(
Number
(
res
.
data
.
data
.
errno
)
===
203
)
{
// 三天内特价
// 三天内特价
this
.
setState
({
this
.
setState
({
nowPrice
:
res
.
data
.
data
.
data
.
now_price
,
nowPrice
:
res
.
data
.
data
.
data
.
now_price
,
laterPrice
:
res
.
data
.
data
.
data
.
three_day_later_price
,
laterPrice
:
res
.
data
.
data
.
data
.
three_day_later_price
,
status
:
2
status
:
2
,
showSingleBox
:
true
,
})
})
}
else
{
}
else
{
Toast
.
info
(
res
.
data
.
data
.
msg
,
2
)
Toast
.
info
(
res
.
data
.
data
.
msg
,
2
)
...
@@ -218,29 +220,32 @@ class Single extends Component {
...
@@ -218,29 +220,32 @@ class Single extends Component {
clearInterval
(
_this
.
intervalPayStatus
);
clearInterval
(
_this
.
intervalPayStatus
);
_this
.
intervalPayStatus
=
null
;
_this
.
intervalPayStatus
=
null
;
// 获取课程类型
// 获取课程类型
this
.
props
.
showSingleBox
();
http
.
get
(
`
${
API
[
'base-api'
]}
/class_order_status/
${
getParam
(
'oid'
)}
`
).
then
((
res
)
=>
{
http
.
get
(
`
${
API
[
'base-api'
]}
/class_order_status/
${
getParam
(
'oid'
)}
`
).
then
((
res
)
=>
{
if
(
Number
(
res
.
data
.
data
.
errno
)
===
200
)
{
if
(
Number
(
res
.
data
.
data
.
errno
)
===
200
)
{
// 正常购买单集成功
// 正常购买单集成功
this
.
setState
({
this
.
setState
({
status
:
6
status
:
6
,
showSingleBox
:
true
,
})
})
}
else
if
(
Number
(
res
.
data
.
data
.
errno
)
===
201
)
{
}
else
if
(
Number
(
res
.
data
.
data
.
errno
)
===
201
)
{
// 0元参团
// 0元参团
this
.
setState
({
this
.
setState
({
status
:
4
status
:
4
,
showSingleBox
:
true
,
})
})
}
else
if
(
Number
(
res
.
data
.
data
.
errno
)
===
202
)
{
}
else
if
(
Number
(
res
.
data
.
data
.
errno
)
===
202
)
{
// 0元购
// 0元购
this
.
setState
({
this
.
setState
({
status
:
3
status
:
3
,
showSingleBox
:
true
,
})
})
}
else
if
(
Number
(
res
.
data
.
data
.
errno
)
===
203
)
{
}
else
if
(
Number
(
res
.
data
.
data
.
errno
)
===
203
)
{
// 三天内特价
// 三天内特价
this
.
setState
({
this
.
setState
({
nowPrice
:
res
.
data
.
data
.
data
.
now_price
,
nowPrice
:
res
.
data
.
data
.
data
.
now_price
,
laterPrice
:
res
.
data
.
data
.
data
.
three_day_later_price
,
laterPrice
:
res
.
data
.
data
.
data
.
three_day_later_price
,
status
:
2
status
:
2
,
showSingleBox
:
true
,
})
})
}
else
{
}
else
{
Toast
.
info
(
res
.
data
.
data
.
msg
,
2
)
Toast
.
info
(
res
.
data
.
data
.
msg
,
2
)
...
...
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