This commit is contained in:
xingyy 2023-12-22 15:17:22 +08:00
parent 2c0698910e
commit b14826e6d1

View File

@ -166,6 +166,7 @@ const exchange=async (item)=>{
console.log(res,'onSocketOpen') console.log(res,'onSocketOpen')
}); });
uni.onSocketMessage((res)=>{ uni.onSocketMessage((res)=>{
console.log('WebSocket接收到消息', res);
if (res.data==='start the camera'){ if (res.data==='start the camera'){
/* uni.closeSocket()*/ /* uni.closeSocket()*/
uni.navigateTo({ uni.navigateTo({
@ -177,7 +178,7 @@ const exchange=async (item)=>{
url: '/pages/index/index?acc=1' url: '/pages/index/index?acc=1'
}) })
} }
console.log('WebSocket接收到消息', res);
}); });
} }