Explorar o código

普通文本消息 监听

yourname hai 7 meses
pai
achega
3f6adac96e
Modificáronse 1 ficheiros con 2 adicións e 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) {
         } catch (err) {
           console.error('解析应答消息失败', err);
           console.error('解析应答消息失败', err);
         }
         }
+      } else if (msg.type === 88888) { // 普通文本消息
+        showMessage(`${msg.sender?.userId || '未知用户'}: ${msg.data}`);
       }
       }
     });
     });
   };
   };