From 37480a1a026d5086677dd58aace71cc66e70ae0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=B0=91=E9=98=B3?= <786612630@qq.com> Date: Fri, 7 Jun 2024 15:14:52 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=80=83=E5=8B=A4?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=9C=88=E4=BB=BD=E5=BC=B9=E7=AA=97=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81=E5=90=8D?= =?UTF-8?q?=E5=AD=97=E6=8A=A5=E7=BA=A2=E9=97=AE=E9=A2=98=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=AF=86=E7=A0=81=E5=88=97=E8=A1=A8=E6=9C=AA=E7=94=9F?= =?UTF-8?q?=E6=95=88=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../checkingInListSeletMonth_page.dart | 38 ++++++++++++++----- .../checkingInList/checkingInList_page.dart | 18 +++++++-- .../passwordKeyList/passwordKeyList_page.dart | 7 +++- lib/tools/showTFView.dart | 4 +- 4 files changed, 50 insertions(+), 17 deletions(-) diff --git a/lib/main/lockDetail/checkingIn/checkingInList/checkingInListSeletMonth_page.dart b/lib/main/lockDetail/checkingIn/checkingInList/checkingInListSeletMonth_page.dart index 7e584566..0931ead4 100644 --- a/lib/main/lockDetail/checkingIn/checkingInList/checkingInListSeletMonth_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInList/checkingInListSeletMonth_page.dart @@ -2,19 +2,24 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:star_lock/app_settings/app_settings.dart'; +typedef SelectDateCallback(DateTime dateTime); class CheckingInListSeletMonthPage extends StatefulWidget { - const CheckingInListSeletMonthPage({Key? key}) : super(key: key); + int selectYear; + int selectMonth; + SelectDateCallback? selectAction; + CheckingInListSeletMonthPage({required this.selectYear, required this.selectMonth, required this.selectAction, Key? key}) : super(key: key); @override State createState() => _CheckingInListSeletMonthPageState(); } class _CheckingInListSeletMonthPageState extends State { - var _selectMonth = 1; @override Widget build(BuildContext context) { + AppLog.log('selectYear:${widget.selectYear} selectMonth:${widget.selectMonth}'); return Dialog( // insetPadding: EdgeInsets.all(10), //距离 shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10.w))), //形状 @@ -35,16 +40,20 @@ class _CheckingInListSeletMonthPageState extends State[ GestureDetector( onTap:(){ - + setState(() { + widget.selectYear--; + }); }, child: Image(width: 50.w, height: 40.w, image: const AssetImage('images/icon_left_black.png'),), ), SizedBox(width: 50.w,), - Text('2024', style: TextStyle(fontSize: 30.sp, color: Colors.black, fontWeight: FontWeight.w500)), + Text('${widget.selectYear}', style: TextStyle(fontSize: 30.sp, color: Colors.black, fontWeight: FontWeight.w500)), SizedBox(width: 50.w), GestureDetector( onTap: (){ - + setState(() { + widget.selectYear++; + }); }, child: Image(width: 50.w, height: 40.w, image: const AssetImage('images/icon_right_black.png')), ), @@ -67,10 +76,12 @@ class _CheckingInListSeletMonthPageState extends State now.year || (year == now.year && month > now.month)) { + return true; + } + return false; + } } diff --git a/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart b/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart index a8b44f0e..c5ba3d35 100755 --- a/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart @@ -6,6 +6,7 @@ import 'package:get/get.dart'; import 'package:star_lock/main/lockDetail/checkingIn/checkingInList/checkingInListMonth_entity.dart'; import 'package:star_lock/main/lockDetail/checkingIn/checkingInList/checkingInList_state.dart'; import 'package:star_lock/main/lockMian/entity/lockListInfo_entity.dart'; +import 'package:star_lock/tools/dateTool.dart'; import '../../../../appRouters.dart'; import '../../../../app_settings/app_colors.dart'; @@ -211,7 +212,7 @@ class _CheckingInListPageState extends State { await showDialog( context: Get.context!, builder: (BuildContext context) { - // if(state.isDay.value){ + if(state.isDay.value){ return ShowCalendar( datePickerMode: DatePickerMode.day, selectAction: (DateTime dateTime) { @@ -223,9 +224,18 @@ class _CheckingInListPageState extends State { Get.back(); }); }); - // }else{ - // return CheckingInListSeletMonthPage(); - // } + }else{ + final int timestamp = state.checkListDateTimestamp.value; + final DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(timestamp); + return CheckingInListSeletMonthPage(selectYear: dateTime.year, selectMonth: int.parse(state.checkListDate.value), selectAction: (DateTime dateTime){ + setState(() { + state.checkListDateTimestamp.value = dateTime.millisecondsSinceEpoch; + final String beginDate = formatDate(dateTime, state.isDay.value ? [mm, '-', dd] : [mm]); + state.checkListDate.value = beginDate; + logic.loadDataByType(); + }); + }); + } }); } else { // Get.toNamed(Routers.selectLockTypePage); diff --git a/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart b/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart index b86e5fad..2f206d13 100755 --- a/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart +++ b/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart @@ -227,7 +227,7 @@ class _PasswordKeyListPageState extends State Row( children: [ SizedBox( - width: passwordKeyListItem.keyboardPwdStatus == 2 + width: passwordKeyListItem.keyboardPwdStatus == 2 || passwordKeyListItem.keyboardPwdStatus == 3 ? 1.sw - 110.w - 100.w : 1.sw - 110.w - 50.w, child: Row(children: [ @@ -247,6 +247,11 @@ class _PasswordKeyListPageState extends State '已过期'.tr, style: TextStyle(color: Colors.red, fontSize: 20.sp), ) + else if (passwordKeyListItem.keyboardPwdStatus == 3) + Text( + '未生效'.tr, + style: TextStyle(color: Colors.red, fontSize: 20.sp), + ) else Container(), // SizedBox(width: 15.w) diff --git a/lib/tools/showTFView.dart b/lib/tools/showTFView.dart index fd40eb1e..56d332bc 100755 --- a/lib/tools/showTFView.dart +++ b/lib/tools/showTFView.dart @@ -60,12 +60,12 @@ class ShowTFView extends StatelessWidget { inputFormatters: inputFormatters, keyboardType: keyboardType, decoration: InputDecoration( - contentPadding: EdgeInsets.only(left: 5, top: isShowSuffixIcon! ? 0 : -8, bottom: 6), + contentPadding: EdgeInsets.only(left: 5, top: isShowSuffixIcon??false ? 0 : -8, bottom: 6), hintText: tipTitle??TranslationLoader.lanKeys!.pleaseEnter!.tr, hintStyle: TextStyle(fontSize: 22.sp, height: 1.0), //不需要输入框下划线 border: InputBorder.none, - suffixIcon: isShowSuffixIcon! ? IconButton( + suffixIcon: isShowSuffixIcon??false ? IconButton( onPressed: () => controller?.clear(), icon: const Icon(Icons.clear), ) : null, From de98d9270e005ce866564364061654fe06472be9 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Fri, 7 Jun 2024 15:15:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=A2=9E=E5=80=BC?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E4=B8=8D=E5=87=BA=E7=8E=B0=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 8196 -> 8196 bytes lib/mine/mineSet/mineSet/mineSet_page.dart | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.DS_Store b/.DS_Store index 2e1f43b30d6f6ee3763f1adbbe77a14a8a743420..24c4d37f13efd083465bd6eb9f85faa57afc680b 100755 GIT binary patch delta 42 ycmZp1XmQw}Dm?kMU>Uoav5tbNh2`Xh!qStQg;X{_5LRQ^%r5bbW%C~qc4h!Dwhiw9 delta 73 zcmZp1XmQw}D$KZj@*BZIHSy|dQ)3ey1tYUs9ffL3BLf`;6H}wwT22m8Wqs?Q`0SkA dy!_6|`-J5gyEfkw)@0etCh?tR^FI-GW&lK@7WDuC diff --git a/lib/mine/mineSet/mineSet/mineSet_page.dart b/lib/mine/mineSet/mineSet/mineSet_page.dart index 51cd8e96..a7cc2a16 100755 --- a/lib/mine/mineSet/mineSet/mineSet_page.dart +++ b/lib/mine/mineSet/mineSet/mineSet_page.dart @@ -313,7 +313,7 @@ class _MineSetPageState extends State Navigator.pushNamed( context, Routers.aPPUnlockNeedMobileNetworkingLockPage); }), - if (!F.isLite && widget.showAbout) + if (!F.isLite) CommonItem( leftTitel: TranslationLoader.lanKeys!.valueAddedServices!.tr, isHaveLine: true, From 6d19e442593b83d7d6a80d6641f9ec0cc36d0f77 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Fri, 7 Jun 2024 15:17:21 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pubspec.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 4bfba5e8..ab155890 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -66,8 +66,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # 1.0.56+2024060502:xhj 线上环境,对外发布,提交测试 # 1.0.57+2024060702:xhj 线上环境,对外发布,提交测试 # 1.0.58+2024060702:xhj 线上环境,对外发布,提交测试 +# 1.0.59+2024060703:xhj 线上环境,对外发布,提交测试 -version: 1.0.58+2024060702 +version: 1.0.59+2024060703 environment: sdk: '>=2.12.0 <3.0.0'