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();