fix:修复鑫泓佳判断

This commit is contained in:
anfe 2024-04-29 15:13:13 +08:00
parent 2178a622db
commit dd87cb6243
2 changed files with 156 additions and 142 deletions

View File

@ -23,7 +23,9 @@ class StarLockLoginXHJPage extends StatefulWidget {
class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
final logic = Get.put(StarLockLoginLogic());
final state = Get.find<StarLockLoginLogic>().state;
final state = Get
.find<StarLockLoginLogic>()
.state;
@override
Widget build(BuildContext context) {
@ -65,11 +67,14 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
SizedBox(
width: 40.w,
),
Text(
'${state.countryName.value} +${state.countryCode.value}',
style: TextStyle(
fontSize: 22.sp, color: AppColors.mainColor),
)
Obx(() {
return Text(
'${state.countryName.value} +${state.countryCode
.value}',
style: TextStyle(
fontSize: 22.sp, color: AppColors.mainColor),
);
})
],
),
),
@ -109,7 +114,8 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
),
),
label:
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}",
"${TranslationLoader.lanKeys!.pleaseEnter!
.tr}${TranslationLoader.lanKeys!.password!.tr}",
inputFormatters: [
LengthLimitingTextInputFormatter(20),
]),
@ -125,83 +131,90 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Obx(
() => Container(
padding: EdgeInsets.only(
left: 5.w,
right: 10.w,
),
child: Image.asset(
state.agree.value
? 'images/icon_round_select.png'
: 'images/icon_round_unSelect.png',
width: 20.w,
height: 20.w,
),
),
() =>
Container(
padding: EdgeInsets.only(
left: 5.w,
right: 10.w,
),
child: Image.asset(
state.agree.value
? 'images/icon_round_select.png'
: 'images/icon_round_unSelect.png',
width: 20.w,
height: 20.w,
),
),
),
Flexible(
child: RichText(
text: TextSpan(
text: TranslationLoader.lanKeys!.readAndAgree!.tr,
style: TextStyle(
color: const Color(0xff333333), fontSize: 20.sp),
children: [
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: GestureDetector(
child: Text(
'${TranslationLoader.lanKeys!.userAgreement!.tr}',
style: TextStyle(
color: AppColors.mainColor,
fontSize: 20.sp)),
onTap: () {
Get.toNamed(Routers.webviewShowPage,
arguments: {
"url": XSConstantMacro.userAgreementURL,
"title": '用户协议'.tr
});
},
)),
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: GestureDetector(
child: Text(
'${TranslationLoader.lanKeys!.privacyPolicy!.tr}',
style: TextStyle(
color: AppColors.mainColor,
fontSize: 20.sp)),
onTap: () {
Get.toNamed(Routers.webviewShowPage,
arguments: {
"url": XSConstantMacro.privacyPolicyURL,
"title": '隐私政策'.tr
});
},
)),
],
)),
text: TranslationLoader.lanKeys!.readAndAgree!.tr,
style: TextStyle(
color: const Color(0xff333333),
fontSize: 20.sp),
children: [
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: GestureDetector(
child: Text(
'${TranslationLoader.lanKeys!
.userAgreement!.tr}',
style: TextStyle(
color: AppColors.mainColor,
fontSize: 20.sp)),
onTap: () {
Get.toNamed(Routers.webviewShowPage,
arguments: {
"url": XSConstantMacro
.userAgreementURL,
"title": '用户协议'.tr
});
},
)),
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: GestureDetector(
child: Text(
'${TranslationLoader.lanKeys!
.privacyPolicy!.tr}',
style: TextStyle(
color: AppColors.mainColor,
fontSize: 20.sp)),
onTap: () {
Get.toNamed(Routers.webviewShowPage,
arguments: {
"url": XSConstantMacro
.privacyPolicyURL,
"title": '隐私政策'.tr
});
},
)),
],
)),
)
],
),
),
),
SizedBox(height: 15.w),
Obx(() => SubmitBtn(
btnName: TranslationLoader.lanKeys!.login!.tr,
fontSize: 28.sp,
borderRadius: 20.w,
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
isDisabled: state.canNext.value,
onClick: state.canNext.value
? () {
if (state.agree.value == false) {
logic.showToast('请先同意用户协议及隐私政策'.tr);
return;
} else {
logic.login();
}
Obx(() =>
SubmitBtn(
btnName: TranslationLoader.lanKeys!.login!.tr,
fontSize: 28.sp,
borderRadius: 20.w,
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
isDisabled: state.canNext.value,
onClick: state.canNext.value
? () {
if (state.agree.value == false) {
logic.showToast('请先同意用户协议及隐私政策'.tr);
return;
} else {
logic.login();
}
: null)),
}
: null)),
SizedBox(height: 10.h),
ElevatedButton(
onPressed: () async {
@ -243,41 +256,40 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
),
Expanded(
child: SizedBox(
width: 10.sp,
)),
width: 10.sp,
)),
F.isLite
? Container()
: 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: () {
Get.toNamed(Routers.demoModeLockDetailPage);
},
)
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: () {
Get.toNamed(Routers.demoModeLockDetailPage);
},
)
],
),
],
));
}
Widget loginInput(
{TextEditingController? controller,
List<TextInputFormatter>? inputFormatters,
String? hintText,
bool? isHaveLeftWidget,
Widget? leftWidget,
String? label,
bool? isPwd,
BlockStrCallback? onchangeAction}) {
Widget loginInput({TextEditingController? controller,
List<TextInputFormatter>? inputFormatters,
String? hintText,
bool? isHaveLeftWidget,
Widget? leftWidget,
String? label,
bool? isPwd,
BlockStrCallback? onchangeAction}) {
return Container(
width: 1.sp,
child: Column(

View File

@ -39,49 +39,51 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
: null,
body: Column(
children: [
Container(
width: 1.sw,
height: 0.2.sw,
margin: EdgeInsets.symmetric(horizontal: 15.w),
padding: EdgeInsets.symmetric(horizontal: 25.w),
decoration: BoxDecoration(
image: const DecorationImage(
image: AssetImage('images/xhj_main_bg.jpg'),
fit: BoxFit.cover,
),
borderRadius: BorderRadius.circular(20.r),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.15),
offset: const Offset(0, 0),
blurRadius: 10.r,
spreadRadius: 0,
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'系统设置',
style: TextStyle(
color: AppColors.blackColor,
fontSize: 28.sp,
fontWeight: FontWeight.w600,
),
),
Text(
'系统的全局配置在此项内进行设置',
style: TextStyle(
color: AppColors.blackColor.withOpacity(0.6),
fontSize: 20.sp,
fontWeight: FontWeight.w600,
),
),
],
),
),
F.sw(
defaultCall: () => SizedBox(),
xhjCall: () => Container(
width: 1.sw,
height: 0.2.sw,
margin: EdgeInsets.symmetric(horizontal: 15.w),
padding: EdgeInsets.symmetric(horizontal: 25.w),
decoration: BoxDecoration(
image: const DecorationImage(
image: AssetImage('images/xhj_main_bg.jpg'),
fit: BoxFit.cover,
),
borderRadius: BorderRadius.circular(20.r),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.15),
offset: const Offset(0, 0),
blurRadius: 10.r,
spreadRadius: 0,
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'系统设置',
style: TextStyle(
color: AppColors.blackColor,
fontSize: 28.sp,
fontWeight: FontWeight.w600,
),
),
Text(
'系统的全局配置在此项内进行设置',
style: TextStyle(
color: AppColors.blackColor.withOpacity(0.6),
fontSize: 20.sp,
fontWeight: FontWeight.w600,
),
),
],
),
)),
SizedBox(
height: 20.h,
),