diff --git a/public/react/src/App.js b/public/react/src/App.js index 293d1baca..b7658450a 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -333,7 +333,13 @@ class App extends Component { {/*实训课程(原实训路径)*/} - + + () + } + > + {/*课堂*/} diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index f3442b8b7..e126027ec 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -40,6 +40,8 @@ class CoursesNew extends Component { } componentDidMount() { + + let coursesId = this.props.match.params.coursesId; let user_school=this.props.current_user&&this.props.current_user.user_school; @@ -85,7 +87,13 @@ class CoursesNew extends Component { this.Searchvalue("") } - + componentDidUpdate(prevProps){ + if(prevProps.current_user!=this.props.current_user){ + if(this.props.current_user.user_identity==="学生"){ + window.location.href ="/403" + } + } + } onChangeTimepublishs = (date, dateString) => { if(dateString===""){ this.setState({ diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index a5f0529e0..f3f4ceadf 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -7,7 +7,7 @@ import Dialog, { DialogContentText, DialogTitle, } from 'material-ui/Dialog'; - +import {notification } from 'antd'; import axios from 'axios'; @@ -349,7 +349,12 @@ class LoginDialog extends Component { if(response.status===200){ if (response.data.status === 402) { window.location.href = response.data.url; - }else{ + }else if (response.data.status === -2) { + notification.open({ + message: '提示', + description:response.data.message, + }); + }else{ broadcastChannelPostMessage('refreshPage') this.setState({ isRender:false diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 3ea3c493c..10a6ec054 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -384,7 +384,7 @@ class NewHeader extends Component { } onKeywordSearchKeyDown = (e) => { - window.location.href ="/search"+"?value="+e.target.value; + window.location.href ="/search?value="+e.target.value; // let code = e.keyCode; // if(code == 13) { @@ -709,6 +709,7 @@ submittojoinclass=(value)=>{ console.log(value)} + onPressEnter={this.onKeywordSearchKeyDown} style={{ width: 258 }} /> @@ -791,7 +792,7 @@ submittojoinclass=(value)=>{