video_transcode
caicai8 5 years ago
parent c6a2837aca
commit bea567ca88

@ -98,12 +98,12 @@ class Boards extends Component{
this.fetchBoards() this.fetchBoards()
this.fetchAll() this.fetchAll()
on('updateNavSuccess', this.updateNavSuccess) // on('updateNavSuccess', this.updateNavSuccess)
} }
componentWillUnmount() { // componentWillUnmount() {
off('updateNavSuccess', this.updateNavSuccess) // off('updateNavSuccess', this.updateNavSuccess)
} // }
updateNavSuccess = () => { updateNavSuccess = () => {
this.fetchBoards() this.fetchBoards()
if (this.props.match.params.boardId == this.state.boardid) { if (this.props.match.params.boardId == this.state.boardid) {
@ -112,7 +112,7 @@ class Boards extends Component{
} }
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
if ( prevProps.match.params.boardId != this.props.match.params.boardId ) { if ( prevProps.match.params.boardId !== this.props.match.params.boardId ) {
this.setState({ this.setState({
isSpin:true isSpin:true
}) })

@ -194,13 +194,11 @@ class Addcourses extends Component{
} }
submittojoinclass=()=>{ submittojoinclass=()=>{
debugger;
let{Addcoursestype}=this.state; let{Addcoursestype}=this.state;
this.setState({ this.setState({
isSpin:true isSpin:true
}) })
let {invite_code,professor,assistant_professor,student}=this.state; let {invite_code,professor,assistant_professor,student}=this.state;
invite_code="MBTAP";
if(invite_code===undefined||invite_code===""){ if(invite_code===undefined||invite_code===""){
this.setState({ this.setState({
invite_codetype:true, invite_codetype:true,

@ -65,7 +65,6 @@ class RepositoryAddFileupload_files extends Component {
fileList = fileList.map(file => { fileList = fileList.map(file => {
if (file.response) { if (file.response) {
if (file.response.status===0) { if (file.response.status===0) {
} }
} }
return file; return file;
@ -76,34 +75,35 @@ class RepositoryAddFileupload_files extends Component {
}; };
onAttachmentRemove=(info)=>{ onAttachmentRemove=(info)=>{
console.log(info);
if(info.response){ if(info.response){
let shixunId = this.props.match.params.shixunId; let shixunId = this.props.match.params.shixunId;
let {message,filspath}=this.state; let {message,filspath}=this.state;
if(message===""||message===undefined){ if(message===""||message===undefined){
this.props.showNotification('删除文件请先填写提交信息'); this.props.showNotification('删除文件请先填写提交信息');
return return;
} }
let matchpath =this.props.match.path; let matchpath =this.props.match.path;
let Repositoryflag =undefined; let Repositoryflag =undefined;
if( matchpath.indexOf("repository")>-1){ if( matchpath.indexOf("repository")>-1){
Repositoryflag =undefined; Repositoryflag =undefined;
} }
if(matchpath.indexOf("secret_repository")>-1){ if(matchpath.indexOf("secret_repository")>-1){
Repositoryflag =true; Repositoryflag =true;
} }
let newfilspath=filspath; let newfilspath=filspath;
if(newfilspath===""){ if(newfilspath===""){
newfilspath=info.name newfilspath=info.name
}else{ }else{
newfilspath=filspath+"/"+info.name newfilspath=filspath+"/"+info.name
} }
const url = `/shixuns//${shixunId}/delete_git_file.json`; const url = `/shixuns//${shixunId}/delete_git_file.json`;
axios.delete(url, { data: { axios.delete(url, { data: {
path:newfilspath, path:newfilspath,
message:message, message:message,
secret_repository:Repositoryflag secret_repository:Repositoryflag

Loading…
Cancel
Save