This commit is contained in:
2023-11-14 17:15:14 +08:00
parent c786728a7b
commit 02f675c30c
3 changed files with 19 additions and 9 deletions

View File

@ -114,7 +114,9 @@
uni.onSocketMessage(res => {
console.log("webScoket监听收到的信息", res);
this.uploadType = 2
this.hr = JSON.parse(res.data).pulse
let resdata = JSON.parse(res.data)
let message = JSON.parse(resdata.message)
this.hr = message.pulse
this.$forceUpdate()
})
} catch (e) {
@ -303,4 +305,4 @@
}
}
}
</style>
</style>

View File

@ -77,10 +77,13 @@
if (e.deviceType == 1) {
this.SOCKETURL = `ws://112.6.122.71:8009/fd/webSocket/${e.sn}`
this.scoket();
// ws://112.6.122.71:8009/fd/webSocket/{sn}
// ws://218.58.213.15:8009/fd/webSocket/{sn}
}
})
}
})
},
methods: {
formatDate(timestamp) {
@ -135,11 +138,13 @@
}
})
uni.onSocketMessage(res => {
console.log("webScoket监听收到的信息", res);
let resdata = JSON.parse(res.data)
let message = JSON.parse(resdata.message)
console.log("webScoket监听收到的信息", resdata, message);
this.uploadType = 2
this.dbp = JSON.parse(res.data).dbp
this.sbp = JSON.parse(res.data).sbp
this.hr = JSON.parse(res.data).pulse
this.dbp = message.dbp
this.sbp = message.sbp
this.hr = message.pulse
this.$forceUpdate()
})
} catch (e) {
@ -325,4 +330,4 @@
}
}
}
</style>
</style>

View File

@ -162,7 +162,10 @@
})
uni.onSocketMessage(res => {
this.uploadType = 2
this.number = JSON.parse(res.data).fbg
let resdata = JSON.parse(res.data)
let message = JSON.parse(resdata.message)
console.log("webScoket监听收到的信息", resdata, message);
this.number = message.fbg
this.$forceUpdate()
})
} catch (e) {
@ -319,4 +322,4 @@
}
}
}
</style>
</style>