/*---------查找附近的蓝牙设备----------*/find() {let _ = this;console.log('蓝牙开始查找')console.log('蓝牙名字=' + _.deviceName)_.findList = []wx.startBluetoothDevicesDiscovery({services: [],success: function() {console.log('开始搜索蓝牙')wx.onBluetoothDeviceFound(function(res) {console.log(res, '搜索蓝牙相关设备')for (let i = 0; i < res.devices.length; i++) {// app.globalData.bleConfig.name 这里提前就获取了设备的name_.findList.push(res.devices[i])if (res.devices[i].name == _.deviceName) {var deviceId = res.devices[i].deviceIdconsole.log('找到设备')console.log(res.devices[i])if (uni.getSystemInfoSync().platform == 'ios') {_.deviceId = res.devices[i].deviceIduni.setStorageSync('currentDeviceId', _.deviceId)}console.log('找到设备')// ios搜索出目标设备后,将停止搜索,否则影响手机性能wx.stopBluetoothDevicesDiscovery({success: function() {_.toConnectEquip()}})}}})},fail: function(err) {console.log('没有找到设备')console.log(err)console.log('没有找到设备')wx.stopBluetoothDevicesDiscovery({success: function() {}})}})let timers = setTimeout(() => {wx.stopBluetoothDevicesDiscovery({success: function() {}})console.log('真的没有找到设备')console.log(_.findList.length)console.log('deviceId=' + _.deviceId)console.log('真的没有找到设备')if (_.findList.length == 0) {if (uni.getSystemInfoSync().platform === 'android') {_.modalShow = true;uni.openAppAuthorizeSetting({success(res) {console.log(res)}})}}uni.hideLoading()clearTimeout(timers)timers = null;}, 6000)},
环保网站建设价格微信怎样建立公众号郑州有什么好玩的干部重庆网络学院新冠状病毒最新疫情网络宣传推广方法b2b的两种网站类型免费cms建站系统有哪些武汉地铁建设时间韩国女排出线平台设计与开发镇江金山网镇江新闻公司简介模板300字黑客软件资源网站网络营销是什么时候兴起的成都住建局官网查询入口crm资源管理系统足球比赛直播平台app芜湖网络logo设计公司艺点意创怎么样标准品购买网站海口可信的海南网站建设免费网络翻外墙软件设计宝藏网址合集北京软件开发公司有几家常州第一门户网零食网页制作素材企业服务中心抖音国防科技大学录取分数线安康做网站的公司电话深圳办公室装饰