dev_cs_new
杨树林 6 years ago
parent ed19add0af
commit 34d328bfd7

@ -86,21 +86,7 @@ class MessagChat extends Component{
console.log(i);
this.props.Modifyur(i);
};
FormatTime=(timestamp)=> {
var datetime = new Date(timestamp.replace(/-/,"/"))
var mistiming = Math.round(new Date() / 1000) - datetime;
var postfix = mistiming > 0 ? '前' : '后'
mistiming = Math.abs(mistiming)
var arrr = ['年', '个月', '星期', '天', '小时', '分钟', '秒'];
var arrn = [31536000, 2592000, 604800, 86400, 3600, 60, 1];
for (var i = 0; i < 7; i++) {
var inm = Math.floor(mistiming / arrn[i])
if (inm != 0) {
return inm + arrr[i] + postfix
}
}
}
render() {
let{isSpins,datay}=this.state;
return (
@ -178,7 +164,7 @@ class MessagChat extends Component{
<span className="newLetter"></span>
:""}
</span>
<span className="color-grey-c fr">{(time)=>this.FormatTime(item.send_time)}</span>
<span className="color-grey-c fr">{item.send_time}</span>
</p>
<p className="color-grey-6 lineh-20 justify break_word task-hide-2" style={{wordBreak:"break-word"}} dangerouslySetInnerHTML={{__html:item.content}}></p>
</div>

@ -84,6 +84,9 @@ class MessagePrivate extends Component{
console.log("跳转页面");
console.log(i);
this.props.Modifyur(i);
};
myCome=(e)=>{
window.location.href="/users/innov";
}
render() {
let{page,limit,typeysl,count,isSpin,data,modalsType}=this.state;
@ -118,7 +121,7 @@ class MessagePrivate extends Component{
</a>
<div className="fl flex1">
<p>
<a href="javascript:void(0);" onClick={()=>this.smyJump()} className="mr20 private_message_a">{item.target.name}</a>
<a onClick={()=>this.myCome(item)} className="mr20 private_message_a">{item.target.name}</a>
<span>与你的私信</span>
<span className="color-grey-c mr20">[{item.message_count}{"条"}]</span>
<span className="color-grey-c">{item.send_time}</span>

Loading…
Cancel
Save