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

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

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

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

Loading…
Cancel
Save