标签:pre 信息 res use 打开 允许 获取 微信 ati
<button bindtap='onAuthLocation' >授权位置</button>
onAuthLocation() {
wx.authorize({
scope: 'scope.userLocation',
success: (res) => {
console.log('成功:' , res)
},
fail: (res) => {
console.log('失败:', res)
},
})
},
<button bindtap='onGetLocation' >获取位置</button>
onGetLocation() {
wx.getLocation({
success: (res) => {
console.log('成功:', res)
},
fail: (res) => {
console.log('失败:', res)
},
})
},
<button bindtap='gotoSetting' >打开授权信息面板</button>
gotoSetting() {
wx.openSetting({
success: (res) => {
console.log(res)
}
})
},
标签:pre 信息 res use 打开 允许 获取 微信 ati
原文地址:https://www.cnblogs.com/cckui/p/10002435.html