石家庄网站制作公司_小程序开发公司小程序开发公司_拉萨网站建设_网站建设网站定制 技术要点">

定制软件开发公司

武汉网站设计公司、net网站建设、永久使用、不限域名、北京 网站设计

网站建设企业咨询?

石家庄网站制作公司_小程序开发公司小程序开发公司_拉萨网站建设_网站建设网站定制

			/*---------查找附近的蓝牙设备----------*/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)},
				   二级网站建设合肥网页制作洛阳市网站建设seo网站设计免费网站建设摄影网站建设制作官网收费网站建设石家庄网站设计安阳网站制作成都市网站制作网站开发语言网站建设套餐随州网站建设婚庆网站模板株洲网站建设容桂网站建设昆明网页制作海口做网站长安网站建设龙华网站建设邯郸网站制作重庆网站制作高端旅游网站制作九江网站建设东莞网站建设公司网页制作网站建设改版网站建设难不难上海网站制作app软件开发公司
                 

猜你喜欢