提交 b61c778c 编写于 作者: D DCloud_LXH

feat(mp-weixin): getAppAuthorizeSetting protocols

上级 c29d7666
import { MPProtocol } from './types'
export const getAppAuthorizeSetting: MPProtocol = {
returnValue: function (fromRes, toRes) {
const { locationReducedAccuracy } = fromRes
toRes.locationAccuracy = 'unsupported'
if (locationReducedAccuracy === true) {
toRes.locationAccuracy = 'reduced'
} else if (locationReducedAccuracy === false) {
toRes.locationAccuracy = 'full'
}
},
}
......@@ -12,4 +12,5 @@ export { navigateTo, initEventChannel, getEventChannel } from './navigateTo'
export { getDeviceInfo } from './getDeviceInfo'
export { getAppBaseInfo } from './getAppBaseInfo'
export { getWindowInfo } from './getWindowInfo'
export { getAppAuthorizeSetting } from './getAppAuthorizeSetting'
export * from './types'
......@@ -57,6 +57,7 @@ export {
getDeviceInfo,
getAppBaseInfo,
getWindowInfo,
getAppAuthorizeSetting,
} from './api/protocols'
// types
export { MiniProgramAppOptions, MiniProgramAppInstance } from './runtime/app'
......
......@@ -7,4 +7,5 @@ export {
getDeviceInfo,
getAppBaseInfo,
getWindowInfo,
getAppAuthorizeSetting,
} from '@dcloudio/uni-mp-core'
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册