- wx.getLocation概率性闪退
- 当前 Bug 的表现(可附上截图) 调用wx.getLocation(),将坐标上传至服务端 - 预期表现 正常返回成功或者失败,成功上传,失败不上传 - 提供一个最简复现 Demo [代码]function[代码] [代码]getGPS() {[代码][代码] [代码][代码]console.log([代码][代码]"获取GPS"[代码][代码])[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'获取GPS'[代码][代码],[代码][代码] [代码][代码]icon: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]image: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]duration: 1000,[代码][代码] [代码][代码]mask: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) { },[代码][代码] [代码][代码]fail: [代码][代码]function[代码] [代码](res) { },[代码][代码] [代码][代码]complete: [代码][代码]function[代码] [代码](res) { },[代码][代码] [代码][代码]})[代码][代码] [代码][代码]wx.getLocation({[代码][代码] [代码][代码]type: [代码][代码]'wgs84'[代码][代码],[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]console.log([代码][代码]"获取GPS成功"[代码][代码])[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'获取GPS成功'[代码][代码],[代码][代码] [代码][代码]icon: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]image: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]duration: 1000,[代码][代码] [代码][代码]mask: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) { },[代码][代码] [代码][代码]fail: [代码][代码]function[代码] [代码](res) { },[代码][代码] [代码][代码]complete: [代码][代码]function[代码] [代码](res) { },[代码][代码] [代码][代码]})[代码][代码] [代码][代码]latitude = res.latitude;[代码][代码] [代码][代码]longitude = res.longitude;[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail:[代码][代码]function[代码][代码](res){[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'获取GPS失败'[代码][代码],[代码][代码] [代码][代码]icon: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]image: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]duration: 1000,[代码][代码] [代码][代码]mask: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) { },[代码][代码] [代码][代码]fail: [代码][代码]function[代码] [代码](res) { },[代码][代码] [代码][代码]complete: [代码][代码]function[代码] [代码](res) { },[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码]}[代码]代码执行后,概率性出现打印“获取GPS”后,直接闪退
2018-04-13 - 获取蓝牙对象缺少advertisServiceUUIDs和localName
调用wx.getBluetoothDevices(OBJECT)接口时返回的参数有概率出现缺少advertisServiceUUIDs和localName情况,导致无法执行下一步的wx.createBLEConnection iOS没有出现过这种情况
2018-03-23 - 调用startBluetoothDevicesDiscovery找不到设备
代码片段: wx.openBluetoothAdapter success: function (res) { setTimeout(function () { wx.startBluetoothDevicesDiscovery({ 开启适配器(openBluetoothAdapter)成功后,延迟200ms执行startBluetoothDevicesDiscovery,返回成功时,再延迟200ms执行getBluetoothDevices,没有发现设备 测试机:荣耀v10 对比iPhone 6没有这个问题
2018-03-22 - iOS和模拟器上可以访问服务端,而Android不行
服务端:https://access.ishanghome.com 操作:wx.request请求 现象:iOS和模拟器可以返回数据,Android提示请求失败
2018-03-15 - wx.login获取不到code
[代码]//调用登录接口[代码][代码] [代码][代码]wx.login({[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]wx.getUserInfo({[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]var[代码] [代码]code = res.code;[代码][代码] [代码][代码]that.globalData.userInfo = res.userInfo[代码][代码] [代码][代码]console.log(code);[代码][代码] [代码][代码]typeof[代码] [代码]cb == [代码][代码]"function"[代码] [代码]&& cb(that.globalData.userInfo)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码]打印code显示"undefined" [代码]//调用登录接口[代码][代码] [代码][代码]wx.login({[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]wx.getUserInfo({[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]var[代码] [代码]code = res.code;[代码][代码] [代码][代码]that.globalData.userInfo = res.userInfo[代码][代码] [代码][代码]console.log(res);[代码][代码] [代码][代码]typeof[代码] [代码]cb == [代码][代码]"function"[代码] [代码]&& cb(that.globalData.userInfo)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码]打印res,里面找不到code字段 是接口有变化吗?还是需要配置什么
2018-03-14