mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
perf: 未读消息优化
This commit is contained in:
parent
1a62a47935
commit
85d88b6800
@ -616,13 +616,14 @@ class DialogController extends AbstractController
|
||||
$dialogUser->updated_at = Carbon::now();
|
||||
$dialogUser->save();
|
||||
//
|
||||
$dialogUser->webSocketDialog->generateUnread($user->userid);
|
||||
$dialogUser->webSocketDialog->generateUnread($user->userid, true);
|
||||
$data[] = [
|
||||
'id' => $dialogUser->webSocketDialog->id,
|
||||
'unread' => $dialogUser->webSocketDialog->unread,
|
||||
'mention' => $dialogUser->webSocketDialog->mention,
|
||||
'position_msgs' => $dialogUser->webSocketDialog->position_msgs,
|
||||
'user_at' => Carbon::parse($dialogUser->updated_at)->toDateTimeString('millisecond'),
|
||||
'user_ms' => Carbon::parse($dialogUser->updated_at)->valueOf()
|
||||
'user_ms' => Carbon::parse($dialogUser->updated_at)->valueOf(),
|
||||
];
|
||||
}
|
||||
return Base::retSuccess('success', $data);
|
||||
|
||||
@ -136,10 +136,10 @@
|
||||
</div>
|
||||
|
||||
<!--跳转提示-->
|
||||
<div v-if="positionMsg" class="dialog-position" :class="{'down': tagShow}">
|
||||
<div v-if="positionMsg" class="dialog-position" :class="{'down': true}">
|
||||
<div class="position-label" @click="onPositionMark">
|
||||
<Icon v-if="positionLoad > 0" type="ios-loading" class="icon-loading"></Icon>
|
||||
<i v-else class="taskfont"></i>
|
||||
<i v-else class="taskfont" :class="{'below': positionLoadMark}"></i>
|
||||
{{positionMsg.label}}
|
||||
</div>
|
||||
</div>
|
||||
@ -694,6 +694,7 @@ export default {
|
||||
scrollTmp: 0,
|
||||
|
||||
positionLoad: 0,
|
||||
positionLoadMark: false,
|
||||
|
||||
approveDetails:{id: 0},
|
||||
approveDetailsShow: false,
|
||||
@ -1036,6 +1037,7 @@ export default {
|
||||
watch: {
|
||||
dialogId: {
|
||||
handler(dialog_id, old_id) {
|
||||
this.positionLoadMark = false;
|
||||
this.mountedNow = Date.now();
|
||||
if (dialog_id) {
|
||||
this.msgNew = 0
|
||||
@ -2996,6 +2998,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
//
|
||||
this.positionLoadMark = true;
|
||||
this.positionLoad++
|
||||
const {msg_id} = this.positionMsg;
|
||||
this.onPositionId(msg_id).finally(_ => {
|
||||
|
||||
@ -1392,6 +1392,9 @@
|
||||
height: 14px;
|
||||
font-size: 14px;
|
||||
line-height: 14px;
|
||||
&.below{
|
||||
transform: rotate(-180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user