mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-18 22:37:34 +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}
|
* @returns {*|string}
|
||||||
*/
|
*/
|
||||||
formatTime(date) {
|
formatTime(date) {
|
||||||
let time = $A.Date(date, true),
|
let now = $A.Time(),
|
||||||
now = $A.Time(),
|
time = $A.Date(date, true),
|
||||||
string = '';
|
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)
|
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)) {
|
} else if ($A.formatDate('Y', now) === $A.formatDate('Y', time)) {
|
||||||
string = $A.formatDate('m-d', time)
|
string = $A.formatDate('m-d', time)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -907,7 +907,10 @@ export default {
|
|||||||
return; // 可见 且 路由匹配时
|
return; // 可见 且 路由匹配时
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const {id, dialog_id, type, msg} = data;
|
const {id, dialog_id, type, msg, userid} = data;
|
||||||
|
if (userid == this.userId) {
|
||||||
|
return; // 自己的消息不弹出通知
|
||||||
|
}
|
||||||
let body = '';
|
let body = '';
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'text':
|
case 'text':
|
||||||
|
|||||||
@ -47,7 +47,8 @@
|
|||||||
|
|
||||||
<!--时间/阅读-->
|
<!--时间/阅读-->
|
||||||
<div v-if="msgData.created_at" class="dialog-foot">
|
<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">
|
<div v-if="msgData.send > 1 || dialogType === 'group'" class="percent" @click="openReadPercentage">
|
||||||
<EPopover
|
<EPopover
|
||||||
@ -106,6 +107,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
popperLoad: 0,
|
popperLoad: 0,
|
||||||
popperShow: false,
|
popperShow: false,
|
||||||
|
timeShow: false,
|
||||||
allList: [],
|
allList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -526,7 +526,9 @@ export default {
|
|||||||
updateDialogs() {
|
updateDialogs() {
|
||||||
this.__updateDialogs && clearTimeout(this.__updateDialogs)
|
this.__updateDialogs && clearTimeout(this.__updateDialogs)
|
||||||
this.__updateDialogs = setTimeout(_ => {
|
this.__updateDialogs = setTimeout(_ => {
|
||||||
this.$store.dispatch("getDialogs", true).catch(() => {});
|
if (this.tabActive === 'dialog') {
|
||||||
|
this.$store.dispatch("getDialogs", true).catch(() => {});
|
||||||
|
}
|
||||||
}, 2000)
|
}, 2000)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user