- 请问下startLocationUpdateBackground这个接口有并发量限制吗?
startBgLocation() { return new Promise((resolve, reject) => { wx.startLocationUpdateBackground({ success: () => { this.backgroundLocationStarted = true; // 只有监听器未运行时才启动 if (!this.isListenerRunning) { this.startLocationChangeListener(); } resolve(); }, fail: (err) => { this.sendLogToServer('startBgLocation 失败', err); reject(err); } }); }); }, 如果我10个人挂后台同时调用此接口获取位置信息,会限制其中一人一直获取之前的位置吗,就是一直获取上一次的位置
09-05 - 请问下调试版支持onCheckForUpdate方法吗?
updateManager.onCheckForUpdate(function (res) { // 请求完新版本信息的回调 console.log('检查更新', res) }) updateManager.onUpdateReady(function () { wx.showModal({ title: '更新提示', content: '新版本已经准备好,是否重启应用?', success: function (res) { if (res.confirm) { // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 updateManager.applyUpdate() } }, }) }) updateManager.onUpdateFailed(function () { // 新版本下载失败 console.log('更新失败') })
08-07 - 我有一个定位功能小程序,接口已经审核过了,我是开发者,我给别人加上了体验版之后,为什么别人不能定位?
wx.getLocation({ type: 'wgs84', success: (res) => { this.sendLogToServer('立即定位成功' + `位置: (${res.longitude}, ${res.latitude}), 精度: ${res.accuracy}m`); // 立即定位成功后直接发送一次数据 this.sendLocationToBackend(res, this.validIds).catch(err => { this.sendLogToServer('立即定位后发送失败' + `错误: ${err.message}`); }); resolve(); }, fail: (err) => { this.sendLogToServer('立即定位失败' + `错误: ${err.errMsg}, 准备重试`); this.startBackgroundLocation().then(resolve).catch(resolve); } });
07-29 - 已经审核通过startLocationUpdateBackground接口,但是挂在后台定位不生效?
wx.startLocationUpdateBackground({ success: () => { console.log('后台定位启动成功'); this.backgroundLocationStarted = true; this.startLocationChangeListener(); resolve(); },
07-28