dev_forum
杨树林 5 years ago
parent 0e8eb1aaf3
commit cf9c4cad85

@ -18,10 +18,10 @@ function locationurl(list){
}
// TODO 开发期多个身份切换
const debugType ="";
// const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
// window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin'
// window._debugType = debugType;
// const debugType ="";
const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin'
window._debugType = debugType;
export function initAxiosInterceptors(props) {
// TODO 避免重复的请求 https://github.com/axios/axios#cancellation

@ -62,7 +62,7 @@ class Addcourses extends Component{
inputjoinclassvalue=(e)=>{
if(e.target.value.length>=7){
this.openNotification("只能输入小于7位数的邀请码!");
this.openNotification("请输入5位课堂邀请码或6位分班邀请码!");
return
}
this.setState({

@ -341,21 +341,21 @@ submittojoinclass=(value)=>{
return
}
let newrolearr=rolearr;
if(value===1){
// if(value===1){
if(tojoinclasstitle.length<6){
this.setState({
code_notice:true
})
return
}
}else if(value===0){
if(tojoinclasstitle.length<5){
this.setState({
code_notice:true
})
return
}
}
// }else if(value===0){
// if(tojoinclasstitle.length<5){
// this.setState({
// code_notice:true
// })
// return
// }
// }
if(tojoinclasstitle===""||tojoinclasstitle===undefined){
this.setState({
code_notice:true
@ -477,8 +477,8 @@ submittojoinclass=(value)=>{
inputjoinclassvalue=(e)=>{
console.log(e.target.value.length);
if(e.target.value.length>=7){
this.openNotification("只能输入小于7位数的邀请码!");
if(e.target.value.length>=7||e.target.value.length<6){
this.openNotification("请输入6位项目邀请码!");
return
}
this.setState({
@ -811,12 +811,12 @@ submittojoinclass=(value)=>{
<label className="panel-form-label fl">项目邀请码</label>
<Input type="text" className="input-60-40 fl mt5" name="invite_code"
style={{width: '275px'}}
placeholder="请输入5位项目邀请码或6位分班邀请码" value={tojoinclasstitle} onInput={this.inputjoinclassvalue}/>
placeholder="请输入6位项目邀请码" value={tojoinclasstitle} onInput={this.inputjoinclassvalue}/>
</li>
<p id="none_invite_code_notice"
className="color-orange none f12"
style={{marginLeft: '90px',display:code_notice===true?'block':"none"}}>请输入5位项目邀请码或6位分班邀请码</p>
style={{marginLeft: '90px',display:code_notice===true?'block':"none"}}>请输入6位项目邀请码</p>
<li className="clearfix ">

Loading…
Cancel
Save