From e219c240bf37dd55f1975e4c8cc71c3ed8e9a4fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=B0=91=E9=98=B3?= <786612630@qq.com> Date: Thu, 2 Jan 2025 10:43:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=201=E3=80=81=E4=BF=AE=E5=A4=8D=E4=B8=80?= =?UTF-8?q?=E9=94=AE=E7=99=BB=E5=BD=95sky=E7=8E=AF=E5=A2=83=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=97=AE=E9=A2=98=E3=80=822=E3=80=81=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E4=B8=80=E9=94=AE=E7=99=BB=E5=BD=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Podfile.lock | 378 -------------- lan/lan_ar.json | 3 +- lan/lan_bg.json | 3 +- lan/lan_bn.json | 3 +- lan/lan_cs.json | 3 +- lan/lan_da.json | 3 +- lan/lan_de.json | 3 +- lan/lan_el.json | 3 +- lan/lan_en.json | 3 +- lan/lan_es.json | 3 +- lan/lan_et.json | 3 +- lan/lan_fi.json | 3 +- lan/lan_fr.json | 3 +- lan/lan_he.json | 3 +- lan/lan_hk.json | 3 +- lan/lan_hr.json | 3 +- lan/lan_hu.json | 3 +- lan/lan_id.json | 3 +- lan/lan_it.json | 3 +- lan/lan_ja.json | 3 +- lan/lan_keys.json | 3 +- lan/lan_kk.json | 3 +- lan/lan_ko.json | 3 +- lan/lan_lt.json | 3 +- lan/lan_ms.json | 3 +- lan/lan_nl.json | 3 +- lan/lan_pl.json | 3 +- lan/lan_pt.json | 3 +- lan/lan_ro.json | 3 +- lan/lan_ru.json | 3 +- lan/lan_sk.json | 3 +- lan/lan_sr_cyrl.json | 3 +- lan/lan_sv.json | 3 +- lan/lan_th.json | 3 +- lan/lan_tr.json | 3 +- lan/lan_tw.json | 3 +- lan/lan_uk.json | 3 +- lan/lan_vi.json | 3 +- lan/lan_zh.json | 3 +- lib/login/login/starLock_login_logic.dart | 66 +-- lib/login/login/starLock_login_page.dart | 69 ++- lib/login/login/starLock_login_xhj_page.dart | 59 ++- lib/tools/jverify_one_click_login.dart | 488 ++++++------------- 43 files changed, 316 insertions(+), 858 deletions(-) delete mode 100644 ios/Podfile.lock diff --git a/ios/Podfile.lock b/ios/Podfile.lock deleted file mode 100644 index 9dca6bdf..00000000 --- a/ios/Podfile.lock +++ /dev/null @@ -1,378 +0,0 @@ -PODS: - - aj_captcha_flutter (0.0.1): - - Flutter - - AlicloudPush (1.9.9.8): - - AlicloudSender - - AlicloudUT - - AlicloudUtils - - AlicloudSender (1.0.0.3): - - AlicloudUTDID - - EMASRest - - AlicloudUT (5.2.0.16): - - AlicloudUTDID - - AlicloudUTDID (1.6.0) - - AlicloudUtils (2.0.0): - - AlicloudUTDID - - aliyun_face_plugin (0.0.1): - - Flutter - - AMap3DMap (10.0.700): - - AMapFoundation (>= 1.8.0) - - amap_flutter_location (0.0.1): - - AMapLocation - - Flutter - - amap_flutter_map (0.0.1): - - AMap3DMap - - Flutter - - AMapFoundation (1.8.2) - - AMapLocation (2.10.0): - - AMapFoundation (>= 1.8.0) - - app_settings (5.1.1): - - Flutter - - audio_session (0.0.1): - - Flutter - - audioplayers_darwin (0.0.1): - - Flutter - - auto_orientation (0.0.1): - - Flutter - - Bugly (2.6.1) - - camera_avfoundation (0.0.1): - - Flutter - - connectivity_plus (0.0.1): - - Flutter - - FlutterMacOS - - device_info_plus (0.0.1): - - Flutter - - DKImagePickerController/Core (4.3.9): - - DKImagePickerController/ImageDataManager - - DKImagePickerController/Resource - - DKImagePickerController/ImageDataManager (4.3.9) - - DKImagePickerController/PhotoGallery (4.3.9): - - DKImagePickerController/Core - - DKPhotoGallery - - DKImagePickerController/Resource (4.3.9) - - DKPhotoGallery (0.0.19): - - DKPhotoGallery/Core (= 0.0.19) - - DKPhotoGallery/Model (= 0.0.19) - - DKPhotoGallery/Preview (= 0.0.19) - - DKPhotoGallery/Resource (= 0.0.19) - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Core (0.0.19): - - DKPhotoGallery/Model - - DKPhotoGallery/Preview - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Model (0.0.19): - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Preview (0.0.19): - - DKPhotoGallery/Model - - DKPhotoGallery/Resource - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Resource (0.0.19): - - SDWebImage - - SwiftyGif - - EMASRest (11.1.1.2) - - file_picker (0.0.1): - - DKImagePickerController/PhotoGallery - - Flutter - - Flutter (1.0.0) - - flutter_blue_plus (0.0.1): - - Flutter - - flutter_bugly (0.0.1): - - Bugly (= 2.6.1) - - Flutter - - flutter_local_notifications (0.0.1): - - Flutter - - flutter_native_contact_picker (0.0.1): - - Flutter - - flutter_pcm_sound (0.0.1): - - Flutter - - flutter_voice_processor (1.1.1): - - Flutter - - ios-voice-processor (~> 1.1.0) - - fluttertoast (0.0.2): - - Flutter - - Toast - - fluwx (0.0.1): - - Flutter - - fluwx/pay (= 0.0.1) - - fluwx/pay (0.0.1): - - Flutter - - WechatOpenSDK-XCFramework (~> 2.0.4) - - google_maps_flutter_ios (0.0.1): - - Flutter - - GoogleMaps (< 9.0) - - GoogleMaps (6.2.1): - - GoogleMaps/Maps (= 6.2.1) - - GoogleMaps/Base (6.2.1) - - GoogleMaps/Maps (6.2.1): - - GoogleMaps/Base - - image_gallery_saver (2.0.2): - - Flutter - - image_picker_ios (0.0.1): - - Flutter - - ios-voice-processor (1.1.0) - - JCore (4.6.2) - - JPush (5.3.0): - - JCore (>= 2.0.0) - - jpush_flutter (0.0.2): - - Flutter - - JCore (>= 4.6.2) - - JPush (= 5.3.0) - - just_audio (0.0.1): - - Flutter - - network_info_plus (0.0.1): - - Flutter - - open_filex (0.0.2): - - Flutter - - package_info_plus (0.4.5): - - Flutter - - path_provider_foundation (0.0.1): - - Flutter - - FlutterMacOS - - permission_handler_apple (9.3.0): - - Flutter - - SDWebImage (5.19.2): - - SDWebImage/Core (= 5.19.2) - - SDWebImage/Core (5.19.2) - - shared_preferences_foundation (0.0.1): - - Flutter - - FlutterMacOS - - sqflite (0.0.3): - - Flutter - - FlutterMacOS - - SwiftyGif (5.4.5) - - system_settings (0.0.1): - - Flutter - - Toast (4.1.1) - - UMCommon (7.4.7): - - UMDevice - - UMDevice (3.4.0) - - umeng_common_sdk (0.0.1): - - Flutter - - UMCommon - - UMDevice - - url_launcher_ios (0.0.1): - - Flutter - - video_player_avfoundation (0.0.1): - - Flutter - - FlutterMacOS - - webview_flutter_wkwebview (0.0.1): - - Flutter - - WechatOpenSDK-XCFramework (2.0.4) - -DEPENDENCIES: - - aj_captcha_flutter (from `.symlinks/plugins/aj_captcha_flutter/ios`) - - AlicloudPush (~> 1.9.9) - - aliyun_face_plugin (from `.symlinks/plugins/aliyun_face_plugin/ios`) - - amap_flutter_location (from `.symlinks/plugins/amap_flutter_location/ios`) - - amap_flutter_map (from `.symlinks/plugins/amap_flutter_map/ios`) - - app_settings (from `.symlinks/plugins/app_settings/ios`) - - audio_session (from `.symlinks/plugins/audio_session/ios`) - - audioplayers_darwin (from `.symlinks/plugins/audioplayers_darwin/ios`) - - auto_orientation (from `.symlinks/plugins/auto_orientation/ios`) - - camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`) - - connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`) - - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - - file_picker (from `.symlinks/plugins/file_picker/ios`) - - Flutter (from `Flutter`) - - flutter_blue_plus (from `.symlinks/plugins/flutter_blue_plus/ios`) - - flutter_bugly (from `.symlinks/plugins/flutter_bugly/ios`) - - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - - flutter_native_contact_picker (from `.symlinks/plugins/flutter_native_contact_picker/ios`) - - flutter_pcm_sound (from `.symlinks/plugins/flutter_pcm_sound/ios`) - - flutter_voice_processor (from `.symlinks/plugins/flutter_voice_processor/ios`) - - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) - - fluwx (from `.symlinks/plugins/fluwx/ios`) - - google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`) - - image_gallery_saver (from `.symlinks/plugins/image_gallery_saver/ios`) - - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - - JPush - - jpush_flutter (from `.symlinks/plugins/jpush_flutter/ios`) - - just_audio (from `.symlinks/plugins/just_audio/ios`) - - network_info_plus (from `.symlinks/plugins/network_info_plus/ios`) - - open_filex (from `.symlinks/plugins/open_filex/ios`) - - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - - sqflite (from `.symlinks/plugins/sqflite/darwin`) - - system_settings (from `.symlinks/plugins/system_settings/ios`) - - UMCommon - - UMDevice - - umeng_common_sdk (from `.symlinks/plugins/umeng_common_sdk/ios`) - - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`) - - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`) - -SPEC REPOS: - https://github.com/aliyun/aliyun-specs.git: - - AlicloudPush - - AlicloudSender - - AlicloudUT - - AlicloudUTDID - - AlicloudUtils - - EMASRest - https://github.com/CocoaPods/Specs.git: - - AMap3DMap - - AMapFoundation - - AMapLocation - - Bugly - - DKImagePickerController - - DKPhotoGallery - - GoogleMaps - - ios-voice-processor - - JCore - - JPush - - SDWebImage - - SwiftyGif - - Toast - - UMCommon - - UMDevice - - WechatOpenSDK-XCFramework - -EXTERNAL SOURCES: - aj_captcha_flutter: - :path: ".symlinks/plugins/aj_captcha_flutter/ios" - aliyun_face_plugin: - :path: ".symlinks/plugins/aliyun_face_plugin/ios" - amap_flutter_location: - :path: ".symlinks/plugins/amap_flutter_location/ios" - amap_flutter_map: - :path: ".symlinks/plugins/amap_flutter_map/ios" - app_settings: - :path: ".symlinks/plugins/app_settings/ios" - audio_session: - :path: ".symlinks/plugins/audio_session/ios" - audioplayers_darwin: - :path: ".symlinks/plugins/audioplayers_darwin/ios" - auto_orientation: - :path: ".symlinks/plugins/auto_orientation/ios" - camera_avfoundation: - :path: ".symlinks/plugins/camera_avfoundation/ios" - connectivity_plus: - :path: ".symlinks/plugins/connectivity_plus/darwin" - device_info_plus: - :path: ".symlinks/plugins/device_info_plus/ios" - file_picker: - :path: ".symlinks/plugins/file_picker/ios" - Flutter: - :path: Flutter - flutter_blue_plus: - :path: ".symlinks/plugins/flutter_blue_plus/ios" - flutter_bugly: - :path: ".symlinks/plugins/flutter_bugly/ios" - flutter_local_notifications: - :path: ".symlinks/plugins/flutter_local_notifications/ios" - flutter_native_contact_picker: - :path: ".symlinks/plugins/flutter_native_contact_picker/ios" - flutter_pcm_sound: - :path: ".symlinks/plugins/flutter_pcm_sound/ios" - flutter_voice_processor: - :path: ".symlinks/plugins/flutter_voice_processor/ios" - fluttertoast: - :path: ".symlinks/plugins/fluttertoast/ios" - fluwx: - :path: ".symlinks/plugins/fluwx/ios" - google_maps_flutter_ios: - :path: ".symlinks/plugins/google_maps_flutter_ios/ios" - image_gallery_saver: - :path: ".symlinks/plugins/image_gallery_saver/ios" - image_picker_ios: - :path: ".symlinks/plugins/image_picker_ios/ios" - jpush_flutter: - :path: ".symlinks/plugins/jpush_flutter/ios" - just_audio: - :path: ".symlinks/plugins/just_audio/ios" - network_info_plus: - :path: ".symlinks/plugins/network_info_plus/ios" - open_filex: - :path: ".symlinks/plugins/open_filex/ios" - package_info_plus: - :path: ".symlinks/plugins/package_info_plus/ios" - path_provider_foundation: - :path: ".symlinks/plugins/path_provider_foundation/darwin" - permission_handler_apple: - :path: ".symlinks/plugins/permission_handler_apple/ios" - shared_preferences_foundation: - :path: ".symlinks/plugins/shared_preferences_foundation/darwin" - sqflite: - :path: ".symlinks/plugins/sqflite/darwin" - system_settings: - :path: ".symlinks/plugins/system_settings/ios" - umeng_common_sdk: - :path: ".symlinks/plugins/umeng_common_sdk/ios" - url_launcher_ios: - :path: ".symlinks/plugins/url_launcher_ios/ios" - video_player_avfoundation: - :path: ".symlinks/plugins/video_player_avfoundation/darwin" - webview_flutter_wkwebview: - :path: ".symlinks/plugins/webview_flutter_wkwebview/ios" - -SPEC CHECKSUMS: - aj_captcha_flutter: dd7af1aa064bdd621ae335b819bab07309c3c023 - AlicloudPush: 88529c9b796e4ece0601de0867b30359f55b61f7 - AlicloudSender: 1f468b6bd962a099ffc19d45e3608b0fe98f259d - AlicloudUT: 6d1cf30d57d096b7e9bb4b069dd0ba6ad59a3338 - AlicloudUTDID: 4e9d44c2fd704b3508069c38eaec9d6a759e702c - AlicloudUtils: 2a78de434a8b2dc99e408c4d6220e654076d9ef0 - aliyun_face_plugin: 7a90b6526c5acea616062e809699294c782c3eb8 - AMap3DMap: 6ee456d7ba946ebbad580a343b74ffa8e9936175 - amap_flutter_location: 44ff5beb64f42e0bf5feb402fe299dac0013af6f - amap_flutter_map: 979e54d227cedac6c7504a2151bfbf3bcf96760a - AMapFoundation: 9885c48fc3a78fdfb84a0299a2293e56ea3c9fec - AMapLocation: 5248aec2455ebb5d104b367813c946430a2ee033 - app_settings: 017320c6a680cdc94c799949d95b84cb69389ebc - audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207 - audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40 - auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d - Bugly: 217ac2ce5f0f2626d43dbaa4f70764c953a26a31 - camera_avfoundation: dd002b0330f4981e1bbcb46ae9b62829237459a4 - connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db - device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed - DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c - DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60 - EMASRest: 8df6f87836767a9415ad5cc4af739bc9d215b475 - file_picker: ce3938a0df3cc1ef404671531facef740d03f920 - Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - flutter_blue_plus: 4837da7d00cf5d441fdd6635b3a57f936778ea96 - flutter_bugly: bf35df32a9c5d50b8aacdd35bd8ddc5b55150dae - flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086 - flutter_native_contact_picker: bd430ba0fbf82768bb50c2c52a69a65759a8f907 - flutter_pcm_sound: de0572ca4f99091cc2abfcc31601b8a4ddd33c0e - flutter_voice_processor: 2b89b93d69b02227ae3fd58589ee0bcfa3ca2a82 - fluttertoast: e9a18c7be5413da53898f660530c56f35edfba9c - fluwx: c18fd6c16b03a2187cd07d6e48e32a7801962849 - google_maps_flutter_ios: f135b968a67c05679e0a53538e900b5c174b0d99 - GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4 - image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb - image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1 - ios-voice-processor: 8e32d7f980a06d392d128ef1cd19cf6ddcaca3c1 - JCore: 024c73b04e110b496e93d8c127ea9cd1ed934e4c - JPush: b71f497a3c1b825c7843fd97f290b05d5cd75f2e - jpush_flutter: c87be254790933c0363684169ef9d3d279a5adc5 - just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa - network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f - open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4 - package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e - path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 - permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 - SDWebImage: dfe95b2466a9823cf9f0c6d01217c06550d7b29a - shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 - sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec - SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4 - system_settings: 8f5cdbfa72c677fc8d665b863bcc20d393d87e9d - Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e - UMCommon: 8b4cd0423297c39bca6eea1ec896558b40e5bcf7 - UMDevice: dcdf7ec167387837559d149fbc7d793d984faf82 - umeng_common_sdk: a8abd7f86dfd013dbbeeae587ee143760c6582f2 - url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe - video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3 - webview_flutter_wkwebview: 2a23822e9039b7b1bc52e5add778e5d89ad488d1 - WechatOpenSDK-XCFramework: 36fb2bea0754266c17184adf4963d7e6ff98b69f - -PODFILE CHECKSUM: a4d4747e9f246a7c5b9d643d5efa33799112963a - -COCOAPODS: 1.14.3 diff --git a/lan/lan_ar.json b/lan/lan_ar.json index 44cffeca..68f1e225 100644 --- a/lan/lan_ar.json +++ b/lan/lan_ar.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "اتبع النظام" + "跟随系统": "اتبع النظام", + "一键登录": "تسجيل الدخول بنقرة واحدة" } \ No newline at end of file diff --git a/lan/lan_bg.json b/lan/lan_bg.json index 6567d1c8..f0df4426 100644 --- a/lan/lan_bg.json +++ b/lan/lan_bg.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Следете система" + "跟随系统": "Следете система", + "一键登录": "Вход с едно кликване" } \ No newline at end of file diff --git a/lan/lan_bn.json b/lan/lan_bn.json index 1542a4ab..b7de627d 100644 --- a/lan/lan_bn.json +++ b/lan/lan_bn.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "এক্ফক্লোসিস্টেম" + "跟随系统": "এক্ফক্লোসিস্টেম", + "一键登录": "এক-সিক্লিক্লোগিন" } \ No newline at end of file diff --git a/lan/lan_cs.json b/lan/lan_cs.json index 4954aa0f..2a5dd7c7 100644 --- a/lan/lan_cs.json +++ b/lan/lan_cs.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Sledovat systém" + "跟随系统": "Sledovat systém", + "一键登录": "Přihlášení s jedním kliknutím" } \ No newline at end of file diff --git a/lan/lan_da.json b/lan/lan_da.json index ee31f06f..25356910 100644 --- a/lan/lan_da.json +++ b/lan/lan_da.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Følg systemet" + "跟随系统": "Følg systemet", + "一键登录": "Login med et enkelt klik" } \ No newline at end of file diff --git a/lan/lan_de.json b/lan/lan_de.json index ef466e35..7e63c4c4 100644 --- a/lan/lan_de.json +++ b/lan/lan_de.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "System folgen" + "跟随系统": "System folgen", + "一键登录": "Ein-Klick-Login" } \ No newline at end of file diff --git a/lan/lan_el.json b/lan/lan_el.json index 8615448e..b8120be8 100644 --- a/lan/lan_el.json +++ b/lan/lan_el.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Ακολουθήστε το σύστημα" + "跟随系统": "Ακολουθήστε το σύστημα", + "一键登录": "Σύνδεση ενός κλικ" } \ No newline at end of file diff --git a/lan/lan_en.json b/lan/lan_en.json index e203f2c4..4963d7d8 100644 --- a/lan/lan_en.json +++ b/lan/lan_en.json @@ -1122,5 +1122,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Follow system" + "跟随系统": "Follow system", + "一键登录": "One-click login" } diff --git a/lan/lan_es.json b/lan/lan_es.json index 6be6e12e..09613dbb 100644 --- a/lan/lan_es.json +++ b/lan/lan_es.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Seguir sistema" + "跟随系统": "Seguir sistema", + "一键登录": "Inicio de sesión con un solo clic" } \ No newline at end of file diff --git a/lan/lan_et.json b/lan/lan_et.json index 36e7dbd6..f656931a 100644 --- a/lan/lan_et.json +++ b/lan/lan_et.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Süsteemi jälgimine" + "跟随系统": "Süsteemi jälgimine", + "一键登录": "Üheklõpsu sisselogimine" } \ No newline at end of file diff --git a/lan/lan_fi.json b/lan/lan_fi.json index be6b3412..5cdbf875 100644 --- a/lan/lan_fi.json +++ b/lan/lan_fi.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Seuraa järjestelmää" + "跟随系统": "Seuraa järjestelmää", + "一键登录": "Yhden napsautuksen kirjautuminen" } \ No newline at end of file diff --git a/lan/lan_fr.json b/lan/lan_fr.json index 41653eba..2aa57653 100644 --- a/lan/lan_fr.json +++ b/lan/lan_fr.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Suivre le système" + "跟随系统": "Suivre le système", + "一键登录": "Connexion en un clic" } \ No newline at end of file diff --git a/lan/lan_he.json b/lan/lan_he.json index 964fde7b..4fe7ea9a 100644 --- a/lan/lan_he.json +++ b/lan/lan_he.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "מערכת מעקב" + "跟随系统": "מערכת מעקב", + "一键登录": "התחברות בלחיצה אחת" } \ No newline at end of file diff --git a/lan/lan_hk.json b/lan/lan_hk.json index d7ad3f6c..85770c37 100644 --- a/lan/lan_hk.json +++ b/lan/lan_hk.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "跟踪系统" + "跟随系统": "跟踪系统", + "一键登录": "一键登录" } \ No newline at end of file diff --git a/lan/lan_hr.json b/lan/lan_hr.json index 557389ba..5af466ff 100644 --- a/lan/lan_hr.json +++ b/lan/lan_hr.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Prati sistem:" + "跟随系统": "Prati sistem:", + "一键登录": "Prijavljivanje jednog klika" } \ No newline at end of file diff --git a/lan/lan_hu.json b/lan/lan_hu.json index 58ad7bbf..d1b2ebfd 100644 --- a/lan/lan_hu.json +++ b/lan/lan_hu.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Follow system" + "跟随系统": "Follow system", + "一键登录": "Egykattintásos bejelentkezés" } \ No newline at end of file diff --git a/lan/lan_id.json b/lan/lan_id.json index 71306282..aa9cbd59 100644 --- a/lan/lan_id.json +++ b/lan/lan_id.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Sistem mengikuti" + "跟随系统": "Sistem mengikuti", + "一键登录": "Masuk satu klik" } \ No newline at end of file diff --git a/lan/lan_it.json b/lan/lan_it.json index 93144303..8c8bb2fd 100644 --- a/lan/lan_it.json +++ b/lan/lan_it.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Seguire il sistema" + "跟随系统": "Seguire il sistema", + "一键登录": "Accesso con un clic" } \ No newline at end of file diff --git a/lan/lan_ja.json b/lan/lan_ja.json index 39576260..80d86b8e 100644 --- a/lan/lan_ja.json +++ b/lan/lan_ja.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "システムに従う" + "跟随系统": "システムに従う", + "一键登录": "ワンクリックログイン" } \ No newline at end of file diff --git a/lan/lan_keys.json b/lan/lan_keys.json index 1656967f..1a1db11a 100755 --- a/lan/lan_keys.json +++ b/lan/lan_keys.json @@ -1122,5 +1122,6 @@ "日简称": "日简称", "时简称": "时简称", "分简称": "分简称", - "跟随系统": "跟随系统" + "跟随系统": "跟随系统", + "一键登录": "一键登录" } diff --git a/lan/lan_kk.json b/lan/lan_kk.json index ca429781..7f2f0c8e 100644 --- a/lan/lan_kk.json +++ b/lan/lan_kk.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Жүйені қолдану" + "跟随系统": "Жүйені қолдану", + "一键登录": "Бір шертті кіру" } \ No newline at end of file diff --git a/lan/lan_ko.json b/lan/lan_ko.json index 11ff733a..6b32e8d5 100644 --- a/lan/lan_ko.json +++ b/lan/lan_ko.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "시스템을 따르십시오" + "跟随系统": "시스템을 따르십시오", + "一键登录": "원 클릭 로그인" } \ No newline at end of file diff --git a/lan/lan_lt.json b/lan/lan_lt.json index 1c203b01..95c8aaec 100644 --- a/lan/lan_lt.json +++ b/lan/lan_lt.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Sekti sistema" + "跟随系统": "Sekti sistema", + "一键登录": "Vieno paspaudimo prisijungimas" } \ No newline at end of file diff --git a/lan/lan_ms.json b/lan/lan_ms.json index 3d3a59e7..94dfbd52 100644 --- a/lan/lan_ms.json +++ b/lan/lan_ms.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Ikut system" + "跟随系统": "Ikut system", + "一键登录": "Log masuk satu klik" } \ No newline at end of file diff --git a/lan/lan_nl.json b/lan/lan_nl.json index 07669fa1..b511e44f 100644 --- a/lan/lan_nl.json +++ b/lan/lan_nl.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Systeem volgen" + "跟随系统": "Systeem volgen", + "一键登录": "Inloggen met één klik" } \ No newline at end of file diff --git a/lan/lan_pl.json b/lan/lan_pl.json index b50c37e6..7db037bd 100644 --- a/lan/lan_pl.json +++ b/lan/lan_pl.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Śledź system" + "跟随系统": "Śledź system", + "一键登录": "Login jednym kliknięciem" } \ No newline at end of file diff --git a/lan/lan_pt.json b/lan/lan_pt.json index a08af884..ae6701a6 100644 --- a/lan/lan_pt.json +++ b/lan/lan_pt.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Siga o sistema" + "跟随系统": "Siga o sistema", + "一键登录": "Login com um clique" } \ No newline at end of file diff --git a/lan/lan_ro.json b/lan/lan_ro.json index 6d572f88..a7353714 100644 --- a/lan/lan_ro.json +++ b/lan/lan_ro.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Urmează sistemul:" + "跟随系统": "Urmează sistemul:", + "一键登录": "Autentificare cu un singur clicName" } \ No newline at end of file diff --git a/lan/lan_ru.json b/lan/lan_ru.json index 08faace8..c42ca680 100644 --- a/lan/lan_ru.json +++ b/lan/lan_ru.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Следуйте системе" + "跟随系统": "Следуйте системе", + "一键登录": "Вход в один клик" } \ No newline at end of file diff --git a/lan/lan_sk.json b/lan/lan_sk.json index cadd2541..1474475a 100644 --- a/lan/lan_sk.json +++ b/lan/lan_sk.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Sledovať systém" + "跟随系统": "Sledovať systém", + "一键登录": "Prihlásenie jedným kliknutím" } \ No newline at end of file diff --git a/lan/lan_sr_cyrl.json b/lan/lan_sr_cyrl.json index e79136b2..53981179 100644 --- a/lan/lan_sr_cyrl.json +++ b/lan/lan_sr_cyrl.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Пратите систем" + "跟随系统": "Пратите систем", + "一键登录": "Пријава једним кликом" } \ No newline at end of file diff --git a/lan/lan_sv.json b/lan/lan_sv.json index 9235a008..21e97557 100644 --- a/lan/lan_sv.json +++ b/lan/lan_sv.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Följ system" + "跟随系统": "Följ system", + "一键登录": "Ett klick inloggning" } \ No newline at end of file diff --git a/lan/lan_th.json b/lan/lan_th.json index e4020c44..4b904717 100644 --- a/lan/lan_th.json +++ b/lan/lan_th.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "ระบบติดตามผล" + "跟随系统": "ระบบติดตามผล", + "一键登录": "เข้าสู่ระบบด้วยคลิกเดียว" } \ No newline at end of file diff --git a/lan/lan_tr.json b/lan/lan_tr.json index 04d9df57..557cec4d 100644 --- a/lan/lan_tr.json +++ b/lan/lan_tr.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Sistemi takip et" + "跟随系统": "Sistemi takip et", + "一键登录": "Tek tıklama giriş" } \ No newline at end of file diff --git a/lan/lan_tw.json b/lan/lan_tw.json index 39b35337..67e3fb56 100644 --- a/lan/lan_tw.json +++ b/lan/lan_tw.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "跟蹤系統" + "跟随系统": "跟蹤系統", + "一键登录": "一鍵登錄" } \ No newline at end of file diff --git a/lan/lan_uk.json b/lan/lan_uk.json index 7bef26fa..9eb5dd42 100644 --- a/lan/lan_uk.json +++ b/lan/lan_uk.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Система стеження за" + "跟随系统": "Система стеження за", + "一键登录": "Вхід в один клік" } \ No newline at end of file diff --git a/lan/lan_vi.json b/lan/lan_vi.json index 2584157d..537d14f3 100644 --- a/lan/lan_vi.json +++ b/lan/lan_vi.json @@ -1119,5 +1119,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "Hệ thống theo dõi" + "跟随系统": "Hệ thống theo dõi", + "一键登录": "Đăng nhập bằng một cú nhấp chuột" } \ No newline at end of file diff --git a/lan/lan_zh.json b/lan/lan_zh.json index 522b21da..e29bc923 100755 --- a/lan/lan_zh.json +++ b/lan/lan_zh.json @@ -1123,5 +1123,6 @@ "日简称": "D", "时简称": "H", "分简称": "M", - "跟随系统": "跟随系统" + "跟随系统": "跟随系统", + "一键登录": "一键登录" } diff --git a/lib/login/login/starLock_login_logic.dart b/lib/login/login/starLock_login_logic.dart index 72d355e5..8170243b 100755 --- a/lib/login/login/starLock_login_logic.dart +++ b/lib/login/login/starLock_login_logic.dart @@ -78,37 +78,40 @@ class StarLockLoginLogic extends BaseGetXController { } Future oneClickLoginAction() async { - Map? map = await JverifyOneClickLoginManage().loginAuth(); - final int code = map!['code']; - final String content = map['message']; - // final String operator = map['operator']; - AppLog.log('1111code:$code content:$content'); - if (code == 6000) { - // final LoginEntity entity = await ApiRepository.to.oneClickLogin( - // loginType: '3', loginToken: content, deviceInfo: state.deviceInfoMap); - // if (entity.errorCode!.codeIsSuccessful) { - // UmengCommonSdk.onEvent('login_result', { - // 'account': state.emailOrPhone.value, - // 'date': DateTool().getNowDateWithType(1), - // 'login_res': '成功', - // }); - // - // Storage.saveLoginData(entity.data); - // Storage.setBool(saveIsVip, entity.data!.isVip == 1); - // eventBus.fire(MineInfoChangeRefreshUI()); - // if (Get.isRegistered()) { - // Get.find().getStarLockInfo(isUnShowLoading: true); - // } - // Get.offNamedUntil(Routers.starLockMain, (Route route) => false); - // BlueManage().scanDevices.clear(); //清除设备缓存 - // } else { - // UmengCommonSdk.onEvent('login_result', { - // 'account': state.emailOrPhone.value, - // 'date': DateTool().getNowDateWithType(1), - // 'login_res': '${entity.errorCode}--${entity.errorMsg}', - // }); - // } - } + await JverifyOneClickLoginManage().loginAuth((e) async { + final int? code = e.code; + final String? content = e.message; + // final String operator = map['operator']; + AppLog.log('1111code:$code content:$content'); + if (code == 6000) { + final LoginEntity entity = await ApiRepository.to.oneClickLogin( + loginType: '3', + loginToken: content ?? '', + deviceInfo: state.deviceInfoMap); + if (entity.errorCode!.codeIsSuccessful) { + UmengCommonSdk.onEvent('login_result', { + 'account': state.emailOrPhone.value, + 'date': DateTool().getNowDateWithType(1), + 'login_res': '成功', + }); + + Storage.saveLoginData(entity.data); + Storage.setBool(saveIsVip, entity.data!.isVip == 1); + eventBus.fire(MineInfoChangeRefreshUI()); + if (Get.isRegistered()) { + Get.find().getStarLockInfo(isUnShowLoading: true); + } + Get.offNamedUntil(Routers.starLockMain, (Route route) => false); + BlueManage().scanDevices.clear(); //清除设备缓存 + } else { + UmengCommonSdk.onEvent('login_result', { + 'account': state.emailOrPhone.value, + 'date': DateTool().getNowDateWithType(1), + 'login_res': '${entity.errorCode}--${entity.errorMsg}', + }); + } + } + }); } Future checkIpAction() async { @@ -153,6 +156,7 @@ class StarLockLoginLogic extends BaseGetXController { super.onInit(); JverifyOneClickLoginManage(); + oneClickLoginAction(); state.isCheckVerifyEnable.value = await JverifyOneClickLoginManage().checkVerifyEnable(); } diff --git a/lib/login/login/starLock_login_page.dart b/lib/login/login/starLock_login_page.dart index ffd99166..b9344e57 100755 --- a/lib/login/login/starLock_login_page.dart +++ b/lib/login/login/starLock_login_page.dart @@ -236,24 +236,24 @@ class _StarLockLoginPageState extends State { } } : null)), - SizedBox(height: 20.w), - Obx(() => Visibility( - visible: state.isCheckVerifyEnable.value, - child: SubmitBtn( - btnName: '一键登录', - fontSize: 28.sp, - borderRadius: 20.w, - padding: EdgeInsets.only(top: 25.w, bottom: 25.w), - // isDisabled: state.canNext.value, - onClick: () { - if (state.agree.value == false) { - logic.showToast('请先同意用户协议及隐私政策'.tr); - return; - } else { - logic.oneClickLoginAction(); - } - }), - )), + // SizedBox(height: 20.w), + // Obx(() => Visibility( + // visible: state.isCheckVerifyEnable.value, + // child: SubmitBtn( + // btnName: '一键登录', + // fontSize: 28.sp, + // borderRadius: 20.w, + // padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + // // isDisabled: state.canNext.value, + // onClick: () { + // if (state.agree.value == false) { + // logic.showToast('请先同意用户协议及隐私政策'.tr); + // return; + // } else { + // logic.oneClickLoginAction(); + // } + // }), + // )), SizedBox(height: 50.w), Row( mainAxisAlignment: MainAxisAlignment.center, @@ -278,24 +278,23 @@ class _StarLockLoginPageState extends State { child: SizedBox( width: 10.sp, )), - if (F.isLite) - Container() - else - GestureDetector( - child: SizedBox( - // width: 150.w, - height: 50.h, - // color: Colors.red, - child: Center( - child: Text('演示模式'.tr, - style: TextStyle( - fontSize: 22.sp, color: AppColors.mainColor)), + Obx(() => Visibility( + visible: state.isCheckVerifyEnable.value, + child: GestureDetector( + child: SizedBox( + // width: 150.w, + height: 50.h, + // color: Colors.red, + child: Center( + child: Text('一键登录'.tr, + style: TextStyle( + fontSize: 22.sp, + color: AppColors.mainColor)), + ), + ), + onTap: logic.oneClickLoginAction, ), - ), - onTap: () { - Get.toNamed(Routers.demoModeLockDetailPage); - }, - ) + )) ], ), ], diff --git a/lib/login/login/starLock_login_xhj_page.dart b/lib/login/login/starLock_login_xhj_page.dart index e389fa08..b0810366 100755 --- a/lib/login/login/starLock_login_xhj_page.dart +++ b/lib/login/login/starLock_login_xhj_page.dart @@ -1,3 +1,4 @@ +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -184,17 +185,19 @@ class _StarLockLoginPageState extends State { width: Get.width, child: ElevatedButton( onPressed: () async { - if (state.agree.value == false) { - logic.showToast('请先同意用户协议及隐私政策'.tr); - return; - } else { - logic.oneClickLoginAction(); - } + final dynamic data = + await Get.toNamed(Routers.starLockRegisterPage); + state.emailOrPhoneController.text = + data['phoneOrEmailStr']; + logic.checkNext(state.emailOrPhoneController); + state.pwdController.text = data['pwd']; + logic.checkNext(state.pwdController); + setState(() {}); }, style: ElevatedButton.styleFrom( backgroundColor: AppColors.mainColor), child: Text( - '一键登录'.tr, + '注册'.tr, style: TextStyle(fontSize: 22.sp, color: Colors.white), ), @@ -225,29 +228,25 @@ class _StarLockLoginPageState extends State { child: SizedBox( width: 10.sp, )), - GestureDetector( - child: SizedBox( - // width: 150.w, - height: 50.h, - // color: Colors.red, - child: Center( - child: Text('注册'.tr, - style: TextStyle( - fontSize: 22.sp, - color: AppColors.mainColor)), - ), - ), - onTap: () async { - final dynamic data = - await Get.toNamed(Routers.starLockRegisterPage); - state.emailOrPhoneController.text = - data['phoneOrEmailStr']; - logic.checkNext(state.emailOrPhoneController); - state.pwdController.text = data['pwd']; - logic.checkNext(state.pwdController); - setState(() {}); - }, - ) + Obx(() => Visibility( + visible: state.isCheckVerifyEnable.value, + child: GestureDetector( + child: SizedBox( + // width: 150.w, + height: 50.h, + // color: Colors.red, + child: Center( + child: Text('一键登录'.tr, + style: TextStyle( + fontSize: 22.sp, + color: AppColors.mainColor)), + ), + ), + onTap: () async { + logic.oneClickLoginAction(); + }, + ), + )) ], ), ], diff --git a/lib/tools/jverify_one_click_login.dart b/lib/tools/jverify_one_click_login.dart index 8bdc9d6f..94993d6d 100644 --- a/lib/tools/jverify_one_click_login.dart +++ b/lib/tools/jverify_one_click_login.dart @@ -1,6 +1,13 @@ +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; import 'package:jverify/jverify.dart'; +import 'package:star_lock/app_settings/app_colors.dart'; import '../app_settings/app_settings.dart'; +import '../common/XSConstantMacro/XSConstantMacro.dart'; import '../flavors.dart'; class JverifyOneClickLoginManage { @@ -33,13 +40,17 @@ class JverifyOneClickLoginManage { String f_opr_key = 'operator'; Future _initSDK() async { - await initPlatformState(); + try { + await initPlatformState(); - isInitSuccess(); + isInitSuccess(); - getToken(); + getToken(); - preLogin(); + preLogin(); + } catch (e) { + AppLog.log('SDK 初始化错误: $e'); + } } Future initPlatformState() async { @@ -50,22 +61,17 @@ class JverifyOneClickLoginManage { jverify.setDebugMode(true); // 打开调试模式 jverify.setCollectionAuth(true); + String appKey; if (F.isSKY) { - jverify.setup( - appKey: '7ff37d174c1a568a89e98dad', //"你自己应用的 AppKey", - channel: 'devloper-default'); // 初始化sdk, appKey 和 channel 只对ios设置有效 + appKey = '7ff37d174c1a568a89e98dad'; AppLog.log('appKey:7ff37d174c1a568a89e98dad'); } else { - jverify.setup( - appKey: '251fc8074820d122b6de58d2', //"你自己应用的 AppKey", - channel: 'devloper-default'); // 初始化sdk, appKey 和 channel 只对ios设置有效 + appKey = '251fc8074820d122b6de58d2'; AppLog.log('appKey:251fc8074820d122b6de58d2'); } - - // If the widget was removed from the tree while the asynchronous platform - // message was in flight, we want to discard the reply rather than calling - // setState to update our non-existent appearance. - // if (!mounted) return; + jverify.setup( + appKey: appKey, //"你自己应用的 AppKey", + channel: 'devloper'); /// 授权页面点击时间监听 jverify.addAuthPageEventListener((JVAuthPageEvent event) { @@ -135,342 +141,132 @@ class JverifyOneClickLoginManage { } /// SDK 请求授权一键登录 - Future loginAuth() async { + Future loginAuth( + Function(JVListenerEvent jvListenerEvent) action) async { Map map = await jverify.checkVerifyEnable(); final bool result = map[f_result_key]; print('checkVerifyEnable $map'); //需要使用sms的时候不检查result - if (result) { - return await jverify.loginAuth(true); - // jverify.loginAuth(true).then((map) { - // /// 再,在回调里获取 loginAuth 接口异步返回数据(如果是通过添加 JVLoginAuthCallBackListener 监听来获取返回数据,则忽略此步骤) - // final int code = map[f_code_key]; - // final String content = map[f_msg_key]; - // final String operator = map[f_opr_key]; - // AppLog.log( - // '通过接口异步返回,获取到 loginAuth 接口返回数据,code=$code,message = $content,operator = $operator'); - // return map; - // }); - } - return null; - // .then((map) { - // final bool result = map[f_result_key]; - // print('checkVerifyEnable $map'); - // //需要使用sms的时候不检查result // if (result) { - // // if (true) { - // jverify.loginAuth(true).then((map) { - // /// 再,在回调里获取 loginAuth 接口异步返回数据(如果是通过添加 JVLoginAuthCallBackListener 监听来获取返回数据,则忽略此步骤) - // final int code = map[f_code_key]; - // final String content = map[f_msg_key]; - // final String operator = map[f_opr_key]; - // AppLog.log( - // '通过接口异步返回,获取到 loginAuth 接口返回数据,code=$code,message = $content,operator = $operator'); - // return map; - // }); - -// // final screenSize = MediaQuery.of(context).size; -// // final screenWidth = screenSize.width; -// // final screenHeight = screenSize.height; -// final bool isiOS = Platform.isIOS; -// -// /// 自定义授权的 UI 界面,以下设置的图片必须添加到资源文件里, -// /// android项目将图片存放至drawable文件夹下,可使用图片选择器的文件名,例如:btn_login.xml,入参为"btn_login"。 -// /// ios项目存放在 Assets.xcassets。 -// /// -// final JVUIConfig uiConfig = JVUIConfig(); -// // uiConfig.authBGGifPath = "main_gif"; -// // uiConfig.authBGVideoPath="main_vi"; -// uiConfig.authBGVideoPath = -// 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4'; -// uiConfig.authBGVideoImgPath = 'main_v_bg'; -// -// uiConfig.navHidden = !isiOS; -// // uiConfig.navColor = Colors.red.value; -// // uiConfig.navText = "登录"; -// // uiConfig.navTextColor = Colors.blue.value; -// // uiConfig.navReturnImgPath = "return_bg"; //图片必须存在 -// -// uiConfig.logoWidth = 100; -// uiConfig.logoHeight = 80; -// //uiConfig.logoOffsetX = isiOS ? 0 : null;//(screenWidth/2 - uiConfig.logoWidth/2).toInt(); -// uiConfig.logoOffsetY = 10; -// uiConfig.logoVerticalLayoutItem = JVIOSLayoutItem.ItemSuper; -// uiConfig.logoHidden = false; -// uiConfig.logoImgPath = 'logo'; -// -// uiConfig.numberFieldWidth = 200; -// uiConfig.numberFieldHeight = 40; -// //uiConfig.numFieldOffsetX = isiOS ? 0 : null;//(screenWidth/2 - uiConfig.numberFieldWidth/2).toInt(); -// uiConfig.numFieldOffsetY = isiOS ? 20 : 120; -// uiConfig.numberVerticalLayoutItem = JVIOSLayoutItem.ItemLogo; -// uiConfig.numberColor = Colors.blue.value; -// uiConfig.numberSize = 18; -// -// uiConfig.sloganOffsetY = isiOS ? 20 : 160; -// uiConfig.sloganVerticalLayoutItem = JVIOSLayoutItem.ItemNumber; -// uiConfig.sloganTextColor = Colors.black.value; -// uiConfig.sloganTextSize = 15; -// // uiConfig.slogan -// //uiConfig.sloganHidden = 0; -// -// uiConfig.logBtnWidth = 220; -// uiConfig.logBtnHeight = 50; -// //uiConfig.logBtnOffsetX = isiOS ? 0 : null;//(screenWidth/2 - uiConfig.logBtnWidth/2).toInt(); -// uiConfig.logBtnOffsetY = isiOS ? 20 : 230; -// uiConfig.logBtnVerticalLayoutItem = JVIOSLayoutItem.ItemSlogan; -// uiConfig.logBtnText = '登录按钮'; -// uiConfig.logBtnTextColor = Colors.brown.value; -// uiConfig.logBtnTextSize = 16; -// uiConfig.logBtnTextBold = true; -// uiConfig.loginBtnNormalImage = 'login_btn_normal'; //图片必须存在 -// uiConfig.loginBtnPressedImage = 'login_btn_press'; //图片必须存在 -// uiConfig.loginBtnUnableImage = 'login_btn_unable'; //图片必须存在 -// -// uiConfig.privacyHintToast = -// true; //only android 设置隐私条款不选中时点击登录按钮默认显示toast。 -// -// uiConfig.privacyState = false; //设置默认勾选 -// uiConfig.privacyCheckboxSize = 20; -// uiConfig.checkedImgPath = 'check_image'; //图片必须存在 -// uiConfig.uncheckedImgPath = 'uncheck_image'; //图片必须存在 -// uiConfig.privacyCheckboxInCenter = true; -// uiConfig.privacyCheckboxHidden = false; -// uiConfig.isAlertPrivacyVc = true; -// -// //uiConfig.privacyOffsetX = isiOS ? (20 + uiConfig.privacyCheckboxSize) : null; -// uiConfig.privacyOffsetY = 15; // 距离底部距离 -// uiConfig.privacyVerticalLayoutItem = JVIOSLayoutItem.ItemSuper; -// uiConfig.clauseName = '协议1'; -// uiConfig.clauseUrl = 'http://www.baidu.com'; -// uiConfig.clauseBaseColor = Colors.black.value; -// uiConfig.clauseNameTwo = '协议二'; -// uiConfig.clauseUrlTwo = 'http://www.hao123.com'; -// uiConfig.clauseColor = Colors.red.value; -// uiConfig.privacyText = ['1极', '4证']; -// uiConfig.privacyTextSize = 13; -// uiConfig.privacyItem = [ -// JVPrivacy('自定义协议1', 'http://www.baidu.com', -// beforeName: '==', afterName: '++', separator: '*'), -// JVPrivacy('自定义协议2', 'http://www.baidu.com', separator: '、'), -// JVPrivacy('自定义协议3', 'http://www.baidu.com', separator: '、'), -// JVPrivacy('自定义协议4', 'http://www.baidu.com', separator: '、'), -// JVPrivacy('自定义协议5', 'http://www.baidu.com', separator: '、') -// ]; -// uiConfig.textVerAlignment = 1; -// //uiConfig.privacyWithBookTitleMark = true; -// //uiConfig.privacyTextCenterGravity = false; -// uiConfig.authStatusBarStyle = JVIOSBarStyle.StatusBarStyleDarkContent; -// uiConfig.privacyStatusBarStyle = JVIOSBarStyle.StatusBarStyleDefault; -// uiConfig.modelTransitionStyle = -// JVIOSUIModalTransitionStyle.CrossDissolve; -// -// uiConfig.statusBarColorWithNav = true; -// // uiConfig.virtualButtonTransparent = true; -// -// uiConfig.privacyStatusBarColorWithNav = true; -// uiConfig.privacyVirtualButtonTransparent = true; -// -// uiConfig.needStartAnim = true; -// uiConfig.needCloseAnim = true; -// uiConfig.enterAnim = 'activity_slide_enter_bottom'; -// uiConfig.exitAnim = 'activity_slide_exit_bottom'; -// -// uiConfig.privacyNavColor = Colors.red.value; -// uiConfig.privacyNavTitleTextColor = Colors.blue.value; -// uiConfig.privacyNavTitleTextSize = 16; -// -// uiConfig.privacyNavTitleTitle = 'ios lai le'; //only ios -// uiConfig.privacyNavReturnBtnImage = 'back'; //图片必须存在; -// -// //协议二次弹窗内容设置 -iOS -// uiConfig.isAlertPrivacyVc = true; -// uiConfig.agreementAlertViewTitleTexSize = 18; -// uiConfig.agreementAlertViewTitleTextColor = Colors.red.value; -// uiConfig.agreementAlertViewContentTextAlignment = -// JVTextAlignmentType.center; -// uiConfig.agreementAlertViewContentTextFontSize = 16; -// uiConfig.agreementAlertViewLoginBtnNormalImagePath = 'login_btn_normal'; -// uiConfig.agreementAlertViewLoginBtnPressedImagePath = 'login_btn_press'; -// uiConfig.agreementAlertViewLoginBtnUnableImagePath = 'login_btn_unable'; -// uiConfig.agreementAlertViewLogBtnTextColor = Colors.black.value; -// -// //协议二次弹窗内容设置 -Android -// final JVPrivacyCheckDialogConfig privacyCheckDialogConfig = -// JVPrivacyCheckDialogConfig(); -// // privacyCheckDialogConfig.width = 250; -// // privacyCheckDialogConfig.height = 100; -// privacyCheckDialogConfig.title = '测试协议标题'; -// privacyCheckDialogConfig.offsetX = 0; -// privacyCheckDialogConfig.offsetY = 0; -// privacyCheckDialogConfig.logBtnText = '同11意'; -// privacyCheckDialogConfig.titleTextSize = 22; -// privacyCheckDialogConfig.gravity = 'center'; -// privacyCheckDialogConfig.titleTextColor = Colors.black.value; -// privacyCheckDialogConfig.contentTextGravity = 'left'; -// privacyCheckDialogConfig.contentTextSize = 14; -// privacyCheckDialogConfig.logBtnImgPath = 'login_btn_normal'; -// privacyCheckDialogConfig.logBtnTextColor = Colors.black.value; -// privacyCheckDialogConfig.logBtnMarginT = 20; -// privacyCheckDialogConfig.logBtnMarginB = 20; -// privacyCheckDialogConfig.logBtnMarginL = 10; -// privacyCheckDialogConfig.logBtnWidth = 140; -// privacyCheckDialogConfig.logBtnHeight = 40; -// -// /// 添加自定义的 控件 到dialog -// final List dialogWidgetList = []; -// const String btn_dialog_widgetId = -// 'jv_add_custom_dialog_button'; // 标识控件 id -// final JVCustomWidget buttonDialogWidget = -// JVCustomWidget(btn_dialog_widgetId, JVCustomWidgetType.button); -// buttonDialogWidget.title = '取消'; -// buttonDialogWidget.left = 163; -// buttonDialogWidget.top = 142; -// buttonDialogWidget.width = 140; -// buttonDialogWidget.height = 40; -// buttonDialogWidget.textAlignment = JVTextAlignmentType.center; -// buttonDialogWidget.btnNormalImageName = 'main_btn_other'; -// buttonDialogWidget.btnPressedImageName = 'main_btn_other'; -// // buttonDialogWidget.backgroundColor = Colors.yellow.value; -// //buttonWidget.textAlignment = JVTextAlignmentType.left; -// -// // 添加点击事件监听 -// jverify.addClikWidgetEventListener(btn_dialog_widgetId, (eventId) { -// AppLog.log('receive listener - click dialog widget event :$eventId'); -// if (btn_dialog_widgetId == eventId) { -// AppLog.log('receive listener - 点击【新加 dialog button】'); -// } -// }); -// dialogWidgetList.add(buttonDialogWidget); -// privacyCheckDialogConfig.widgets = dialogWidgetList; -// uiConfig.privacyCheckDialogConfig = privacyCheckDialogConfig; -// -// //sms -// final JVSMSUIConfig smsConfig = JVSMSUIConfig(); -// smsConfig.smsPrivacyBeanList = [ -// JVPrivacy('自定义协议1', 'http://www.baidu.com', -// beforeName: '==', afterName: '++', separator: '*') -// ]; -// smsConfig.enableSMSService = true; -// uiConfig.smsUIConfig = smsConfig; -// -// uiConfig.setIsPrivacyViewDarkMode = false; //协议页面是否支持暗黑模式 -// -// //弹框模式 -// // JVPopViewConfig popViewConfig = JVPopViewConfig(); -// // popViewConfig.width = (screenWidth - 100.0).toInt(); -// // popViewConfig.height = (screenHeight - 150.0).toInt(); -// -// // uiConfig.popViewConfig = popViewConfig; -// -// /// 添加自定义的 控件 到授权界面 -// final List widgetList = []; -// -// const String text_widgetId = 'jv_add_custom_text'; // 标识控件 id -// final JVCustomWidget textWidget = -// JVCustomWidget(text_widgetId, JVCustomWidgetType.textView); -// textWidget.title = '新加 text view 控件'; -// textWidget.left = 20; -// textWidget.top = 360; -// textWidget.width = 200; -// textWidget.height = 40; -// textWidget.backgroundColor = Colors.yellow.value; -// textWidget.isShowUnderline = true; -// textWidget.textAlignment = JVTextAlignmentType.center; -// textWidget.isClickEnable = true; -// -// // 添加点击事件监听 -// jverify.addClikWidgetEventListener(text_widgetId, (eventId) { -// AppLog.log('receive listener - click widget event :$eventId'); -// if (text_widgetId == eventId) { -// AppLog.log('receive listener - 点击【新加 text】'); -// } -// }); -// widgetList.add(textWidget); -// -// const String btn_widgetId = 'jv_add_custom_button'; // 标识控件 id -// final JVCustomWidget buttonWidget = -// JVCustomWidget(btn_widgetId, JVCustomWidgetType.button); -// buttonWidget.title = '新加 button 控件'; -// buttonWidget.left = 100; -// buttonWidget.top = 400; -// buttonWidget.width = 150; -// buttonWidget.height = 40; -// buttonWidget.isShowUnderline = true; -// buttonWidget.backgroundColor = Colors.brown.value; -// //buttonWidget.btnNormalImageName = ""; -// //buttonWidget.btnPressedImageName = ""; -// //buttonWidget.textAlignment = JVTextAlignmentType.left; -// -// // 添加点击事件监听 -// jverify.addClikWidgetEventListener(btn_widgetId, (eventId) { -// AppLog.log('receive listener - click widget event :$eventId'); -// if (btn_widgetId == eventId) { -// AppLog.log('receive listener - 点击【新加 button】'); -// } -// }); -// widgetList.add(buttonWidget); -// -// // 设置iOS的二次弹窗按钮 -// uiConfig.agreementAlertViewWidgets = dialogWidgetList; -// uiConfig.agreementAlertViewUIFrames = { -// 'superViewFrame': [10, 60, 280, 300], -// 'alertViewFrame': [0, 0, 280, 300], -// 'titleFrame': [10, 10, 260, 40], -// 'contentFrame': [15, 60, 250, 110], -// 'buttonFrame': [10, 200, 100, 40] -// }; -// -// /// 步骤 1:调用接口设置 UI -// jverify.setCustomAuthorizationView(true, uiConfig, -// landscapeConfig: uiConfig, widgets: widgetList); -// if (!isSms) { -// /// 步骤 2:调用一键登录接口 -// jverify.loginAuthSyncApi2( -// autoDismiss: true, -// enableSms: true, -// loginAuthcallback: (event) { -// AppLog.log( -// '获取到 loginAuthSyncApi 接口返回数据,code=${event.code},message = ${event.message},operator = ${event.operator}'); -// }); -// } else { -// /// 步骤 2:调用短信登录接口 -// jverify.smsAuth( -// autoDismiss: true, -// smsCallback: (event) { -// AppLog.log( -// '获取到 smsAuth 接口返回数据,code=${event.code},message = ${event.message},phone = ${event.phone}'); -// }); -// } -// } else { - /* 弹框模式 - JVPopViewConfig popViewConfig = JVPopViewConfig(); - popViewConfig.width = (screenWidth - 100.0).toInt(); - popViewConfig.height = (screenHeight - 150.0).toInt(); - - uiConfig.popViewConfig = popViewConfig; - */ - - /* - - /// 方式二:使用异步接口 (如果想使用异步接口,则忽略此步骤,看方式二) - - /// 先,执行异步的一键登录接口 - jverify.loginAuth(true).then((map) { - - /// 再,在回调里获取 loginAuth 接口异步返回数据(如果是通过添加 JVLoginAuthCallBackListener 监听来获取返回数据,则忽略此步骤) - int code = map[f_code_key]; - String content = map[f_msg_key]; - String operator = map[f_opr_key]; - setState(() { - _hideLoading(); - _result = "接口异步返回数据:[$code] message = $content"; - }); - print("通过接口异步返回,获取到 loginAuth 接口返回数据,code=$code,message = $content,operator = $operator"); - }); - - */ + // return await jverify.loginAuth(true); // } - // }); + // return null; + + if (result) { + bool isiOS = Platform.isIOS; + + /// 自定义授权的 UI 界面,以下设置的图片必须添加到资源文件里, + /// android项目将图片存放至drawable文件夹下,可使用图片选择器的文件名,例如:btn_login.xml,入参为"btn_login"。 + /// ios项目存放在 Assets.xcassets。 + JVUIConfig uiConfig = JVUIConfig(); + // uiConfig.authBGGifPath = "main_gif"; + // uiConfig.authBGVideoPath="main_vi"; + // uiConfig.authBGVideoPath = 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4'; + uiConfig.authBackgroundImage = 'images/icon_left_grey.png'; + + // uiConfig.navHidden = !isiOS; + uiConfig.navColor = AppColors.mainColor.value; + uiConfig.navText = '一键登录'.tr; + uiConfig.navTextColor = Colors.white.value; + uiConfig.navReturnImgPath = 'return_bg'; //图片必须存在 + + uiConfig.logoWidth = 100; + uiConfig.logoHeight = 100; + //uiConfig.logoOffsetX = isiOS ? 0 : null;//(screenWidth/2 - uiConfig.logoWidth/2).toInt(); + uiConfig.logoOffsetY = 100; + uiConfig.logoVerticalLayoutItem = JVIOSLayoutItem.ItemSuper; + uiConfig.logoHidden = false; + uiConfig.logoImgPath = 'logo'; + + uiConfig.numberFieldWidth = 200; + uiConfig.numberFieldHeight = 40; + //uiConfig.numFieldOffsetX = isiOS ? 0 : null;//(screenWidth/2 - uiConfig.numberFieldWidth/2).toInt(); + uiConfig.numFieldOffsetY = isiOS ? 120 : 220; + uiConfig.numberVerticalLayoutItem = JVIOSLayoutItem.ItemLogo; + uiConfig.numberColor = AppColors.mainColor.value; + uiConfig.numberSize = 18; + + uiConfig.sloganOffsetY = isiOS ? 120 : 260; + uiConfig.sloganVerticalLayoutItem = JVIOSLayoutItem.ItemNumber; + uiConfig.sloganTextColor = Colors.black.value; + uiConfig.sloganTextSize = 15; +// uiConfig.slogan + //uiConfig.sloganHidden = 0; + + uiConfig.logBtnOffsetX = 20; + uiConfig.logBtnWidth = double.parse('${1.sw - 20 * 2}').toInt(); + uiConfig.logBtnHeight = 50; + //uiConfig.logBtnOffsetX = isiOS ? 0 : null;//(screenWidth/2 - uiConfig.logBtnWidth/2).toInt(); + uiConfig.logBtnOffsetY = isiOS ? 120 : 330; + uiConfig.logBtnVerticalLayoutItem = JVIOSLayoutItem.ItemNumber; + uiConfig.logBtnText = '一键登录'.tr; + uiConfig.logBtnTextColor = Colors.white.value; + uiConfig.logBtnTextSize = 16; + uiConfig.logBtnBackgroundPath = ''; + // uiConfig.logBtnTextBold = true; + // uiConfig.loginBtnNormalImage = 'login_btn_normal'; //图片必须存在 + // uiConfig.loginBtnPressedImage = 'login_btn_press'; //图片必须存在 + // uiConfig.loginBtnUnableImage = 'login_btn_unable'; //图片必须存在 + + uiConfig.privacyHintToast = + true; //only android 设置隐私条款不选中时点击登录按钮默认显示toast。 + + uiConfig.privacyState = false; //设置默认勾选 + uiConfig.privacyCheckboxSize = 20; + uiConfig.checkedImgPath = 'check_image'; //图片必须存在 + uiConfig.uncheckedImgPath = 'uncheck_image'; //图片必须存在 + uiConfig.privacyCheckboxInCenter = true; + uiConfig.privacyCheckboxHidden = false; + uiConfig.isAlertPrivacyVc = true; + + //uiConfig.privacyOffsetX = isiOS ? (20 + uiConfig.privacyCheckboxSize) : null; + uiConfig.privacyOffsetY = 30; // 距离底部距离 + uiConfig.privacyOffsetX = 15; // 距离底部距离 + uiConfig.privacyVerticalLayoutItem = JVIOSLayoutItem.ItemSuper; + uiConfig.clauseName = '协议1'; + uiConfig.clauseUrl = 'http://www.baidu.com'; + uiConfig.clauseBaseColor = Colors.black.value; + uiConfig.clauseNameTwo = '协议二'; + uiConfig.clauseUrlTwo = 'http://www.hao123.com'; + uiConfig.clauseColor = AppColors.mainColor.value; + uiConfig.privacyText = ['我已阅读并同意'.tr]; + uiConfig.privacyTextSize = 13; + uiConfig.privacyItem = [ + JVPrivacy('用户协议'.tr, XSConstantMacro.userAgreementURL, + beforeName: '', afterName: '', separator: ''), + JVPrivacy('隐私政策'.tr, XSConstantMacro.privacyPolicyURL, separator: '') + ]; + uiConfig.textVerAlignment = 1; + //uiConfig.privacyWithBookTitleMark = true; + //uiConfig.privacyTextCenterGravity = false; + uiConfig.authStatusBarStyle = JVIOSBarStyle.StatusBarStyleDarkContent; + uiConfig.privacyStatusBarStyle = JVIOSBarStyle.StatusBarStyleDefault; + uiConfig.modelTransitionStyle = JVIOSUIModalTransitionStyle.CrossDissolve; + + uiConfig.statusBarColorWithNav = true; + // uiConfig.virtualButtonTransparent = true; + + uiConfig.privacyStatusBarColorWithNav = true; + uiConfig.privacyVirtualButtonTransparent = true; + + uiConfig.needStartAnim = true; + uiConfig.needCloseAnim = true; + uiConfig.enterAnim = 'activity_slide_enter_bottom'; + uiConfig.exitAnim = 'activity_slide_exit_bottom'; + + uiConfig.privacyNavColor = AppColors.mainColor.value; + uiConfig.privacyNavTitleTextColor = Colors.white.value; + uiConfig.privacyNavTitleTextSize = 16; + + /// 调用接口设置 UI + jverify.setCustomAuthorizationView(true, uiConfig, + landscapeConfig: uiConfig); + jverify.loginAuthSyncApi2( + autoDismiss: true, + loginAuthcallback: (event) { + action(event); + // AppLog.log('获取到 loginAuthSyncApi 接口返回数据,code=${event.code},message = ${event.message},operator = ${event.operator}'); + }); + } } }