function search() {
var that = this;
//检查蓝牙状态
wx.openBluetoothAdapter({
success: function (res) {
//蓝牙打开
wx.startBeaconDiscovery({
//搜索附近的iBeacon设备
uuids: ['74278adb-b644-4520-8f0c-720eaf059935'],//uuid参数
success: function (res) {
//控制台打印
wx.onBeaconUpdate(function(res){
console.log("打印监听到的设备信息" + res.beacons);
console.log(res.beacons);