no message
This commit is contained in:
parent
6356c99543
commit
ce36792303
@ -220,6 +220,8 @@ export default {
|
||||
this.notificationClass.replaceOptions({
|
||||
icon: user.userimg,
|
||||
body: body,
|
||||
data: data,
|
||||
tag: "dialog",
|
||||
requireInteraction: true
|
||||
});
|
||||
this.notificationClass.userAgreed();
|
||||
@ -320,11 +322,21 @@ export default {
|
||||
this.notificationClass = new notificationKoro(this.$L("打开通知成功"));
|
||||
if (this.notificationClass.support) {
|
||||
this.notificationClass.notificationEvent({
|
||||
onclick: () => {
|
||||
window.focus();
|
||||
onclick: ({target}) => {
|
||||
this.notificationClass.close();
|
||||
this.goForward({path: '/manage/messenger'});
|
||||
this.$store.dispatch("openDialogUserid", this.dialogMsgPush.userid);
|
||||
window.focus();
|
||||
//
|
||||
const {tag, data} = target;
|
||||
if (tag == 'dialog') {
|
||||
if (!$A.isJson(data)) {
|
||||
return;
|
||||
}
|
||||
this.goForward({path: '/manage/messenger'});
|
||||
if (data.dialog_id) {
|
||||
this.$store.state.method.setStorage("messenger::dialogId", data.dialog_id)
|
||||
this.$store.state.dialogOpenId = data.dialog_id;
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
this.notificationPermission();
|
||||
|
@ -147,7 +147,6 @@ export default {
|
||||
}
|
||||
},
|
||||
dialogOpenId(id) {
|
||||
this.$store.state.method.setStorage("messenger::dialogId", id)
|
||||
this.dialogId = id;
|
||||
}
|
||||
},
|
||||
|
3
resources/assets/js/store/actions.js
vendored
3
resources/assets/js/store/actions.js
vendored
@ -1128,6 +1128,7 @@ export default {
|
||||
},
|
||||
}).then(result => {
|
||||
dispatch("saveDialog", result.data);
|
||||
state.method.setStorage("messenger::dialogId", result.data.id);
|
||||
state.dialogOpenId = result.data.id;
|
||||
resolve(result);
|
||||
}).catch(e => {
|
||||
@ -1381,7 +1382,6 @@ export default {
|
||||
const {mode, data} = msg;
|
||||
const {dialog_id} = data;
|
||||
// 更新消息列表
|
||||
state.dialogMsgPush = data;
|
||||
dispatch("saveDialogMsg", data)
|
||||
if (mode === "add" || mode === "chat") {
|
||||
// 新增任务消息数量
|
||||
@ -1397,6 +1397,7 @@ export default {
|
||||
// 移动到首位
|
||||
dispatch("moveDialogTop", dialog_id);
|
||||
}
|
||||
state.dialogMsgPush = data;
|
||||
}
|
||||
// 更新最后消息
|
||||
dispatch("updateDialogLastMsg", data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user