监听位置变化有时候后时间很长?
let _locationChangeFn = (location) => {
resolve(location);
console.log('监听位置变化结束', new Date());
wx.offLocationChange(_locationChangeFn)
};
console.log('开始监听位置变化', new Date());
wx.startLocationUpdate({
success: (res) => {
wx.onLocationChange(_locationChangeFn);
},
fail: (err) => {
reject(false);
}
})
这个监听位置位置真机测试有时候时间长达10s