no message

This commit is contained in:
kuaifan 2022-06-20 07:15:34 +08:00
parent f54f86f2b5
commit 093de52230
9 changed files with 22 additions and 30 deletions

2
public/js/app.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
d5af67b0d43b37d0 75b861862ebcf29b

View File

@ -285,10 +285,6 @@ export default {
type: Number, type: Number,
default: 0 default: 0
}, },
searchMsgId: {
type: Number,
default: 0
},
autoFocus: { autoFocus: {
type: Boolean, type: Boolean,
default: false default: false
@ -319,7 +315,7 @@ export default {
userids: [], userids: [],
}, },
confirmId: 0, openId: 0,
dialogDrag: false, dialogDrag: false,
groupInfoShow: false, groupInfoShow: false,
@ -350,6 +346,7 @@ export default {
computed: { computed: {
...mapState([ ...mapState([
'taskId', 'taskId',
'dialogSearchMsgId',
'dialogMsgs', 'dialogMsgs',
'dialogMsgTransfer', 'dialogMsgTransfer',
'cacheDialogs', 'cacheDialogs',
@ -479,7 +476,7 @@ export default {
requestAnimationFrame(this.onToBottom); requestAnimationFrame(this.onToBottom);
} }
this.$store.dispatch("getDialogMsgs", id).then(_ => { this.$store.dispatch("getDialogMsgs", id).then(_ => {
this.confirmId = id; this.openId = id;
setTimeout(this.onSearchMsgId, 100) setTimeout(this.onSearchMsgId, 100)
}).catch(_ => {}); }).catch(_ => {});
// //
@ -496,7 +493,7 @@ export default {
immediate: true immediate: true
}, },
searchMsgId() { dialogSearchMsgId() {
this.onSearchMsgId(); this.onSearchMsgId();
}, },
@ -688,9 +685,9 @@ export default {
}, },
onSearchMsgId() { onSearchMsgId() {
if (this.searchMsgId > 0 && this.confirmId === this.dialogId) { if (this.dialogSearchMsgId > 0 && this.openId === this.dialogId) {
this.onPositionId(this.searchMsgId) this.onPositionId(this.dialogSearchMsgId)
this.$store.state.searchMsgId = 0 this.$store.state.dialogSearchMsgId = 0
} }
}, },

View File

@ -46,7 +46,10 @@
:key="key" :key="key"
:data-id="dialog.id" :data-id="dialog.id"
:class="dialogClass(dialog)" :class="dialogClass(dialog)"
@click="openDialog(dialog.id, dialog.search_msg_id)" @click="openDialog({
dialog_id: dialog.id,
search_msg_id: dialog.search_msg_id
})"
v-longpress="handleLongpress"> v-longpress="handleLongpress">
<template v-if="dialog.type=='group'"> <template v-if="dialog.type=='group'">
<i v-if="dialog.group_type=='project'" class="taskfont icon-avatar project">&#xe6f9;</i> <i v-if="dialog.group_type=='project'" class="taskfont icon-avatar project">&#xe6f9;</i>
@ -139,12 +142,7 @@
<div class="msg-dialog-bg-icon"><Icon type="ios-chatbubbles" /></div> <div class="msg-dialog-bg-icon"><Icon type="ios-chatbubbles" /></div>
<div class="msg-dialog-bg-text">{{$L('选择一个会话开始聊天')}}</div> <div class="msg-dialog-bg-text">{{$L('选择一个会话开始聊天')}}</div>
</div> </div>
<DialogWrapper <DialogWrapper v-if="windowLarge && dialogId > 0" :dialogId="dialogId" @on-active="scrollIntoActive" :auto-focus="$A.isDesktop()"/>
v-if="windowLarge && dialogId > 0"
:dialogId="dialogId"
:searchMsgId="dialogSearchMsgId"
@on-active="scrollIntoActive"
:auto-focus="$A.isDesktop()"/>
</div> </div>
</div> </div>
</div> </div>
@ -205,7 +203,7 @@ export default {
}, },
computed: { computed: {
...mapState(['cacheDialogs', 'loadDialogs', 'dialogId', 'dialogSearchMsgId']), ...mapState(['cacheDialogs', 'loadDialogs', 'dialogId']),
routeName() { routeName() {
return this.$route.name return this.$route.name
@ -446,15 +444,12 @@ export default {
} }
}, },
openDialog(dialogId, searchMsgId = null) { openDialog(dialogId) {
if (this.operateVisible) { if (this.operateVisible) {
return return
} }
this.dialogKey = ""; this.dialogKey = "";
this.$store.dispatch("openDialog", { this.$store.dispatch("openDialog", dialogId)
dialog_id: dialogId,
search_msg_id: searchMsgId
})
}, },
openContacts(user) { openContacts(user) {