附件上传 弹出框口

dev_forum
ysl 6 years ago
parent cc290824bd
commit 0f1211f555

@ -9,7 +9,7 @@ import '../css/Courses.css';
import Modals from "../../modals/Modals";
import AddStudentModal from '../members/modal/AddStudentModal'
import AddTeacherModal from '../members/modal/AddTeacherModal'
import Trialapplication from "../../login/Trialapplication";
// 点击按钮复制功能
// function jsCopy(){
@ -43,13 +43,20 @@ class CoursesBanner extends Component {
metype: 0,
modalsBottomval: "",
antIcon:false,
coursedata:undefined
coursedata:undefined,
user_phone_binded:false,
isRenders:false,
showTrial:false,
}
console.log("CoursesBanner");
console.log("48");
console.log(props);
}
componentDidMount() {
this.updatabanner()
this.setState({
user_phone_binded :this.props.user_phone_binded,
})
}
updatabanner=()=>{
let courseId = this.props.match.params.coursesId;
@ -57,9 +64,19 @@ class CoursesBanner extends Component {
axios.get(url).then((result) => {
if( result!=undefined){
let data = result.data;
if(result.data.status === 407){
this.setState({
coursedata: data
isRenders:true,
coursedata: data,
showTrial:false,
})
}else{
this.setState({
coursedata: data,
showTrial:true,
})
}
}
})
}
@ -315,10 +332,13 @@ class CoursesBanner extends Component {
}
render() {
let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon} = this.state;
let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state;
return (
<div>
<Trialapplication {...this.state} user_phone_binded={user_phone_binded} ></Trialapplication>
{
coursedata === undefined || coursedata.status===401? <div id="course_info_1309" className="courseHead" style={{height: '206px'}}></div>:<div id="course_info_1309" className="courseHead" style={{height: '206px'}}>
{Addcoursestypes === true ? <Addcourses
@ -574,6 +594,9 @@ class CoursesBanner extends Component {
</div>
</div>
</div>
}
</div>
)
}
}

@ -71,7 +71,6 @@ class Trialapplication extends Component {
this.setState({
isRenders: true
})
this.props.setTrialapplication();
}
return response;
}, (error) => {

@ -213,12 +213,12 @@ export function TPMIndexHOC(WrappedComponent) {
return this.state.coursedata&&this.state.coursedata.course_identity === 6
}
setTrialapplication = ()=>{
this.setState({
isRenders:true
})
}
// setTrialapplication = ()=>{
// this.setState({
// isRenders:true
// })
//
// }
/**
@ -288,13 +288,13 @@ export function TPMIndexHOC(WrappedComponent) {
}
return (
<div>
{
user_phone_binded === undefined?
""
:
<Trialapplication {...this.state} user_phone_binded={user_phone_binded} setTrialapplication = {this.setTrialapplication} ></Trialapplication>
{/*{*/}
{/* user_phone_binded === undefined?*/}
{/* ""*/}
{/* :*/}
{/* <Trialapplication {...this.state} user_phone_binded={user_phone_binded} setTrialapplication = {this.setTrialapplication} ></Trialapplication>*/}
}
{/*}*/}
<SiderBar
Headertop={Headertop}

Loading…
Cancel
Save