get-app-authorize-setting.js 563 字节
Newer Older
fxy060608's avatar
fxy060608 已提交
1
export function getAppAuthorizeSetting () {
2 3 4
  const { getAppAuthorizeSetting } = weex.requireModule('plus')
  let appAuthorizeSetting = getAppAuthorizeSetting()
  try {
fxy060608's avatar
fxy060608 已提交
5
    if (typeof appAuthorizeSetting === 'string') { appAuthorizeSetting = JSON.parse(appAuthorizeSetting) }
6 7
  } catch (error) { }

D
DCloud_LXH 已提交
8 9 10 11 12 13 14
  for (const key in appAuthorizeSetting) {
    if (Object.hasOwnProperty.call(appAuthorizeSetting, key)) {
      const value = appAuthorizeSetting[key];
      if(value === 'undefined') appAuthorizeSetting[key] = undefined
    }
  }

15
  return appAuthorizeSetting
fxy060608's avatar
fxy060608 已提交
16
}