File tree Expand file tree Collapse file tree 7 files changed +37
-18
lines changed
Expand file tree Collapse file tree 7 files changed +37
-18
lines changed Original file line number Diff line number Diff line change 1717 <uses-permission android : name =" android.permission.WAKE_LOCK" />
1818
1919 <application >
20- <!-- since 2.0.0 optional 可选项,使用一键登录功能必须添加 -->
21- <!-- since 2.1.1 optional 可选项,通过screenOrientation设置授权页面横竖屏展示 -->
22- <activity
23- android : name =" com.cmic.sso.sdk.activity.OAuthActivity"
24- android : configChanges =" orientation|keyboardHidden|screenSize"
25- android : screenOrientation =" portrait"
26- android : launchMode =" singleTop" >
27- </activity >
2820 <!-- since 2.0.0 optional 可选项,使用一键登录功能必须添加 -->
2921 <!-- since 2.1.1 optional 可选项,通过screenOrientation设置授权页面横竖屏展示 -->
3022 <activity
3123 android : name =" com.cmic.sso.sdk.activity.LoginAuthActivity"
32- android : theme =" @android: style/Theme.Holo.NoActionBar "
24+ android : theme =" @style/ActivityDialogStyle "
3325 android : configChanges =" orientation|keyboardHidden|screenSize"
3426 android : screenOrientation =" portrait"
3527 android : launchMode =" singleTop" >
3830 <!-- since 2.1.1 optional 可选项,通过screenOrientation设置授权页面横竖屏展示 -->
3931 <activity android : name =" cn.jiguang.verifysdk.CtLoginActivity"
4032 android : configChanges =" orientation|keyboardHidden|screenSize"
41- android : theme =" @android: style/Theme.Holo.NoActionBar "
33+ android : theme =" @style/ActivityDialogStyle "
4234 android : screenOrientation =" portrait"
4335 android : launchMode =" singleTop" >
4436 </activity >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <shape xmlns : android =" http://schemas.android.com/apk/res/android" >
3+ <corners android : radius =" 5dp" />
4+ </shape >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <resources >
3+ <style name =" ActivityDialogStyle" >
4+ <!-- 去掉action bar和标题栏-->
5+ <item name =" android:windowActionBar" >false</item >
6+ <item name =" android:windowNoTitle" >true</item >
7+ <!-- 背景透明-->
8+ <item name =" android:windowIsTranslucent" >true</item >
9+ <!-- dialog圆角-->
10+ <item name =" android:windowBackground" >@drawable/dialog_bg</item >
11+
12+ <!-- 弹窗后整个屏幕的背景是否有遮障层,默认是半透明的-->
13+ <item name =" android:backgroundDimEnabled" >true</item >
14+ </style >
15+ </resources >
Original file line number Diff line number Diff line change @@ -246,12 +246,12 @@ export default class App extends React.Component {
246246 } ;
247247 JVerification . addLoginEventListener ( this . LoginListener ) ;
248248 if ( Platform . OS == 'ios' ) {
249- this . UnCheckboxEvent = result => {
250- console . log ( 'UnCheckboxEvent:未选中隐私协议框' ) ;
251- this . createAlert ( 'Listener:未选中隐私协议框' ) ;
252- }
253- JVerification . addUncheckBoxEventListener ( this . UnCheckboxEvent )
254- }
249+ this . UnCheckboxEvent = result => {
250+ console . log ( 'UnCheckboxEvent:未选中隐私协议框' ) ;
251+ this . createAlert ( 'Listener:未选中隐私协议框' ) ;
252+ }
253+ JVerification . addUncheckBoxEventListener ( this . UnCheckboxEvent ) ;
254+ }
255255 }
256256
257257 render ( ) {
Original file line number Diff line number Diff line change 1010 "jcore-react-native" : " ^1.7.0" ,
1111 "react" : " 16.8.6" ,
1212 "react-native" : " 0.63.4" ,
13- "jverification-react-native" : " 2.4.5 "
13+ "jverification-react-native" : " 2.4.6 "
1414 },
1515 "devDependencies" : {
1616 "@babel/core" : " ^7.5.0" ,
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const JVerificationModule = NativeModules.JVerificationModule;
88
99const listeners = { } ;
1010const LoginEvent = 'LoginEvent' ; //登录事件
11+ const UnCheckBox = 'UncheckBoxCallBack' ; //iOS 未选中隐私协议CheckBox,点击登录按钮的回调事件
1112
1213export 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 ] ) {
Original file line number Diff line number Diff line change 55 "main" : " index.js" ,
66 "license" : " ISC" ,
77 "author" : " wicked.tc130" ,
8- "version" : " 2.4.5 " ,
8+ "version" : " 2.4.6 " ,
99 "repository" : {
1010 "type" : " git" ,
1111 "url" : " https://github.com/jpush/jverification-react-native"
You can’t perform that action at this time.
0 commit comments