|
|
@@ -219,14 +219,20 @@
|
|
|
// });
|
|
|
|
|
|
if (getToken()) {
|
|
|
- console.log(window)
|
|
|
+ console.log(window);
|
|
|
let url =
|
|
|
- 'ws://' +window.location.host +
|
|
|
+ 'ws://' +
|
|
|
+ window.location.host +
|
|
|
'/ws/websocket/UnreadNotifyMessageCount?token=' +
|
|
|
getToken();
|
|
|
let socket = new WebSocket(url);
|
|
|
socket.onmessage = (event) => {
|
|
|
this.noticeCount = event.data * 1 || 0;
|
|
|
+ this.$store.dispatch('user/setMenuBadge', {
|
|
|
+ path: '/page-wt/message',
|
|
|
+ value: this.noticeCount,
|
|
|
+ color: 'danger'
|
|
|
+ });
|
|
|
if (this.noticeCount) {
|
|
|
getUnreadNotice().then((res) => {
|
|
|
this.visibleModal = false;
|