From 0e8eb1aaf3b5f09bb7a6d46ac70b7fe1f43ea9ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 23 Jul 2019 16:04:54 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/App.js | 9 +- public/react/src/AppConfig.js | 6 +- .../courses/coursesPublic/Addcourses.js | 20 ++++- public/react/src/modules/login/LoginDialog.js | 17 +++- public/react/src/modules/tpm/NewHeader.js | 86 +++++++++++++++++-- 5 files changed, 121 insertions(+), 17 deletions(-) diff --git a/public/react/src/App.js b/public/react/src/App.js index db6b6f43b..d178a3565 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -258,7 +258,12 @@ class App extends Component { // //TODO 这里如果样式变了会出现css不加载的情况 // }); } - + //修改登录方法 + Modifyloginvalue=()=>{ + this.setState({ + isRender:false, + }) + } render() { @@ -268,7 +273,7 @@ class App extends Component { - + this.Modifyloginvalue()}> diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 5721c88a9..81dd855ea 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -18,9 +18,9 @@ function locationurl(list){ } // TODO 开发期多个身份切换 -const debugType ="" -// window.location.search.indexOf('debug=t') != -1 ? 'teacher' : -// window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' +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) { diff --git a/public/react/src/modules/courses/coursesPublic/Addcourses.js b/public/react/src/modules/courses/coursesPublic/Addcourses.js index 886ba2a0e..39f2ac061 100644 --- a/public/react/src/modules/courses/coursesPublic/Addcourses.js +++ b/public/react/src/modules/courses/coursesPublic/Addcourses.js @@ -49,10 +49,22 @@ class Addcourses extends Component{ }) } - + openNotification = (messge) => { + notification.open({ + message: "提示", + description: + messge, + onClick: () => { + console.log('Notification Clicked!'); + }, + }); + }; inputjoinclassvalue=(e)=>{ - + if(e.target.value.length>=7){ + this.openNotification("只能输入小于7位数的邀请码!"); + return + } this.setState({ invite_code:e.target.value }) @@ -187,7 +199,9 @@ class Addcourses extends Component{ student:student } ).then((response) => { - + if(response === undefined){ + return + } if(response.data.status===0){ // course_id: 1545 // message: "成功" diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 54fe17b9f..c6820d68f 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -329,6 +329,11 @@ class LoginDialog extends Component { this.setState({ isRender: false }) + try { + this.props.Modifyloginvalue(); + }catch (e) { + + } } loginEDU=()=>{ @@ -370,11 +375,16 @@ class LoginDialog extends Component { window.location.reload(); } } + try { + this.props.Modifyloginvalue(); + }catch (e) { + } }).catch((error) => { console.log("356"); console.log(error) }) + } onKeydowns=(e)=>{ let {disabled}=this.state; @@ -383,6 +393,9 @@ class LoginDialog extends Component { console.log(1) } } + getloginurl=(url)=>{ + window.location.href = url; + } render() { let{open,login,speedy,loginValue,regular,isGoing,isGoingValue,disabled,bottonclass, dialogBox,shortcutnum,disabledType,gaincode,authCodeType,authCodeclass, isRender}=this.state; @@ -475,8 +488,8 @@ class LoginDialog extends Component { - 忘记密码 - 注册 + this.getloginurl("/changepassword")} className="mr3 color-grey-9">忘记密码 + this.getloginurl("/register")} className="color-grey-9">注册

diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 2455b0be4..9bc6d2c42 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -12,7 +12,7 @@ import { getImageUrl, toPath } from 'educoder' import axios from 'axios'; -import { Modal,Checkbox ,Radio,Input,message } from 'antd'; +import { Modal,Checkbox ,Radio,Input,message,notification } from 'antd'; import Addcourses from '../courses/coursesPublic/Addcourses'; @@ -113,6 +113,16 @@ class NewHeader extends Component { // // } } + openNotification = (messge) => { + notification.open({ + message: "提示", + description: + messge, + onClick: () => { + console.log('Notification Clicked!'); + }, + }); + }; componentWillReceiveProps(newProps, oldProps) { this.setState({ user:newProps.user @@ -158,12 +168,38 @@ class NewHeader extends Component { } tojoinclass=()=>{ + let{user} =this.state; + if(user===undefined){ + this.setState({ + isRender:true + }) + return + } + if(user&&user.login===""){ + this.setState({ + isRender:true + }) + return; + } this.setState({ Addcoursestypes:true, }) } tojoinitem=()=>{ + let{user} =this.state; + if(user===undefined){ + this.setState({ + isRender:true + }) + return + } + if(user&&user.login===""){ + this.setState({ + isRender:true + }) + return; + } this.setState({ tojoinitemtype:true }) @@ -235,7 +271,7 @@ class NewHeader extends Component { }) } educoderlogin=()=>{ - //退出账号 + //登录账号 this.setState({ isRender:true }) @@ -440,6 +476,11 @@ submittojoinclass=(value)=>{ } inputjoinclassvalue=(e)=>{ + console.log(e.target.value.length); + if(e.target.value.length>=7){ + this.openNotification("只能输入小于7位数的邀请码!"); + return + } this.setState({ tojoinclasstitle:e.target.value }) @@ -483,6 +524,35 @@ submittojoinclass=(value)=>{ } ) } + //头部获取是否已经登录了 + getUser=(url)=>{ + console.log("点击了503") + console.log(url); + let{user} =this.state; + if(user===undefined){ + this.setState({ + isRender:true + }) + return + } + if(user&&user.login===""){ + this.setState({ + isRender:true + }) + return; + } + if(url !== undefined || url!==""){ + window.location.href = url; + } + } + + //修改登录方法 + Modifyloginvalue=()=>{ + this.setState({ + isRender:false, + }) + } + render() { const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。 const {match ,} = this.props; @@ -529,12 +599,12 @@ submittojoinclass=(value)=>{ // rolearr:["",""], // console.log("618"); // console.log(user_phone_binded); - return (
{isRender===true?this.Modifyloginvalue()} {...this.state} {...this.props} />:""} @@ -705,10 +775,12 @@ submittojoinclass=(value)=>{
    From cf9c4cad858baf6bbfed64dadba11b30eb0c1db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 23 Jul 2019 17:20:45 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 8 +++--- .../courses/coursesPublic/Addcourses.js | 2 +- public/react/src/modules/login/LoginDialog.js | 2 +- public/react/src/modules/tpm/NewHeader.js | 26 +++++++++---------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 81dd855ea..467520507 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -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 diff --git a/public/react/src/modules/courses/coursesPublic/Addcourses.js b/public/react/src/modules/courses/coursesPublic/Addcourses.js index 39f2ac061..ab0a9eb56 100644 --- a/public/react/src/modules/courses/coursesPublic/Addcourses.js +++ b/public/react/src/modules/courses/coursesPublic/Addcourses.js @@ -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({ diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index c6820d68f..7629eeef2 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -416,7 +416,7 @@ class LoginDialog extends Component {
-
+
  • {this.enter(0)}}>登录
  • {/*
  • {this.register(0)}}>快捷登录
  • */} diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 9bc6d2c42..f8b0fc595 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -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)=>{ + placeholder="请输入6位项目邀请码" value={tojoinclasstitle} onInput={this.inputjoinclassvalue}/>

    请输入5位项目邀请码或6位分班邀请码

    + style={{marginLeft: '90px',display:code_notice===true?'block':"none"}}>请输入6位项目邀请码

  • From 3197b15e263c0422abadb0d5b27857b22b0336e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 23 Jul 2019 17:47:51 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/NewHeader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index f8b0fc595..01a5a6a05 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -477,7 +477,7 @@ submittojoinclass=(value)=>{ inputjoinclassvalue=(e)=>{ console.log(e.target.value.length); - if(e.target.value.length>=7||e.target.value.length<6){ + if(e.target.value.length>=7){ this.openNotification("请输入6位项目邀请码!"); return } From 955669b2a053c24ebac68e657bb3f388d8501187 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 23 Jul 2019 17:55:49 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E8=80=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/subjects/show.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/subjects/show.json.jbuilder b/app/views/subjects/show.json.jbuilder index cafb08942..25c2962cc 100644 --- a/app/views/subjects/show.json.jbuilder +++ b/app/views/subjects/show.json.jbuilder @@ -10,7 +10,7 @@ json.publish_status publish_status(@subject, @is_creator, @user, @shixuns) json.allow_statistics @user.manager_of_subject?(@subject) json.allow_send @user.logged? json.allow_visit @user.manager_of_subject?(@subject) || @user.admin? || @subject.status > 1 -json.allow_add_member @user.admin? +json.allow_add_member @user.manager_of_subject?(@subject) json.members @members do |member| json.partial! 'subject_member', locals: { user: member.user } From a9823999a16a3e0b8168feccf7d807cd28123009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 23 Jul 2019 18:03:41 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 8 ++++---- public/react/src/modules/tpm/NewHeader.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 5721c88a9..fe026f053 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -18,10 +18,10 @@ function locationurl(list){ } // TODO 开发期多个身份切换 -const debugType ="" -// window.location.search.indexOf('debug=t') != -1 ? 'teacher' : -// window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' -// window._debugType = 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 diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 01a5a6a05..354452d3f 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -438,7 +438,7 @@ submittojoinclass=(value)=>{ } if(value===1){ - let url="/applied_project/applied_project_info.json" + let url="/api/applied_project/applied_project_info.json" const form = new FormData(); form.append('invite_code', tojoinclasstitle); form.append('member', RadioGroupvalue); From 75e64b2d68e9ab4cdb2cb0211f55fb6c8021e7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 23 Jul 2019 18:04:37 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/NewHeader.js | 468 +++++++++++----------- 1 file changed, 234 insertions(+), 234 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 01a5a6a05..0b4f42faa 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -62,9 +62,9 @@ class NewHeader extends Component { RadioGroupvalue:undefined, submitapplications:false, isRender:false, - showSearchOpentype:false, + showSearchOpentype:false, showTrial:false, - setevaluatinghides:false + setevaluatinghides:false } // console.log("176") // console.log(props); @@ -152,7 +152,7 @@ class NewHeader extends Component { const url = `/accounts/logout.json` this.delCookie("autologin_trustie") axios.get(url, { - }) + }) .then((response) => { if(response.data.status===1){ this.setState({ @@ -331,136 +331,136 @@ class NewHeader extends Component { }) } -submittojoinclass=(value)=>{ - let {tojoinclasstitle,rolearr,RadioGroupvalue}=this.state; + submittojoinclass=(value)=>{ + let {tojoinclasstitle,rolearr,RadioGroupvalue}=this.state; - if(tojoinclasstitle===undefined){ - this.setState({ - code_notice:true - }) - return - } - let newrolearr=rolearr; - // if(value===1){ + if(tojoinclasstitle===undefined){ + this.setState({ + code_notice:true + }) + return + } + let newrolearr=rolearr; + // 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 - // } - // } - if(tojoinclasstitle===""||tojoinclasstitle===undefined){ - this.setState({ - code_notice:true - }) - return - }else{ - this.setState({ - code_notice:false - }) - } - - let pamst=[]; - let num=0; - for(var i = 0 ; i { - if( response.data.state===0){ - this.submitstatevalue(0,"加入成功",response.data.course_id) - }else if( response.data.state===1){ - }else if( response.data.state===2){ - this.submitstatevalue( 0,"课堂已过期! 请联系课堂管理员重启课堂。(在配置课堂处)") - }else if( response.data.state===3){ - this.submitstatevalue( 0,"您已是课堂成员)",response.data.course_id) - }else if( response.data.state===4){ - this.submitstatevalue( 0,"您输入的邀请码错误)") - }else if( response.data.state===5){ - this.submitstatevalue( 0,"您还未登录") - }else if( response.data.state===6){ - this.submitstatevalue( 0,"申请已提交,请等待审核") - }else if( response.data.state===7){ - this.submitstatevalue( 0," 您已经发送过申请了,请耐心等待") - }else if( response.data.state===8){ - this.submitstatevalue( 0,"您已经是该课堂的教师了",response.data.course_id) - }else if( response.data.state==9){ - this.submitstatevalue( 0,"您已经是该课堂的教辅了",response.data.course_id) - }else if( response.data.state==10){ - this.submitstatevalue(0,"您已经是该课堂的管理员了",response.data.course_id) - }else if( response.data.state==11){ - this.submitstatevalue(0," 该课堂已归档,请联系老师") - }else if( response.data.state==12){ - this.submitstatevalue(0,"您已经发送过申请了,请耐心等待师") - }else if( response.data.state==13){ - this.submitstatevalue(0,"您申请已提交,请等待审核") - }else if( response.data.state==14){ - this.submitstatevalue("此邀请码已停用,请与老师联系") - }else if( response.data.state==15){ - this.submitstatevalue(0,"您已是课堂成员! 加入分班请在课堂具体分班页面进行") - }else { - this.submitstatevalue(0," 未知错误,请稍后再试") - } - }) + if(value===1&&RadioGroupvalue===undefined){ + this.setState({ + checked_notice:true + }) + return + } - } + if(value===0){ + let url="/courses/join_course_multi_role.json" + const form = new FormData(); + form.append('invite_code', tojoinclasstitle); + form.append('role', pamst); + form.append('type', 1); + axios.post(url,form,[true] + ).then((response) => { + if( response.data.state===0){ + this.submitstatevalue(0,"加入成功",response.data.course_id) + }else if( response.data.state===1){ + }else if( response.data.state===2){ + this.submitstatevalue( 0,"课堂已过期! 请联系课堂管理员重启课堂。(在配置课堂处)") + }else if( response.data.state===3){ + this.submitstatevalue( 0,"您已是课堂成员)",response.data.course_id) + }else if( response.data.state===4){ + this.submitstatevalue( 0,"您输入的邀请码错误)") + }else if( response.data.state===5){ + this.submitstatevalue( 0,"您还未登录") + }else if( response.data.state===6){ + this.submitstatevalue( 0,"申请已提交,请等待审核") + }else if( response.data.state===7){ + this.submitstatevalue( 0," 您已经发送过申请了,请耐心等待") + }else if( response.data.state===8){ + this.submitstatevalue( 0,"您已经是该课堂的教师了",response.data.course_id) + }else if( response.data.state==9){ + this.submitstatevalue( 0,"您已经是该课堂的教辅了",response.data.course_id) + }else if( response.data.state==10){ + this.submitstatevalue(0,"您已经是该课堂的管理员了",response.data.course_id) + }else if( response.data.state==11){ + this.submitstatevalue(0," 该课堂已归档,请联系老师") + }else if( response.data.state==12){ + this.submitstatevalue(0,"您已经发送过申请了,请耐心等待师") + }else if( response.data.state==13){ + this.submitstatevalue(0,"您申请已提交,请等待审核") + }else if( response.data.state==14){ + this.submitstatevalue("此邀请码已停用,请与老师联系") + }else if( response.data.state==15){ + this.submitstatevalue(0,"您已是课堂成员! 加入分班请在课堂具体分班页面进行") + }else { + this.submitstatevalue(0," 未知错误,请稍后再试") + } + }) - if(value===1){ - let url="/applied_project/applied_project_info.json" - const form = new FormData(); - form.append('invite_code', tojoinclasstitle); - form.append('member', RadioGroupvalue); - form.append('type', 1); - axios.post(url,form,[true] - ).then((response) => { - if( response.data.status===1){ - this.submitstatevalue(1,"您输入的邀请码错误") - }else if( response.data.status===2){ - this.submitstatevalue( 1,"您已经是该项目成员",response.data.project) - }else if( response.data.status===3){ - this.submitstatevalue( 1,"请选择一个角色") - }else if( response.data.status===4){ - this.submitstatevalue( 1,"您的申请已提交,请等待项目管理员审批") - }else if( response.data.status===5){ - this.submitstatevalue( 1,"您已经申请加入该项目了,请耐心等待") - }else if( response.data.status===6){ - this.submitstatevalue( 1,"您已成功加入项目",response.data.project) - } - }) + } + + if(value===1){ + let url="/api/applied_project/applied_project_info.json" + const form = new FormData(); + form.append('invite_code', tojoinclasstitle); + form.append('member', RadioGroupvalue); + form.append('type', 1); + axios.post(url,form,[true] + ).then((response) => { + if( response.data.status===1){ + this.submitstatevalue(1,"您输入的邀请码错误") + }else if( response.data.status===2){ + this.submitstatevalue( 1,"您已经是该项目成员",response.data.project) + }else if( response.data.status===3){ + this.submitstatevalue( 1,"请选择一个角色") + }else if( response.data.status===4){ + this.submitstatevalue( 1,"您的申请已提交,请等待项目管理员审批") + }else if( response.data.status===5){ + this.submitstatevalue( 1,"您已经申请加入该项目了,请耐心等待") + }else if( response.data.status===6){ + this.submitstatevalue( 1,"您已成功加入项目",response.data.project) + } + }) + } } -} // trialapplications =()=>{ // console.log("点击了") @@ -486,54 +486,54 @@ submittojoinclass=(value)=>{ }) } - showSearchOpen=(e)=>{ - this.setState({ - showSearchOpentype:true - }) - e.stopPropagation(e);//阻止冒泡 - } - - hideshowSearchOpen=(e)=>{ - let {setevaluatinghides}=this.state; - if(setevaluatinghides===true){ - this.setState({ - showSearchOpentype:false, - setevaluatinghides:false - }) - e.stopPropagation(e);//阻止冒泡 - } - } - - onKeywordSearchKeyDown = (value) => { - let url=`/search?value=${value}`; - this.props.history.push(url) - } - - onKeywordSearchKeyDowns=()=>{ - this.setState( - { - setevaluatinghides:false - } - ) - } - - setevaluatinghides=()=>{ - this.setState( - { - setevaluatinghides:true - } - ) - } - //头部获取是否已经登录了 - getUser=(url)=>{ + showSearchOpen=(e)=>{ + this.setState({ + showSearchOpentype:true + }) + e.stopPropagation(e);//阻止冒泡 + } + + hideshowSearchOpen=(e)=>{ + let {setevaluatinghides}=this.state; + if(setevaluatinghides===true){ + this.setState({ + showSearchOpentype:false, + setevaluatinghides:false + }) + e.stopPropagation(e);//阻止冒泡 + } + } + + onKeywordSearchKeyDown = (value) => { + let url=`/search?value=${value}`; + this.props.history.push(url) + } + + onKeywordSearchKeyDowns=()=>{ + this.setState( + { + setevaluatinghides:false + } + ) + } + + setevaluatinghides=()=>{ + this.setState( + { + setevaluatinghides:true + } + ) + } + //头部获取是否已经登录了 + getUser=(url)=>{ console.log("点击了503") console.log(url); let{user} =this.state; if(user===undefined){ - this.setState({ - isRender:true - }) - return + this.setState({ + isRender:true + }) + return } if(user&&user.login===""){ this.setState({ @@ -572,7 +572,7 @@ submittojoinclass=(value)=>{ submitapplicationsvalue, user, isRender, - showSearchOpentype, + showSearchOpentype, }=this.state; /* 用户名称 用户头像url @@ -603,13 +603,13 @@ submittojoinclass=(value)=>{
    - {isRender===true?this.Modifyloginvalue()} - {...this.state} - {...this.props} - />:""} + {isRender===true?this.Modifyloginvalue()} + {...this.state} + {...this.props} + />:""} -
    +
    {/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} 高校智能化教学与实训平台 @@ -654,15 +654,15 @@ submittojoinclass=(value)=>{
  • - {/*
  • 教学案例
  • */} + {/*
  • 教学案例
  • */}
  • - 在线竞赛 - + 在线竞赛 +
  • -
  • 教学案例
  • -
  • 众包创新
  • +
  • 教学案例
  • +
  • 众包创新
  • 交流问答
  • {
-