diff --git a/im-ui/src/api/date.js b/im-ui/src/api/date.js index 2329860..bba3e43 100644 --- a/im-ui/src/api/date.js +++ b/im-ui/src/api/date.js @@ -21,8 +21,7 @@ let toTimeText = (timeStamp, simple) => { //不属于今年 timeText = formatDateTime(dateTime); if(simple){ - console.log(timeText) - timeText = timeText.substr(2,5); + timeText = timeText.substr(2,8); } } return timeText; diff --git a/im-uniapp/common/date.js b/im-uniapp/common/date.js index c3a747d..bba3e43 100644 --- a/im-uniapp/common/date.js +++ b/im-uniapp/common/date.js @@ -21,7 +21,7 @@ let toTimeText = (timeStamp, simple) => { //不属于今年 timeText = formatDateTime(dateTime); if(simple){ - timeText = timeText.substr(2,5); + timeText = timeText.substr(2,8); } } return timeText; diff --git a/im-uniapp/components/chat-item/chat-item.vue b/im-uniapp/components/chat-item/chat-item.vue index 3ae1a97..8b8e2f5 100644 --- a/im-uniapp/components/chat-item/chat-item.vue +++ b/im-uniapp/components/chat-item/chat-item.vue @@ -7,7 +7,7 @@ {{chat.showName}} - {{$date.toTimeText(chat.lastSendTime)}} + {{$date.toTimeText(chat.lastSendTime,true)}} {{atText}}