Skip to content

Commit 2bf23e0

Browse files
committed
新增addUncheckBoxEventListener接口
1 parent c7464cd commit 2bf23e0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const JVerificationModule = NativeModules.JVerificationModule;
88

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

1213
export default class JVerification {
1314

@@ -238,6 +239,13 @@ export default class JVerification {
238239
});
239240
}
240241

242+
static addUncheckBoxEventListener(callback) {
243+
listeners[callback] = DeviceEventEmitter.addListener(
244+
UnCheckBox, result => {
245+
callback(result);
246+
});
247+
}
248+
241249
//移除事件
242250
static removeListener(callback) {
243251
if (!listeners[callback]) {

0 commit comments

Comments
 (0)