dev_forum
杨树明 5 years ago
parent 9f75a9780c
commit 20c2dda047

@ -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({

@ -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

@ -792,9 +792,7 @@ submittojoinclass=(value)=>{
<div className="edu-menu-list" style={{top: '60px',width:"240px"}}>
<div className="overPart"></div>
<ul className="fl with50 edu-txt-center pr ul-leftline">
{console.log(this.props)}
{console.log(this.state)}
<li><Link to={"/courses/new"}>新建课堂</Link></li>
{this.props.current_user&&this.props.current_user.user_identity==="学生"?"":<li><Link to={"/courses/new"}>新建课堂</Link></li>}
<li><a href="/shixuns/new">新建实训</a></li>
<li><a href={this.props.Headertop===undefined?"":"/paths/new"}>新建实践课程</a></li>
<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.new_project_url} target="_blank">新建项目</a></li>

@ -169,7 +169,7 @@ class SearchPage extends Component{
return (
<a key={key}
href={
item.type==="shixun"?`/shixuns/${item.identifier}/challenges`:item.type==="course"?`/courses/${item.id}/students`:item.type==="subject"?`/courses/${item.id}/students`:item.type==="memo"?`/forums/${item.id}`:""
item.type==="shixun"?`/shixuns/${item.identifier}/challenges`:item.type==="course"?`/courses/${item.id}/students`:item.type==="subject"?`/paths/${item.id}`:item.type==="memo"?`/forums/${item.id}`:""
}
target="_blank"
>

Loading…
Cancel
Save