|
|
|
@ -37,29 +37,15 @@ class Messagerouting extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount(){
|
|
|
|
|
// console.log("Messagerouting");
|
|
|
|
|
// console.log(this.props);
|
|
|
|
|
let courstype=this.props.location.search;
|
|
|
|
|
console.log("Messagerouting");
|
|
|
|
|
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,
|
|
|
|
|
});
|
|
|
|
|
// console.log(courstype);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if(courstype==="?tag=3"){
|
|
|
|
|
this.setState({
|
|
|
|
|
routing:3,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
componentDidUpdate(prevProps) {
|
|
|
|
|
// console.log("11111111111");
|
|
|
|
@ -140,6 +126,28 @@ class Messagerouting extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
myCome=(e)=>{
|
|
|
|
|
window.location.href="/users/"+e.target.login;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
myxiaoxisixintab=(i)=>{
|
|
|
|
|
if(i===1){
|
|
|
|
|
this.setState({
|
|
|
|
|
routing:1,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if(i===2){
|
|
|
|
|
this.setState({
|
|
|
|
|
routing:2,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if(i===3){
|
|
|
|
|
this.setState({
|
|
|
|
|
routing:3,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let{routing,unread_message_count,unread_tiding_count} =this.state;
|
|
|
|
|
console.log(this.props);
|
|
|
|
@ -191,19 +199,19 @@ class Messagerouting extends Component{
|
|
|
|
|
{/*/!*消息自路由*! name 是 /message/info/:userid/*/}
|
|
|
|
|
<Route path="/message/:userid/user_tidings"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<MessagSub {...this.state} {...this.props} {...props} Message2={()=>this.Message2()}></MessagSub>)
|
|
|
|
|
(props) => (<MessagSub {...this.state} {...this.props} {...props} Message2={()=>this.Message2()} Mtab={(i)=>this.myxiaoxisixintab(i)}></MessagSub>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
{/*/!*私信*! name 是letter/*/}
|
|
|
|
|
<Route path="/message/:userid/private_messages"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<MessagePrivate {...this.state} {...this.props} {...props} Message2={()=>this.Message2()} Modifyur={(i,item)=>this.Modifyur(i,item)}></MessagePrivate> )
|
|
|
|
|
(props) => (<MessagePrivate {...this.state} {...this.props} {...props} Message2={()=>this.Message2()} Modifyur={(i,item)=>this.Modifyur(i,item)} Mtab={(i)=>this.myxiaoxisixintab(i)}></MessagePrivate> )
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
{/*/!*私信聊天页面*! letters/*/}
|
|
|
|
|
<Route path="/message/:userid/message_detail"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<MessagChat {...this.state} {...this.props} {...props} Message2={()=>this.Message2()} Modifyur={(i)=>this.Modifyur(i)}></MessagChat>)
|
|
|
|
|
(props) => (<MessagChat {...this.state} {...this.props} {...props} Message2={()=>this.Message2()} Modifyur={(i)=>this.Modifyur(i)} Mtab={(i)=>this.myxiaoxisixintab(i)}></MessagChat>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
|
|
|
|
|