dev_cs_new
杨树林 6 years ago
parent afd8dec936
commit 3830a30673

@ -38,7 +38,28 @@ class Messagerouting extends Component{
componentDidMount(){ componentDidMount(){
console.log("Messagerouting"); 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) { componentDidUpdate(prevProps) {
// console.log("11111111111"); // console.log("11111111111");
@ -74,11 +95,11 @@ class Messagerouting extends Component{
}); });
this.Messageprivatemessageunreadmessage(this.props.current_user.user_id); this.Messageprivatemessageunreadmessage(this.props.current_user.user_id);
if(value===1){ 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 return
} }
if(value===2){ 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; return;
} }
}; };
@ -105,10 +126,10 @@ class Messagerouting extends Component{
routing:i, routing:i,
}); });
if(i===1){ 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){ 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 { }else {
@ -117,7 +138,7 @@ class Messagerouting extends Component{
myysluser:item, myysluser:item,
}); });
console.log("22222222222"); 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`);
} }
}; };

Loading…
Cancel
Save