YY 2 years ago
parent
commit
0af0586873
1 changed files with 2 additions and 7 deletions
  1. 2 7
      src/layout/header/notice.vue

+ 2 - 7
src/layout/header/notice.vue

@@ -39,14 +39,12 @@ export default {
       // const url = `ws://broadcast.waityou24.cn/dev/point/chat/v1/api/ws`;
       const url = `ws://broadcast.waityou24.cn/point/chat/v1/api/ws`;
       const ws = new WS(url, shop_id, (res) => {
-        console.log(res);
         if (res.data != 'connect success') this.onMessage(res.data);
       });
     },
     onMessage(message) {
       let data = JSON.parse(message);
       let type = data.type;
-      console.log(type);
       if (type === 'shopMsg') {
         this.instance = this.$notify({
           title: '新消息',
@@ -60,11 +58,8 @@ export default {
         });
         this.getNotRead();
       } else if (type === 'chat') {
-        if (this.$route.path === '/selfShop/message') {
-          console.log('1');
-          this.setMessage(data);
-        } else {
-          console.log(2);
+        if (this.$route.path === '/selfShop/message') this.setMessage(data);
+        else {
           this.instance = this.$notify({
             title: '新消息',
             message: '有顾客进行咨询,请及时回复!',