fix: - 一键登录逻辑,UI完善
- 一键登录页面以及二次协议确认页面UI样式完善
- 一键登录逻辑完善,边界异常处理
This commit is contained in:
parent
60a6666d22
commit
841ef69381
BIN
android/app/src/main/res/drawable/icon_left_grey.png
Normal file
BIN
android/app/src/main/res/drawable/icon_left_grey.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 214 B |
@ -74,8 +74,6 @@ PODS:
|
|||||||
- SDWebImage
|
- SDWebImage
|
||||||
- SwiftyGif
|
- SwiftyGif
|
||||||
- EMASRest (11.1.1.2)
|
- EMASRest (11.1.1.2)
|
||||||
- fast_rsa (0.6.0):
|
|
||||||
- Flutter
|
|
||||||
- file_picker (0.0.1):
|
- file_picker (0.0.1):
|
||||||
- DKImagePickerController/PhotoGallery
|
- DKImagePickerController/PhotoGallery
|
||||||
- Flutter
|
- Flutter
|
||||||
@ -146,6 +144,8 @@ PODS:
|
|||||||
- fluwx/pay (0.0.1):
|
- fluwx/pay (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- WechatOpenSDK-XCFramework (~> 2.0.4)
|
- WechatOpenSDK-XCFramework (~> 2.0.4)
|
||||||
|
- gallery_saver (0.0.1):
|
||||||
|
- Flutter
|
||||||
- google_maps_flutter_ios (0.0.1):
|
- google_maps_flutter_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- GoogleMaps (< 9.0)
|
- GoogleMaps (< 9.0)
|
||||||
@ -215,6 +215,24 @@ PODS:
|
|||||||
- JPush (= 5.3.0)
|
- JPush (= 5.3.0)
|
||||||
- just_audio (0.0.1):
|
- just_audio (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- JVerification (3.2.4):
|
||||||
|
- JCore (>= 2.1.6)
|
||||||
|
- jverify (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- JCore (>= 4.6.2)
|
||||||
|
- JVerification (= 3.2.4)
|
||||||
|
- libwebp (1.3.2):
|
||||||
|
- libwebp/demux (= 1.3.2)
|
||||||
|
- libwebp/mux (= 1.3.2)
|
||||||
|
- libwebp/sharpyuv (= 1.3.2)
|
||||||
|
- libwebp/webp (= 1.3.2)
|
||||||
|
- libwebp/demux (1.3.2):
|
||||||
|
- libwebp/webp
|
||||||
|
- libwebp/mux (1.3.2):
|
||||||
|
- libwebp/demux
|
||||||
|
- libwebp/sharpyuv (1.3.2)
|
||||||
|
- libwebp/webp (1.3.2):
|
||||||
|
- libwebp/sharpyuv
|
||||||
- nanopb (3.30910.0):
|
- nanopb (3.30910.0):
|
||||||
- nanopb/decode (= 3.30910.0)
|
- nanopb/decode (= 3.30910.0)
|
||||||
- nanopb/encode (= 3.30910.0)
|
- nanopb/encode (= 3.30910.0)
|
||||||
@ -257,6 +275,9 @@ PODS:
|
|||||||
- video_player_avfoundation (0.0.1):
|
- video_player_avfoundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- video_thumbnail (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- libwebp
|
||||||
- webview_flutter_wkwebview (0.0.1):
|
- webview_flutter_wkwebview (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- WechatOpenSDK-XCFramework (2.0.4)
|
- WechatOpenSDK-XCFramework (2.0.4)
|
||||||
@ -274,7 +295,6 @@ DEPENDENCIES:
|
|||||||
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
|
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
|
||||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
|
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
|
||||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||||
- fast_rsa (from `.symlinks/plugins/fast_rsa/ios`)
|
|
||||||
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
||||||
- firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)
|
- firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)
|
||||||
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
||||||
@ -287,12 +307,14 @@ DEPENDENCIES:
|
|||||||
- flutter_voice_processor (from `.symlinks/plugins/flutter_voice_processor/ios`)
|
- flutter_voice_processor (from `.symlinks/plugins/flutter_voice_processor/ios`)
|
||||||
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
|
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
|
||||||
- fluwx (from `.symlinks/plugins/fluwx/ios`)
|
- fluwx (from `.symlinks/plugins/fluwx/ios`)
|
||||||
|
- gallery_saver (from `.symlinks/plugins/gallery_saver/ios`)
|
||||||
- google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`)
|
- google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`)
|
||||||
- image_gallery_saver (from `.symlinks/plugins/image_gallery_saver/ios`)
|
- image_gallery_saver (from `.symlinks/plugins/image_gallery_saver/ios`)
|
||||||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
||||||
- JPush
|
- JPush
|
||||||
- jpush_flutter (from `.symlinks/plugins/jpush_flutter/ios`)
|
- jpush_flutter (from `.symlinks/plugins/jpush_flutter/ios`)
|
||||||
- just_audio (from `.symlinks/plugins/just_audio/ios`)
|
- just_audio (from `.symlinks/plugins/just_audio/ios`)
|
||||||
|
- jverify (from `.symlinks/plugins/jverify/ios`)
|
||||||
- network_info_plus (from `.symlinks/plugins/network_info_plus/ios`)
|
- network_info_plus (from `.symlinks/plugins/network_info_plus/ios`)
|
||||||
- open_filex (from `.symlinks/plugins/open_filex/ios`)
|
- open_filex (from `.symlinks/plugins/open_filex/ios`)
|
||||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||||
@ -306,6 +328,7 @@ DEPENDENCIES:
|
|||||||
- umeng_common_sdk (from `.symlinks/plugins/umeng_common_sdk/ios`)
|
- umeng_common_sdk (from `.symlinks/plugins/umeng_common_sdk/ios`)
|
||||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||||
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
|
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
|
||||||
|
- video_thumbnail (from `.symlinks/plugins/video_thumbnail/ios`)
|
||||||
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
|
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
@ -334,6 +357,8 @@ SPEC REPOS:
|
|||||||
- ios-voice-processor
|
- ios-voice-processor
|
||||||
- JCore
|
- JCore
|
||||||
- JPush
|
- JPush
|
||||||
|
- JVerification
|
||||||
|
- libwebp
|
||||||
- nanopb
|
- nanopb
|
||||||
- PromisesObjC
|
- PromisesObjC
|
||||||
- SDWebImage
|
- SDWebImage
|
||||||
@ -366,8 +391,6 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/connectivity_plus/darwin"
|
:path: ".symlinks/plugins/connectivity_plus/darwin"
|
||||||
device_info_plus:
|
device_info_plus:
|
||||||
:path: ".symlinks/plugins/device_info_plus/ios"
|
:path: ".symlinks/plugins/device_info_plus/ios"
|
||||||
fast_rsa:
|
|
||||||
:path: ".symlinks/plugins/fast_rsa/ios"
|
|
||||||
file_picker:
|
file_picker:
|
||||||
:path: ".symlinks/plugins/file_picker/ios"
|
:path: ".symlinks/plugins/file_picker/ios"
|
||||||
firebase_analytics:
|
firebase_analytics:
|
||||||
@ -392,6 +415,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/fluttertoast/ios"
|
:path: ".symlinks/plugins/fluttertoast/ios"
|
||||||
fluwx:
|
fluwx:
|
||||||
:path: ".symlinks/plugins/fluwx/ios"
|
:path: ".symlinks/plugins/fluwx/ios"
|
||||||
|
gallery_saver:
|
||||||
|
:path: ".symlinks/plugins/gallery_saver/ios"
|
||||||
google_maps_flutter_ios:
|
google_maps_flutter_ios:
|
||||||
:path: ".symlinks/plugins/google_maps_flutter_ios/ios"
|
:path: ".symlinks/plugins/google_maps_flutter_ios/ios"
|
||||||
image_gallery_saver:
|
image_gallery_saver:
|
||||||
@ -402,6 +427,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/jpush_flutter/ios"
|
:path: ".symlinks/plugins/jpush_flutter/ios"
|
||||||
just_audio:
|
just_audio:
|
||||||
:path: ".symlinks/plugins/just_audio/ios"
|
:path: ".symlinks/plugins/just_audio/ios"
|
||||||
|
jverify:
|
||||||
|
:path: ".symlinks/plugins/jverify/ios"
|
||||||
network_info_plus:
|
network_info_plus:
|
||||||
:path: ".symlinks/plugins/network_info_plus/ios"
|
:path: ".symlinks/plugins/network_info_plus/ios"
|
||||||
open_filex:
|
open_filex:
|
||||||
@ -424,6 +451,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||||
video_player_avfoundation:
|
video_player_avfoundation:
|
||||||
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
|
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
|
||||||
|
video_thumbnail:
|
||||||
|
:path: ".symlinks/plugins/video_thumbnail/ios"
|
||||||
webview_flutter_wkwebview:
|
webview_flutter_wkwebview:
|
||||||
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
|
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
|
||||||
|
|
||||||
@ -451,7 +480,6 @@ SPEC CHECKSUMS:
|
|||||||
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
|
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
|
||||||
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
|
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
|
||||||
EMASRest: 8df6f87836767a9415ad5cc4af739bc9d215b475
|
EMASRest: 8df6f87836767a9415ad5cc4af739bc9d215b475
|
||||||
fast_rsa: a1fed69b074093d2e2e3fefae6b821a071649d4c
|
|
||||||
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
|
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
|
||||||
Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9
|
Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9
|
||||||
firebase_analytics: 1a66fe8d4375eccff44671ea37897683a78b2675
|
firebase_analytics: 1a66fe8d4375eccff44671ea37897683a78b2675
|
||||||
@ -468,7 +496,8 @@ SPEC CHECKSUMS:
|
|||||||
flutter_pcm_sound: de0572ca4f99091cc2abfcc31601b8a4ddd33c0e
|
flutter_pcm_sound: de0572ca4f99091cc2abfcc31601b8a4ddd33c0e
|
||||||
flutter_voice_processor: 2b89b93d69b02227ae3fd58589ee0bcfa3ca2a82
|
flutter_voice_processor: 2b89b93d69b02227ae3fd58589ee0bcfa3ca2a82
|
||||||
fluttertoast: e9a18c7be5413da53898f660530c56f35edfba9c
|
fluttertoast: e9a18c7be5413da53898f660530c56f35edfba9c
|
||||||
fluwx: c18fd6c16b03a2187cd07d6e48e32a7801962849
|
fluwx: daa284756ce53442b3d0417ceeda66e981906811
|
||||||
|
gallery_saver: 9fc173c9f4fcc48af53b2a9ebea1b643255be542
|
||||||
google_maps_flutter_ios: f135b968a67c05679e0a53538e900b5c174b0d99
|
google_maps_flutter_ios: f135b968a67c05679e0a53538e900b5c174b0d99
|
||||||
GoogleAppMeasurement: 6e49ffac7d3f2c3ded9cc663f912a13b67bbd0de
|
GoogleAppMeasurement: 6e49ffac7d3f2c3ded9cc663f912a13b67bbd0de
|
||||||
GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4
|
GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4
|
||||||
@ -480,6 +509,9 @@ SPEC CHECKSUMS:
|
|||||||
JPush: b71f497a3c1b825c7843fd97f290b05d5cd75f2e
|
JPush: b71f497a3c1b825c7843fd97f290b05d5cd75f2e
|
||||||
jpush_flutter: c87be254790933c0363684169ef9d3d279a5adc5
|
jpush_flutter: c87be254790933c0363684169ef9d3d279a5adc5
|
||||||
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
|
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
|
||||||
|
JVerification: 0774807f44dd788c78d50303a14e133735807856
|
||||||
|
jverify: 337ea43ac1e16f9484f4195abe787d1b6241163c
|
||||||
|
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
|
||||||
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
|
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
|
||||||
network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f
|
network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f
|
||||||
open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4
|
open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4
|
||||||
@ -498,9 +530,10 @@ SPEC CHECKSUMS:
|
|||||||
umeng_common_sdk: a8abd7f86dfd013dbbeeae587ee143760c6582f2
|
umeng_common_sdk: a8abd7f86dfd013dbbeeae587ee143760c6582f2
|
||||||
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
||||||
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
|
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
|
||||||
|
video_thumbnail: c4e2a3c539e247d4de13cd545344fd2d26ffafd1
|
||||||
webview_flutter_wkwebview: 2a23822e9039b7b1bc52e5add778e5d89ad488d1
|
webview_flutter_wkwebview: 2a23822e9039b7b1bc52e5add778e5d89ad488d1
|
||||||
WechatOpenSDK-XCFramework: 36fb2bea0754266c17184adf4963d7e6ff98b69f
|
WechatOpenSDK-XCFramework: 36fb2bea0754266c17184adf4963d7e6ff98b69f
|
||||||
|
|
||||||
PODFILE CHECKSUM: 728f9c851a19709391c77c54ed3556e484b54db6
|
PODFILE CHECKSUM: 728f9c851a19709391c77c54ed3556e484b54db6
|
||||||
|
|
||||||
COCOAPODS: 1.16.2
|
COCOAPODS: 1.14.3
|
||||||
|
|||||||
21
ios/Runner/Assets.xcassets/icon_left_grey.imageset/Contents.json
vendored
Normal file
21
ios/Runner/Assets.xcassets/icon_left_grey.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "icon_left_grey.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
ios/Runner/Assets.xcassets/icon_left_grey.imageset/icon_left_grey.png
vendored
Normal file
BIN
ios/Runner/Assets.xcassets/icon_left_grey.imageset/icon_left_grey.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 214 B |
@ -103,8 +103,8 @@ class StarLockLoginLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> oneClickLoginAction() async {
|
Future<void> oneClickLoginAction(BuildContext context) async {
|
||||||
await JverifyOneClickLoginManage().loginAuth((e) async {
|
await JverifyOneClickLoginManage().loginAuth(context,(e) async {
|
||||||
final int? code = e.code;
|
final int? code = e.code;
|
||||||
final String? content = e.message;
|
final String? content = e.message;
|
||||||
// final String operator = map['operator'];
|
// final String operator = map['operator'];
|
||||||
@ -142,7 +142,7 @@ class StarLockLoginLogic extends BaseGetXController {
|
|||||||
// showToast('用户取消一键登录'.tr);
|
// showToast('用户取消一键登录'.tr);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
showToast('一键登录失败,请重试'.tr);
|
showToast('一键登录失败,请使用账号/密码登录'.tr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -283,7 +283,8 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
|||||||
width: 10.sp,
|
width: 10.sp,
|
||||||
)),
|
)),
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: state.isCheckVerifyEnable.value && state.currentLanguage == 'zh_CN',
|
visible: state.isCheckVerifyEnable.value &&
|
||||||
|
state.currentLanguage == 'zh_CN',
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
// width: 150.w,
|
// width: 150.w,
|
||||||
@ -296,7 +297,9 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
|||||||
color: AppColors.mainColor)),
|
color: AppColors.mainColor)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: logic.oneClickLoginAction,
|
onTap: () {
|
||||||
|
logic.oneClickLoginAction(context);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
|
|||||||
@ -243,7 +243,7 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
logic.oneClickLoginAction();
|
logic.oneClickLoginAction(context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
|
|||||||
@ -142,7 +142,7 @@ class JverifyOneClickLoginManage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// SDK 请求授权一键登录
|
/// SDK 请求授权一键登录
|
||||||
Future<void> loginAuth(
|
Future<void> loginAuth(BuildContext context,
|
||||||
Function(JVListenerEvent jvListenerEvent) action) async {
|
Function(JVListenerEvent jvListenerEvent) action) async {
|
||||||
Map map = await jverify.checkVerifyEnable();
|
Map map = await jverify.checkVerifyEnable();
|
||||||
final bool result = map[f_result_key];
|
final bool result = map[f_result_key];
|
||||||
@ -154,6 +154,9 @@ class JverifyOneClickLoginManage {
|
|||||||
// return null;
|
// return null;
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
final screenWidth = screenSize.width;
|
||||||
|
final screenHeight = screenSize.height;
|
||||||
bool isiOS = Platform.isIOS;
|
bool isiOS = Platform.isIOS;
|
||||||
|
|
||||||
/// 自定义授权的 UI 界面,以下设置的图片必须添加到资源文件里,
|
/// 自定义授权的 UI 界面,以下设置的图片必须添加到资源文件里,
|
||||||
@ -163,13 +166,13 @@ class JverifyOneClickLoginManage {
|
|||||||
// uiConfig.authBGGifPath = "main_gif";
|
// uiConfig.authBGGifPath = "main_gif";
|
||||||
// uiConfig.authBGVideoPath="main_vi";
|
// uiConfig.authBGVideoPath="main_vi";
|
||||||
// uiConfig.authBGVideoPath = 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4';
|
// uiConfig.authBGVideoPath = 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4';
|
||||||
uiConfig.authBackgroundImage = 'images/icon_left_grey.png';
|
// uiConfig.authBackgroundImage = 'images/icon_left_grey.png';
|
||||||
|
|
||||||
// uiConfig.navHidden = !isiOS;
|
// uiConfig.navHidden = !isiOS;
|
||||||
uiConfig.navColor = Colors.white.value;
|
uiConfig.navColor = AppColors.mainColor.value;
|
||||||
uiConfig.navText = '一键登录'.tr;
|
uiConfig.navText = '一键登录'.tr;
|
||||||
uiConfig.navTextColor = Colors.white.value;
|
uiConfig.navTextColor = Colors.white.value;
|
||||||
uiConfig.navReturnImgPath = 'return_bg'; //图片必须存在
|
uiConfig.navReturnImgPath = 'icon_left_grey'; //图片必须存在
|
||||||
|
|
||||||
uiConfig.logoWidth = 100;
|
uiConfig.logoWidth = 100;
|
||||||
uiConfig.logoHeight = 100;
|
uiConfig.logoHeight = 100;
|
||||||
@ -194,11 +197,11 @@ class JverifyOneClickLoginManage {
|
|||||||
// uiConfig.slogan
|
// uiConfig.slogan
|
||||||
//uiConfig.sloganHidden = 0;
|
//uiConfig.sloganHidden = 0;
|
||||||
|
|
||||||
uiConfig.logBtnOffsetX = 20;
|
// uiConfig.logBtnOffsetX = 20;
|
||||||
uiConfig.logBtnWidth = double.parse('${1.sw - 20 * 2}').toInt();
|
uiConfig.logBtnWidth = double.parse('${1.sw - 20 * 2}').toInt();
|
||||||
uiConfig.logBtnHeight = 50;
|
uiConfig.logBtnHeight = 50;
|
||||||
//uiConfig.logBtnOffsetX = isiOS ? 0 : null;//(screenWidth/2 - uiConfig.logBtnWidth/2).toInt();
|
//uiConfig.logBtnOffsetX = isiOS ? 0 : null;//(screenWidth/2 - uiConfig.logBtnWidth/2).toInt();
|
||||||
uiConfig.logBtnOffsetY = isiOS ? 120 : 330;
|
uiConfig.logBtnOffsetY = isiOS ? 140 : 330;
|
||||||
uiConfig.logBtnVerticalLayoutItem = JVIOSLayoutItem.ItemNumber;
|
uiConfig.logBtnVerticalLayoutItem = JVIOSLayoutItem.ItemNumber;
|
||||||
uiConfig.logBtnText = '一键登录'.tr;
|
uiConfig.logBtnText = '一键登录'.tr;
|
||||||
uiConfig.logBtnTextColor = AppColors.mainColor.value;
|
uiConfig.logBtnTextColor = AppColors.mainColor.value;
|
||||||
@ -221,6 +224,7 @@ class JverifyOneClickLoginManage {
|
|||||||
uiConfig.isAlertPrivacyVc = true;
|
uiConfig.isAlertPrivacyVc = true;
|
||||||
|
|
||||||
//uiConfig.privacyOffsetX = isiOS ? (20 + uiConfig.privacyCheckboxSize) : null;
|
//uiConfig.privacyOffsetX = isiOS ? (20 + uiConfig.privacyCheckboxSize) : null;
|
||||||
|
uiConfig.privacyNavReturnBtnImage = 'icon_left_grey'; //图片必须存在;
|
||||||
uiConfig.privacyOffsetY = 30; // 距离底部距离
|
uiConfig.privacyOffsetY = 30; // 距离底部距离
|
||||||
uiConfig.privacyOffsetX = 15; // 距离底部距离
|
uiConfig.privacyOffsetX = 15; // 距离底部距离
|
||||||
uiConfig.privacyVerticalLayoutItem = JVIOSLayoutItem.ItemSuper;
|
uiConfig.privacyVerticalLayoutItem = JVIOSLayoutItem.ItemSuper;
|
||||||
@ -259,8 +263,73 @@ class JverifyOneClickLoginManage {
|
|||||||
uiConfig.privacyNavTitleTextColor = Colors.white.value;
|
uiConfig.privacyNavTitleTextColor = Colors.white.value;
|
||||||
uiConfig.privacyNavTitleTextSize = 16;
|
uiConfig.privacyNavTitleTextSize = 16;
|
||||||
|
|
||||||
|
//协议二次弹窗内容设置 -Android
|
||||||
|
final JVPrivacyCheckDialogConfig privacyCheckDialogConfig =
|
||||||
|
JVPrivacyCheckDialogConfig();
|
||||||
|
privacyCheckDialogConfig.width = 250; //协议⼆次弹窗本身的宽
|
||||||
|
privacyCheckDialogConfig.height = 100; //协议⼆次弹窗本身的⾼
|
||||||
|
privacyCheckDialogConfig.title = '请阅读并同意一下条款'; //弹窗标题
|
||||||
|
privacyCheckDialogConfig.offsetX = 0; // 窗口相对屏幕中心的x轴偏移量
|
||||||
|
privacyCheckDialogConfig.offsetY = 0; // 窗口相对屏幕中心的y轴偏移量
|
||||||
|
|
||||||
|
privacyCheckDialogConfig.logBtnText = '同意并登录'; //弹窗登录按钮
|
||||||
|
privacyCheckDialogConfig.titleTextSize = 24; // 弹窗标题字体大小
|
||||||
|
privacyCheckDialogConfig.gravity = 'center'; //弹窗对齐方式
|
||||||
|
privacyCheckDialogConfig.titleTextColor = Colors.black.value; // 弹窗标题字体颜色
|
||||||
|
privacyCheckDialogConfig.contentTextGravity = 'left'; //协议⼆次弹窗协议内容对⻬⽅式
|
||||||
|
privacyCheckDialogConfig.contentTextSize = 16; //协议⼆次弹窗协议内容字体⼤⼩
|
||||||
|
// privacyCheckDialogConfig.logBtnImgPath = "login_btn_normal";//协议⼆次弹窗登录按钮的背景图⽚
|
||||||
|
privacyCheckDialogConfig.logBtnTextColor =
|
||||||
|
Colors.black.value; //协议⼆次弹窗登录按钮的字体颜⾊
|
||||||
|
privacyCheckDialogConfig.logBtnMarginT = 20; //协议⼆次弹窗登录按钮上边距
|
||||||
|
privacyCheckDialogConfig.logBtnMarginB = 20; //协议⼆次弹窗登录按钮下边距
|
||||||
|
privacyCheckDialogConfig.logBtnMarginL = 40; //协议⼆次弹窗登录按钮左边距
|
||||||
|
privacyCheckDialogConfig.logBtnWidth = 140; //协议⼆次弹窗登录按钮宽
|
||||||
|
privacyCheckDialogConfig.logBtnHeight = 40; //协议⼆次弹窗登录按高
|
||||||
|
/// 添加自定义的 控件 到dialog
|
||||||
|
final List<JVCustomWidget> dialogWidgetList = <JVCustomWidget>[];
|
||||||
|
const String btnDialogWidgetid = 'jv_add_custom_dialog_button'; // 标识控件 id
|
||||||
|
final JVCustomWidget buttonDialogWidget =
|
||||||
|
JVCustomWidget(btnDialogWidgetid, JVCustomWidgetType.button);
|
||||||
|
buttonDialogWidget.title = '取消';
|
||||||
|
buttonDialogWidget.titleFont = 16;
|
||||||
|
buttonDialogWidget.left = 80;
|
||||||
|
buttonDialogWidget.top = 180;
|
||||||
|
buttonDialogWidget.width = 140;
|
||||||
|
buttonDialogWidget.height = 40;
|
||||||
|
buttonDialogWidget.textAlignment = JVTextAlignmentType.center;
|
||||||
|
buttonDialogWidget.titleColor = Colors.black.value;
|
||||||
|
// buttonDialogWidget.btnNormalImageName = "main_btn_other";
|
||||||
|
// buttonDialogWidget.btnPressedImageName = "main_btn_other";
|
||||||
|
// buttonDialogWidget.backgroundColor = Colors.yellow.value;
|
||||||
|
// buttonWidget.textAlignment = JVTextAlignmentType.left;
|
||||||
|
|
||||||
|
// 添加点击事件监听
|
||||||
|
jverify.addClikWidgetEventListener(btnDialogWidgetid, (eventId) {
|
||||||
|
print('receive listener - click dialog widget event :$eventId');
|
||||||
|
if (btnDialogWidgetid == eventId) {
|
||||||
|
print('receive listener - 点击【新加 dialog button】');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
dialogWidgetList.add(buttonDialogWidget);
|
||||||
|
privacyCheckDialogConfig.widgets = dialogWidgetList;
|
||||||
|
uiConfig.privacyCheckDialogConfig = privacyCheckDialogConfig;
|
||||||
|
// iOS 二次弹窗添加取消按钮
|
||||||
|
uiConfig.isAlertPrivacyVc = true;
|
||||||
|
uiConfig.agreementAlertViewWidgets = dialogWidgetList;
|
||||||
|
uiConfig.agreementAlertViewLogBtnTextFontSize = 16;
|
||||||
|
uiConfig.agreementAlertViewTitleTexSize = 18;
|
||||||
|
uiConfig.agreementAlertViewContentTextFontSize = 14;
|
||||||
|
final alertLeft = (screenWidth / 2 - 300 / 2).toInt();
|
||||||
|
uiConfig.agreementAlertViewUIFrames = {
|
||||||
|
'superViewFrame': [alertLeft, 100, 300, 220],
|
||||||
|
'titleFrame': [20, 10, 260, 40],
|
||||||
|
'contentFrame': [25, 70, 250, 120],
|
||||||
|
'buttonFrame': [80, 142, 140, 40]
|
||||||
|
};
|
||||||
|
|
||||||
/// 调用接口设置 UI
|
/// 调用接口设置 UI
|
||||||
jverify.setCustomAuthorizationView(true, uiConfig,
|
jverify.setCustomAuthorizationView(false, uiConfig,
|
||||||
landscapeConfig: uiConfig);
|
landscapeConfig: uiConfig);
|
||||||
jverify.loginAuthSyncApi2(
|
jverify.loginAuthSyncApi2(
|
||||||
autoDismiss: true,
|
autoDismiss: true,
|
||||||
@ -270,7 +339,8 @@ class JverifyOneClickLoginManage {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// -10000 表示登录失败
|
// -10000 表示登录失败
|
||||||
action(JVListenerEvent.fromJson(<String,dynamic >{'code': -10000, 'message': ''}));
|
action(JVListenerEvent.fromJson(
|
||||||
|
<String, dynamic>{'code': -10000, 'message': ''}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
48
pubspec.lock
48
pubspec.lock
@ -621,14 +621,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.3"
|
version: "2.2.3"
|
||||||
flutter_foreground_task:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: flutter_foreground_task
|
|
||||||
sha256: "6cf10a27f5e344cd2ecad0752d3a5f4ec32846d82fda8753b3fe2480ebb832a3"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "6.5.0"
|
|
||||||
flutter_hooks:
|
flutter_hooks:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -714,30 +706,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.18"
|
version: "2.0.18"
|
||||||
flutter_screen_recording:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: flutter_screen_recording
|
|
||||||
sha256: "672a3f6c9e7b7438461a3a18ba36d8586189adcb716911d4c41d5d88592fbdda"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.16"
|
|
||||||
flutter_screen_recording_platform_interface:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: flutter_screen_recording_platform_interface
|
|
||||||
sha256: "9e07f78a2529bc5b6c77d045b392ed4062445543613fcad431c4cc1da57558d7"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.0.3"
|
|
||||||
flutter_screen_recording_web:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: flutter_screen_recording_web
|
|
||||||
sha256: f0a1b141beb1a64d8087c5871949a11ea6bf5d2a2fcd9d1341a7cf7b11e41aab
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.0.7"
|
|
||||||
flutter_screenutil:
|
flutter_screenutil:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -1341,14 +1309,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.6"
|
version: "3.1.6"
|
||||||
platform_detect:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: platform_detect
|
|
||||||
sha256: a62f99417fc4fa2d099ce0ccdbb1bd3977920f2a64292c326271f049d4bc3a4f
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.1.0"
|
|
||||||
plugin_platform_interface:
|
plugin_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -1389,14 +1349,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.2"
|
version: "6.1.2"
|
||||||
pub_semver:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: pub_semver
|
|
||||||
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.1.4"
|
|
||||||
qr:
|
qr:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user