This commit is contained in:
xiaozhiyong
2024-04-08 10:43:56 +08:00
parent 0907abab72
commit 3c1fc03e1f
4 changed files with 50 additions and 38 deletions

View File

@@ -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('拒绝了定位权限')