caishi 6 years ago
commit 9578650e47

@ -241,6 +241,7 @@ class App extends Component {
render() { render() {
// let {isRenders} = this.state; // let {isRenders} = this.state;
return ( return (
<LocaleProvider locale={zhCN}> <LocaleProvider locale={zhCN}>
@ -254,7 +255,7 @@ class App extends Component {
{/*{*/} {/*{*/}
{/* isRenders === true?*/} {/* isRenders === true?*/}
<Trialapplication></Trialapplication> {/*<Trialapplication></Trialapplication>*/}
{/*:""*/} {/*:""*/}
{/*}*/} {/*}*/}

@ -421,7 +421,7 @@ class CommonWorkSetting extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:starttime, starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime:endtime, endtime:endtime,
Cancelname:"暂不发布", Cancelname:"暂不发布",
Savesname:"立即发布", Savesname:"立即发布",

@ -86,7 +86,7 @@ class Associationmodel extends Component{
ModalSave:this.goback, ModalSave:this.goback,
loadtype:true loadtype:true
}) })
this.props.funlist()
} }
} }

@ -213,7 +213,7 @@ class Exercise extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+this.props.getNowFormatDates(1), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
endtime:"截止时间:"+this.props.getNowFormatDates(2), endtime:"截止时间:"+this.props.getNowFormatDates(2),
Cancelname:"暂不发布", Cancelname:"暂不发布",

