onShow: function() {
console.log("permission show")
wx.getSystemInfo({
success(res) {
console.log(res)
console.log(res.model)
console.log(res.pixelRatio)
console.log(res.windowWidth)
console.log(res.windowHeight)
console.log(res.language)
console.log(res.version)
console.log(res.locationAuthorized)
console.log(res.locationEnabled)
if (!res.locationEnabled) {
console.log("系统位置服务未开启");
wx.showToast({
title: '系统位置服务未开启',
icon: 'none',
duration: 3000
})
} else if (!res.locationAuthorized) {
console.log("微信位置服务未授权");
wx.showToast({
title: '微信位置服务未授权',
icon: 'none',
duration: 3000
})
}
},fail(e){
console.log(e)
}
})
},
切换手机位置服务开关,获取的数据不变?