diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue index 2c68ab0f..2471e24f 100644 --- a/src/pages/mine/index.vue +++ b/src/pages/mine/index.vue @@ -150,15 +150,18 @@ const exchange=async (item)=>{ const arrayBuffer = new Uint8Array(res1) imageSrc.value = "data:image/png;base64," + uni.arrayBufferToBase64(arrayBuffer) showWin4.value=true -/* const ws = uni.connectSocket({ - url: `ws://172.16.100.93:9052/api/smart/appointment/subscribe/msg?AppointmentUid=${item.appointmentUid}`, // 你的WebSocket服务器地址 + uni.connectSocket({ + url: `ws://172.16.100.93:9052/api/smart/appointment/subscribe/msg?AppointmentUid=${item.appointmentUid}`, success: function() { console.log('WebSocket连接已创建成功!'); } }); + uni.onSocketOpen(function (res) { + console.log(res,'onSocketOpen') + }); uni.onSocketMessage(function (res) { console.log('WebSocket接收到消息:', res.data); - });*/ + }); } const goViewVenues = (item) => { uni.setStorageSync('ticket',item)