Skip to content

Commit

Permalink
新增addUncheckBoxEventListener接口
Browse files Browse the repository at this point in the history
  • Loading branch information
hyhSuper committed Jan 25, 2021
1 parent c7464cd commit 2bf23e0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const JVerificationModule = NativeModules.JVerificationModule;

const listeners = {};
const LoginEvent = 'LoginEvent'; //登录事件
const UnCheckBox = 'UncheckBoxCallBack'; //iOS 未选中隐私协议CheckBox,点击登录按钮的回调事件

export default class JVerification {

Expand Down Expand Up @@ -238,6 +239,13 @@ export default class JVerification {
});
}

static addUncheckBoxEventListener(callback) {
listeners[callback] = DeviceEventEmitter.addListener(
UnCheckBox, result => {
callback(result);
});
}

//移除事件
static removeListener(callback) {
if (!listeners[callback]) {
Expand Down

0 comments on commit 2bf23e0

Please sign in to comment.