提交 d2614ed4 编写于 作者: Q qiang

Merge branch 'dev' into alpha

......@@ -5,5 +5,12 @@ export function getAppAuthorizeSetting () {
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
}
import {
hasOwn
} from 'uni-shared'
import {
invoke,
publish
......@@ -72,11 +69,6 @@ export function offPush (params) {
export function createPushMessage (params, callbackId) {
const setting = getAppAuthorizeSetting()
if (!hasOwn(setting, 'notificationAuthorized')) {
return invoke(callbackId, {
errMsg: 'createPushMessage:fail missing push module'
})
}
if (setting.notificationAuthorized !== 'authorized') {
return invoke(callbackId, {
errMsg: 'createPushMessage:fail ' + setting.notificationAuthorized
......
export default {
returnValue: function (result) {
const { locationReducedAccuracy } = result
result.locationAccuracy = 'unsupported'
if (locationReducedAccuracy === true) {
result.locationAccuracy = 'reduced'
} else if (locationReducedAccuracy === false) {
result.locationAccuracy = 'full'
}
}
}
......@@ -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',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册