hellouniapp->api->beacon即可复现
![g***@qq.com](https://img-cdn-tc.dcloud.net.cn/account/identicon/4c83982908544344b092ccaacde99932.png)
- 发布:2020-06-23 14:58
- 更新:2020-06-23 15:15
- 阅读:1212
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win10 X64 1903
HBuilderX类型: 正式
HBuilderX版本号: 2.7.14
手机系统: Android
手机系统版本号: Android 10
手机厂商: 华为
手机机型: 一加6,3,华为均测试
页面类型: vue
打包方式: 云端
项目创建方式: HBuilderX
操作步骤:
预期结果:
使用uni.onBeaconUpdate可以正常使用API,扫描到的设备和微信小程序一样多。
使用uni.onBeaconUpdate可以正常使用API,扫描到的设备和微信小程序一样多。
实际结果:
uni.onBeaconUpdate不能正常使用,plus.ibeacon.onBeaconUpdate扫描结果比微信小程序少
uni.onBeaconUpdate不能正常使用,plus.ibeacon.onBeaconUpdate扫描结果比微信小程序少
bug描述:
问题1:uni.onBeaconUpdate API至少安卓无法正常使用。替换为plus.ibeacon.onBeaconUpdate可搜索到附近设备。但!!!问题2来了
问题2 plus.ibeacon.onBeaconUpdate经常扫不到设备,,或比微信小程序扫到的少。
问题3:https://www.html5plus.org/doc/zh_cn/ibeacon.html文档代码有一处错误,,“success;”冒号打成了分号,全文检索即可只有一处
问题4:hellouniapp->page->api->beacon.vue的14行代码key不应该为uuid,uuid会重复
<!-- <view class="uni-list-box" v-for="(item, index) in deviceList" :key="item.uuid"> -->
<view class="uni-list-box" v-for="(item, index) in deviceList" :key="index">
![](http://img-cdn-tc.dcloud.net.cn/uploads/questions/20200623/0cb605d83d3a935e732907ee319b1f2c.png)
![](http://img-cdn-tc.dcloud.net.cn/uploads/questions/20200623/f7ac3640ee219894b0d1badb1265fb6c.jpg)
![](http://img-cdn-tc.dcloud.net.cn/uploads/questions/20200623/22e80713789e4b2081a78c756ef7aa9a.jpg)