Commit dd824ad2 authored by 崔佳豪's avatar 崔佳豪

fix: 消息时间显示问题

parent 44bbb44a
Pipeline #57323 passed with stages
......@@ -184,6 +184,7 @@ const CheckAllMessage = props => {
};
// 渲染消息发送时间
const renderTime = value => {
if (!value) return '';
const createTime = new Date(value);
const currentTime = new Date();
const difSeconds = (currentTime.getTime() - createTime.getTime()) / 1000;
......@@ -374,7 +375,7 @@ const CheckAllMessage = props => {
<div className={styles.msgDesc} title={messageContent(item.messType, JSON.parse(item.infoContent))}>{messageContent(item.messType, JSON.parse(item.infoContent))}</div>
</div>
</div>
<div className={styles.right}>{renderTime(item.createTime)}</div>
<div className={styles.right}>{renderTime(item.createTime || item.hisCreateTime)}</div>
</div>))}
</InfiniteScroll>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment