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
a6bef5d7
Commit
a6bef5d7
authored
Sep 26, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shiting
parent
d7258b48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
src/components/detail/index.js
+15
-3
No files found.
src/components/detail/index.js
View file @
a6bef5d7
...
...
@@ -18,6 +18,7 @@ import {bindActionCreators} from "redux";
import
{
delCountryNum
}
from
'./../country/countryRedux'
;
import
RedPacket
from
'./redPacket'
;
import
{
Link
}
from
"react-router-dom"
;
class
Detail
extends
Component
{
...
...
@@ -318,15 +319,26 @@ class Detail extends Component {
}
// 点击子组件试听按钮
toAudition
=
()
=>
{
toAudition
=
(
vCourseId
,
videoId
)
=>
{
const
{
user
}
=
this
.
props
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
if
(
!
uid
)
{
this
.
props
.
history
.
push
(
'/passport/login'
)
}
else
{
this
.
setState
({
auditionBox
:
true
,
console
.
log
(
vCourseId
,
videoId
)
if
(
videoId
==
''
||
videoId
==
0
||
videoId
==
undefined
){
return
false
;
}
http
.
post
(
`
${
API
[
'base-api'
]}
/sys/get_class_audition?video_id=
${
videoId
}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
errno
==
200
)
{
this
.
props
.
history
.
push
(
`/play/video?id=
${
vCourseId
+
'&video_id='
+
videoId
}
`
)
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
);
}
})
// this.setState({
// auditionBox: 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