Merge branch 'release' of gitee.com:starlock-cn/app-starlock into release
This commit is contained in:
commit
17b5a76d2d
@ -159,7 +159,7 @@
|
||||
"remoteUnlockingPageTip": "When enabled, you will be able to open the lock remotely through the gateway. This function can only be turned on and off near the lock via Bluetooth on the phone.",
|
||||
"currentMode": "Current Mode",
|
||||
"delayTime": "Delay Time",
|
||||
"automaticBlockingTip": "After the time set above, the lock will automatically close. After you enable or modify the Settings, open the lock once for the time to take effect",
|
||||
"automaticBlockingTip": "After the time set above, the lock will automatically close. After you enable or modify the Settings, open the lock once for the time to take effect.",
|
||||
"time": "Time",
|
||||
"normallyOpen": "Normally Open",
|
||||
"date": "Date",
|
||||
@ -881,6 +881,6 @@
|
||||
"已有": "Already has",
|
||||
"新增": "New",
|
||||
"账号格式错误": "The account format is incorrect",
|
||||
"接收者信息为空": "The recipient information is empty"
|
||||
|
||||
"接收者信息为空": "The recipient information is empty",
|
||||
"请输入时间(秒)": "Please enter the time (seconds)",
|
||||
}
|
||||
|
||||
@ -913,6 +913,6 @@
|
||||
"已有": "已有",
|
||||
"新增": "新增",
|
||||
"账号格式错误": "账号格式错误",
|
||||
"接收者信息为空": "接收者信息为空"
|
||||
|
||||
"接收者信息为空": "接收者信息为空",
|
||||
"请输入时间(秒)": "请输入时间(秒)"
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@
|
||||
"remoteUnlockingPageTip": "功能开启后,你将可以通过网关远程开锁。此功能的开启和关闭只能在锁附近通过手机蓝牙进行。",
|
||||
"currentMode": "当前模式",
|
||||
"delayTime": "延迟时间",
|
||||
"automaticBlockingTip": "经过以上设定的时间,锁会自动关闭。开启或修改设置后,请先开一次锁,使时间生效",
|
||||
"automaticBlockingTip": "经过以上设定的时间,锁会自动关闭。开启或修改设置后,请先开一次锁,使时间生效。",
|
||||
"time": "时间",
|
||||
"normallyOpen": "常开",
|
||||
"date": "日期",
|
||||
@ -881,6 +881,6 @@
|
||||
"已有": "已有",
|
||||
"新增": "新增",
|
||||
"账号格式错误": "账号格式错误",
|
||||
"接收者信息为空": "接收者信息为空"
|
||||
|
||||
"接收者信息为空": "接收者信息为空",
|
||||
"请输入时间(秒)": "请输入时间(秒)"
|
||||
}
|
||||
|
||||
@ -90,11 +90,11 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage>
|
||||
return;
|
||||
}
|
||||
final List<String> list = <String>[
|
||||
'5',
|
||||
'10',
|
||||
'15',
|
||||
'30',
|
||||
'60',
|
||||
'5S',
|
||||
'10S',
|
||||
'15S',
|
||||
'30S',
|
||||
'60S',
|
||||
TranslationLoader.lanKeys!.custom!.tr
|
||||
];
|
||||
ShowBottomSheetTool().showSingleRowPicker(
|
||||
@ -111,6 +111,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage>
|
||||
//选择事件的回调
|
||||
clickCallBack: (int index, Object str) {
|
||||
if (index != 5) {
|
||||
str = str.toString().substring(0, str.toString().length - 1);
|
||||
state.isCustomLockTime.value = false;
|
||||
state.autoLockTime.value = str.toString();
|
||||
Storage.saveAutomaticLockOffTime(str.toString());
|
||||
@ -127,13 +128,13 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage>
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(
|
||||
left: 30.w, top: 10.w, right: 30.w, bottom: 10.w),
|
||||
left: 20.w, top: 10.w, right: 20.w, bottom: 10.w),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)',
|
||||
TranslationLoader.lanKeys!.time!.tr,
|
||||
style: TextStyle(fontSize: 24.sp),
|
||||
),
|
||||
],
|
||||
@ -153,8 +154,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage>
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, bottom: 8.0),
|
||||
hintText:
|
||||
'${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)',
|
||||
hintText: '请输入时间(秒)'.tr,
|
||||
hintStyle: TextStyle(fontSize: 24.sp),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
|
||||
@ -4,27 +4,14 @@ import 'package:get/get.dart';
|
||||
|
||||
import '../lockSet/lockSetInfo_entity.dart';
|
||||
|
||||
class AutomaticBlockingState {
|
||||
var lockSetInfoData = LockSetInfoData().obs;
|
||||
final lockBasicInfo = LockBasicInfo().obs;
|
||||
|
||||
var isJustForShow = false.obs;// 是否只是作为展示作用,因为普通用户只是展示,不可修改
|
||||
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
var sureBtnState = 0.obs;// 0可点击 1 不可点击
|
||||
|
||||
var isOpen = false.obs;// 是否开启自动落锁
|
||||
var autoLockTime = "5".obs;
|
||||
var isCustomLockTime = false.obs;// 自定义
|
||||
final TextEditingController timeController = TextEditingController();
|
||||
|
||||
var canNext = false.obs;// 是否可以点击下一步
|
||||
class AutomaticBlockingState {// 是否可以点击下一步
|
||||
|
||||
AutomaticBlockingState() {
|
||||
var map = Get.arguments;
|
||||
lockSetInfoData.value = map["lockSetInfoData"];
|
||||
lockSetInfoData.value = map['lockSetInfoData'];
|
||||
lockBasicInfo.value = lockSetInfoData.value.lockBasicInfo!;
|
||||
|
||||
isOpen.value = lockSetInfoData.value.lockSettingInfo!.autoLock! == 1 ? true : false;
|
||||
isOpen.value = lockSetInfoData.value.lockSettingInfo!.autoLock! == 1;
|
||||
autoLockTime.value = lockSetInfoData.value.lockSettingInfo!.autoLockSecond!.toString();
|
||||
|
||||
if(lockBasicInfo.value.isLockOwner == 1 || lockBasicInfo.value.keyRight == 1){
|
||||
@ -34,15 +21,30 @@ class AutomaticBlockingState {
|
||||
isJustForShow.value = true;
|
||||
}
|
||||
|
||||
if((lockSetInfoData.value.lockSettingInfo!.autoLock! > 0)
|
||||
&& (lockSetInfoData.value.lockSettingInfo!.autoLockSecond! != 5)
|
||||
&& (lockSetInfoData.value.lockSettingInfo!.autoLockSecond! != 10)
|
||||
&& (lockSetInfoData.value.lockSettingInfo!.autoLockSecond! != 15)
|
||||
&& (lockSetInfoData.value.lockSettingInfo!.autoLockSecond! != 30)
|
||||
&& (lockSetInfoData.value.lockSettingInfo!.autoLockSecond! != 60)){
|
||||
isCustomLockTime.value = true;
|
||||
timeController.text = autoLockTime.value;
|
||||
}
|
||||
// if((lockSetInfoData.value.lockSettingInfo!.autoLock! > 0)
|
||||
// && (lockSetInfoData.value.lockSettingInfo!.autoLockSecond! != 5)
|
||||
// && (lockSetInfoData.value.lockSettingInfo!.autoLockSecond! != 10)
|
||||
// && (lockSetInfoData.value.lockSettingInfo!.autoLockSecond! != 15)
|
||||
// && (lockSetInfoData.value.lockSettingInfo!.autoLockSecond! != 30)
|
||||
// && (lockSetInfoData.value.lockSettingInfo!.autoLockSecond! != 60)){
|
||||
// isCustomLockTime.value = true;
|
||||
// timeController.text = autoLockTime.value;
|
||||
// }
|
||||
|
||||
timeController.text = autoLockTime.value;
|
||||
}
|
||||
Rx<LockSetInfoData> lockSetInfoData = LockSetInfoData().obs;
|
||||
final Rx<LockBasicInfo> lockBasicInfo = LockBasicInfo().obs;
|
||||
|
||||
RxBool isJustForShow = false.obs;// 是否只是作为展示作用,因为普通用户只是展示,不可修改
|
||||
RxBool ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
RxInt sureBtnState = 0.obs;// 0可点击 1 不可点击
|
||||
|
||||
RxBool isOpen = false.obs;// 是否开启自动落锁
|
||||
RxString autoLockTime = '5'.obs;
|
||||
RxBool isCustomLockTime = false.obs;// 自定义
|
||||
final TextEditingController timeController = TextEditingController();
|
||||
|
||||
RxBool canNext = false.obs;
|
||||
|
||||
}
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/flavors.dart';
|
||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_logic.dart';
|
||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_state.dart';
|
||||
|
||||
import '../../../appRouters.dart';
|
||||
import '../../../app_settings/app_colors.dart';
|
||||
@ -22,8 +24,8 @@ class MineBindPhoneOrEmailPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
|
||||
final logic = Get.put(MineBindPhoneOrEmailLogic());
|
||||
final state = Get.find<MineBindPhoneOrEmailLogic>().state;
|
||||
final MineBindPhoneOrEmailLogic logic = Get.put(MineBindPhoneOrEmailLogic());
|
||||
final MineBindPhoneOrEmailState state = Get.find<MineBindPhoneOrEmailLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -31,14 +33,14 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: F.sw(
|
||||
skyCall: () => TitleAppBar(
|
||||
barTitle: state.channel.value == "1"
|
||||
barTitle: state.channel.value == '1'
|
||||
? TranslationLoader.lanKeys!.mobileNumber!.tr
|
||||
: TranslationLoader.lanKeys!.email!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
),
|
||||
xhjCall: () => TitleAppBar(
|
||||
barTitle: state.channel.value == "1"
|
||||
barTitle: state.channel.value == '1'
|
||||
? TranslationLoader.lanKeys!.mobileNumber!.tr
|
||||
: TranslationLoader.lanKeys!.email!.tr,
|
||||
haveBack: true,
|
||||
@ -51,7 +53,7 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(top: 10.h, left: 30.w, right: 30.w),
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: 1.sw,
|
||||
padding: EdgeInsets.only(top: 5.h, bottom: 5.h),
|
||||
@ -63,7 +65,7 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
|
||||
)),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isPadding: false,
|
||||
isHaveRightWidget: true,
|
||||
@ -92,14 +94,14 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
|
||||
},
|
||||
leftWidget: const SizedBox(),
|
||||
hintText: state.channel.value == '1'
|
||||
? "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.mobileNumber!.tr}"
|
||||
: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.email!.tr}",
|
||||
inputFormatters: [
|
||||
? '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.mobileNumber!.tr}'
|
||||
: '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.email!.tr}',
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
SizedBox(height: 10.w),
|
||||
Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: LoginInput(
|
||||
controller: state.codeController,
|
||||
@ -109,8 +111,8 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
|
||||
logic.checkNext(state.codeController);
|
||||
},
|
||||
hintText:
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}",
|
||||
inputFormatters: [
|
||||
'${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}',
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
),
|
||||
@ -156,7 +158,7 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
|
||||
onClick: state.canSub.value
|
||||
? () {
|
||||
if (state.accountIsOK.value && state.codeIsOK) {
|
||||
if (state.channel.value == "1") {
|
||||
if (state.channel.value == '1') {
|
||||
logic.bindMobileRequest();
|
||||
} else {
|
||||
logic.bindEmailRequest();
|
||||
|
||||
@ -84,9 +84,36 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.mobileNumber!.tr,
|
||||
rightTitle: state.mineInfoData.value.mobile != null
|
||||
? state.mineInfoData.value.mobile!
|
||||
: TranslationLoader.lanKeys!.goBind!.tr,
|
||||
// rightTitle: (state.mineInfoData.value.mobile ?? '').isNotEmpty
|
||||
// ? state.mineInfoData.value.mobile!
|
||||
// : TranslationLoader.lanKeys!.goBind!.tr,
|
||||
// rightWidget: Container(
|
||||
// width: 15.w,
|
||||
// height: 15.h,
|
||||
// decoration: const BoxDecoration(
|
||||
// color: Colors.red,
|
||||
// shape: BoxShape.circle,
|
||||
// ),
|
||||
// ),
|
||||
rightWidget:
|
||||
(state.mineInfoData.value.mobile ?? '').isEmpty?
|
||||
Container(
|
||||
width: 15.w,
|
||||
height: 15.h,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.red,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
):
|
||||
Text(
|
||||
state.mineInfoData.value.mobile ?? '',
|
||||
textAlign: TextAlign.right,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
isHaveRightWidget: true,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -109,9 +136,28 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.email!.tr,
|
||||
rightTitle: state.mineInfoData.value.email != null
|
||||
? state.mineInfoData.value.email!
|
||||
: TranslationLoader.lanKeys!.goBind!.tr,
|
||||
// rightTitle: (state.mineInfoData.value.email??'').isNotEmpty
|
||||
// ? state.mineInfoData.value.email!
|
||||
// : TranslationLoader.lanKeys!.goBind!.tr,
|
||||
rightWidget:
|
||||
(state.mineInfoData.value.email ?? '').isEmpty?
|
||||
Container(
|
||||
width: 15.w,
|
||||
height: 15.h,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.red,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
):
|
||||
Text(
|
||||
state.mineInfoData.value.email ?? '',
|
||||
textAlign: TextAlign.right,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
isHaveRightWidget: true,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -144,9 +190,20 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
|
||||
}),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.safetyProblem!.tr,
|
||||
rightTitle: state.mineInfoData.value.haveSafeAnswer == 0
|
||||
? '去设置'.tr
|
||||
: '',
|
||||
isHaveRightWidget: true,
|
||||
// rightTitle: state.mineInfoData.value.haveSafeAnswer == 0
|
||||
// ? '去设置'.tr
|
||||
// : '',
|
||||
rightWidget:
|
||||
state.mineInfoData.value.haveSafeAnswer == 0 ?
|
||||
Container(
|
||||
width: 15.w,
|
||||
height: 15.h,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.red,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
):Container(),
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user