Skip to content

Commit d208736

Browse files
author
wangqingqing
committed
ios 不选择同意协议的时候,设置是否弹出toast提示
1 parent 0cf5fcc commit d208736

File tree

8 files changed

+21
-7
lines changed

8 files changed

+21
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
1+
## 0.6.11
2+
+ 优化:ios 在不选中认证协议的时候,设置是否显示toast提示。
23
## 0.6.10
34
+ 优化:jcore 2.2.5库获取不到的问题
45
## 0.6.9

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919

2020
```
2121
dependencies:
22-
jverify: 0.6.10
22+
jverify: 0.6.11
2323
```
2424

2525
### 配置

documents/APIs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,10 +499,10 @@ jverify.getSMSCode(phone,{signId:signId,tempId:tempId}).then((map){
499499
|virtualButtonTransparent |boolean |设置授权页虚拟按键栏背景是否透明(android)|
500500
|privacyStatusBarColorWithNav |boolean |设置隐私页状态栏与导航栏同色(android)|
501501
|privacyStatusBarDarkMode |boolean |设置隐私页状态栏暗色模式(android)|
502-
|privacyHintToast |boolean |设置隐私条款不选中时点击登录按钮默认弹出toast。(android)|
503502
|privacyStatusBarTransparent |boolean |设置隐私页状态栏是否透明(android)|
504503
|privacyStatusBarHidden |boolean |设置隐私页状态栏是否隐藏(android)|
505504
|privacyVirtualButtonTransparent |boolean |设置隐私页虚拟按键栏背景是否透明(android)|
505+
|privacyHintToast |boolean |设置隐私条款不选中时点击登录按钮默认弹出toast|
506506
|needStartAnim |boolean |设置拉起授权页时是否需要显示默认动画|
507507
|needCloseAnim |boolean |设置关闭授权页时是否需要显示默认动画|
508508
|StatusBarStyleDefault |enum |Automatically chooses light or dark content based on the user interface style|

example/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,5 @@
7070
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
7171

7272
**/ios/**/Podfile.lock
73-
**/ios/**/Runner.xcworkspace/
73+
**/ios/**/Runner.xcworkspace/
74+
.flutter-plugins-dependencies

example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ class _MyAppState extends State<MyApp> {
333333
uiConfig.loginBtnPressedImage = "login_btn_press";//图片必须存在
334334
uiConfig.loginBtnUnableImage = "login_btn_unable";//图片必须存在
335335

336-
uiConfig.privacyHintToast = false;//only android 设置隐私条款不选中时点击登录按钮默认显示toast。
336+
uiConfig.privacyHintToast = true;//only android 设置隐私条款不选中时点击登录按钮默认显示toast。
337337

338338
uiConfig.privacyState = true;//设置默认勾选
339339
uiConfig.privacyCheckboxSize = 20;

ios/Classes/JverifyPlugin.m

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,18 @@ - (void)setCustomUIWithUIConfig:(JVUIConfig *)uiconfig configArguments:(NSDictio
632632
}
633633

634634
/************** privacy ***************/
635+
BOOL privacyHintToast = [[self getValue:config key:@"privacyHintToast"] boolValue];
636+
if(privacyHintToast){
637+
uiconfig.customPrivacyAlertViewBlock = ^(UIViewController *vc) {
638+
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"请点击同意协议" message:nil preferredStyle:UIAlertControllerStyleAlert];
639+
[alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:nil] ];
640+
[vc presentViewController:alert animated:true completion:nil];
641+
642+
};
643+
}
644+
645+
646+
635647
BOOL isCenter = [[self getValue:config key:@"privacyTextCenterGravity"] boolValue];
636648
NSTextAlignment alignmet = isCenter?NSTextAlignmentCenter:NSTextAlignmentLeft;
637649
uiconfig.privacyTextAlignment = alignmet;

lib/jverify.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ class JVUIConfig {
511511
String uncheckedImgPath;
512512
String checkedImgPath;
513513
int privacyCheckboxSize;
514-
bool privacyHintToast = true;//only android 设置隐私条款不选中时点击登录按钮默认弹出toast。
514+
bool privacyHintToast = true;//设置隐私条款不选中时点击登录按钮默认弹出toast。
515515
bool privacyState = false; //设置隐私条款默认选中状态,默认不选中
516516
bool privacyCheckboxHidden = false; //设置隐私条款checkbox是否隐藏
517517
bool privacyCheckboxInCenter = false; //设置隐私条款checkbox是否相对协议文字纵向居中

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: jverify
22
description: JIGUANG Official Jverifycation SDK flutter plugin project.
3-
version: 0.6.10
3+
version: 0.6.11
44
author: xudong.rao <[email protected]>
55
homepage: https://www.jiguang.cn
66

0 commit comments

Comments
 (0)