You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.6 KiB
70 lines
1.6 KiB
import React, { Component } from 'react';
|
|
import { Modal} from 'antd';
|
|
import axios from 'axios';
|
|
//加入金品课堂
|
|
class Jointheclass extends Component {
|
|
|
|
constructor(props) {
|
|
super(props);
|
|
}
|
|
|
|
componentDidMount() {
|
|
// console.log("加入金品课堂");
|
|
// console.log(this.props);
|
|
|
|
}
|
|
|
|
modalCancel=()=>{
|
|
this.props.ysljoinmodalCancel();
|
|
};
|
|
|
|
setDownload=()=>{
|
|
var id=this.props.match.params.coursesId
|
|
|
|
var url = `/courses/${id}/join_excellent_course.json`;
|
|
axios.post(url).then((result) => {
|
|
if(result){
|
|
if(result.data){
|
|
if(result.data.status === 0){
|
|
this.props.showNotification(result.data.message);
|
|
this.props.ysljoinmodalCanceltwo();
|
|
}else {
|
|
this.props.showNotification(result.data.message);
|
|
}
|
|
}
|
|
|
|
}
|
|
}).catch((error) => {
|
|
console.log(error)
|
|
})
|
|
|
|
}
|
|
|
|
|
|
render() {
|
|
// console.log("加入金品课堂2");
|
|
// console.log(this.props);
|
|
return(
|
|
<Modal
|
|
keyboard={false}
|
|
closable={false}
|
|
footer={null}
|
|
destroyOnClose={true}
|
|
title="提示"
|
|
centered={true}
|
|
visible={this.props.yslJointhe===undefined?false:this.props.yslJointhe}
|
|
width="600px"
|
|
>
|
|
<div className="educouddiv">
|
|
<div className={"tabeltext-alignleft"}><p style={{fontSize: "16px",marginTop:"46px"}}>是否确认该加入课堂?</p></div>
|
|
<div className="clearfix edu-txt-center" style={{marginTop:"98px"}}>
|
|
<a className="task-btn mr30" onClick={()=>this.modalCancel()}>取消</a>
|
|
<a className="task-btn task-btn-orange" onClick={()=>this.setDownload()}>确认</a>
|
|
</div>
|
|
</div>
|
|
</Modal>
|
|
)
|
|
}
|
|
}
|
|
|
|
export default Jointheclass; |