perf: 优化消息窗口

This commit is contained in:
kuaifan 2025-03-30 08:56:22 +08:00
parent 82230d70a5
commit a57740e14e
6 changed files with 22 additions and 32 deletions

View File

@ -227,7 +227,6 @@ export default {
case 'contact':
this.$store.dispatch("openDialogUserid", item.id).then(_ => {
this.onHide()
this.goForward({name: 'manage-messenger', params: {dialogAction: 'dialog'}})
}).catch(({msg}) => {
$A.modalError(msg || this.$L('打开会话失败'))
});

View File

@ -182,9 +182,7 @@ export default {
},
openDialog() {
this.$store.dispatch("openDialogUserid", this.userid).then(_ => {
this.goForward({name: 'manage-messenger'})
}).catch(({msg}) => {
this.$store.dispatch("openDialogUserid", this.userid).catch(({msg}) => {
$A.modalError(msg)
});
},

View File

@ -636,17 +636,16 @@ export default {
})
if (dialogId) {
this.$store.dispatch("openDialog", dialogId)
this.aibotShow = false;
} else {
this.aibotShow = false
return
}
//
this.aibotDialogSearchLoad = type;
this.$store.dispatch("call", {
url: 'users/search/ai',
data: {type},
}).then(({data}) => {
this.$store.dispatch("openDialogUserid", data.userid).then(_ => {
if (this.windowOrientation == 'landscape') {
this.goForward({ name: 'manage-messenger' })
}
this.aibotShow = false;
}).catch(({ msg }) => {
$A.modalError(msg)
@ -657,7 +656,6 @@ export default {
this.aibotDialogSearchLoad = '';
$A.messageError(msg || '机器人暂未开启');
});
}
},
//
onMeeting(name) {

View File

@ -522,7 +522,6 @@ export default {
} else if (this.$parent.$options.name === "Modal") {
this.$parent.close()
}
this.goForward({name: 'manage-messenger'})
}).catch(({msg}) => {
$A.modalError(msg)
});

View File

@ -219,9 +219,7 @@ export default {
onOpenDialog(userid) {
if (this.dialogData.type == 'group' || ![this.dialogData.dialog_user?.userid, this.userId].includes(userid)) {
this.$store.dispatch("openDialogUserid", userid).then(_ => {
this.goForward({name: 'manage-messenger'})
}).catch(({msg}) => {
this.$store.dispatch("openDialogUserid", userid).catch(({msg}) => {
$A.modalError(msg)
});
}

View File

@ -505,9 +505,7 @@ export default {
},
openDialog(userid) {
this.$store.dispatch("openDialogUserid", userid).then(_ => {
this.goForward({name: 'manage-messenger'})
}).catch(({msg}) => {
this.$store.dispatch("openDialogUserid", userid).catch(({msg}) => {
$A.modalError(msg)
});
},