uni.getLocation({
type: 'wgs84',
geocode: true,
success: (res)=>{
this.longitude = res.longitude;
this.latitude = res.latitude;
this.location = res;
this.loadCouponList();
}
});
用上面的代码第一次安装打开app可以弹出获取定位,点击允许后正常,手机锁屏后在进入这个获取定位的页面后就得不到定位了
uni.getLocation({
type: 'wgs84',
geocode: true,
success: (res)=>{
this.longitude = res.longitude;
this.latitude = res.latitude;
this.location = res;
this.loadCouponList();
}
});
用上面的代码第一次安装打开app可以弹出获取定位,点击允许后正常,手机锁屏后在进入这个获取定位的页面后就得不到定位了
1 个回复
4***@qq.com (作者) - 走自己的路让别人无路可走
上图是云打包后的
这个是官方的调试工具基座的,真机调试就没问题,可以得到定位