1.底部新增消息入口
2.将设置移出到个人中心页面 3.注册页面默认邮箱注册
This commit is contained in:
parent
8a8c81b7d2
commit
4fa076565f
@ -126,12 +126,16 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
||||
height: 36.w,
|
||||
),
|
||||
),
|
||||
hintText: '请输入手机号或者邮箱'.tr,
|
||||
// hintText: '请输入手机号或者邮箱'.tr,
|
||||
hintText: '请输入邮箱'.tr,
|
||||
// keyboardType: TextInputType.number,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
// FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||
LengthLimitingTextInputFormatter(30),
|
||||
FilteringTextInputFormatter.singleLineFormatter
|
||||
FilteringTextInputFormatter.singleLineFormatter,
|
||||
// 添加邮箱格式限制
|
||||
FilteringTextInputFormatter.allow(RegExp(r'^[a-zA-Z0-9@._-]+$')),
|
||||
]),
|
||||
SizedBox(height: 10.h),
|
||||
LoginInput(
|
||||
|
||||
@ -75,73 +75,73 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
||||
Widget topSelectCountryAndRegionWidget() {
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
SizedBox(height: 50.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: 340.w,
|
||||
height: 60.h,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(30.h)),
|
||||
border: Border.all(width: 1.0, color: AppColors.greyLineColor)),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
state.isIphoneType.value = true;
|
||||
},
|
||||
child: Obx(
|
||||
() => Container(
|
||||
width: 170.w,
|
||||
height: 60.h,
|
||||
decoration: state.isIphoneType.value
|
||||
? BoxDecoration(
|
||||
color: AppColors.mainColor,
|
||||
borderRadius: BorderRadius.all(Radius.circular(30.h)),
|
||||
border: Border.all(width: 1.0, color: AppColors.greyLineColor))
|
||||
: null,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'手机'.tr,
|
||||
style: TextStyle(color: state.isIphoneType.value ? Colors.white : Colors.black),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
state.isIphoneType.value = false;
|
||||
},
|
||||
child: Obx(
|
||||
() => Container(
|
||||
height: 60.h,
|
||||
decoration: !state.isIphoneType.value
|
||||
? BoxDecoration(
|
||||
color: AppColors.mainColor,
|
||||
borderRadius: BorderRadius.all(Radius.circular(30.h)),
|
||||
border: Border.all(width: 1.0, color: AppColors.greyLineColor))
|
||||
: null,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'邮箱'.tr,
|
||||
style: TextStyle(
|
||||
color: !state.isIphoneType.value ? Colors.white : Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 60.h),
|
||||
// SizedBox(height: 50.h),
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// children: <Widget>[
|
||||
// Container(
|
||||
// width: 340.w,
|
||||
// height: 60.h,
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.all(Radius.circular(30.h)),
|
||||
// border: Border.all(width: 1.0, color: AppColors.greyLineColor)),
|
||||
// child: Row(
|
||||
// children: <Widget>[
|
||||
// GestureDetector(
|
||||
// onTap: () {
|
||||
// state.isIphoneType.value = true;
|
||||
// },
|
||||
// child: Obx(
|
||||
// () => Container(
|
||||
// width: 170.w,
|
||||
// height: 60.h,
|
||||
// decoration: state.isIphoneType.value
|
||||
// ? BoxDecoration(
|
||||
// color: AppColors.mainColor,
|
||||
// borderRadius: BorderRadius.all(Radius.circular(30.h)),
|
||||
// border: Border.all(width: 1.0, color: AppColors.greyLineColor))
|
||||
// : null,
|
||||
// child: Center(
|
||||
// child: Text(
|
||||
// '手机'.tr,
|
||||
// style: TextStyle(color: state.isIphoneType.value ? Colors.white : Colors.black),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: GestureDetector(
|
||||
// onTap: () {
|
||||
// state.isIphoneType.value = false;
|
||||
// },
|
||||
// child: Obx(
|
||||
// () => Container(
|
||||
// height: 60.h,
|
||||
// decoration: !state.isIphoneType.value
|
||||
// ? BoxDecoration(
|
||||
// color: AppColors.mainColor,
|
||||
// borderRadius: BorderRadius.all(Radius.circular(30.h)),
|
||||
// border: Border.all(width: 1.0, color: AppColors.greyLineColor))
|
||||
// : null,
|
||||
// child: Center(
|
||||
// child: Text(
|
||||
// '邮箱'.tr,
|
||||
// style: TextStyle(
|
||||
// color: !state.isIphoneType.value ? Colors.white : Colors.black,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// SizedBox(height: 60.h),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
final result = await Get.toNamed(Routers.selectCountryRegionPage);
|
||||
|
||||
@ -6,7 +6,7 @@ class StarLockRegisterState {
|
||||
StarLockRegisterState() {
|
||||
// 根据系统语言设置默认选中的tab
|
||||
final Locale? systemLocale = Get.deviceLocale;
|
||||
isIphoneType.value = systemLocale?.languageCode == 'zh';
|
||||
//isIphoneType.value = systemLocale?.languageCode == 'zh';
|
||||
|
||||
resetResend();
|
||||
}
|
||||
@ -24,7 +24,7 @@ class StarLockRegisterState {
|
||||
RxString surePwd = ''.obs;
|
||||
RxString verificationCode = ''.obs;
|
||||
RxString xWidth = ''.obs; // 滑动验证码滑动位置
|
||||
RxBool isIphoneType = true.obs;
|
||||
RxBool isIphoneType = false.obs;
|
||||
RxBool canSub = false.obs; // 是否能提交
|
||||
RxBool agree = false.obs;
|
||||
RxBool canSendCode = false.obs; // 是否能发送验证码
|
||||
|
||||
@ -23,6 +23,7 @@ import 'package:star_lock/tools/submitBtn.dart';
|
||||
import '../../../appRouters.dart';
|
||||
import '../../../baseWidget.dart';
|
||||
import '../../../flavors.dart';
|
||||
import '../../../mine/message/messageList/messageList_page.dart';
|
||||
import '../../../mine/mine/starLockMine_page.dart';
|
||||
import '../../../tools/EasyRefreshTool.dart';
|
||||
import '../../../tools/eventBusEventManage.dart';
|
||||
@ -115,6 +116,10 @@ class _StarLockMainPageState extends State<StarLockMainPage>
|
||||
), // 使用本地图片
|
||||
label: '设备',
|
||||
),
|
||||
const BottomNavigationBarItem(
|
||||
icon: Icon(Icons.notifications),
|
||||
label: '消息',
|
||||
),
|
||||
const BottomNavigationBarItem(
|
||||
icon: Icon(Icons.person),
|
||||
label: '我的',
|
||||
@ -177,7 +182,7 @@ class _StarLockMainPageState extends State<StarLockMainPage>
|
||||
break;
|
||||
}
|
||||
} else if (state.selectedIndex.value == 1) {
|
||||
returnWidget = StarLockMinePage();
|
||||
returnWidget = MessageListPage();
|
||||
} else {
|
||||
returnWidget = StarLockMinePage();
|
||||
}
|
||||
|
||||
@ -194,28 +194,28 @@ class _MessageListPageState extends State<MessageListPage>
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 30.sp)),
|
||||
// 点击多选可以进行删除
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// 没有多选删除的 api接口,无法使用
|
||||
// if (_showCheckboxes.value) {
|
||||
// deleteSelectedMessages();
|
||||
// } else {
|
||||
// setState(() {
|
||||
// _showCheckboxes.value =
|
||||
// !_showCheckboxes.value;
|
||||
// });
|
||||
// }
|
||||
},
|
||||
child: _showCheckboxes.value
|
||||
? Text('删除',
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
color: Colors.red))
|
||||
: Image.asset(
|
||||
'images/mine/icon_message_checbox.png',
|
||||
width: 30.w,
|
||||
height: 30.h),
|
||||
)
|
||||
// GestureDetector(
|
||||
// onTap: () {
|
||||
// // 没有多选删除的 api接口,无法使用
|
||||
// // if (_showCheckboxes.value) {
|
||||
// // deleteSelectedMessages();
|
||||
// // } else {
|
||||
// // setState(() {
|
||||
// // _showCheckboxes.value =
|
||||
// // !_showCheckboxes.value;
|
||||
// // });
|
||||
// // }
|
||||
// },
|
||||
// child: _showCheckboxes.value
|
||||
// ? Text('删除',
|
||||
// style: TextStyle(
|
||||
// fontSize: 24.sp,
|
||||
// color: Colors.red))
|
||||
// : Image.asset(
|
||||
// 'images/mine/icon_message_checbox.png',
|
||||
// width: 30.w,
|
||||
// height: 30.h),
|
||||
// )
|
||||
]),
|
||||
)
|
||||
]))),
|
||||
@ -377,29 +377,29 @@ class _MessageListPageState extends State<MessageListPage>
|
||||
),
|
||||
child: Container(
|
||||
width: 1.sw,
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 8.h, bottom: 12.h),
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 8.h),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
SizedBox(height: 4.h),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
child: Text(
|
||||
// 调用请求标题
|
||||
'远程开门请求',
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp,
|
||||
color: messageItemEntity.readAt! == 0
|
||||
? AppColors.blackColor
|
||||
: AppColors.placeholderTextColor),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 4.h),
|
||||
// SizedBox(height: 4.h),
|
||||
// Row(
|
||||
// children: <Widget>[
|
||||
// Flexible(
|
||||
// child: Text(
|
||||
// // 调用请求标题
|
||||
// '远程开门请求',
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// style: TextStyle(
|
||||
// fontSize: 22.sp,
|
||||
// color: messageItemEntity.readAt! == 0
|
||||
// ? AppColors.blackColor
|
||||
// : AppColors.placeholderTextColor),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// SizedBox(height: 4.h),
|
||||
Wrap(
|
||||
children: <Widget>[
|
||||
// if (messageItemEntity.readAt! == 0)
|
||||
@ -422,7 +422,7 @@ class _MessageListPageState extends State<MessageListPage>
|
||||
child: Text(
|
||||
DateTool().dateToHnString(messageItemEntity.createdAt!.toString()),
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
fontSize: 20.sp,
|
||||
color: messageItemEntity.readAt! == 0
|
||||
? AppColors.blackColor
|
||||
: AppColors.placeholderTextColor,
|
||||
@ -432,7 +432,7 @@ class _MessageListPageState extends State<MessageListPage>
|
||||
Container(
|
||||
width: 1,
|
||||
height: 10,
|
||||
margin: EdgeInsets.only(left: 5.w, right: 5.w, top: 8.h),
|
||||
margin: EdgeInsets.only(left: 5.w, right: 5.w, top: 10.h),
|
||||
color: messageItemEntity.readAt! == 0
|
||||
? AppColors.blackColor
|
||||
: AppColors.placeholderTextColor,
|
||||
@ -442,14 +442,14 @@ class _MessageListPageState extends State<MessageListPage>
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
fontSize: 20.sp,
|
||||
color: messageItemEntity.readAt! == 0
|
||||
? AppColors.blackColor
|
||||
: AppColors.placeholderTextColor,
|
||||
),
|
||||
)),
|
||||
Container(child: GestureDetector(
|
||||
child: Text('点击查看', style: TextStyle(fontWeight: FontWeight.w500, fontSize: 18.sp, color: AppColors.mainColor),),
|
||||
Container(transform: Matrix4.translationValues(0, -8, 0), child: GestureDetector(
|
||||
child: Text('点击查看', style: TextStyle(fontWeight: FontWeight.w500, fontSize: 20.sp, color: AppColors.mainColor),),
|
||||
),alignment: Alignment.centerRight,)
|
||||
],
|
||||
),
|
||||
@ -470,7 +470,7 @@ class _MessageListPageState extends State<MessageListPage>
|
||||
// : AppColors.placeholderTextColor)),
|
||||
// ],
|
||||
// ),
|
||||
SizedBox(width: 20.h),
|
||||
// SizedBox(width: 20.h),
|
||||
]))))),
|
||||
// 显示选中状态的复选框
|
||||
if (_showCheckboxes.value)
|
||||
|
||||
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/flavors.dart';
|
||||
import 'package:star_lock/mine/mine/starLockMine_state.dart';
|
||||
@ -12,14 +13,22 @@ import 'package:star_lock/tools/wechat/customer_tool.dart';
|
||||
import '../../appRouters.dart';
|
||||
import '../../app_settings/app_colors.dart';
|
||||
import '../../baseWidget.dart';
|
||||
import '../../tools/commonItem.dart';
|
||||
import '../../tools/customNetworkImage.dart';
|
||||
import '../../tools/showTipView.dart';
|
||||
import '../../tools/submitBtn.dart';
|
||||
import '../../tools/wechat/wechatManageTool.dart';
|
||||
import '../../tools/wechat/wx_push_miniProgram/wx_push_miniProgram.dart';
|
||||
import '../../translations/app_dept.dart';
|
||||
import '../../translations/current_locale_tool.dart';
|
||||
import '../mineSet/mineSet/mineSet_logic.dart';
|
||||
import '../mineSet/mineSet/mineSet_state.dart';
|
||||
import 'starLockMine_logic.dart';
|
||||
|
||||
class StarLockMinePage extends StatefulWidget {
|
||||
const StarLockMinePage({Key? key}) : super(key: key);
|
||||
const StarLockMinePage({Key? key, this.showAppBar = true, this.showAbout = true}) : super(key: key);
|
||||
final bool showAppBar;
|
||||
final bool showAbout;
|
||||
|
||||
@override
|
||||
State<StarLockMinePage> createState() => StarLockMinePageState();
|
||||
@ -30,10 +39,21 @@ GlobalKey<StarLockMinePageState> starLockMineKey = GlobalKey();
|
||||
class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
||||
final StarLockMineLogic logic = Get.put(StarLockMineLogic());
|
||||
final StarLockMineState state = Get.find<StarLockMineLogic>().state;
|
||||
late final MineSetState stateSet;
|
||||
late final MineSetLogic logicSet;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
// 确保 MineSetLogic 存在
|
||||
if (!Get.isRegistered<MineSetLogic>()) {
|
||||
Get.put(MineSetLogic());
|
||||
}
|
||||
logicSet = Get.find<MineSetLogic>();
|
||||
stateSet = logicSet.state;
|
||||
logicSet.userSettingsInfoRequest();
|
||||
|
||||
logic.getUserInfoRequest();
|
||||
}
|
||||
|
||||
@ -41,7 +61,8 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: SafeArea(
|
||||
child: Container(
|
||||
child: SingleChildScrollView(child: Container(
|
||||
margin: EdgeInsets.only(bottom: 20.h),
|
||||
padding: EdgeInsets.symmetric(horizontal: 20.w),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
@ -87,11 +108,18 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
||||
height: 20.h,
|
||||
),
|
||||
bottomListWidget(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.r),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 15.h),
|
||||
child: getListDataView(),
|
||||
)])))));
|
||||
}
|
||||
|
||||
Widget topWidget() {
|
||||
@ -104,15 +132,15 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
||||
},
|
||||
child: Obx(
|
||||
() => SizedBox(
|
||||
width: 88.w,
|
||||
height: 88.w,
|
||||
width: 68.w,
|
||||
height: 68.w,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(52.5.w),
|
||||
child: CustomNetworkImage(
|
||||
url: state.userHeadUrl.value,
|
||||
defaultUrl: 'images/controls_user.png',
|
||||
width: 88.w,
|
||||
height: 88.h,
|
||||
width: 68.w,
|
||||
height: 68.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -165,44 +193,44 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.r),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(horizontal: 15.w, vertical: 10.h),
|
||||
child: Row(
|
||||
children: [
|
||||
if (F.isSKY && Get.locale!.languageCode == 'zh')
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
WechatManageTool.getAppInfo(CustomerTool.openCustomerService);
|
||||
},
|
||||
child: Image.asset(
|
||||
'images/mine/icon_mine_main_supportStaff.png',
|
||||
width: 34.w,
|
||||
height: 34.w,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
Get.toNamed(Routers.messageListPage);
|
||||
},
|
||||
child: Image.asset(
|
||||
'images/mine/icon_mine_main_message.png',
|
||||
width: 36.w,
|
||||
height: 36.w,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
// const Spacer(),
|
||||
// Container(
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.white,
|
||||
// borderRadius: BorderRadius.circular(10.r),
|
||||
// ),
|
||||
// padding: EdgeInsets.symmetric(horizontal: 15.w, vertical: 10.h),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// if (F.isSKY && Get.locale!.languageCode == 'zh')
|
||||
// GestureDetector(
|
||||
// onTap: () {
|
||||
// Get.back();
|
||||
// WechatManageTool.getAppInfo(CustomerTool.openCustomerService);
|
||||
// },
|
||||
// child: Image.asset(
|
||||
// 'images/mine/icon_mine_main_supportStaff.png',
|
||||
// width: 34.w,
|
||||
// height: 34.w,
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// width: 20.w,
|
||||
// ),
|
||||
// GestureDetector(
|
||||
// onTap: () {
|
||||
// Get.back();
|
||||
// Get.toNamed(Routers.messageListPage);
|
||||
// },
|
||||
// child: Image.asset(
|
||||
// 'images/mine/icon_mine_main_message.png',
|
||||
// width: 36.w,
|
||||
// height: 36.w,
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// )
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -261,7 +289,7 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
||||
SizedBox(width: 15.w),
|
||||
Text(
|
||||
lockTypeTitle,
|
||||
style: TextStyle(fontSize: 28.sp),
|
||||
style: TextStyle(fontSize: 22.sp),
|
||||
),
|
||||
const Spacer(),
|
||||
Icon(
|
||||
@ -272,4 +300,406 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Widget getListDataView() {
|
||||
// 检测系统语言是否为中文
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
/* 2024-01-12 会议确定去掉“提示音、触摸开锁” by DaisyWu
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.prompTone!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(
|
||||
width: 60.w,
|
||||
height: 50.h,
|
||||
child: Obx(() => _isPrompToneSwitch()))),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.touchUnlock!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(
|
||||
width: 60.w,
|
||||
height: 50.h,
|
||||
child: Obx(() => _isTouchUnlockSwitch()))),
|
||||
*/
|
||||
F.sw(
|
||||
skyCall: () => const SizedBox(),
|
||||
xhjCall: () => CommonItem(
|
||||
leftTitel: '个人信息'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.minePersonInfoPage);
|
||||
})),
|
||||
CommonItem(
|
||||
leftTitel: '消息推送'.tr,
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
isHaveLine: F.sw(
|
||||
skyCall: () => F.appFlavor == Flavor.sky, xhjCall: () => true),
|
||||
rightWidget: SizedBox(
|
||||
width: 60.w,
|
||||
height: 50.h,
|
||||
child: Obx(() => _isPushNotificationSwitch())
|
||||
)),
|
||||
// if (F.appFlavor == Flavor.sky)
|
||||
Visibility(
|
||||
visible: stateSet.currentLanguageCode == 'zh_CN',
|
||||
child: CommonItem(
|
||||
leftTitel: '微信公众号推送'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(
|
||||
width: 60.w,
|
||||
height: 50.h,
|
||||
child: Obx(_isWechatPublicAccountPushSwitch),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.h),
|
||||
CommonItem(
|
||||
leftTitel: '锁用户管理'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.lockUserManageLisPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: '授权管理员'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.authorizedAdministratorListPage);
|
||||
}),
|
||||
//by DaisyWu 新增--批量授权
|
||||
if (!F.isProductionEnv)
|
||||
CommonItem(
|
||||
leftTitel: '批量授权'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.authorityManagementPage);
|
||||
// Toast.show(msg: "功能暂未开放");
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: '网关'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.gatewayListPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: '锁分组'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.lockGroupListPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: '转移智能锁'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.transferSmartLockPage);
|
||||
}),
|
||||
//暂无网关屏蔽
|
||||
// CommonItem(
|
||||
// leftTitel: '转移网关'.tr,
|
||||
// rightTitle: '',
|
||||
// isHaveLine: true,
|
||||
// isHaveDirection: true,
|
||||
// action: () {
|
||||
// Get.toNamed(Routers.selectGetewayListPage);
|
||||
// }),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
|
||||
// AppLog.log('state.currentLanguageName: ${state.currentLanguageName} state.currentLanguage.value: ${state.currentLanguage.value}');
|
||||
CommonItem(
|
||||
leftTitel: '多语言'.tr,
|
||||
rightTitle: stateSet.currentLanguageName,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
// Get.toNamed(Routers.mineMultiLanguagePage);
|
||||
await Get.toNamed(Routers.mineMultiLanguagePage)!.then((value) {
|
||||
setState(() {
|
||||
if (value.containsKey('currentLanguage')) {
|
||||
stateSet.currentLanguage.value = value['currentLanguage'];
|
||||
}
|
||||
});
|
||||
});
|
||||
}),
|
||||
/* 2024-01-12 会议确定去掉“锁屏” by DaisyWu
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lockScreen!.tr,
|
||||
rightTitle: (state.lockScreen.value == 1
|
||||
? TranslationLoader.lanKeys!.opened!.tr
|
||||
: TranslationLoader.lanKeys!.closed!.tr),
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.lockScreenPage,
|
||||
arguments: {'isOn': state.lockScreen.value}).then((value) {
|
||||
logic.userSettingsInfoRequest();
|
||||
});
|
||||
})),
|
||||
*/
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: '隐藏无效开锁权限'.tr,
|
||||
rightTitle:
|
||||
(stateSet.hideExpiredAccessFlag.value == 1 ? '已开启'.tr : '已关闭'.tr),
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.hideInvalidUnlockPermissionsPage,
|
||||
arguments: <String, int>{
|
||||
'isOn': stateSet.hideExpiredAccessFlag.value
|
||||
}).then((Object? value) {
|
||||
logicSet.userSettingsInfoRequest();
|
||||
});
|
||||
})),
|
||||
otherItem(
|
||||
leftTitle: 'APP开锁时需手机连网的锁'.tr,
|
||||
isHaveLine: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.aPPUnlockNeedMobileNetworkingLockPage);
|
||||
}),
|
||||
if (!F.isSKY)
|
||||
CommonItem(
|
||||
leftTitel: '增值服务'.tr,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.back();
|
||||
Get.toNamed(Routers.valueAddedServicesPage);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: 'Amazon Alexa'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.amazonAlexaPage, arguments: <String, dynamic>{
|
||||
'isAmazonAlexa': stateSet.isAmazonAlexa.value,
|
||||
'amazonAlexaData': stateSet.amazonAlexaData.value
|
||||
});
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: 'Google Home'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.googleHomePage, arguments: <String, dynamic>{
|
||||
'isGoogleHome': stateSet.isGoogleHome.value,
|
||||
'googleHomeData': stateSet.googleHomeData.value
|
||||
})?.then((Object? value) {
|
||||
logicSet.userSettingsInfoRequest();
|
||||
});
|
||||
}),
|
||||
// if (!F.isProductionEnv)
|
||||
// CommonItem(
|
||||
// leftTitel: '小米IOT平台'.tr,
|
||||
// rightTitle: '',
|
||||
// isHaveLine: widget.showAbout,
|
||||
// isHaveDirection: true,
|
||||
// action: () {
|
||||
// logic.showToast('功能暂未开放'.tr);
|
||||
// }),
|
||||
if (!F.isSKY)
|
||||
CommonItem(
|
||||
leftTitel: '客服'.tr,
|
||||
isHaveLine: widget.showAbout,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
WechatManageTool.getAppInfo(CustomerTool.openCustomerService);
|
||||
},
|
||||
),
|
||||
if (widget.showAbout)
|
||||
CommonItem(
|
||||
leftTitel: '关于'.tr,
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.back();
|
||||
Get.toNamed(Routers.aboutPage);
|
||||
},
|
||||
),
|
||||
// CommonItem(leftTitel:TranslationLoader.lanKeys!.valueAddedServices!.tr, rightTitle:"", isHaveDirection: true, action: (){
|
||||
//
|
||||
// }),
|
||||
SizedBox(
|
||||
height: F.sw(skyCall: () => 50.h, xhjCall: () => 0.0),
|
||||
),
|
||||
// CommonItem(leftTitel:TranslationLoader.lanKeys!.about!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
//
|
||||
// }),
|
||||
// SizedBox(height: 10.h,),
|
||||
// CommonItem(leftTitel:TranslationLoader.lanKeys!.userAgreement!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
//
|
||||
// }),
|
||||
// CommonItem(leftTitel:TranslationLoader.lanKeys!.privacyPolicy!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
//
|
||||
// }),
|
||||
// CommonItem(leftTitel:TranslationLoader.lanKeys!.personalInformationCollectionList!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
//
|
||||
// }),
|
||||
// CommonItem(leftTitel:TranslationLoader.lanKeys!.applicationPermissionDescription!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
//
|
||||
// }),
|
||||
// CommonItem(leftTitel:TranslationLoader.lanKeys!.thirdPartyInformationSharingList!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
//
|
||||
// }),
|
||||
F.sw(skyCall: keyBottomWidget, xhjCall: () => const SizedBox())
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
//微信公众号推送开关
|
||||
CupertinoSwitch _isWechatPublicAccountPushSwitch() {
|
||||
return CupertinoSwitch(
|
||||
activeColor: CupertinoColors.activeBlue,
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: stateSet.isWechatPublicAccountPush.value,
|
||||
onChanged: (bool value) {
|
||||
stateSet.isWechatPublicAccountPush.value =
|
||||
!stateSet.isWechatPublicAccountPush.value;
|
||||
logicSet.setMpWechatPushSwitchRequest(context);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
CupertinoSwitch _isPushNotificationSwitch() {
|
||||
return CupertinoSwitch(
|
||||
activeColor: CupertinoColors.activeBlue,
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: stateSet.isPushNotification.value,
|
||||
onChanged: (bool value) {
|
||||
// stateSet.isPushNotification.value = !stateSet.isPushNotification.value;
|
||||
stateSet.isPushNotification.value = value;
|
||||
openAppSettings();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget otherItem(
|
||||
{String? leftTitle,
|
||||
bool? isHaveLine,
|
||||
Function()? action,
|
||||
double? allHeight}) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
width: 1.sw,
|
||||
padding:
|
||||
EdgeInsets.only(left: 20.w, top: 15.h, bottom: 15.h, right: 10.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
border: isHaveLine!
|
||||
? Border(
|
||||
bottom: BorderSide(
|
||||
color: AppColors.greyLineColor, // 设置边框颜色
|
||||
width: 2.0.h, // 设置边框宽度
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Text(leftTitle!, style: TextStyle(fontSize: 22.sp))),
|
||||
SizedBox(width: 10.w),
|
||||
if (CurrentLocaleTool.getCurrentLocaleString() ==
|
||||
ExtensionLanguageType.fromLanguageType(LanguageType.hebrew)
|
||||
.toString() ||
|
||||
CurrentLocaleTool.getCurrentLocaleString() ==
|
||||
ExtensionLanguageType.fromLanguageType(LanguageType.arabic)
|
||||
.toString())
|
||||
Image.asset(
|
||||
'images/icon_left_grey.png',
|
||||
width: 21.w,
|
||||
height: 21.w,
|
||||
)
|
||||
else
|
||||
Image.asset(
|
||||
'images/icon_right_grey.png',
|
||||
width: 12.w,
|
||||
height: 21.w,
|
||||
),
|
||||
SizedBox(width: 5.w),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget keyBottomWidget() {
|
||||
return Padding(
|
||||
padding: F.sw(
|
||||
skyCall: () => EdgeInsets.zero,
|
||||
xhjCall: () => EdgeInsets.symmetric(horizontal: 15.w)),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
SubmitBtn(
|
||||
btnName: '退出'.tr,
|
||||
isDelete: true,
|
||||
padding: EdgeInsets.symmetric(horizontal: 15.w),
|
||||
onClick: () {
|
||||
//退出登录
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'确定要退出吗?'.tr, logic.userLogoutRequest);
|
||||
// showLoginOutAlertTipDialog();
|
||||
}),
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 30.w, top: 30.h),
|
||||
// color: Colors.red,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
TextButton(
|
||||
child: Text(
|
||||
'删除账号'.tr,
|
||||
style: TextStyle(
|
||||
color: AppColors.darkGrayTextColor, fontSize: 18.sp),
|
||||
),
|
||||
onPressed: () {
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'删除账号后,你的所有信息及相关记录都会从平台彻底删除,且不可恢复,是否删除?'.tr, () {
|
||||
//安全验证
|
||||
Get.toNamed(Routers.safeVerifyPage);
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user