Explorar el Código

普通文本消息 监听

yourname hace 7 meses
padre
commit
3f6adac96e
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      client/mobile/pages_classroom.tsx

+ 2 - 0
client/mobile/pages_classroom.tsx

@@ -277,6 +277,8 @@ export const ClassroomPage = () => {
         } catch (err) {
           console.error('解析应答消息失败', err);
         }
+      } else if (msg.type === 88888) { // 普通文本消息
+        showMessage(`${msg.sender?.userId || '未知用户'}: ${msg.data}`);
       }
     });
   };