小程序
小游戏
企业微信
微信支付
扫描小程序码分享
这是mate20pro的小程序设置打开页面
这是其它手机打开小程序设置的页面
无法授权位置信息导致无法打开地图选择位置
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
你好,请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
//用户选择位置
wxGetUserAddress: function () {
var that = this
wx.getSetting({
success:function(res){
console.log(res);
//这里判断是否有地位权限
if (!res.authSetting['scope.userLocation']) {
wx.showModal({
title: '提示',
content: '小程序请求获取位置权限',
if(res.confirm==false){
return false;
}
wx.openSetting({
success(res) {
//如果再次拒绝则返回页面并提示
wx.showToast({
title: '此功能需获取位置信息,请重新设置',
duration: 3000,
icon: 'none'
})
} else {
//允许授权,调用地图
that.chooseMap()
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
你好,请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
//用户选择位置
wxGetUserAddress: function () {
var that = this
wx.getSetting({
success:function(res){
console.log(res);
//这里判断是否有地位权限
if (!res.authSetting['scope.userLocation']) {
wx.showModal({
title: '提示',
content: '小程序请求获取位置权限',
success:function(res){
if(res.confirm==false){
return false;
}
wx.openSetting({
success(res) {
//如果再次拒绝则返回页面并提示
if (!res.authSetting['scope.userLocation']) {
wx.showToast({
title: '此功能需获取位置信息,请重新设置',
duration: 3000,
icon: 'none'
})
} else {
//允许授权,调用地图
that.chooseMap()
}
}
})
}
})
} else {