更新
This commit is contained in:
@@ -222,22 +222,21 @@ export default {
|
||||
success(res) {
|
||||
console.log(res.authSetting,'res.authSetting')
|
||||
if (!res.authSetting[ 'scope.userLocation']) {
|
||||
console.log('用户没有授权用户没有授权用户没有授权用户没有授权')
|
||||
// console.log('用户没有授权用户没有授权用户没有授权用户没有授权')
|
||||
// 用户没有授权
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您暂无授权定位权限,将无法显示油站距离',
|
||||
content: '您暂无授权定位权限,将无法显示附近油站',
|
||||
confirmText: '去设置',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
wx.openSetting({
|
||||
success(res) {
|
||||
if (res.authSetting['scope.userLocation']) {
|
||||
re()
|
||||
// 授权成功,重新定位
|
||||
} else {
|
||||
// 没有允许定位权限
|
||||
wx.showToast({
|
||||
title: '您拒绝了定位权限,将无法使用附近电站站功能',
|
||||
title: '您拒绝了定位权限',
|
||||
icon: 'none'
|
||||
});
|
||||
rj('拒绝了定位权限')
|
||||
|
||||
Reference in New Issue
Block a user