mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-02 06:54:19 +00:00
perf: 优化打开个人会话速度
This commit is contained in:
parent
3416f41116
commit
2189337a1d
10
resources/assets/js/store/actions.js
vendored
10
resources/assets/js/store/actions.js
vendored
@ -2192,6 +2192,16 @@ export default {
|
||||
*/
|
||||
openDialogUserid({state, dispatch}, userid) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
const dialog = state.cacheDialogs.find(item => {
|
||||
if (item.type !== 'user' || !item.dialog_user) {
|
||||
return false
|
||||
}
|
||||
return item.dialog_user.userid === userid
|
||||
});
|
||||
if (dialog) {
|
||||
dispatch("openDialog", dialog.id);
|
||||
return;
|
||||
}
|
||||
dispatch("call", {
|
||||
url: 'dialog/open/user',
|
||||
data: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user