Merge remote-tracking branch 'origin/dev_Ysl' into dev_Ysl

dev_cs_new
杨树明 6 years ago
commit bd72e97d04

@ -233,7 +233,7 @@ const ProjectPackages=Loadable({
const Messagerouting= Loadable({ const Messagerouting= Loadable({
loader: () => import('./modules/message/js/Messagerouting'), loader: () => import('./modules/message/js/Messagerouting'),
loading: Loading, loading: Loading,
}) });
class App extends Component { class App extends Component {
constructor(props) { constructor(props) {
super(props) super(props)

@ -26,7 +26,6 @@ class MessagChat extends Component{
this.getdata(1); this.getdata(1);
console.log("MessagChat111111"); console.log("MessagChat111111");
console.log(this.props); console.log(this.props);
console.log(this.state);
this.setState({ this.setState({
myyslusers:this.props.myysluser myyslusers:this.props.myysluser
}) })

@ -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>

Loading…
Cancel
Save