diff --git a/public/react/src/modules/message/js/MessagChat.js b/public/react/src/modules/message/js/MessagChat.js index c412a88ff..d57b4a7a1 100644 --- a/public/react/src/modules/message/js/MessagChat.js +++ b/public/react/src/modules/message/js/MessagChat.js @@ -300,6 +300,9 @@ class MessagChat extends Component{ } //回复 setreplyfun=()=>{ + this.setState({ + isSpin:true, + }); let contents=this.messageRef.current.getValue().trim(); let target_ids=this.props.match.params.private let url = `/users/${this.props.match.params.userid}/private_messages.json`; @@ -308,6 +311,9 @@ class MessagChat extends Component{ content: contents }) .then((response) => { + this.setState({ + isSpin:false, + }); if(response===undefined){ return } @@ -317,31 +323,50 @@ class MessagChat extends Component{ var datas=[]; var dataso=this.state.messages; var datays=response.data.private_message; - var obj={}; - for (var i=0;i{ + smyJump =(i,id)=>{ // console.log("跳转页面"); // console.log(i); - this.props.Modifyur(i,item); + this.props.Modifyur(i,id); }; myCome=(e)=>{ window.location.href="/users/"+e.target.login; diff --git a/public/react/src/modules/message/js/Messagerouting.js b/public/react/src/modules/message/js/Messagerouting.js index 619e1b838..ee0034a4f 100644 --- a/public/react/src/modules/message/js/Messagerouting.js +++ b/public/react/src/modules/message/js/Messagerouting.js @@ -32,7 +32,6 @@ class Messagerouting extends Component{ routing:1, unread_message_count:0, unread_tiding_count:0, - myysluser:undefined, } } @@ -100,7 +99,7 @@ class Messagerouting extends Component{ }; //跳转到链接 - Modifyur=(i,item)=>{ + Modifyur=(i,id)=>{ // console.log("跳转到链接1"); // console.log(i); // console.log(item); @@ -119,10 +118,9 @@ class Messagerouting extends Component{ }else { this.setState({ routing:i, - myysluser:item, }); console.log("22222222222"); - this.props.history.replace(`/message/${this.props.current_user.user_id}/${item.id}/message_detail`); + this.props.history.replace(`/message/${this.props.current_user.user_id}/${id}/message_detail`); } }; diff --git a/public/react/src/modules/message/messagemodal/WriteaprivateletterModal.js b/public/react/src/modules/message/messagemodal/WriteaprivateletterModal.js index 1234b1fe1..a89614745 100644 --- a/public/react/src/modules/message/messagemodal/WriteaprivateletterModal.js +++ b/public/react/src/modules/message/messagemodal/WriteaprivateletterModal.js @@ -70,7 +70,7 @@ class WriteaprivateletterModal extends Component { floatingboxdisplays:false, Pleaseselectthesender:false, }); - this.props.smyJump(3,this.state.users); + this.props.smyJump(3,result.data.private_message.receiver_id); //console.log(result); }).catch((error) => { //console.log(error)