Commit a6bef5d7 by xuzhenghua

shiting

parent d7258b48
......@@ -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,
// })
}
}
// 点击子组件单集购买按钮
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment