liyongli 2 anni fa
parent
commit
50b0d74a25
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/view/chatQh/index.vue

+ 1 - 1
src/view/chatQh/index.vue

@@ -71,6 +71,7 @@ const load = ref(false);
 const chatEle = ref(null);
 const inputText = ref('');
 let chatlist = ref([]);
+let session_hash = Math.random().toString(36).substring(2);
 
 if (!userData.value.UserId) {
   chat.value.push(
@@ -112,7 +113,6 @@ function saveText() {
   createSocket(
     ws => {
       const data = ws.data || {};
-      let session_hash = Math.random().toString(36).substring(2);
       if (data.msg == 'send_hash')
         ws.ws.send(
           JSON.stringify({