feat: 1,注册页面根据类型限制输入格式 2,删除锁无需再次验证登录密码

This commit is contained in:
wuyaxi 2025-07-17 09:22:43 +08:00
parent 6d4b8e78ee
commit c8626da999
2 changed files with 24 additions and 3 deletions

View File

@ -135,6 +135,17 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
Widget middleTFWidget() { Widget middleTFWidget() {
return Column( return Column(
children: <Widget>[ children: <Widget>[
// Obx(() => LoginInput(
// controller: state.phoneOrEmailController,
// onchangeAction: (v) {
// logic.checkNext(state.phoneOrEmailController);
// },
// leftWidget: SizedBox(),
// label: state.isIphoneType.value ? '请输入手机号'.tr : '请输入邮箱'.tr,
// keyboardType: TextInputType.number,
// inputFormatters: <TextInputFormatter>[
// LengthLimitingTextInputFormatter(30),
// ])),
Obx(() => LoginInput( Obx(() => LoginInput(
controller: state.phoneOrEmailController, controller: state.phoneOrEmailController,
onchangeAction: (v) { onchangeAction: (v) {
@ -142,9 +153,18 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
}, },
leftWidget: SizedBox(), leftWidget: SizedBox(),
label: state.isIphoneType.value ? '请输入手机号'.tr : '请输入邮箱'.tr, label: state.isIphoneType.value ? '请输入手机号'.tr : '请输入邮箱'.tr,
keyboardType: TextInputType.number, keyboardType: state.isIphoneType.value
? TextInputType.number
: TextInputType.emailAddress,
inputFormatters: <TextInputFormatter>[ inputFormatters: <TextInputFormatter>[
LengthLimitingTextInputFormatter(30), LengthLimitingTextInputFormatter(30),
//
if (state.isIphoneType.value)
FilteringTextInputFormatter.digitsOnly //
else
// @._-
FilteringTextInputFormatter.allow(
RegExp(r'[a-zA-Z0-9@._-]'))
])), ])),
LoginInput( LoginInput(
controller: state.pwdController, controller: state.pwdController,

View File

@ -563,8 +563,9 @@ class LockSetLogic extends BaseGetXController {
.showIosTipWithContentDialog('删除锁后,所有信息都会一起删除,确定删除锁吗?'.tr, () { .showIosTipWithContentDialog('删除锁后,所有信息都会一起删除,确定删除锁吗?'.tr, () {
// //
state.showTipView.resetGetController(); state.showTipView.resetGetController();
state.showTipView.showTFViewAlertDialog( factoryDataResetAction();
state.passwordTF, '请输入登录密码'.tr, '请输入登录密码'.tr, checkLoginPassword); // state.showTipView.showTFViewAlertDialog(
// state.passwordTF, '请输入登录密码'.tr, '请输入登录密码'.tr, checkLoginPassword);
}); });
} else if (state.lockBasicInfo.value.keyRight == 1) { } else if (state.lockBasicInfo.value.keyRight == 1) {
// //