|
|
|
@ -29,11 +29,13 @@ class MessagChat extends Component{
|
|
|
|
|
}
|
|
|
|
|
componentDidMount(){
|
|
|
|
|
this.getdata(1);
|
|
|
|
|
let target_ids=this.props.match.params.private;
|
|
|
|
|
this.getChatList(1,this.state.limits,target_ids);
|
|
|
|
|
// console.log("MessagChat111111");
|
|
|
|
|
// console.log(this.props.myysluser);
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
|
|
const query = this.props.location.search;
|
|
|
|
|
let target_ids = query.split('?target_ids=');
|
|
|
|
|
this.getChatList(1,this.state.limits,target_ids[1]);
|
|
|
|
|
// console.log("MessagChat111111");
|
|
|
|
|
// console.log(this.props.myysluser);
|
|
|
|
|
this.setState({
|
|
|
|
|
myyslusers:this.props.myysluser
|
|
|
|
|
})
|
|
|
|
|
try {
|
|
|
|
@ -293,7 +295,7 @@ class MessagChat extends Component{
|
|
|
|
|
// mess:true,
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
this.props.history.replace(`/message/${this.props.current_user.user_id}/${user.id}/message_detail`);
|
|
|
|
|
this.props.history.replace(`/message/${this.props.current_user.user_id}/message_detail?target_ids=${user.id}`);
|
|
|
|
|
// this.getdatatwo(this.state.page);
|
|
|
|
|
this.getChatListtwo(this.state.pages,this.state.mypagey,user.id);
|
|
|
|
|
|
|
|
|
@ -301,10 +303,11 @@ class MessagChat extends Component{
|
|
|
|
|
//回复
|
|
|
|
|
setreplyfun=()=>{
|
|
|
|
|
let contents=this.messageRef.current.getValue().trim();
|
|
|
|
|
let target_ids=this.props.match.params.private
|
|
|
|
|
const query = this.props.location.search;
|
|
|
|
|
let target_ids = query.split('?target_ids=');
|
|
|
|
|
let url = `/users/${this.props.match.params.userid}/private_messages.json`;
|
|
|
|
|
axios.post(url, {
|
|
|
|
|
target_id: target_ids,
|
|
|
|
|
target_id: target_ids[1],
|
|
|
|
|
content: contents
|
|
|
|
|
})
|
|
|
|
|
.then((response) => {
|
|
|
|
|