You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.1 KiB
65 lines
2.1 KiB
import React, { Component } from 'react';
|
|
import {
|
|
Spin,
|
|
Pagination,
|
|
} from "antd";
|
|
import axios from 'axios';
|
|
import moment from 'moment';
|
|
import {getImageUrl,markdownToHTML} from 'educoder';
|
|
import "../css/messagemy.css"
|
|
import WriteaprivateletterModal from '../messagemodal/WriteaprivateletterModal';
|
|
//私信页面
|
|
class Leftdialogue extends Component{
|
|
constructor(props) {
|
|
super(props);
|
|
this.state={
|
|
};
|
|
|
|
}
|
|
|
|
componentDidMount(){
|
|
console.log("Leftdialogue");
|
|
console.log(this.props);
|
|
};
|
|
componentDidUpdate(prevProps) {
|
|
// console.log("11111111111");
|
|
// console.log(prevProps);
|
|
// console.log("22222222222");
|
|
// console.log(this.props);
|
|
// console.log("33333333333");
|
|
// if(prevProps.current_user !== this.props.current_user){
|
|
// this.getdata(1);
|
|
// }
|
|
}
|
|
mydelete=(user_id,id)=>{
|
|
this.props.DELETEsetreplyfun(user_id,id);
|
|
}
|
|
myCome=(e)=>{
|
|
window.location.href="/users/"+e.login;
|
|
}
|
|
|
|
render() {
|
|
|
|
return (
|
|
<div className="OtherSide clearfix" id="message_content_25148">
|
|
<a onMouseDown={()=>this.myCome(this.props.objeysl.sender)}>
|
|
{
|
|
this.props.objeysl&&this.props.objeysl.sender.image_url ?
|
|
<img alt="头像" className="mr10 radius fl myimgw48 myimgh48"
|
|
src={getImageUrl("/images/" + this.props.objeysl.sender.image_url)} />:""
|
|
}
|
|
</a>
|
|
<div className="fl pr OtherSide-info">
|
|
<span className="trangle"></span>
|
|
<div className="sms break_word" id="message_content_show_25148" dangerouslySetInnerHTML={{__html: markdownToHTML(this.props.objeysl.content).replace(/▁/g, "▁▁▁")}}></div>
|
|
<div className="edu-txt-right mt5">
|
|
<a className="color-grey-c" onClick={()=>this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)} >删除</a>
|
|
</div>
|
|
</div>
|
|
<span className="fl ml15 color-grey-c lineh-15 mt15">{moment(this.props.objeysl.send_time).hour()}:{moment(this.props.objeysl.send_time).minute()<10?"0"+moment(this.props.objeysl.send_time).minute():moment(this.props.objeysl.send_time).minute()}</span>
|
|
</div>
|
|
)
|
|
}
|
|
}
|
|
export default Leftdialogue;
|
|
// onClick="delete_confirm_box('/users/innov/delete_message?mess_id=25148', '确定要删除该条记录吗?')"
|