请提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
多次调用wx.startLocationUpdateBackground()会出现重重复监听事件?比如我单击按钮 开启后台位置监控调用,再单击关闭后台监控,现在的问题是 开了然后关,再开发现onLocationChange事件触发2次,再关再开就会出现3,4,5次.这是如何避免 //开启后台获取地理位置坐标 async enableLocationUpdateBackground() { const that = this; wx.startLocationUpdateBackground({ success:async res=> { //console.log('开启后台定位', res) Notify({ type: 'success', message: '开启上报定位信息' }); //开始记录 const userId = wx.getStorageSync('userId'); const openId = wx.getStorageSync('openid'); const userInfo = this.data.userInfo; const startloc = await that.getLocation(); const startaddress = await that.reverseGeocoder({ latitude: startloc.latitude, longitude: startloc.longitude }); that.addTrackPath({ "UserId": userId, "TrackingDateTime": moment().format("YYYY-MM-DDTHH:mm:ss.SSS[Z]"), "BeginDateTime": moment().format("YYYY-MM-DDTHH:mm:ss.SSS[Z]"), "Location": JSON.stringify(startloc), "latitude": startloc.latitude, "longitude": startloc.longitude, "Address": startaddress.result.address, "OpenId": openId, "NickName": userInfo.nickName, "AvatarUrl": userInfo.avatarUrl, }) wx.onLocationChange( async res => { //console.log('onLocationChange', res) const loc = await that.reverseGeocoder({ latitude: res.latitude, longitude: res.longitude }); //console.log(loc) that.addTrackPath({ "UserId": userId, "TrackingDateTime": moment().format("YYYY-MM-DDTHH:mm:ss.SSS[Z]"), "Location": JSON.stringify(res), "latitude": res.latitude, "longitude": res.longitude, "Address": loc.result.address, "OpenId": openId, "NickName": userInfo.nickName, "AvatarUrl": userInfo.avatarUrl, }) }); }, fail(res) { that.setData({ enable: false }) console.log('开启后台定位失败', res) Notify({ type: 'danger', message: '开启定位失败' }); Dialog.alert({ message: '请转到设置位置信息[使用小程序期间和离开小程序后]', }).then(() => { wx.navigateTo({ url: '../manage/index', }) }); }, complete: function (res) { // console.log('开启后台定位.complete', res) // wx.openSetting({ // success(res) { // console.log(res.authSetting) // res.authSetting = { // "scope.userInfo": true, // "scope.userLocation": true // } // } // }) }, }); }, //关闭后台获取地理坐标 disableLocationUpdateBackground() { const that = this; wx.stopLocationUpdate({ complete: async (res) => { wx.offLocationChange(res=>{ }) //结束记录 const userId = wx.getStorageSync('userId'); const openId = wx.getStorageSync('openid'); const userInfo = this.data.userInfo; const endloc = await that.getLocation(); const endaddress = await that.reverseGeocoder({ latitude: endloc.latitude, longitude: endloc.longitude }); that.addTrackPath({ "UserId": userId, "TrackingDateTime": moment().format("YYYY-MM-DDTHH:mm:ss.SSS[Z]"), "EndDateTime": moment().format("YYYY-MM-DDTHH:mm:ss.SSS[Z]"), "Location": JSON.stringify(endloc), "latitude": endloc.latitude, "longitude": endloc.longitude, "Address": endaddress.result.address, "OpenId": openId, "NickName": userInfo.nickName, "AvatarUrl": userInfo.avatarUrl, }) Notify({ type: 'primary', message: '停止上报定位信息' }); }, }) },
2020-07-08你好,提示“登录环境异常,本次登录失效,请重新登录”的问题,重新扫码登录即可,出现该提示一般是由于微信帐号被其它用户投诉导致(如:涉嫌频繁发送营销类广告骚扰信息等,请遵守微信使用规则,并规范个人行为,谢谢!)
这是什么情况?我在朋友家电脑上登录微信登陆不上?电脑系统重装后,pc版微信频繁出现该提示, 电脑系统是纯净原版的,系统补丁也都更新过了. [图片]微信也卸载重装多次.都无法解决这个问题
2020-07-08你好,麻烦具体描述信息。
认证支付问题?您好,小程序臻京喜,是复用的怎么还需要支付300
2020-07-08麻烦提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
webview里面的h5在ios中的问题 ?我在小程序里面使用webveiw,然后进入h5页面,在页面中跳转到另一个域名的h5(另一个域名添加了业务域名的),ios 手机居然能打开我们自己的app(这个app也是嵌套了这个h5的)。这是什么原因呢
2020-07-08你好,麻烦参考一下 --微信认证申请流程(企业类型)-- https://developers.weixin.qq.com/community/develop/doc/00064c76418108e7c73af219d51009 进行认证
小程序做了微信认证后还能进行企业认证吗?小程序通过审核发布上线后,获取授权失败,授权有微信昵称、手机号、真实姓名,百度后说要进行小程序企业认证,企业认证的具体操作可以告诉一下吗?
2020-07-08麻烦提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
recycle-view中的图片显示不了什么情况?recycle-item里面有要显示的图片,如下图所示 显示不出来 [图片]
2020-07-08你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html) 安卓是否出现卡机问题?
canvas2D 在iOS上加载多张图片阻塞卡机问题?canvas2D 在iOS上加载多张图片会阻塞卡机, 是否有其他方法解决? img.onload = (res) => {} //100来张图片
2020-07-08你好,提示“登录环境异常,本次登录失效,请重新登录”的问题,重新扫码登录即可,出现该提示一般是由于微信帐号被其它用户投诉导致(如:涉嫌频繁发送营销类广告骚扰信息等,请遵守微信使用规则,并规范个人行为,谢谢!)
电脑版微信 微信登录环境存在异常怎么回事 这个如何处理?这几天 电脑登录微信 连续俩天了! 出现这个问题!请问官方人员 !这个怎么解决! 微信号cien666666
2020-07-08你好,这边测试是没有问题的哈,你可以换个浏览器,按以下流程操作绑定:https://kf.qq.com/faq/170824FF3EBV170824NZRzYN.html
小程序无法绑定开放平台?需求:公司开发小程序,希望获取到unionid,故需要绑定开放平台。 遇到的问题:绑定小程序到开放平台时,toast报错:系统错误,请稍后重试!这个错误提示维持了两天。 开放平台账号:libyteam@szzbmy.com 小程序appId:wxf7fd8014ea25c6e7 [图片]
2020-07-08麻烦提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。 保存在手机什么位置呢?
wx.chooseImage()在上传图片时会保存到手机中,请问怎么解决?wx.chooseImage()在上传图片时会保存到手机中,请问怎么解决?
2020-07-08