添加关闭客户端时通知服务端

This commit is contained in:
RenCheng 2025-03-01 17:23:27 +08:00
parent 828b5c6a6d
commit f91d4b9de7
2 changed files with 6 additions and 2 deletions

View File

@ -54,7 +54,9 @@
computed: { computed: {
}, },
destroyed: function () { // destroyed: function () { //
this.websocketclose(); var userId = store.getters.userInfo.id;
this.websock.send("close_"+userId);
this.websocketclose();
}, },
created () { created () {

View File

@ -54,7 +54,9 @@
computed: { computed: {
}, },
destroyed: function () { // destroyed: function () { //
this.websocketclose(); var userId = store.getters.userInfo.id;
this.websock.send("close_"+userId);
this.websocketclose();
}, },
created () { created () {