feat: 完成锁重置及常见问题相关需求
This commit is contained in:
parent
abaf21b6fc
commit
0f88339c5c
BIN
images/lockType/addLock_lockReset.png
Normal file
BIN
images/lockType/addLock_lockReset.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@ -58,16 +58,6 @@ class _LockAddFaqPageState extends State<LockAddFaqPage> {
|
|||||||
|
|
||||||
SizedBox(height: 20.h),
|
SizedBox(height: 20.h),
|
||||||
|
|
||||||
// 问题4:距离过远
|
|
||||||
_buildFaqItem(
|
|
||||||
icon: Icons.signal_wifi_off,
|
|
||||||
title: '距离过远'.tr,
|
|
||||||
description: '请确保手机与锁的距离在有效范围内。'.tr,
|
|
||||||
solution: '将手机靠近锁,距离保持在1米以内。'.tr,
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(height: 20.h),
|
|
||||||
|
|
||||||
// 问题5:锁已被其他用户添加
|
// 问题5:锁已被其他用户添加
|
||||||
_buildFaqItem(
|
_buildFaqItem(
|
||||||
icon: Icons.person_off,
|
icon: Icons.person_off,
|
||||||
@ -91,10 +81,8 @@ class _LockAddFaqPageState extends State<LockAddFaqPage> {
|
|||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.w),
|
padding: EdgeInsets.symmetric(horizontal: 20.w),
|
||||||
child: ElevatedButton.icon(
|
child: ElevatedButton.icon(
|
||||||
onPressed: () {
|
onPressed: logic.startOtaUpgrade,
|
||||||
logic.startOtaUpgrade();
|
icon: const Icon(Icons.system_update_alt, color: Colors.white),
|
||||||
},
|
|
||||||
icon: Icon(Icons.system_update_alt, color: Colors.white),
|
|
||||||
label: Text(
|
label: Text(
|
||||||
'尝试升级固件'.tr,
|
'尝试升级固件'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
@ -21,149 +21,74 @@ class _LockResetConfirmPageState extends State<LockResetConfirmPage>
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GetBuilder<LockResetConfirmLogic>(
|
return GetBuilder<LockResetConfirmLogic>(
|
||||||
init: LockResetConfirmLogic(),
|
init: LockResetConfirmLogic(),
|
||||||
builder: (LockResetConfirmLogic logic) {
|
builder: (LockResetConfirmLogic logic) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
appBar: F.sw(
|
appBar: F.sw(
|
||||||
skyCall: () => TitleAppBar(
|
skyCall: () => TitleAppBar(
|
||||||
barTitle: '重置确认'.tr,
|
barTitle: '设备重置'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
),
|
|
||||||
xhjCall: () => TitleAppBar(
|
|
||||||
barTitle: '重置确认'.tr,
|
|
||||||
haveBack: true,
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
iconColor: AppColors.blackColor,
|
|
||||||
titleColor: AppColors.blackColor,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
body: ListView(
|
xhjCall: () => TitleAppBar(
|
||||||
children: [
|
barTitle: '设备重置'.tr,
|
||||||
SizedBox(height: 60.h),
|
haveBack: true,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
// 重置图标
|
iconColor: AppColors.blackColor,
|
||||||
Container(
|
titleColor: AppColors.blackColor,
|
||||||
width: 120.w,
|
),
|
||||||
height: 120.w,
|
),
|
||||||
margin: EdgeInsets.symmetric(horizontal: 1.sw / 2 - 60.w),
|
body: ListView(
|
||||||
decoration: BoxDecoration(
|
children: [
|
||||||
color: AppColors.mainColor.withOpacity(0.1),
|
SizedBox(height: 100.h),
|
||||||
borderRadius: BorderRadius.circular(60.w),
|
Row(
|
||||||
),
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
child: Icon(
|
children: [
|
||||||
Icons.refresh,
|
Text(
|
||||||
size: 60.w,
|
|
||||||
color: AppColors.mainColor,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(height: 40.h),
|
|
||||||
|
|
||||||
// 标题
|
|
||||||
Container(
|
|
||||||
width: 1.sw,
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 40.w),
|
|
||||||
child: Text(
|
|
||||||
'请确认设备已重置'.tr,
|
'请确认设备已重置'.tr,
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 24.sp,
|
fontSize: 24.sp,
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: Colors.black87,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
|
),
|
||||||
SizedBox(height: 30.h),
|
SizedBox(height: 120.h),
|
||||||
|
Image.asset(
|
||||||
// 说明文字
|
'images/lockType/addLock_lockReset.png',
|
||||||
Container(
|
width: 278.w,
|
||||||
width: 1.sw,
|
height: 278.w,
|
||||||
padding: EdgeInsets.symmetric(horizontal: 40.w),
|
),
|
||||||
child: Text(
|
SizedBox(height: 120.h),
|
||||||
'添加设备前,请确保设备已重置为出厂状态。重置后的设备将清除所有用户数据,包括指纹、密码、卡片等信息。'.tr,
|
Container(
|
||||||
textAlign: TextAlign.center,
|
width: 1.sw,
|
||||||
style: TextStyle(
|
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||||
fontSize: 20.sp,
|
child: Wrap(
|
||||||
color: Colors.black54,
|
alignment: WrapAlignment.center,
|
||||||
height: 1.5,
|
children: [
|
||||||
|
Text(
|
||||||
|
'添加设备前,请确保设备已重置为出厂状态。'.tr,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20.sp, fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
SizedBox(height: 50.h),
|
SizedBox(height: 120.h),
|
||||||
|
Container(
|
||||||
// 重置方法提示
|
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||||
Container(
|
child: SubmitBtn(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 30.w),
|
btnName: '设备已重置'.tr,
|
||||||
padding: EdgeInsets.all(20.w),
|
borderRadius: 20.w,
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.blue[50],
|
|
||||||
borderRadius: BorderRadius.circular(12.w),
|
|
||||||
border: Border.all(
|
|
||||||
color: Colors.blue[200]!,
|
|
||||||
width: 1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.info_outline,
|
|
||||||
color: Colors.blue[700],
|
|
||||||
size: 24.w,
|
|
||||||
),
|
|
||||||
SizedBox(width: 12.w),
|
|
||||||
Expanded(
|
|
||||||
child: Text(
|
|
||||||
'重置方法请查阅设备说明书'.tr,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 20.sp,
|
|
||||||
color: Colors.blue[700],
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(height: 60.h),
|
|
||||||
|
|
||||||
// 确认按钮
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.symmetric(horizontal: 40.w),
|
|
||||||
child: SubmitBtn(
|
|
||||||
btnName: '我已重置设备,继续添加'.tr,
|
|
||||||
borderRadius: 25.w,
|
|
||||||
onClick: () {
|
onClick: () {
|
||||||
logic.confirmLockReset();
|
logic.confirmLockReset();
|
||||||
},
|
}),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
|
),
|
||||||
SizedBox(height: 20.h),
|
);
|
||||||
|
},
|
||||||
// 取消按钮
|
);
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.symmetric(horizontal: 40.w),
|
|
||||||
child: TextButton(
|
|
||||||
onPressed: Get.back,
|
|
||||||
child: Text(
|
|
||||||
'取消'.tr,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 22.sp,
|
|
||||||
color: Colors.grey[600],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(height: 40.h),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user