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

View File

@ -46,7 +46,10 @@
:key="key"
:data-id="dialog.id"
: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">
<template v-if="dialog.type=='group'">
<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-text">{{$L('选择一个会话开始聊天')}}</div>
</div>
<DialogWrapper
v-if="windowLarge && dialogId > 0"
:dialogId="dialogId"
:searchMsgId="dialogSearchMsgId"
@on-active="scrollIntoActive"
:auto-focus="$A.isDesktop()"/>
<DialogWrapper v-if="windowLarge && dialogId > 0" :dialogId="dialogId" @on-active="scrollIntoActive" :auto-focus="$A.isDesktop()"/>
</div>
</div>
</div>
@ -205,7 +203,7 @@ export default {
},
computed: {
...mapState(['cacheDialogs', 'loadDialogs', 'dialogId', 'dialogSearchMsgId']),
...mapState(['cacheDialogs', 'loadDialogs', 'dialogId']),
routeName() {
return this.$route.name
@ -446,15 +444,12 @@ export default {
}
},
openDialog(dialogId, searchMsgId = null) {
openDialog(dialogId) {
if (this.operateVisible) {
return
}
this.dialogKey = "";
this.$store.dispatch("openDialog", {
dialog_id: dialogId,
search_msg_id: searchMsgId
})
this.$store.dispatch("openDialog", dialogId)
},
openContacts(user) {