From 7250b5ac5a1479f94e805bf01f65bf31c8653328 Mon Sep 17 00:00:00 2001 From: qiang Date: Mon, 18 Jul 2022 20:03:54 +0800 Subject: [PATCH] chore: build --- packages/uni-app-plus/dist/index.v3.js | 12 +++++++----- packages/uni-mp-weixin/dist/index.js | 16 +++++++++++++++- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/packages/uni-app-plus/dist/index.v3.js b/packages/uni-app-plus/dist/index.v3.js index 2f809a8d6..5edd8347f 100644 --- a/packages/uni-app-plus/dist/index.v3.js +++ b/packages/uni-app-plus/dist/index.v3.js @@ -6636,6 +6636,13 @@ var serviceContext = (function () { if (typeof appAuthorizeSetting === 'string') { appAuthorizeSetting = JSON.parse(appAuthorizeSetting); } } catch (error) { } + for (const key in appAuthorizeSetting) { + if (Object.hasOwnProperty.call(appAuthorizeSetting, key)) { + const value = appAuthorizeSetting[key]; + if (value === 'undefined') appAuthorizeSetting[key] = undefined; + } + } + return appAuthorizeSetting } @@ -8491,11 +8498,6 @@ var serviceContext = (function () { function createPushMessage (params, callbackId) { const setting = getAppAuthorizeSetting(); - if (!hasOwn(setting, 'notificationAuthorized')) { - return invoke$1(callbackId, { - errMsg: 'createPushMessage:fail missing push module' - }) - } if (setting.notificationAuthorized !== 'authorized') { return invoke$1(callbackId, { errMsg: 'createPushMessage:fail ' + setting.notificationAuthorized diff --git a/packages/uni-mp-weixin/dist/index.js b/packages/uni-mp-weixin/dist/index.js index 66ec8adb3..34ae3cab7 100644 --- a/packages/uni-mp-weixin/dist/index.js +++ b/packages/uni-mp-weixin/dist/index.js @@ -900,6 +900,19 @@ var getWindowInfo = { } }; +var getAppAuthorizeSetting = { + returnValue: function (result) { + const { locationReducedAccuracy } = result; + + result.locationAccuracy = 'unsupported'; + if (locationReducedAccuracy === true) { + result.locationAccuracy = 'reduced'; + } else if (locationReducedAccuracy === false) { + result.locationAccuracy = 'full'; + } + } +}; + // import navigateTo from 'uni-helpers/navigate-to' const protocols = { @@ -911,7 +924,8 @@ const protocols = { showActionSheet, getAppBaseInfo, getDeviceInfo, - getWindowInfo + getWindowInfo, + getAppAuthorizeSetting }; const todos = [ 'vibrate', -- GitLab