handleBeaconDiscovery(data) {
const range = data.range;
const rssiArray = data.beaconList.map(uuid => ({
uuid,
rssi: [],
avg: 0
}));
wx.startBeaconDiscovery({
uuids: data.beaconList,
success: () => {
wx.onBeaconUpdate(res => {
console.log(222222222,res);
wx.showToast({
title: '信标'+ res.beacons[0].uuid,
duration: 3000
})
this.processBeaconUpdate(res.beacons, rssiArray, range);
});
},
fail: this.handleBeaconError
});
},
