diff --git a/public/react/src/modules/message/js/MessagChat.js b/public/react/src/modules/message/js/MessagChat.js index 9ac4992c8..5767c7d0b 100644 --- a/public/react/src/modules/message/js/MessagChat.js +++ b/public/react/src/modules/message/js/MessagChat.js @@ -29,6 +29,11 @@ class MessagChat extends Component{ this.setState({ myyslusers:this.props.myysluser }) + try { + this.props.Mtab(3); + }catch (e) { + + } } // 滑动刷新 contentViewScrolledit=(e)=>{ diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index 7b645b217..479401681 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -21,9 +21,15 @@ class MessagSub extends Component{ } // 初始化数据 componentDidMount(){ - console.log("初始化数据了"); - this.getdata("",this.state.page); + console.log("初始化数据了MessagSub"); + console.log(this.props); + this.getdata("",this.state.page); // this.Messageprivatemessageunreadmessage(); + try { + this.props.Mtab(1); + }catch (e) { + + } } //塞选页数 @@ -120,10 +126,10 @@ class MessagSub extends Component{ return(
- {item.trigger_user.name}
+ this.myCome(item)}>{item.trigger_user.name}
{item.time}
{this.state.typeysl==="apply"?(
item.status===0?
diff --git a/public/react/src/modules/message/js/MessagePrivate.js b/public/react/src/modules/message/js/MessagePrivate.js
index badeba23a..95712f720 100644
--- a/public/react/src/modules/message/js/MessagePrivate.js
+++ b/public/react/src/modules/message/js/MessagePrivate.js
@@ -25,7 +25,14 @@ class MessagePrivate extends Component{
}
componentDidMount(){
+ console.log("初始化数据了MessagePrivate");
+ console.log(this.props);
this.getdata(1);
+ try {
+ this.props.Mtab(2);
+ }catch (e) {
+
+ }
};
componentDidUpdate(prevProps) {
// console.log("11111111111");
diff --git a/public/react/src/modules/message/js/Messagerouting.js b/public/react/src/modules/message/js/Messagerouting.js
index a40a799c4..890350507 100644
--- a/public/react/src/modules/message/js/Messagerouting.js
+++ b/public/react/src/modules/message/js/Messagerouting.js
@@ -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/*/}