From 2bf23e0c8fbcb47e16650f8e1d38466d1236d3d3 Mon Sep 17 00:00:00 2001 From: Alan <975348978@qq.com> Date: Mon, 25 Jan 2021 19:20:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EaddUncheckBoxEventListener?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.js b/index.js index 71ca6b4..5288bff 100644 --- a/index.js +++ b/index.js @@ -8,6 +8,7 @@ const JVerificationModule = NativeModules.JVerificationModule; const listeners = {}; const LoginEvent = 'LoginEvent'; //登录事件 +const UnCheckBox = 'UncheckBoxCallBack'; //iOS 未选中隐私协议CheckBox,点击登录按钮的回调事件 export default class JVerification { @@ -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]) {