|
|
|
@ -38,7 +38,28 @@ class Messagerouting extends Component{
|
|
|
|
|
|
|
|
|
|
componentDidMount(){
|
|
|
|
|
console.log("Messagerouting");
|
|
|
|
|
console.log(this.props);
|
|
|
|
|
console.log(this.props);
|
|
|
|
|
let courstype=this.props.location.search;
|
|
|
|
|
// // courstype=courstype.splice('/');
|
|
|
|
|
// // courstype=courstype[3];
|
|
|
|
|
// // console.log("45");
|
|
|
|
|
console.log(courstype);
|
|
|
|
|
if(courstype==="?tag=1"){
|
|
|
|
|
this.setState({
|
|
|
|
|
routing:1,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if(courstype==="?tag=2"){
|
|
|
|
|
this.setState({
|
|
|
|
|
routing:2,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if(courstype==="?tag=3"){
|
|
|
|
|
this.setState({
|
|
|
|
|
routing:3,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
componentDidUpdate(prevProps) {
|
|
|
|
|
// console.log("11111111111");
|
|
|
|
@ -74,11 +95,11 @@ class Messagerouting extends Component{
|
|
|
|
|
});
|
|
|
|
|
this.Messageprivatemessageunreadmessage(this.props.current_user.user_id);
|
|
|
|
|
if(value===1){
|
|
|
|
|
this.props.history.replace(`/message/info/${this.props.current_user.user_id}`);
|
|
|
|
|
this.props.history.replace(`/message/info/${this.props.current_user.user_id}?tag=1`);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(value===2){
|
|
|
|
|
this.props.history.replace(`/message/letter/${this.props.current_user.user_id}`);
|
|
|
|
|
this.props.history.replace(`/message/letter/${this.props.current_user.user_id}?tag=2`);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
@ -105,10 +126,10 @@ class Messagerouting extends Component{
|
|
|
|
|
routing:i,
|
|
|
|
|
});
|
|
|
|
|
if(i===1){
|
|
|
|
|
this.props.history.replace(`/message/info/${this.props.current_user.user_id}`);
|
|
|
|
|
this.props.history.replace(`/message/info/${this.props.current_user.user_id}?tag=1`);
|
|
|
|
|
}
|
|
|
|
|
if(i===2){
|
|
|
|
|
this.props.history.replace(`/message/letter/${this.props.current_user.user_id}`);
|
|
|
|
|
this.props.history.replace(`/message/letter/${this.props.current_user.user_id}?tag=2`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
@ -117,7 +138,7 @@ class Messagerouting extends Component{
|
|
|
|
|
myysluser:item,
|
|
|
|
|
});
|
|
|
|
|
console.log("22222222222");
|
|
|
|
|
this.props.history.replace(`/message/letters/${this.props.current_user.user_id}`);
|
|
|
|
|
this.props.history.replace(`/message/letters/${this.props.current_user.user_id}?tag=3`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|