Skip to content

Commit

Permalink
feat(app): openAppAuthorizeSetting
Browse files Browse the repository at this point in the history
  • Loading branch information
StrivingRabbit committed Jul 27, 2022
1 parent 2735d14 commit 2a5bb29
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ const device = [
'onThemeChange',
'onUIStyleChange',
'getSystemSetting',
'getAppAuthorizeSetting'
'getAppAuthorizeSetting',
'openAppAuthorizeSetting'
]

const keyboard = [
Expand Down Expand Up @@ -269,7 +270,7 @@ const plugin = [
'invokePushCallback',
'getPushClientId',
'onPushMessage',
'offPushMessage',
'offPushMessage',
'createPushMessage'
]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {
invoke
} from '../../bridge'

export function openAppAuthorizeSetting(options, callbackId) {
const { openAppAuthorizeSetting } = weex.requireModule('plus')
openAppAuthorizeSetting(ret => {
if (ret.type === 'success') {
invoke(callbackId, {
errMsg: 'getClipboardData:ok'
})
} else {
invoke(callbackId, {
errMsg: 'getClipboardData:fail'
})
}
})
}
1 change: 1 addition & 0 deletions src/platforms/app-plus/service/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export * from './device/vibrate'
export * from './device/get-window-info'
export * from './device/get-system-setting'
export * from './device/get-app-authorize-setting'
export * from './device/open-app-authorize-setting'

export * from './file/file'
export * from './file/open-document'
Expand Down

0 comments on commit 2a5bb29

Please sign in to comment.