Skip to content

Commit 19ac861

Browse files
authored
Merge pull request #74 from skill20/dev
v0.6.11 设置是否在不选中认证协议的时候是否弹出提示
2 parents 13add89 + 9c8b1a2 commit 19ac861

File tree

11 files changed

+43
-27
lines changed

11 files changed

+43
-27
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.6.11
2+
+ 优化:ios 在不选中认证协议的时候,设置是否显示toast提示。
3+
## 0.6.10
4+
+ 优化:jcore 2.2.5库获取不到的问题
15
## 0.6.9
26
+ 优化:优化android端隐私协议不选中时点击登录按钮,设置是否显示toast提示。具体使用查看 API 文档或者 demo 样例
37
## 0.6.8

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919

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

2525
### 配置

documents/APIs.md

+1-1
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/.flutter-plugins-dependencies

-1
This file was deleted.

example/.gitignore

+2-1
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/ios/Runner.xcodeproj/project.pbxproj

+19-19
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
97C146EC1CF9000F007C117D /* Resources */,
179179
9705A1C41CF9048500538489 /* Embed Frameworks */,
180180
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
181-
D166C758B9692330C07C5D0D /* [CP] Embed Pods Frameworks */,
181+
3EAA4E67215C408AB6EF1883 /* [CP] Embed Pods Frameworks */,
182182
);
183183
buildRules = (
184184
);
@@ -253,6 +253,24 @@
253253
shellPath = /bin/sh;
254254
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
255255
};
256+
3EAA4E67215C408AB6EF1883 /* [CP] Embed Pods Frameworks */ = {
257+
isa = PBXShellScriptBuildPhase;
258+
buildActionMask = 2147483647;
259+
files = (
260+
);
261+
inputPaths = (
262+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
263+
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
264+
);
265+
name = "[CP] Embed Pods Frameworks";
266+
outputPaths = (
267+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
268+
);
269+
runOnlyForDeploymentPostprocessing = 0;
270+
shellPath = /bin/sh;
271+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
272+
showEnvVarsInLog = 0;
273+
};
256274
881F7F5C9B13C6100922CDA7 /* [CP] Check Pods Manifest.lock */ = {
257275
isa = PBXShellScriptBuildPhase;
258276
buildActionMask = 2147483647;
@@ -289,24 +307,6 @@
289307
shellPath = /bin/sh;
290308
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
291309
};
292-
D166C758B9692330C07C5D0D /* [CP] Embed Pods Frameworks */ = {
293-
isa = PBXShellScriptBuildPhase;
294-
buildActionMask = 2147483647;
295-
files = (
296-
);
297-
inputPaths = (
298-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
299-
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
300-
);
301-
name = "[CP] Embed Pods Frameworks";
302-
outputPaths = (
303-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
304-
);
305-
runOnlyForDeploymentPostprocessing = 0;
306-
shellPath = /bin/sh;
307-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
308-
showEnvVarsInLog = 0;
309-
};
310310
/* End PBXShellScriptBuildPhase section */
311311

312312
/* Begin PBXSourcesBuildPhase section */

example/lib/main.dart

+1-1
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

+12
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;

ios/jverify.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A new flutter plugin project.
1515
s.source_files = 'Classes/**/*'
1616
s.public_header_files = 'Classes/**/*.h'
1717
s.dependency 'Flutter'
18-
s.dependency 'JCore'
18+
s.dependency 'JCore', '2.2.5'
1919
s.dependency 'JVerification', '2.6.3'
2020
s.ios.deployment_target = '8.0'
2121
s.static_framework = true

lib/jverify.dart

+1-1
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

+1-1
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.9
3+
version: 0.6.11
44
author: xudong.rao <[email protected]>
55
homepage: https://www.jiguang.cn
66

0 commit comments

Comments
 (0)