fix minp location
This commit is contained in:
parent
dd192b3426
commit
5f4ba844e1
@ -24,4 +24,4 @@ export const WECHAT_VERSION = '7.0.0';
|
||||
|
||||
export const SDK_VERSION = '2.16.0';
|
||||
|
||||
export const VERSION = '1.1.11';
|
||||
export const VERSION = '1.1.12';
|
||||
|
@ -165,7 +165,19 @@ CwPage({
|
||||
|
||||
wx.getSetting({
|
||||
success: res => {
|
||||
if (res.authSetting['scope.userLocation']) {
|
||||
if (res.authSetting['scope.userLocation'] === undefined) {
|
||||
wx.authorize({
|
||||
scope: 'scope.userLocation',
|
||||
success: () => {
|
||||
getLocationAndSend();
|
||||
},
|
||||
fail: () => {
|
||||
$toast.fail({
|
||||
message: '请授权位置'
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if (res.authSetting['scope.userLocation'] === true) {
|
||||
getLocationAndSend();
|
||||
} else {
|
||||
wx.openSetting({
|
||||
@ -176,9 +188,14 @@ CwPage({
|
||||
$toast.clear();
|
||||
|
||||
$toast.fail({
|
||||
message: '不能使用位置'
|
||||
message: '请打开位置'
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
$toast.fail({
|
||||
message: '请授权位置'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -171,7 +171,19 @@ CwPage({
|
||||
|
||||
wx.getSetting({
|
||||
success: res => {
|
||||
if (res.authSetting['scope.userLocation']) {
|
||||
if (res.authSetting['scope.userLocation'] === undefined) {
|
||||
wx.authorize({
|
||||
scope: 'scope.userLocation',
|
||||
success: () => {
|
||||
getLocationAndSend();
|
||||
},
|
||||
fail: () => {
|
||||
$toast.fail({
|
||||
message: '请授权位置'
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if (res.authSetting['scope.userLocation'] === true) {
|
||||
getLocationAndSend();
|
||||
} else {
|
||||
wx.openSetting({
|
||||
@ -182,9 +194,14 @@ CwPage({
|
||||
$toast.clear();
|
||||
|
||||
$toast.fail({
|
||||
message: '不能使用位置'
|
||||
message: '请打开位置'
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
$toast.fail({
|
||||
message: '请授权位置'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user