wx.startLocationUpdateBackground锁屏后再打开无法获取定位信息?
发布于 6 年前 作者 wenmin 8546 次浏览 来自 官方Issues

微信小程序调用wx.startLocationUpdateBackground,锁屏可以获取坐标,但是解锁后就无法获取信息了。

使用微信lib版本: 2.11.2及以上。

运行微信版本:7.0.19

    wx.startLocationUpdateBackground({
      success: (res) => {
        console.log(res);
      },
      fail: (res) => {
        console.log(res)
      }
    }); 
const _locationChangeFn = function(res) {
  console.log('location change', res)
 }
 wx.onLocationChange(_locationChangeFn)

1 回复

你好,请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

回到顶部