|
|
|
@ -26,7 +26,7 @@ class WriteaprivateletterModal extends Component {
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
//用户id
|
|
|
|
|
console.log(this.props.current_user.user_id);
|
|
|
|
|
//console.log(this.props.current_user.user_id);
|
|
|
|
|
this.Recentcontacts();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -40,7 +40,7 @@ class WriteaprivateletterModal extends Component {
|
|
|
|
|
if(result===undefined){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
console.log(result);
|
|
|
|
|
//console.log(result);
|
|
|
|
|
this.setState({
|
|
|
|
|
users:result.data.users,
|
|
|
|
|
Recentcontacts:false,
|
|
|
|
@ -48,7 +48,7 @@ class WriteaprivateletterModal extends Component {
|
|
|
|
|
isSpin:false
|
|
|
|
|
})
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
//console.log(error)
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpin:false
|
|
|
|
|
})
|
|
|
|
@ -71,9 +71,9 @@ class WriteaprivateletterModal extends Component {
|
|
|
|
|
Pleaseselectthesender:false,
|
|
|
|
|
});
|
|
|
|
|
this.props.smyJump(3,this.state.users);
|
|
|
|
|
console.log(result);
|
|
|
|
|
//console.log(result);
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
//console.log(error)
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -95,9 +95,9 @@ class WriteaprivateletterModal extends Component {
|
|
|
|
|
floatingboxdisplay:true,
|
|
|
|
|
isSpin:false
|
|
|
|
|
})
|
|
|
|
|
console.log(result);
|
|
|
|
|
//console.log(result);
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
//console.log(error)
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpin:false
|
|
|
|
|
})
|
|
|
|
@ -124,7 +124,7 @@ class WriteaprivateletterModal extends Component {
|
|
|
|
|
|
|
|
|
|
// 搜索
|
|
|
|
|
search_message_person=()=>{
|
|
|
|
|
console.log("点击搜索按钮");
|
|
|
|
|
//console.log("点击搜索按钮");
|
|
|
|
|
if(this.state.inputvulue.length===0){
|
|
|
|
|
this.Recentcontacts();
|
|
|
|
|
}else {
|
|
|
|
@ -174,7 +174,7 @@ class WriteaprivateletterModal extends Component {
|
|
|
|
|
|
|
|
|
|
// 回车事件
|
|
|
|
|
Myοnkeydοwn=()=>{
|
|
|
|
|
console.log("点击了回车事件");
|
|
|
|
|
//console.log("点击了回车事件");
|
|
|
|
|
if(this.state.inputvulue.length===0){
|
|
|
|
|
this.Recentcontacts();
|
|
|
|
|
}else {
|
|
|
|
@ -185,7 +185,7 @@ class WriteaprivateletterModal extends Component {
|
|
|
|
|
|
|
|
|
|
//判断点击的键盘的keyCode是否为13,是就调用上面的搜索函数
|
|
|
|
|
handleEnterKey = (e) => {
|
|
|
|
|
console.log("");
|
|
|
|
|
//console.log("");
|
|
|
|
|
if(e.nativeEvent.keyCode === 13){ //e.nativeEvent获取原生的事件对像
|
|
|
|
|
this.Myοnkeydοwn()
|
|
|
|
|
}
|
|
|
|
@ -208,11 +208,11 @@ class WriteaprivateletterModal extends Component {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log(e.target.value);
|
|
|
|
|
//console.log(e.target.value);
|
|
|
|
|
};
|
|
|
|
|
// 输入内容
|
|
|
|
|
setdatafunsvals=(e)=>{
|
|
|
|
|
console.log(e.target.value);
|
|
|
|
|
//console.log(e.target.value);
|
|
|
|
|
this.setState({
|
|
|
|
|
inputvulues:e.target.value,
|
|
|
|
|
Pleaseselectthesenders:false,
|
|
|
|
@ -222,7 +222,7 @@ class WriteaprivateletterModal extends Component {
|
|
|
|
|
}
|
|
|
|
|
//失去焦点
|
|
|
|
|
myonBlur=(e)=>{
|
|
|
|
|
console.log("失去焦点了");
|
|
|
|
|
//console.log("失去焦点了");
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
this.setState({
|
|
|
|
|
// floatingboxdisplay:false,
|
|
|
|
@ -230,7 +230,7 @@ class WriteaprivateletterModal extends Component {
|
|
|
|
|
};
|
|
|
|
|
//获取焦点
|
|
|
|
|
myonFocus=(e)=>{
|
|
|
|
|
console.log("获取到焦点了");
|
|
|
|
|
//console.log("获取到焦点了");
|
|
|
|
|
this.setState({
|
|
|
|
|
floatingboxdisplay:true,
|
|
|
|
|
})
|
|
|
|
@ -238,8 +238,8 @@ class WriteaprivateletterModal extends Component {
|
|
|
|
|
|
|
|
|
|
//获取用户信息
|
|
|
|
|
Getuserinformation=(item)=>{
|
|
|
|
|
console.log("获取到了用户信息");
|
|
|
|
|
console.log(item.id);
|
|
|
|
|
//console.log("获取到了用户信息");
|
|
|
|
|
//console.log(item.id);
|
|
|
|
|
this.setState({
|
|
|
|
|
Personalid:item.id===undefined?undefined:item.id===null?undefined:item.id,
|
|
|
|
|
inputvulue:item.name,
|
|
|
|
@ -251,7 +251,7 @@ class WriteaprivateletterModal extends Component {
|
|
|
|
|
render() {
|
|
|
|
|
|
|
|
|
|
let{Pleaseselectthesender,inputvulue,inputvulues,floatingboxdisplay,users,floatingboxdisplays,Recentcontacts,isSpin}=this.state;
|
|
|
|
|
console.log(floatingboxdisplay);
|
|
|
|
|
//console.log(floatingboxdisplay);
|
|
|
|
|
return(
|
|
|
|
|
<Modal
|
|
|
|
|
keyboard={false}
|
|
|
|
|