|
|
@ -95,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}?tag=1`);
|
|
|
|
this.props.history.replace(`/message/${this.props.current_user.user_id}/user_tidings`);
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(value===2){
|
|
|
|
if(value===2){
|
|
|
|
this.props.history.replace(`/message/letter/${this.props.current_user.user_id}?tag=2`);
|
|
|
|
this.props.history.replace(`/message/${this.props.current_user.user_id}/private_messages`);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -126,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}?tag=1`);
|
|
|
|
this.props.history.replace(`/message/${this.props.current_user.user_id}/user_tidings`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(i===2){
|
|
|
|
if(i===2){
|
|
|
|
this.props.history.replace(`/message/letter/${this.props.current_user.user_id}?tag=2`);
|
|
|
|
this.props.history.replace(`/message/${this.props.current_user.user_id}/private_messages`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
@ -138,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}?tag=3`);
|
|
|
|
this.props.history.replace(`/message/${this.props.current_user.user_id}/message_detail`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -185,25 +185,26 @@ class Messagerouting extends Component{
|
|
|
|
{/*{routing===3?<MessagChat {...this.state} {...this.props} Message2={()=>this.Message2()} Modifyur={(i)=>this.Modifyur(i)}></MessagChat>:""}*/}
|
|
|
|
{/*{routing===3?<MessagChat {...this.state} {...this.props} Message2={()=>this.Message2()} Modifyur={(i)=>this.Modifyur(i)}></MessagChat>:""}*/}
|
|
|
|
|
|
|
|
|
|
|
|
<Switch>
|
|
|
|
<Switch>
|
|
|
|
{/*/!*消息自路由*!/*/}
|
|
|
|
{/*/!*消息自路由*! name 是 /message/info/:userid/*/}
|
|
|
|
<Route path="/message/info/:userid"
|
|
|
|
<Route path="/message/:userid/user_tidings"
|
|
|
|
render={
|
|
|
|
render={
|
|
|
|
(props) => (<MessagSub {...this.state} {...this.props} Message2={()=>this.Message2()}></MessagSub>)
|
|
|
|
(props) => (<MessagSub {...this.state} {...this.props} {...props} Message2={()=>this.Message2()}></MessagSub>)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
></Route>
|
|
|
|
></Route>
|
|
|
|
{/*/!*私信*!/*/}
|
|
|
|
{/*/!*私信*! name 是letter/*/}
|
|
|
|
<Route path="/message/letter/:userid"
|
|
|
|
<Route path="/message/:userid/private_messages"
|
|
|
|
render={
|
|
|
|
render={
|
|
|
|
(props) => (<MessagePrivate {...this.state} {...this.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)}></MessagePrivate> )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
></Route>
|
|
|
|
></Route>
|
|
|
|
{/*/!*私信聊天页面*!/*/}
|
|
|
|
{/*/!*私信聊天页面*! letters/*/}
|
|
|
|
<Route path="/message/letters/:userid"
|
|
|
|
<Route path="/message/:userid/message_detail"
|
|
|
|
render={
|
|
|
|
render={
|
|
|
|
(props) => (<MessagChat {...this.state} {...this.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)}></MessagChat>)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
></Route>
|
|
|
|
></Route>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</Switch>
|
|
|
|
</Switch>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|