收藏
回答

小程序的蓝牙信标的uuid信标物理硬件没有开启,而且超出距离也会被监听到?

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

    });

  },


最后一次编辑于  05-20
回答关注问题邀请回答
收藏
登录 后发表内容