diff --git a/src/platforms/mp-weixin/helpers/get-app-authorize-setting.js b/src/platforms/mp-weixin/helpers/get-app-authorize-setting.js new file mode 100644 index 0000000000000000000000000000000000000000..24135a76c4d13484d9585d8a9db662658db72dde --- /dev/null +++ b/src/platforms/mp-weixin/helpers/get-app-authorize-setting.js @@ -0,0 +1,12 @@ +export default { + returnValue: function (result) { + const { locationReducedAccuracy } = result + + result.locationAccuracy = 'unsupported' + if (locationReducedAccuracy === true) { + result.locationAccuracy = 'reduced' + } else if (locationReducedAccuracy === false) { + result.locationAccuracy = 'full' + } + } +} diff --git a/src/platforms/mp-weixin/runtime/api/protocols.js b/src/platforms/mp-weixin/runtime/api/protocols.js index c610422607eff5934ea4817c985d5c3678851311..7f3a5f7a423cc09ed44505f1653a6d4266adee1d 100644 --- a/src/platforms/mp-weixin/runtime/api/protocols.js +++ b/src/platforms/mp-weixin/runtime/api/protocols.js @@ -6,6 +6,7 @@ import showActionSheet from '../../helpers/show-action-sheet' import getAppBaseInfo from '../../helpers/get-app-base-info' import getDeviceInfo from '../../helpers/get-device-info' import getWindowInfo from '../../helpers/get-window-info' +import getAppAuthorizeSetting from '../../helpers/get-app-authorize-setting' export const protocols = { redirectTo, @@ -16,7 +17,8 @@ export const protocols = { showActionSheet, getAppBaseInfo, getDeviceInfo, - getWindowInfo + getWindowInfo, + getAppAuthorizeSetting } export const todos = [ 'vibrate',