mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-12 08:58:11 +00:00
no message
This commit is contained in:
parent
2ab12f74ee
commit
df1d5d97c4
8
resources/assets/js/functions/web.js
vendored
8
resources/assets/js/functions/web.js
vendored
@ -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 {
|
||||
|
||||
@ -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':
|
||||
|
||||
@ -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: [],
|
||||
}
|
||||
},
|
||||
|
||||
@ -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)
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user