From c8626da9992cdb431763d0c7feb7f25ec844221f Mon Sep 17 00:00:00 2001 From: wuyaxi <18682150237@163.com> Date: Thu, 17 Jul 2025 09:22:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=201=EF=BC=8C=E6=B3=A8=E5=86=8C=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=A0=B9=E6=8D=AE=E7=B1=BB=E5=9E=8B=E9=99=90=E5=88=B6?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A0=BC=E5=BC=8F=202=EF=BC=8C=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E9=94=81=E6=97=A0=E9=9C=80=E5=86=8D=E6=AC=A1=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=99=BB=E5=BD=95=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../register/starLock_register_xhj_page.dart | 22 ++++++++++++++++++- .../lockSet/lockSet/lockSet_logic.dart | 5 +++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/lib/login/register/starLock_register_xhj_page.dart b/lib/login/register/starLock_register_xhj_page.dart index 038f85f6..c406d823 100755 --- a/lib/login/register/starLock_register_xhj_page.dart +++ b/lib/login/register/starLock_register_xhj_page.dart @@ -135,6 +135,17 @@ class _StarLockRegisterPageState extends State { Widget middleTFWidget() { return Column( children: [ + // Obx(() => LoginInput( + // controller: state.phoneOrEmailController, + // onchangeAction: (v) { + // logic.checkNext(state.phoneOrEmailController); + // }, + // leftWidget: SizedBox(), + // label: state.isIphoneType.value ? '请输入手机号'.tr : '请输入邮箱'.tr, + // keyboardType: TextInputType.number, + // inputFormatters: [ + // LengthLimitingTextInputFormatter(30), + // ])), Obx(() => LoginInput( controller: state.phoneOrEmailController, onchangeAction: (v) { @@ -142,9 +153,18 @@ class _StarLockRegisterPageState extends State { }, leftWidget: SizedBox(), label: state.isIphoneType.value ? '请输入手机号'.tr : '请输入邮箱'.tr, - keyboardType: TextInputType.number, + keyboardType: state.isIphoneType.value + ? TextInputType.number + : TextInputType.emailAddress, inputFormatters: [ LengthLimitingTextInputFormatter(30), + // 根据注册类型添加输入限制 + if (state.isIphoneType.value) + FilteringTextInputFormatter.digitsOnly // 手机号只能输入数字 + else + // 邮箱:只允许字母、数字、@、.、_、- + FilteringTextInputFormatter.allow( + RegExp(r'[a-zA-Z0-9@._-]')) ])), LoginInput( controller: state.pwdController, diff --git a/lib/main/lockDetail/lockSet/lockSet/lockSet_logic.dart b/lib/main/lockDetail/lockSet/lockSet/lockSet_logic.dart index 7d6b4a65..3cef5958 100755 --- a/lib/main/lockDetail/lockSet/lockSet/lockSet_logic.dart +++ b/lib/main/lockDetail/lockSet/lockSet/lockSet_logic.dart @@ -563,8 +563,9 @@ class LockSetLogic extends BaseGetXController { .showIosTipWithContentDialog('删除锁后,所有信息都会一起删除,确定删除锁吗?'.tr, () { // 删除锁 state.showTipView.resetGetController(); - state.showTipView.showTFViewAlertDialog( - state.passwordTF, '请输入登录密码'.tr, '请输入登录密码'.tr, checkLoginPassword); + factoryDataResetAction(); + // state.showTipView.showTFViewAlertDialog( + // state.passwordTF, '请输入登录密码'.tr, '请输入登录密码'.tr, checkLoginPassword); }); } else if (state.lockBasicInfo.value.keyRight == 1) { // 授权管理员弹框提示