fix:bug调整
This commit is contained in:
parent
df3b4c65c5
commit
4742dac3ee
@ -1151,5 +1151,8 @@
|
||||
"请将手机切换至2.4G WiFi进行手动连接": "Please switch your phone to 2.4G WiFi for manual connection",
|
||||
"请确保网络是2.4GHz Wi-Fi": "Please ensure that the network is 2.4GHz Wi Fi",
|
||||
"是否要远程开锁": "Do you want to unlock remotely",
|
||||
"国家地区的选择将影响数据安全,你当前选择的是": "The choice of country or region will affect data security. What is your current choice",
|
||||
"请确认后再继续": "Please confirm before continuing",
|
||||
"此功能的开启和关闭只能在锁附近通过手机蓝牙进行": "The activation and deactivation of this feature can only be done through Bluetooth on the phone near the lock",
|
||||
"网关添加成功": "Gateway added successfully"
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@
|
||||
"升级": "更新",
|
||||
"空闲": "空置",
|
||||
"已入住": "佔領",
|
||||
"多语言": "語言",
|
||||
"多语言": "多語言",
|
||||
"添加锁": "添加鎖",
|
||||
"锁地址": "鎖定地址",
|
||||
"选择锁类型": "選擇鎖類型",
|
||||
@ -1149,5 +1149,7 @@
|
||||
"2.在APP里开启锁的远程开锁功能(这个功能默认是关闭的)。如果没有这个选项,则锁不支持Google Home": "2.喺APP中開啟鎖嘅遠程解鎖功能(此功能默認關閉)。 如果此選項不可用,則鎖將唔撐Google Home",
|
||||
"3.安装Google Home APP,点击左上角的加号按钮": "3.安裝Google Home應用,點擊左上角嘅加號掣",
|
||||
"暂无最新记录": "目前冇可用嘅最新記錄",
|
||||
"繁体中文(中国台湾)": "繁體中文(中國臺灣)",
|
||||
"繁体中文(中国香港)": "繁體中文(中國香港)",
|
||||
"请将手机切换至2.4G WiFi进行手动连接": "請把手機切換到2.4G WiFi進行手動連接"
|
||||
}
|
||||
@ -1156,5 +1156,10 @@
|
||||
"请确保网络是2.4GHz Wi-Fi": "请确保网络是2.4GHz Wi-Fi",
|
||||
"已选": "已选",
|
||||
"是否要远程开锁": "是否要远程开锁",
|
||||
"繁体中文(中国台湾)": "繁体中文(中国台湾)",
|
||||
"繁体中文(中国香港)": "繁体中文(中国香港)",
|
||||
"国家地区的选择将影响数据安全,你当前选择的是": "国家地区的选择将影响数据安全,你当前选择的是",
|
||||
"请确认后再继续": "请确认后再继续",
|
||||
"此功能的开启和关闭只能在锁附近通过手机蓝牙进行": "此功能的开启和关闭只能在锁附近通过手机蓝牙进行",
|
||||
"网关添加成功": "网关添加成功"
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@
|
||||
"升级": "更新",
|
||||
"空闲": "空缺",
|
||||
"已入住": "已占用",
|
||||
"多语言": "語言",
|
||||
"多语言": "多語言",
|
||||
"添加锁": "添加鎖定",
|
||||
"锁地址": "鎖地址",
|
||||
"选择锁类型": "選擇鎖定類型",
|
||||
@ -1149,5 +1149,7 @@
|
||||
"2.在APP里开启锁的远程开锁功能(这个功能默认是关闭的)。如果没有这个选项,则锁不支持Google Home": "2. 在APP中開啓鎖的遠程開鎖功能(默認關閉)。如果這個選項不可用,鎖將不支持谷歌Home",
|
||||
"3.安装Google Home APP,点击左上角的加号按钮": "3. 安裝谷歌Home應用程序並單擊左上角的加號按鈕",
|
||||
"暂无最新记录": "目前沒有最新的記錄",
|
||||
"繁体中文(中国台湾)": "繁體中文(中國臺灣)",
|
||||
"繁体中文(中国香港)": "繁體中文(中國香港)",
|
||||
"请将手机切换至2.4G WiFi进行手动连接": "手動連接時請將手機調至2.4G WiFi"
|
||||
}
|
||||
@ -62,6 +62,8 @@
|
||||
"批量授权锁": "批量授权锁",
|
||||
"授权管理员拥有操作这把锁的重要权限,请确保只发给我你信任的人": "授权管理员拥有操作这把锁的重要权限,请确保只发给我你信任的人",
|
||||
"功能开启后,你将可以通过网关远程开锁。此功能的开启和关闭只能在锁附近通过手机蓝牙进行。": "功能开启后,你将可以通过网关远程开锁。此功能的开启和关闭只能在锁附近通过手机蓝牙进行。",
|
||||
"此功能的开启和关闭只能在锁附近通过手机蓝牙进行": "此功能的开启和关闭只能在锁附近通过手机蓝牙进行",
|
||||
|
||||
"功能开启后,你将可以通过网关远程开锁。": "功能开启后,你将可以通过网关远程开锁。",
|
||||
"排列方式": "排列方式",
|
||||
"早到榜": "早到榜",
|
||||
@ -1156,5 +1158,9 @@
|
||||
"请确保网络是2.4GHz Wi-Fi": "请确保网络是2.4GHz Wi-Fi",
|
||||
"已选": "已选",
|
||||
"是否要远程开锁": "是否要远程开锁",
|
||||
"繁体中文(中国台湾)": "繁体中文(中国台湾)",
|
||||
"繁体中文(中国香港)": "繁体中文(中国香港)",
|
||||
"国家地区的选择将影响数据安全,你当前选择的是": "国家地区的选择将影响数据安全,你当前选择的是",
|
||||
"请确认后再继续": "请确认后再继续",
|
||||
"网关添加成功": "网关添加成功"
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ class StarLockForgetPasswordLogic extends BaseGetXController {
|
||||
final StarLockForgetPasswordState state = StarLockForgetPasswordState();
|
||||
|
||||
late Timer _timer;
|
||||
|
||||
void _startTimer() {
|
||||
_timer = Timer.periodic(1.seconds, (Timer timer) {
|
||||
if (state.currentSecond > 1) {
|
||||
@ -37,12 +38,12 @@ class StarLockForgetPasswordLogic extends BaseGetXController {
|
||||
}
|
||||
|
||||
Future<void> resetPassword() async {
|
||||
if(state.pwd.value != state.surePwd.value){
|
||||
if (state.pwd.value != state.surePwd.value) {
|
||||
showToast('两次密码不一致哦'.tr);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!RegularExpression().validateString(state.pwd.value)){
|
||||
if (!RegularExpression().validateString(state.pwd.value)) {
|
||||
showToast('密码需至少包含数字/字母/字符中的2种组合'.tr);
|
||||
return;
|
||||
}
|
||||
@ -56,42 +57,44 @@ class StarLockForgetPasswordLogic extends BaseGetXController {
|
||||
state.verificationCode.value);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
ApmHelper.instance.trackEvent('resetPassword_result', {
|
||||
'account':state.phoneStr.value,
|
||||
'date':DateTool().getNowDateWithType(1),
|
||||
'resetPassword_res':'成功',
|
||||
'account': state.phoneStr.value,
|
||||
'date': DateTool().getNowDateWithType(1),
|
||||
'resetPassword_res': '成功',
|
||||
});
|
||||
|
||||
showToast('重置成功'.tr);
|
||||
Get.back();
|
||||
}else{
|
||||
} else {
|
||||
ApmHelper.instance.trackEvent('resetPassword_result', {
|
||||
'account':state.phoneStr.value,
|
||||
'date':DateTool().getNowDateWithType(1),
|
||||
'resetPassword_res':'${entity.errorCode}--${entity.errorMsg}',
|
||||
'account': state.phoneStr.value,
|
||||
'date': DateTool().getNowDateWithType(1),
|
||||
'resetPassword_res': '${entity.errorCode}--${entity.errorMsg}',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> sendValidationCode() async {
|
||||
final SendValidationCodeEntity entity = await ApiRepository.to.sendValidationCodeUnLogin(
|
||||
// state.countryCode.value,
|
||||
countryCode:state.countryCode.value,
|
||||
account:state.phoneStr.value,
|
||||
channel:state.codeType.value,
|
||||
codeType:'2',
|
||||
xWidth:state.xWidth.value.toString());
|
||||
final SendValidationCodeEntity entity =
|
||||
await ApiRepository.to.sendValidationCodeUnLogin(
|
||||
// state.countryCode.value,
|
||||
countryCode: state.countryCode.value,
|
||||
account: state.phoneStr.value,
|
||||
channel: state.codeType.value,
|
||||
codeType: '2',
|
||||
xWidth: state.xWidth.value.toString());
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
_startTimer();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> checkIpAction() async {
|
||||
final CheckIPEntity entity = await ApiRepository.to.checkIpAction(
|
||||
ip: ''
|
||||
);
|
||||
final CheckIPEntity entity = await ApiRepository.to.checkIpAction(ip: '');
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
if(state.countryName.value == entity.data!.name){
|
||||
ShowTipView().showSureAlertDialog('国家地区的选择将影响数据安全,你当前选择的是阿尔巴尼亚,请确认后再继续'.tr, tipTitle: '确认国家或地区'.tr, sureStr: '我知道了'.tr);
|
||||
if (state.countryName.value != entity.data!.name) {
|
||||
ShowTipView().showSureAlertDialog(
|
||||
'国家地区的选择将影响数据安全,你当前选择的是' + state.countryName.value + '请确认后再继续'.tr,
|
||||
tipTitle: '确认国家或地区'.tr,
|
||||
sureStr: '我知道了'.tr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -103,9 +106,9 @@ class StarLockForgetPasswordLogic extends BaseGetXController {
|
||||
void changeInput(TextEditingController controller) {
|
||||
if (controller == state.phoneController) {
|
||||
state.phoneStr.value = controller.text;
|
||||
if(state.phoneStr.value.contains('@')){
|
||||
if (state.phoneStr.value.contains('@')) {
|
||||
state.codeType.value = '2';
|
||||
}else{
|
||||
} else {
|
||||
state.codeType.value = '1';
|
||||
}
|
||||
}
|
||||
@ -120,11 +123,13 @@ class StarLockForgetPasswordLogic extends BaseGetXController {
|
||||
}
|
||||
_resetCanSendCode();
|
||||
_resetCanSub();
|
||||
AppLog.log('state.canSub.value:${state.canSub.value} state.pwdIsOK:${state.pwdIsOK} state.codeIsOK:${state.codeIsOK} state.phoneStr.value:${state.phoneStr.value}');
|
||||
AppLog.log(
|
||||
'state.canSub.value:${state.canSub.value} state.pwdIsOK:${state.pwdIsOK} state.codeIsOK:${state.codeIsOK} state.phoneStr.value:${state.phoneStr.value}');
|
||||
}
|
||||
|
||||
void _resetCanSub() {
|
||||
state.canSub.value = state.pwdIsOK && state.codeIsOK && state.phoneStr.value.isNotEmpty;
|
||||
state.canSub.value =
|
||||
state.pwdIsOK && state.codeIsOK && state.phoneStr.value.isNotEmpty;
|
||||
}
|
||||
|
||||
void _resetCanSendCode() {
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -58,8 +57,7 @@ class _StarLockForgetPasswordPageState
|
||||
children: <Widget>[
|
||||
SizedBox(width: 5.w),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'国家/地区'.tr,
|
||||
child: Text('国家/地区'.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 26.sp, color: AppColors.blackColor))),
|
||||
SizedBox(width: 20.w),
|
||||
|
||||
@ -141,9 +141,9 @@ class StarLockLoginLogic extends BaseGetXController {
|
||||
Future<void> checkIpAction() async {
|
||||
final CheckIPEntity entity = await ApiRepository.to.checkIpAction(ip: '');
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
if (state.countryName == entity.data!.name) {
|
||||
if (state.countryName != entity.data!.name) {
|
||||
ShowTipView().showSureAlertDialog(
|
||||
'国家地区的选择将影响数据安全,你当前选择的是阿尔巴尼亚,请确认后再继续'.tr,
|
||||
'国家地区的选择将影响数据安全,你当前选择的是'+state.countryName+'请确认后再继续'.tr,
|
||||
tipTitle: '确认国家或地区'.tr,
|
||||
sureStr: '我知道了'.tr);
|
||||
}
|
||||
|
||||
@ -362,7 +362,7 @@ class _LockSetPageState extends State<LockSetPage>
|
||||
//todo: 双重认证、双锁联动国际化、API接口
|
||||
//双重认证
|
||||
Obx(() => Visibility(
|
||||
visible: true,
|
||||
visible: state.lockFeature.value.doubleAuthentication == 1,
|
||||
child: CommonItem(
|
||||
leftTitel: '双重认证'.tr,
|
||||
rightTitle: '',
|
||||
|
||||
@ -35,6 +35,7 @@ class _RemoteUnlockingPageState extends State<RemoteUnlockingPage>
|
||||
body: Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
@ -65,7 +66,7 @@ class _RemoteUnlockingPageState extends State<RemoteUnlockingPage>
|
||||
}),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 20.h),
|
||||
child: Text('功能开启后,你将可以通过网关远程开锁。此功能的开启和关闭只能在锁附近通过手机蓝牙进行。'.tr,
|
||||
child: Text('此功能的开启和关闭只能在锁附近通过手机蓝牙进行'.tr,
|
||||
style: TextStyle(fontSize: 20.sp)),
|
||||
),
|
||||
SizedBox(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user