@ -65,6 +65,7 @@ class GraduateTaskItem extends Component{
cardsModalsavetype:this.cannerassocition, cardsModalsavetype:this.cannerassocition,
loadtype:true loadtype:true
}) })
this.props.funlist()
} }
}).catch((error)=>{ }).catch((error)=>{

@ -415,7 +415,7 @@ class GraduationTaskssettingapp extends Component{
Topval:"发布设置均可修改", Topval:"发布设置均可修改",
Botvalleft:"点击修改", Botvalleft:"点击修改",
Botval:"此设置将对所有分班生效", Botval:"此设置将对所有分班生效",
starttime:moment(moment(handleDateString(this.props.getNowFormatDates(1)))).format("YYYY-MM-DD HH:mm") , starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") ,
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
typs:"start", typs:"start",
endtime:endtime, endtime:endtime,
@ -1164,7 +1164,7 @@ class GraduationTaskssettingapp extends Component{
<div className={"h20 mb30 ml30"} > <div className={"h20 mb30 ml30"} >
<span>截止时间</span> <span>截止时间</span>
<Tooltip placement="bottom" title={this.props.isAdmin()===true?endtimetype===true?"时间已过,不能再修改":"":""}> <Tooltip placement="bottom" title={this.props.isSuperAdmin()===true?"":this.props.isAdmin()===true?endtimetype===true?"时间已过,不能再修改":"":""}>
<span> <span>
<DatePicker <DatePicker
showToday={false} showToday={false}
@ -1301,8 +1301,10 @@ class GraduationTaskssettingapp extends Component{
<RadioGroup onChange={this.funcommentstatus} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true} value={crosscomment===false?undefined:commentstatus===0?2:commentstatus===2?2:commentstatus===4?4:undefined}> <RadioGroup onChange={this.funcommentstatus} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true} value={crosscomment===false?undefined:commentstatus===0?2:commentstatus===2?2:commentstatus===4?4:undefined}>
<Radio style={radioStyle} value={2}>指导老师手动分配 <span className={"font-14 color-grey-c ml10"}>由指导老师在作品列表中手动选择每个作品被分配的评阅老师</span></Radio> <Radio style={radioStyle} value={2}>指导老师手动分配 <span className={"font-14 color-grey-c ml10"}>由指导老师在作品列表中手动选择每个作品被分配的评阅老师</span></Radio>
<Radio style={radioStyle} value={4}>答辩组间老师互评 <span className={"font-14 color-grey-c ml10"}>由系统按照设置在答辩组之间自动分配:<Link to={"/courses/"+courseId+"/teachers"}> <Radio style={radioStyle} value={4}>答辩组间老师互评 <span className={"font-14 color-grey-c ml10"}>由系统按照设置在答辩组之间自动分配:
<span className={"color-blue"}>答辩组设置</span></Link></span></Radio> <a href={"/courses/"+courseId+"/teachers"} target="_blank">
<span className={"color-blue"}>答辩组设置</span></a>
</span></Radio>
</RadioGroup> </RadioGroup>
</span> </span>

@ -332,7 +332,7 @@ class GraduationTaskssettinglist extends Component{
Topval:"发布设置均可修改", Topval:"发布设置均可修改",
Botvalleft:"点击修改", Botvalleft:"点击修改",
Botval:"此设置将对所有分班生效", Botval:"此设置将对所有分班生效",
starttime:moment(new Date()).format('YYYY-MM-DD 00:00'), starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") ,
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
typs:"start", typs:"start",
endtime:endtime, endtime:endtime,
@ -544,6 +544,7 @@ class GraduationTaskssettinglist extends Component{
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
if(result.data.status===0){ if(result.data.status===0){
this.searchValue()
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
Modalstopval:result.data.message, Modalstopval:result.data.message,
@ -730,7 +731,7 @@ class GraduationTaskssettinglist extends Component{
其它历史评分将全部失效</pre>:""}> 其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} > {tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
tag.name {tag.name}
</a> </a>
: :
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}} <a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
@ -863,7 +864,7 @@ class GraduationTaskssettinglist extends Component{
其它历史评分将全部失效</pre>:""}> 其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} > {tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
tag.name {tag.name}
</a> </a>
: :
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}} <a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
@ -1012,7 +1013,8 @@ class GraduationTaskssettinglist extends Component{
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/> <Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
其它历史评分将全部失效</pre>:""}> 其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} > {tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
tag.name</a> {tag.name}
</a>
: :
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}} <a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""} onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}
@ -1145,7 +1147,7 @@ class GraduationTaskssettinglist extends Component{
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/> <Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
其它历史评分将全部失效</pre>:""}> 其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} > {tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
tag.name {tag.name}
</a> </a>
: :
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}} <a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
@ -1256,6 +1258,7 @@ class GraduationTaskssettinglist extends Component{
visible={visibles} visible={visibles}
Cancel={this.Cancel} Cancel={this.Cancel}
taskid={taskslistdata&&taskslistdata.task_id} taskid={taskslistdata&&taskslistdata.task_id}
funlist={this.searchValue()}
/>:""} />:""}
{taskslistdata&&taskslistdata? {taskslistdata&&taskslistdata?
@ -1551,12 +1554,13 @@ class GraduationTaskssettinglist extends Component{
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link> to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link>
{taskslistdata.work_status===undefined?"":taskslistdata.work_status.map((item,key)=>{ {taskslistdata.work_status===undefined||taskslistdata.work_status===null||taskslistdata.work_status.length===0?"":taskslistdata.work_status.map((item,key)=>{
return( return(
<span key={key}> <span key={key}>
{item==="提交作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>提交作品</a>:""} {item==="提交作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>提交作品</a>:""}
{item==="修改作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/edit"}>修改作品</a>:""} {item==="补交作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>补交作品</a>:""}
{item==="查看作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/edit"}>查看作品</a> :""} {item==="修改作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+taskslistdata.work_id+"/works/edit"}>修改作品</a>:""}
{item==="查看作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+taskslistdata.work_id+"/works/edit"}>查看作品</a> :""}
{item==="创建项目"?<a className={"fr color-blue font-16"} href={'/projects/new'}>创建项目</a>:""} {item==="创建项目"?<a className={"fr color-blue font-16"} href={'/projects/new'}>创建项目</a>:""}
{item==="关联项目"?<a className={"fr color-blue font-16"} onClick={this.AssociationItems}>关联项目</a>:""} {item==="关联项目"?<a className={"fr color-blue font-16"} onClick={this.AssociationItems}>关联项目</a>:""}
{item==="取消关联"?<a className={"fr color-blue font-16"} onClick={this.cannelAssociation}>取消关联</a>:""} {item==="取消关联"?<a className={"fr color-blue font-16"} onClick={this.cannelAssociation}>取消关联</a>:""}

@ -81,7 +81,7 @@ class GraduationTasksquestions extends Component{
Topval:"发布设置均可修改", Topval:"发布设置均可修改",
Botvalleft:"点击修改", Botvalleft:"点击修改",
Botval:"此设置将对所有分班生效", Botval:"此设置将对所有分班生效",
starttime:moment(new Date()).format('YYYY-MM-DD 00:00'), starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") ,
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
typs:"start", typs:"start",
endtime:endtime, endtime:endtime,

@ -413,7 +413,7 @@ class GraduationTasks extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+starttime, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
typs:"start", typs:"start",
endtime:"截止时间:"+endtime, endtime:"截止时间:"+endtime,

@ -355,7 +355,7 @@ class Poll extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+this.props.getNowFormatDates(1), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
endtime:"截止时间:"+this.props.getNowFormatDates(2), endtime:"截止时间:"+this.props.getNowFormatDates(2),
Cancelname:"暂不发布", Cancelname:"暂不发布",

@ -81,7 +81,7 @@ class Immediatelypublish extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+this.props.getNowFormatDates(1), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
endtime:"截止时间:"+this.props.getNowFormatDates(2), endtime:"截止时间:"+this.props.getNowFormatDates(2),
Cancelname:"暂不发布", Cancelname:"暂不发布",
@ -120,7 +120,7 @@ class Immediatelypublish extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+this.props.getNowFormatDates(1), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
endtime:"截止时间:"+this.props.getNowFormatDates(2), endtime:"截止时间:"+this.props.getNowFormatDates(2),
Cancelname:"暂不发布", Cancelname:"暂不发布",

@ -821,7 +821,7 @@ class Listofworks extends Component {
Topval: "本操作只对“未发布”的对象生效", Topval: "本操作只对“未发布”的对象生效",
Botvalleft: "暂不发布", Botvalleft: "暂不发布",
Botval: "则通过后续手动设置,定时发布", Botval: "则通过后续手动设置,定时发布",
starttime: "发布时间:" + starttime, starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime: "截止时间:" + endtime, endtime: "截止时间:" + endtime,
starttimes:starttime, starttimes:starttime,
typs:"start", typs:"start",

@ -304,7 +304,7 @@ class ShixunStudentWork extends Component {
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+starttime, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime:"截止时间:"+endtime, endtime:"截止时间:"+endtime,
Cancelname:"暂不发布", Cancelname:"暂不发布",
Savesname:"立即发布", Savesname:"立即发布",

@ -1237,7 +1237,7 @@ class Trainingjobsetting extends Component {
Topval: "本操作只对“未发布”的对象生效", Topval: "本操作只对“未发布”的对象生效",
Botvalleft: "暂不发布", Botvalleft: "暂不发布",
Botval: "则通过后续手动设置,定时发布", Botval: "则通过后续手动设置,定时发布",
starttime: "发布时间:" + starttime, starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:starttime, starttimes:starttime,
typs:"start", typs:"start",
endtime: "截止时间:" + endtime, endtime: "截止时间:" + endtime,

@ -148,7 +148,7 @@ class Workquestionandanswer extends Component {
Topval: "本操作只对“未发布”的对象生效", Topval: "本操作只对“未发布”的对象生效",
Botvalleft: "暂不发布", Botvalleft: "暂不发布",
Botval: "则通过后续手动设置,定时发布", Botval: "则通过后续手动设置,定时发布",
starttime: "发布时间:" + starttime, starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime: "截止时间:" + endtime, endtime: "截止时间:" + endtime,
Cancelname: "暂不发布", Cancelname: "暂不发布",
Savesname: "立即发布", Savesname: "立即发布",

@ -209,7 +209,7 @@ class ShixunHomework extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+starttime, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:starttime, starttimes:starttime,
endtime:"截止时间:"+endtime, endtime:"截止时间:"+endtime,
Cancelname:"暂不发布", Cancelname:"暂不发布",
@ -403,7 +403,7 @@ class ShixunHomework extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+ starttime, starttime:"发布时间:"+ moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:starttime, starttimes:starttime,
typs:"start", typs:"start",
endtime:"截止时间:"+ endtime, endtime:"截止时间:"+ endtime,

@ -18,24 +18,29 @@ class Trialapplication extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
props:props, props: props,
login: "", login: "",
Phonenumberisnotcocodes:undefined, Phonenumberisnotcocodes: undefined,
codes: "", codes: "",
reason: "", reason: "",
Phonenumberisnotcoreason:undefined, Phonenumberisnotcoreason: undefined,
isRenders:false, isRenders: false,
seconds: 60, seconds: 60,
getverificationcodes: true, getverificationcodes: true,
Phonenumberisnotco: undefined, Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false, Phonenumberisnotcobool: false,
readonlyInput: true, readonlyInput: true,
user_phone_binded: false,
showTrial: false,
} }
// //user_phone_binded 判断是否手机号验证
console.log("Trialapplication"); console.log("Trialapplication");
console.log(props); console.log(props);
} }
Cancel = () => {
this.props.Cancel()
}
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
@ -45,46 +50,50 @@ class Trialapplication extends Component {
// console.log("componentWillReceiveProps"); // console.log("componentWillReceiveProps");
// console.log(nextProps); // console.log(nextProps);
} }
//初始化数据 //初始化数据
componentDidMount() { componentDidMount() {
// console.log("53");
// console.log(this.props.isRenders);
if (this.props.isRenders != undefined) { if (this.props.isRenders != undefined) {
this.setState({ this.setState({
isRenders: this.props.isRenders isRenders: this.props.isRenders
}) })
} }
if (this.props.showTrial != undefined) {
// 判断是否返回主页的参数
this.setState({
showTrial: this.props.showTrial
})
}
axios.interceptors.response.use((response) => { axios.interceptors.response.use((response) => {
if(response!=undefined) if (response != undefined)
if (response&&response.data.status === 407) { if (response && response.data.status === 407) {
this.setState({ this.setState({
isRenders: true isRenders: true
}) })
} }
return response; return response;
}, (error) => { }, (error) => {
// // if (error.response && error.response.data.error === '401 Unauthorized') {
// // this.back_url = window.location.href;
// // this.setState({
// // isRender: true
// // })
// // // TODO 这里如果样式变了会出现css不加载的情况 // // // TODO 这里如果样式变了会出现css不加载的情况
// // const $ = window.$;
// // const isCssLoaded = window.getComputedStyle($('.log_nav li.active')[0], null)
// // .getPropertyValue('border-bottom')
// // == "2px solid rgb(69, 155, 229)"
// // if (!isCssLoaded) {
// // const isPort3007 = window.location.port == 3007;
// // let _url_origin = isPort3007 ? 'http://localhost:3000' : ''
// //
// // $('head').append( $('<link rel="stylesheet" type="text/css" />')
// // .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css`) );
// // $('head').append( $('<link rel="stylesheet" type="text/css" />')
// // .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css`) );
// // }
// // }
// // return Promise.reject(error);
}); });
// console.log("89");
try {
// console.log(this.state.props.user && this.state.props.user.user_phone_binded);
if (this.state.props.user !== undefined) {
this.setState({
user_phone_binded: this.state.props.user.user_phone_binded,
})
}
} catch (e) {
console.log(e);
}
} }
//获取登入 //获取登入
@ -101,7 +110,7 @@ class Trialapplication extends Component {
// console.log(e.target.value); // console.log(e.target.value);
this.setState({ this.setState({
reason: e.target.value, reason: e.target.value,
Phonenumberisnotcoreason:undefined, Phonenumberisnotcoreason: undefined,
}) })
@ -110,7 +119,7 @@ class Trialapplication extends Component {
codesonChange = (e) => { codesonChange = (e) => {
this.setState({ this.setState({
codes: e.target.value, codes: e.target.value,
Phonenumberisnotcocodes:undefined, Phonenumberisnotcocodes: undefined,
}) })
} }
@ -199,47 +208,57 @@ class Trialapplication extends Component {
} }
handleDialogClose() { handleDialogClose() {
if (this.state.showTrial === false) {
this.setState({ this.setState({
isRenders: false isRenders: false
}) })
this.Cancel();
window.location.href = "/"; window.location.href = "/";
} else {
this.setState({
isRenders: false
})
this.Cancel();
}
} }
postregistered = () => { postregistered = () => {
//提交按钮 //提交按钮
debugger
if (this.state.user_phone_binded === false) {
if (this.state.Phonenumberisnotcobool === false) { if (this.state.Phonenumberisnotcobool === false) {
// if (this.state.login.length === 0) { var iphones = "";
// this.setState({ if (this.state.Phonenumberisnotco === undefined || this.state.Phonenumberisnotco === null || this.state.Phonenumberisnotco === "") {
// Phonenumberisnotco: "请输入手机号或邮箱", iphones = "请输入手机号";
// }) } else {
// console.log("postregistered"); iphones = this.state.Phonenumberisnotco;
// console.log("123456"); }
//
// return
// } else {
this.setState({ this.setState({
Phonenumberisnotco: this.state.Phonenumberisnotco, Phonenumberisnotco: iphones,
}) })
// console.log("postregistered");
// console.log("1234567");
//
// }
return; return;
} }
if(this.state.codes.length===0){ if (this.state.codes.length === 0) {
this.setState({ this.setState({
Phonenumberisnotcocodes: "请输入验证码", Phonenumberisnotcocodes: "请输入验证码",
}) })
return; return;
} }
if(this.state.reason.length === 0){
}
if (this.state.reason.length === 0) {
this.setState({ this.setState({
Phonenumberisnotcoreason: "请输入推荐人信息或申请理由", Phonenumberisnotcoreason: "请输入推荐人信息或申请理由",
}) })
return; return;
} }
var thiss = this;
var url = "/users/trial_apply.json"; var url = "/users/trial_apply.json";
axios.post(url, { axios.post(url, {
phone: this.state.login, phone: this.state.login,
@ -249,7 +268,21 @@ class Trialapplication extends Component {
// console.log(result); // console.log(result);
try { try {
// this.onTabChange("1"); // this.onTabChange("1");
thiss.props.showNotification(`试用申请已提交,我们将尽快完成审核`);
if (thiss.state.showTrial === false) {
window.location.href = "/"; window.location.href = "/";
thiss.setState({
isRenders: false
})
thiss.Cancel();
} else {
thiss.setState({
isRenders: false
})
thiss.Cancel();
}
} catch (e) { } catch (e) {
} }
@ -339,13 +372,14 @@ class Trialapplication extends Component {
//执行view //执行view
render() { render() {
let {login, codes, reason, isRenders, Phonenumberisnotco, getverificationcodes,Phonenumberisnotcocodes,Phonenumberisnotcoreason, seconds} = this.state; let {login, codes, reason, isRenders, user_phone_binded, Phonenumberisnotco, getverificationcodes, Phonenumberisnotcocodes, Phonenumberisnotcoreason, seconds} = this.state;
// console.log("Trialapplication22222222"); // console.log("Trialapplication22222222");
// console.log(this.props); // console.log(this.props);
return ( return (
<div> <div>
{ {
isRenders === false?"": isRenders === false ? "" :
<div style={{"border-radius": "15px"}}> <div style={{"border-radius": "15px"}}>
<style> <style>
@ -515,8 +549,22 @@ class Trialapplication extends Component {
}}> }}>
<i className="iconfont icon-shanchudiao"></i> <i className="iconfont icon-shanchudiao"></i>
</div> </div>
<div className={"login_register_content"} style={{"border-radius": "15px","width": "560px"}}> <div className={"login_register_content"} style={{"border-radius": "15px", "width": "560px"}}>
<div className={"login_register_content"} style={{
<div className={"login_register_content"} style={
user_phone_binded === true ?
{
"width": "560px", "height": "304px",
"border-radius": "15px",
"background": " #FFFFff",
"text-align": "center",
// "position": "absolute",
"left": " 0px",
"box-sizing": "border-box",
"padding": "10px",
}
:
{
"width": "560px", "height": "390px", "width": "560px", "height": "390px",
"border-radius": "15px", "border-radius": "15px",
"background": " #FFFFff", "background": " #FFFFff",
@ -524,8 +572,10 @@ class Trialapplication extends Component {
// "position": "absolute", // "position": "absolute",
"left": " 0px", "left": " 0px",
"box-sizing": "border-box", "box-sizing": "border-box",
"padding":"10px", "padding": "10px",
}}> }
}
>
<ul> <ul>
<span style={{ <span style={{
"padding": "20px", "padding": "20px",
@ -544,6 +594,9 @@ class Trialapplication extends Component {
<div> <div>
<span style={{"color": "#4D4D4D"}}>管理员审核批准后即可继续访问网站</span> <span style={{"color": "#4D4D4D"}}>管理员审核批准后即可继续访问网站</span>
</div> </div>
{
user_phone_binded === true ? "" :
<div style={{ <div style={{
"margin-top": "15px", "padding-left": "50px", "margin-top": "15px", "padding-left": "50px",
"padding-right": "50px" "padding-right": "50px"
@ -562,11 +615,15 @@ class Trialapplication extends Component {
: <div className="mt5 mb5" style={{height: "20px"}}></div> : <div className="mt5 mb5" style={{height: "20px"}}></div>
} }
</div> </div>
}
{
user_phone_binded === true ? "" :
<div style={{"display": "flex", "justify-content": "center"}}> <div style={{"display": "flex", "justify-content": "center"}}>
<Input className="fl mr5" name="codes" type="text" autoComplete="off" readonly <Input className="fl mr5" name="codes" type="text" autoComplete="off"
readonly
onfocus="this.removeAttribute('readonly')" style={{ onfocus="this.removeAttribute('readonly')" style={{
"width": "316px", "width": "316px",
"height": "38px", "height": "38px",
@ -591,17 +648,22 @@ class Trialapplication extends Component {
"text-align": "center", "text-align": "center",
"height": "38px", "height": "38px",
}} type="primary" }} type="primary"
onClick={() => this.getverificationcode()} size={"large"}>验证码</Button> onClick={() => this.getverificationcode()}
size={"large"}>验证码</Button>
: :
<Button className="fl ml5 " style={{ <Button className="fl ml5 " style={{
"background": "#4cacff!important", "background": "#4cacff!important",
"width": "120px", "width": "120px",
"text-align": "center", "text-align": "center",
"height": "38px", "height": "38px",
}}type="primary" }} type="primary"
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button> onClick={() => this.getverificationcode()}
size={"large"}>重新发送</Button>
} }
</div> </div>
}
{ {
Phonenumberisnotcocodes && Phonenumberisnotcocodes != "" ? Phonenumberisnotcocodes && Phonenumberisnotcocodes != "" ?
<p className="color-red mt2 mb2" style={{width: " 100%", height: "23px"}}> <p className="color-red mt2 mb2" style={{width: " 100%", height: "23px"}}>
@ -637,6 +699,8 @@ class Trialapplication extends Component {
</div> </div>
</div> </div>
</Dialog> </Dialog>
@ -646,7 +710,6 @@ class Trialapplication extends Component {
</div> </div>
) )

@ -170,6 +170,7 @@ class NewHeader extends Component {
submitapplications:false, submitapplications:false,
isRender:false, isRender:false,
isRenders:false, isRenders:false,
showTrial:false,
user:undefined, user:undefined,
} }
} }
@ -511,13 +512,18 @@ submittojoinclass=(value)=>{
} }
} }
trialapplications =()=>{ // trialapplications =()=>{
this.setState({ // console.log("点击了")
isRenders: true, // this.setState({
}) // isRenders: true,
} // showTrial:true,
// })
// }
// 关闭
cancelModulationModels = () => {
this.setState({isRenders: false})
}
render() { render() {
const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。 const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。
@ -537,8 +543,8 @@ submittojoinclass=(value)=>{
submitapplications, submitapplications,
submitapplicationsvalue, submitapplicationsvalue,
user, user,
isRenders,
isRender, isRender,
isRenders,
}=this.state; }=this.state;
/* /*
用户名称 用户头像url 用户名称 用户头像url
@ -575,14 +581,16 @@ submittojoinclass=(value)=>{
/> />
{/* :""*/} {/* :""*/}
{/*}*/} {/*}*/}
<Trialapplication></Trialapplication>
{ {/*{*/}
isRenders&&isRenders===true? {/* isRenders&&isRenders===true?*/}
<Trialapplication {/* <Trialapplication*/}
{...this.state} {/* {...this.state}*/}
/> {/* Cancel={() => this.cancelModulationModels()}*/}
:"" {/* />*/}
} {/* :""*/}
{/*}*/}
<div className="educontent clearfix"> <div className="educontent clearfix">
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} {/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
@ -713,7 +721,7 @@ submittojoinclass=(value)=>{
<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.my_project_url}>我的项目</a></li> <li><a href={this.props.Headertop===undefined?"":this.props.Headertop.my_project_url}>我的项目</a></li>
<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.account_manager_url}>账号管理</a></li> <li><a href={this.props.Headertop===undefined?"":this.props.Headertop.account_manager_url}>账号管理</a></li>
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/} {/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li> {/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/}
<li className="bor-top-greyE"> <li className="bor-top-greyE">
{/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.logout_url}>退出</a>*/} {/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.logout_url}>退出</a>*/}
{/*<a onClick={()=>this.educoderlogin()}>退出</a>*/} {/*<a onClick={()=>this.educoderlogin()}>退出</a>*/}

Loading…
Cancel
Save