From fe2f3b11e41f968f89b8aa3a6af8b6df844389ad Mon Sep 17 00:00:00 2001 From: "xie.bx" Date: Thu, 1 Dec 2022 13:29:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=B6=E9=97=B4=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- im-ui/src/components/chat/ChatPrivateVideo.vue | 1 - im-ui/src/components/chat/ChatTime.vue | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/im-ui/src/components/chat/ChatPrivateVideo.vue b/im-ui/src/components/chat/ChatPrivateVideo.vue index 121d1c9..2e28baf 100644 --- a/im-ui/src/components/chat/ChatPrivateVideo.vue +++ b/im-ui/src/components/chat/ChatPrivateVideo.vue @@ -19,7 +19,6 @@ @click="cancel()">
- diff --git a/im-ui/src/components/chat/ChatTime.vue b/im-ui/src/components/chat/ChatTime.vue index f9c324f..b223843 100644 --- a/im-ui/src/components/chat/ChatTime.vue +++ b/im-ui/src/components/chat/ChatTime.vue @@ -18,8 +18,8 @@ let time = new Date(this.time); let strtime = ""; let curTime = new Date(); - let dayDiff =curTime.getDate() - time.getDate() ; - if (time.getDate() === new Date().getDate()) { + let dayDiff = Math.floor((curTime.getTime() - time.getTime())/(24*3600*1000)) ; + if (dayDiff < 1) { strtime = time.getHours() <= 9 ? "0" + time.getHours() : time.getHours(); strtime += ":" strtime += time.getMinutes() <= 9 ? "0" + time.getMinutes() : time.getMinutes();