Merge branch 'develop_liuyf' into 'develop'

fix: - 一键登录逻辑,UI完善

See merge request StarlockTeam/app-starlock!22
This commit is contained in:
刘燕峰 2025-04-23 03:21:44 +00:00
commit ce7684171b
34 changed files with 412 additions and 126 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 设置背景颜色为透明 -->
<solid android:color="@android:color/transparent"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -74,8 +74,6 @@ PODS:
- SDWebImage
- SwiftyGif
- EMASRest (11.1.1.2)
- fast_rsa (0.6.0):
- Flutter
- file_picker (0.0.1):
- DKImagePickerController/PhotoGallery
- Flutter
@ -146,6 +144,8 @@ PODS:
- fluwx/pay (0.0.1):
- Flutter
- WechatOpenSDK-XCFramework (~> 2.0.4)
- gallery_saver (0.0.1):
- Flutter
- google_maps_flutter_ios (0.0.1):
- Flutter
- GoogleMaps (< 9.0)
@ -215,6 +215,24 @@ PODS:
- JPush (= 5.3.0)
- just_audio (0.0.1):
- 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/decode (= 3.30910.0)
- nanopb/encode (= 3.30910.0)
@ -257,6 +275,9 @@ PODS:
- video_player_avfoundation (0.0.1):
- Flutter
- FlutterMacOS
- video_thumbnail (0.0.1):
- Flutter
- libwebp
- webview_flutter_wkwebview (0.0.1):
- Flutter
- WechatOpenSDK-XCFramework (2.0.4)
@ -274,7 +295,6 @@ DEPENDENCIES:
- 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`)
- fast_rsa (from `.symlinks/plugins/fast_rsa/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
@ -287,12 +307,14 @@ DEPENDENCIES:
- flutter_voice_processor (from `.symlinks/plugins/flutter_voice_processor/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/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`)
- 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`)
- jverify (from `.symlinks/plugins/jverify/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`)
@ -306,6 +328,7 @@ DEPENDENCIES:
- 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`)
- video_thumbnail (from `.symlinks/plugins/video_thumbnail/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
SPEC REPOS:
@ -334,6 +357,8 @@ SPEC REPOS:
- ios-voice-processor
- JCore
- JPush
- JVerification
- libwebp
- nanopb
- PromisesObjC
- SDWebImage
@ -366,8 +391,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/connectivity_plus/darwin"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
fast_rsa:
:path: ".symlinks/plugins/fast_rsa/ios"
file_picker:
:path: ".symlinks/plugins/file_picker/ios"
firebase_analytics:
@ -392,6 +415,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/fluttertoast/ios"
fluwx:
:path: ".symlinks/plugins/fluwx/ios"
gallery_saver:
:path: ".symlinks/plugins/gallery_saver/ios"
google_maps_flutter_ios:
:path: ".symlinks/plugins/google_maps_flutter_ios/ios"
image_gallery_saver:
@ -402,6 +427,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/jpush_flutter/ios"
just_audio:
:path: ".symlinks/plugins/just_audio/ios"
jverify:
:path: ".symlinks/plugins/jverify/ios"
network_info_plus:
:path: ".symlinks/plugins/network_info_plus/ios"
open_filex:
@ -424,6 +451,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_ios/ios"
video_player_avfoundation:
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
video_thumbnail:
:path: ".symlinks/plugins/video_thumbnail/ios"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
@ -451,7 +480,6 @@ SPEC CHECKSUMS:
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
EMASRest: 8df6f87836767a9415ad5cc4af739bc9d215b475
fast_rsa: a1fed69b074093d2e2e3fefae6b821a071649d4c
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9
firebase_analytics: 1a66fe8d4375eccff44671ea37897683a78b2675
@ -468,7 +496,8 @@ SPEC CHECKSUMS:
flutter_pcm_sound: de0572ca4f99091cc2abfcc31601b8a4ddd33c0e
flutter_voice_processor: 2b89b93d69b02227ae3fd58589ee0bcfa3ca2a82
fluttertoast: e9a18c7be5413da53898f660530c56f35edfba9c
fluwx: c18fd6c16b03a2187cd07d6e48e32a7801962849
fluwx: daa284756ce53442b3d0417ceeda66e981906811
gallery_saver: 9fc173c9f4fcc48af53b2a9ebea1b643255be542
google_maps_flutter_ios: f135b968a67c05679e0a53538e900b5c174b0d99
GoogleAppMeasurement: 6e49ffac7d3f2c3ded9cc663f912a13b67bbd0de
GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4
@ -480,6 +509,9 @@ SPEC CHECKSUMS:
JPush: b71f497a3c1b825c7843fd97f290b05d5cd75f2e
jpush_flutter: c87be254790933c0363684169ef9d3d279a5adc5
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
JVerification: 0774807f44dd788c78d50303a14e133735807856
jverify: 337ea43ac1e16f9484f4195abe787d1b6241163c
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f
open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4
@ -498,9 +530,10 @@ SPEC CHECKSUMS:
umeng_common_sdk: a8abd7f86dfd013dbbeeae587ee143760c6582f2
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
video_thumbnail: c4e2a3c539e247d4de13cd545344fd2d26ffafd1
webview_flutter_wkwebview: 2a23822e9039b7b1bc52e5add778e5d89ad488d1
WechatOpenSDK-XCFramework: 36fb2bea0754266c17184adf4963d7e6ff98b69f
PODFILE CHECKSUM: 728f9c851a19709391c77c54ed3556e484b54db6
COCOAPODS: 1.16.2
COCOAPODS: 1.14.3

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "check.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View 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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "sky_login_btn_normal.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "sky_login_btn_press.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "uncheck.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "xhj_login_btn_normal.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "xhj_login_btn_press.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -334,4 +334,24 @@ class F {
return false;
}
}
//
static String get loginBtnImagePrefix {
switch (appFlavor) {
case Flavor.local:
case Flavor.dev:
case Flavor.pre:
case Flavor.sky_dev:
case Flavor.sky_pre:
case Flavor.sky:
return 'sky';
case Flavor.xhj_dev:
case Flavor.xhj_pre:
case Flavor.xhj:
case Flavor.xhj_bundle:
return 'xhj';
default:
return 'sky';
}
}
}

View File

@ -103,39 +103,47 @@ class StarLockLoginLogic extends BaseGetXController {
}
}
Future<void> oneClickLoginAction() async {
await JverifyOneClickLoginManage().loginAuth((e) async {
Future<void> oneClickLoginAction(BuildContext context) async {
await JverifyOneClickLoginManage().loginAuth(context,(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) {
ApmHelper.instance.trackEvent('login_result', {
'account': state.emailOrPhone.value,
'date': DateTool().getNowDateWithType(1),
'login_res': '成功',
});
switch (code) {
case 6000:
final LoginEntity entity = await ApiRepository.to.oneClickLogin(
loginType: '3',
loginToken: content ?? '',
deviceInfo: state.deviceInfoMap);
if (entity.errorCode!.codeIsSuccessful) {
ApmHelper.instance.trackEvent('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<LockMainLogic>()) {
Get.find<LockMainLogic>().getStarLockInfo(isUnShowLoading: true);
Storage.saveLoginData(entity.data);
Storage.setBool(saveIsVip, entity.data!.isVip == 1);
eventBus.fire(MineInfoChangeRefreshUI());
if (Get.isRegistered<LockMainLogic>()) {
Get.find<LockMainLogic>().getStarLockInfo(isUnShowLoading: true);
}
Get.offNamedUntil(Routers.starLockMain, (Route route) => false);
BlueManage().scanDevices.clear(); //
} else {
ApmHelper.instance.trackEvent('login_result', {
'account': state.emailOrPhone.value,
'date': DateTool().getNowDateWithType(1),
'login_res': '${entity.errorCode}--${entity.errorMsg}',
});
}
Get.offNamedUntil(Routers.starLockMain, (Route route) => false);
BlueManage().scanDevices.clear(); //
} else {
ApmHelper.instance.trackEvent('login_result', {
'account': state.emailOrPhone.value,
'date': DateTool().getNowDateWithType(1),
'login_res': '${entity.errorCode}--${entity.errorMsg}',
});
}
break;
case 6002:
// showToast('用户取消一键登录'.tr);
break;
default:
showToast('一键登录失败,请使用账号/密码登录'.tr);
break;
}
});
}
@ -215,6 +223,7 @@ class StarLockLoginLogic extends BaseGetXController {
//
Future<void> flushedDeviceInfo() async {
eventBus.fire(AgreePrivacyAgreement());
XSConstantMacro().getDeviceInfoData().then((Map<String, dynamic> data) {
state.deviceInfoMap.value = data;
}).catchError((dynamic error) {

View File

@ -283,7 +283,8 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
width: 10.sp,
)),
Obx(() => Visibility(
visible: state.isCheckVerifyEnable.value && state.currentLanguage == 'zh_CN',
visible: state.isCheckVerifyEnable.value &&
state.currentLanguage == 'zh_CN',
child: GestureDetector(
child: SizedBox(
// width: 150.w,
@ -296,7 +297,9 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
color: AppColors.mainColor)),
),
),
onTap: logic.oneClickLoginAction,
onTap: () {
logic.oneClickLoginAction(context);
},
),
))
],

View File

@ -243,7 +243,7 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
),
),
onTap: () async {
logic.oneClickLoginAction();
logic.oneClickLoginAction(context);
},
),
))

View File

@ -248,7 +248,7 @@ class CardListLogic extends BaseGetXController {
if (isDemoMode == false) {
_initReplySubscription();
_initRefreshAction();
// _initRefreshAction();
}
await getICCardListData(isRefresh: true);
}

View File

@ -430,7 +430,7 @@ class FaceListLogic extends BaseGetXController {
if (isDemoMode == false) {
_initReplySubscription();
_initRefreshAction();
// _initRefreshAction();
}
}

View File

@ -461,7 +461,6 @@ class FingerprintListLogic extends BaseGetXController {
_initReplySubscription();
// _initRefreshAction();
getFingerprintsListData(isRefresh: true);
}
}

View File

@ -75,6 +75,10 @@ class LockSetInfoData {
}
return data;
}
bool isValid() {
return lockId != null;
}
}
class LockStatus {
@ -717,11 +721,19 @@ class CatEyeModeConfig {
// JSON
factory CatEyeModeConfig.fromJson(Map<String, dynamic> json) {
return CatEyeModeConfig(
recordMode: json['recordMode'] != null ? int.tryParse(json['recordMode'].toString()) : null,
recordMode: json['recordMode'] != null
? int.tryParse(json['recordMode'].toString())
: null,
recordTime: json['recordTime'],
realTimeMode: json['realTimeMode'] != null ? int.tryParse(json['realTimeMode'].toString()) : null,
recordEndTime: json['recordEndTime'] != null ? int.tryParse(json['recordEndTime'].toString()) : null,
recordStartTime: json['recordStartTime'] != null ? int.tryParse(json['recordStartTime'].toString()) : null,
realTimeMode: json['realTimeMode'] != null
? int.tryParse(json['realTimeMode'].toString())
: null,
recordEndTime: json['recordEndTime'] != null
? int.tryParse(json['recordEndTime'].toString())
: null,
recordStartTime: json['recordStartTime'] != null
? int.tryParse(json['recordStartTime'].toString())
: null,
detectionDistance: json['detectionDistance'],
);
}

View File

@ -102,6 +102,10 @@ class _LockSetPageState extends State<LockSetPage>
isHaveLine: false,
isHaveDirection: true,
action: () {
if (!state.lockSetInfoData.value.isValid()) {
EasyLoading.showToast('网络访问失败,请检查网络是否正常'.tr);
return;
}
Get.toNamed(Routers.basicInformationPage,
arguments: <String, LockSetInfoData>{
'lockSetInfoData': state.lockSetInfoData.value
@ -154,6 +158,10 @@ class _LockSetPageState extends State<LockSetPage>
isHaveLine: true,
isHaveDirection: true,
action: () {
if (!state.lockSetInfoData.value.isValid()) {
EasyLoading.showToast('网络访问失败,请检查网络是否正常'.tr);
return;
}
Get.toNamed(Routers.lockTimePage,
arguments: <String, LockSetInfoData>{
'lockSetInfoData': state.lockSetInfoData.value
@ -166,6 +174,10 @@ class _LockSetPageState extends State<LockSetPage>
btnName: '删除'.tr,
isDelete: true,
onClick: () async {
if (!state.lockSetInfoData.value.isValid()) {
EasyLoading.showToast('网络访问失败,请检查网络是否正常'.tr);
return;
}
// logic.deletUserAction();
// logic.deletLockInfoData();
// showDeletAlertDialog(context);

View File

@ -233,7 +233,7 @@ class PalmListLogic extends BaseGetXController {
if (isDemoMode == false) {
_initReplySubscription();
_initRefreshAction();
// _initRefreshAction();
}
}

View File

@ -33,9 +33,9 @@ class MineMultiLanguageLogic extends GetxController {
}
}
// Future<void> changeLanguage(Locale l) async {
// await StoreService.to.saveLanguageCode(l.toString());
// await Get.updateLocale(l);
// AppLog.log('saveLocale: ${l.toString()}}');
// }
// Future<void> changeLanguage(Locale l) async {
// await StoreService.to.saveLanguageCode(l.toString());
// await Get.updateLocale(l);
// AppLog.log('saveLocale: ${l.toString()}}');
// }
}

View File

@ -1,7 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/mine/mineMultiLanguage/mineMultiLanguage_state.dart';
import 'package:star_lock/tools/store_service.dart';
import 'package:star_lock/translations/current_locale_tool.dart';
import '../../app_settings/app_colors.dart';
@ -33,12 +35,17 @@ class _MineMultiLanguagePageState extends State<MineMultiLanguagePage> {
actionsList: [
TextButton(
onPressed: () async {
await logic.updateUserLangInfo(state.seletLocale);
final String lanTypeTitle =
ExtensionLanguageType.fromLocale(state.seletLocale)
.lanTitle;
Get.back(
result: {'currentLanguage': state.seletLocale.toString()});
await logic.updateUserLangInfo(state.seletLocale).then((value) {
final String currentLanguage =
StoreService.to.getLanguageCode()!;
final String lanTypeTitle =
ExtensionLanguageType.fromLocale(state.seletLocale)
.lanTitle;
Get.back(result: {'currentLanguage': currentLanguage});
}).catchError((e) {
AppLog.log('updateUserLangInfo error:$e');
EasyLoading.showToast('网络访问失败,请检查网络是否正常'.tr);
});
},
child: Text(
'保存'.tr,

View File

@ -302,8 +302,11 @@ class _MineSetPageState extends State<MineSetPage>
action: () async {
// Get.toNamed(Routers.mineMultiLanguagePage);
await Get.toNamed(Routers.mineMultiLanguagePage)!.then((value) {
state.currentLanguage.value = value['currentLanguage'];
setState(() {});
setState(() {
if (value.containsKey('currentLanguage')) {
state.currentLanguage.value = value['currentLanguage'];
}
});
});
}),
/* 2024-01-12 by DaisyWu

View File

@ -95,6 +95,7 @@ class JverifyOneClickLoginManage {
///
Future<bool> checkVerifyEnable() async {
final Map map = await jverify.checkVerifyEnable();
AppLog.log('一家登录 sdk 初始化结果:$map');
final bool result = map[f_result_key];
return result;
// state.jverify.checkVerifyEnable().then((map) {
@ -141,7 +142,7 @@ class JverifyOneClickLoginManage {
}
/// SDK
Future<void> loginAuth(
Future<void> loginAuth(BuildContext context,
Function(JVListenerEvent jvListenerEvent) action) async {
Map map = await jverify.checkVerifyEnable();
final bool result = map[f_result_key];
@ -153,6 +154,9 @@ class JverifyOneClickLoginManage {
// return null;
if (result) {
final screenSize = MediaQuery.of(context).size;
final screenWidth = screenSize.width;
final screenHeight = screenSize.height;
bool isiOS = Platform.isIOS;
/// UI
@ -162,13 +166,13 @@ class JverifyOneClickLoginManage {
// 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.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.navReturnImgPath = 'icon_left_grey'; //
uiConfig.logoWidth = 100;
uiConfig.logoHeight = 100;
@ -181,45 +185,56 @@ class JverifyOneClickLoginManage {
uiConfig.numberFieldWidth = 200;
uiConfig.numberFieldHeight = 40;
//uiConfig.numFieldOffsetX = isiOS ? 0 : null;//(screenWidth/2 - uiConfig.numberFieldWidth/2).toInt();
uiConfig.numFieldOffsetY = isiOS ? 120 : 220;
uiConfig.numFieldOffsetY = isiOS ? 40 : 220;
uiConfig.numberVerticalLayoutItem = JVIOSLayoutItem.ItemLogo;
uiConfig.numberColor = AppColors.mainColor.value;
uiConfig.numberSize = 18;
uiConfig.sloganOffsetY = isiOS ? 120 : 260;
uiConfig.sloganOffsetY = isiOS ? 10 : 300;
uiConfig.sloganVerticalLayoutItem = JVIOSLayoutItem.ItemNumber;
uiConfig.sloganTextColor = Colors.black.value;
uiConfig.sloganTextSize = 15;
// uiConfig.slogan
//uiConfig.sloganHidden = 0;
uiConfig.logBtnOffsetX = 20;
// 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.logBtnOffsetY = isiOS ? 30 : 330;
uiConfig.logBtnVerticalLayoutItem = JVIOSLayoutItem.ItemSlogan;
uiConfig.logBtnText = '一键登录'.tr;
uiConfig.logBtnTextColor = Colors.white.value;
uiConfig.logBtnTextColor = AppColors.mainColor.value;
uiConfig.logBtnTextSize = 16;
uiConfig.logBtnBackgroundPath = '';
if (isiOS) {
uiConfig.logBtnTextColor = Colors.white.value;
uiConfig.loginBtnNormalImage =
'${F.loginBtnImagePrefix}_login_btn_normal'; //
uiConfig.loginBtnPressedImage =
'${F.loginBtnImagePrefix}_login_btn_press'; //
uiConfig.loginBtnUnableImage =
'${F.loginBtnImagePrefix}_login_btn_normal'; //
uiConfig.logBtnBackgroundPath =
'${F.loginBtnImagePrefix}_login_btn_normal';
}
// 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.privacyCheckboxSize = 22;
if (isiOS) {
uiConfig.checkedImgPath = 'check'; //
uiConfig.uncheckedImgPath = 'uncheck'; //
}
uiConfig.privacyCheckboxInCenter = true;
uiConfig.privacyCheckboxHidden = false;
uiConfig.isAlertPrivacyVc = true;
uiConfig.isAlertPrivacyVc = false;
//uiConfig.privacyOffsetX = isiOS ? (20 + uiConfig.privacyCheckboxSize) : null;
uiConfig.privacyNavReturnBtnImage = 'icon_left_grey'; //;
uiConfig.privacyOffsetY = 30; //
uiConfig.privacyOffsetX = 15; //
uiConfig.privacyVerticalLayoutItem = JVIOSLayoutItem.ItemSuper;
@ -254,12 +269,77 @@ class JverifyOneClickLoginManage {
uiConfig.enterAnim = 'activity_slide_enter_bottom';
uiConfig.exitAnim = 'activity_slide_exit_bottom';
uiConfig.privacyNavColor = AppColors.mainColor.value;
uiConfig.privacyNavColor = Colors.white.value;
uiConfig.privacyNavTitleTextColor = Colors.white.value;
uiConfig.privacyNavTitleTextSize = 16;
// -Android
// final JVPrivacyCheckDialogConfig privacyCheckDialogConfig =
// JVPrivacyCheckDialogConfig();
// privacyCheckDialogConfig.width = 300; //
// privacyCheckDialogConfig.height = 220; //
// privacyCheckDialogConfig.privacyBackgroundColor = Colors.grey.value;
// privacyCheckDialogConfig.title = '请阅读并同意一下条款'; //
// privacyCheckDialogConfig.offsetX = 0; // x轴偏移量
// privacyCheckDialogConfig.offsetY = 0; // y轴偏移量
//
// privacyCheckDialogConfig.logBtnText = '同意并登录'; //
// privacyCheckDialogConfig.titleTextSize = 16; //
// privacyCheckDialogConfig.gravity = 'center'; //
// privacyCheckDialogConfig.titleTextColor = Colors.black.value; //
// privacyCheckDialogConfig.contentTextGravity = 'left'; //
// privacyCheckDialogConfig.contentTextSize = 14; //
// privacyCheckDialogConfig.logBtnImgPath =
// 'log_btn_background'; //
// privacyCheckDialogConfig.logBtnTextColor =
// Colors.black.value; //
// privacyCheckDialogConfig.logBtnMarginT = 40; //
// privacyCheckDialogConfig.logBtnMarginB = 20; //
// privacyCheckDialogConfig.logBtnMarginL = 90; //
// 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 = "log_btn_background";
// buttonDialogWidget.btnPressedImageName = "log_btn_background";
//
// //
// 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
jverify.setCustomAuthorizationView(true, uiConfig,
jverify.setCustomAuthorizationView(false, uiConfig,
landscapeConfig: uiConfig);
jverify.loginAuthSyncApi2(
autoDismiss: true,
@ -267,6 +347,10 @@ class JverifyOneClickLoginManage {
action(event);
// AppLog.log('获取到 loginAuthSyncApi 接口返回数据code=${event.code},message = ${event.message},operator = ${event.operator}');
});
} else {
// -10000
action(JVListenerEvent.fromJson(
<String, dynamic>{'code': -10000, 'message': ''}));
}
}
}

View File

@ -621,14 +621,6 @@ packages:
url: "https://pub.dev"
source: hosted
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:
dependency: transitive
description:
@ -714,30 +706,6 @@ packages:
url: "https://pub.dev"
source: hosted
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:
dependency: "direct main"
description:
@ -1341,14 +1309,6 @@ packages:
url: "https://pub.dev"
source: hosted
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:
dependency: transitive
description:
@ -1389,14 +1349,6 @@ packages:
url: "https://pub.dev"
source: hosted
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:
dependency: transitive
description: