mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
perf: 优化消息窗口
This commit is contained in:
parent
82230d70a5
commit
a57740e14e
@ -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('打开会话失败'))
|
||||
});
|
||||
|
||||
@ -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)
|
||||
});
|
||||
},
|
||||
|
||||
@ -636,28 +636,26 @@ export default {
|
||||
})
|
||||
if (dialogId) {
|
||||
this.$store.dispatch("openDialog", dialogId)
|
||||
this.aibotShow = false;
|
||||
} else {
|
||||
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)
|
||||
}).finally(_ => {
|
||||
this.aibotDialogSearchLoad = '';
|
||||
});
|
||||
}).catch(({msg}) => {
|
||||
this.aibotDialogSearchLoad = '';
|
||||
$A.messageError(msg || '机器人暂未开启');
|
||||
});
|
||||
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(_ => {
|
||||
this.aibotShow = false;
|
||||
}).catch(({ msg }) => {
|
||||
$A.modalError(msg)
|
||||
}).finally(_ => {
|
||||
this.aibotDialogSearchLoad = '';
|
||||
});
|
||||
}).catch(({msg}) => {
|
||||
this.aibotDialogSearchLoad = '';
|
||||
$A.messageError(msg || '机器人暂未开启');
|
||||
});
|
||||
},
|
||||
// 会议
|
||||
onMeeting(name) {
|
||||
|
||||
@ -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)
|
||||
});
|
||||
|
||||
@ -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)
|
||||
});
|
||||
}
|
||||
|
||||
@ -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)
|
||||
});
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user