liudan 5 months ago
parent
commit
8d4ac7844b
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/api/index.js

+ 2 - 3
src/api/index.js

@@ -101,12 +101,11 @@ export const initSocket = (obj, getMessage) => {
     console.log('connect_error');
     Toast.show({
       duration: 10000,
-      content: 'scoket连接出错了',
+      content: 'scoket连接出错了' + e,
     });
   });
   //服务器响应消息
   window.socket.on('callNumber', (data) => {
-    const data1 = JSON.parse(data);
     // Toast.show({
     //   duration: 20000,
     //   content: data1.path+data1.voiceFileName,
@@ -124,7 +123,7 @@ export const initSocket = (obj, getMessage) => {
   window.socket.on('disconnect', function (e) {
     Toast.show({
       duration: 10000,
-      content: '连接断开',
+      content: '连接断开' + e,
     });
     // window.socket = null;
     // initSocket(obj, getMessage);