输出数据,测试使用

main
刘妍 1 month ago
parent 3b1b931200
commit ae39230bec

@ -135,6 +135,7 @@
const topicUAVUrl = computed(() => { const topicUAVUrl = computed(() => {
return 'thing/product/' + UAVinfo.sn + '/osd'; return 'thing/product/' + UAVinfo.sn + '/osd';
}); });
const mqttData = ref([]);
onMounted(() => { onMounted(() => {
destroyConnection(); destroyConnection();
createConnection(connectCallback); createConnection(connectCallback);
@ -151,6 +152,8 @@
if (topic == topicUAVUrl.value) { if (topic == topicUAVUrl.value) {
if (rs.data.latitude && rs.data.longitude) { if (rs.data.latitude && rs.data.longitude) {
uavTrack.value = rs.data; uavTrack.value = rs.data;
mqttData.value.push(rs.data);
console.log(mqttData.value);
} }
} else if (topic == topicUrl.value) { } else if (topic == topicUrl.value) {
if (rs.data.latitude && rs.data.longitude) { if (rs.data.latitude && rs.data.longitude) {

Loading…
Cancel
Save