no message

This commit is contained in:
kuaifan 2022-05-21 20:03:18 +08:00
parent 2ab12f74ee
commit df1d5d97c4
4 changed files with 13 additions and 8 deletions

View File

@ -102,13 +102,11 @@
* @returns {*|string}
*/
formatTime(date) {
let time = $A.Date(date, true),
now = $A.Time(),
let now = $A.Time(),
time = $A.Date(date, true),
string = '';
if ($A.formatDate('Ymd', now) === $A.formatDate('Ymd', time)) {
if (now - time < 3600 * 6 || $A.formatDate('Ymd', now) === $A.formatDate('Ymd', time)) {
string = $A.formatDate('H:i', time)
} else if (now - time < 86400 * 7) {
string = $A.formatDate('m-d H:i', time)
} else if ($A.formatDate('Y', now) === $A.formatDate('Y', time)) {
string = $A.formatDate('m-d', time)
} else {

View File

@ -907,7 +907,10 @@ export default {
return; //
}
//
const {id, dialog_id, type, msg} = data;
const {id, dialog_id, type, msg, userid} = data;
if (userid == this.userId) {
return; //
}
let body = '';
switch (type) {
case 'text':

View File

@ -47,7 +47,8 @@
<!--时间/阅读-->
<div v-if="msgData.created_at" class="dialog-foot">
<div class="time" :title="msgData.created_at">{{$A.formatTime(msgData.created_at)}}</div>
<div v-if="timeShow" class="time" @click="timeShow=false">{{msgData.created_at}}</div>
<div v-else class="time" :title="msgData.created_at" @click="timeShow=true">{{$A.formatTime(msgData.created_at)}}</div>
<div v-if="msgData.send > 1 || dialogType === 'group'" class="percent" @click="openReadPercentage">
<EPopover
@ -106,6 +107,7 @@ export default {
return {
popperLoad: 0,
popperShow: false,
timeShow: false,
allList: [],
}
},

View File

@ -526,7 +526,9 @@ export default {
updateDialogs() {
this.__updateDialogs && clearTimeout(this.__updateDialogs)
this.__updateDialogs = setTimeout(_ => {
this.$store.dispatch("getDialogs", true).catch(() => {});
if (this.tabActive === 'dialog') {
this.$store.dispatch("getDialogs", true).catch(() => {});
}
}, 2000)
},
}