From f9c25b29171c36140454e44aa6926ce1afe68d8d Mon Sep 17 00:00:00 2001 From: Daisy <> Date: Wed, 18 Oct 2023 11:42:27 +0800 Subject: [PATCH] =?UTF-8?q?1=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E7=9A=84=E5=B8=B8=E9=87=8F=E5=AE=9A=E4=B9=89=202=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=89=E6=95=88=E6=9C=9F=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=94=99=E4=B9=B1=E9=97=AE=E9=A2=98=203=EF=BC=8C=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E8=B4=A6=E5=8F=B7=20=E4=BC=98=E5=85=88=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../authorizedAdminList_page.dart | 9 ++--- .../electronicKeyDetail_page.dart | 9 ++--- .../electronicKeyList_page.dart | 9 ++--- .../basicInformation_page.dart | 11 ++++--- .../lcokSet/lockSet/lockSet_page.dart | 33 +++++++++---------- .../main/lockMian/lockMain/lockMain_page.dart | 26 ++++++++------- star_lock/lib/mine/about/about_page.dart | 26 ++++----------- .../mine/mine/safeVerify/safeVerify_page.dart | 2 +- .../mine/safeVerify/safeVerify_state.dart | 20 +++++++++++ .../administratorDetails_page.dart | 9 ++--- .../authorizedAdministratorList_page.dart | 9 ++--- .../lockUserManage/ownedKeyList_page.dart | 9 ++--- .../mine/mineSet/mineSet/mineSet_page.dart | 2 +- 13 files changed, 95 insertions(+), 79 deletions(-) diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart index 19c2a8f2..8cb98928 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart'; import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart'; import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart'; import 'package:star_lock/network/api_repository.dart'; @@ -150,7 +151,7 @@ class _AuthorizedAdminListPageState extends State { //使用期限 String getUseDateStr(ElectronicKeyListItem indexEntity) { String useDateStr = ''; - if (indexEntity.keyType == 1) { + if (indexEntity.keyType == XSConstantMacro.keyTypeTime) { //限期 DateTime startDateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.startDate!); @@ -158,15 +159,15 @@ class _AuthorizedAdminListPageState extends State { DateTime.fromMillisecondsSinceEpoch(indexEntity.endDate!); useDateStr = '${startDateStr.toLocal().toString().substring(0, 16)}-${endDateStr.toLocal().toString().substring(0, 16)}'; - } else if (indexEntity.keyType == 2) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) { //永久 DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!); useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 永久'; - } else if (indexEntity.keyType == 3) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) { //单次 DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!); useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 单次'; - } else if (indexEntity.keyType == 4) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) { //循环 useDateStr = '循环'; } diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart index 3cf63cb9..44f5ca03 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart @@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart'; import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecordEntity.dart'; import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart'; import 'package:star_lock/network/api_repository.dart'; @@ -141,7 +142,7 @@ class _ElectronicKeyDetailPageState extends State { //使用期限 String getUseDateStr(ElectronicKeyListItem indexEntity) { String useDateStr = ''; - if (indexEntity.keyType == 1) { + if (indexEntity.keyType == XSConstantMacro.keyTypeTime) { //限期 DateTime startDateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.startDate!); @@ -149,15 +150,15 @@ class _ElectronicKeyDetailPageState extends State { DateTime.fromMillisecondsSinceEpoch(indexEntity.endDate!); useDateStr = '${startDateStr.toLocal().toString().substring(0, 16)}\n${endDateStr.toLocal().toString().substring(0, 16)}'; - } else if (indexEntity.keyType == 2) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) { //永久 DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!); useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 永久'; - } else if (indexEntity.keyType == 3) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) { //单次 DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!); useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 单次'; - } else if (indexEntity.keyType == 4) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) { //循环 useDateStr = '循环'; } diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart index 720c3315..d018b966 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; +import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart'; import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_logic.dart'; import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart'; import 'package:star_lock/tools/noData.dart'; @@ -223,7 +224,7 @@ class _ElectronicKeyListPageState extends State { //使用期限 String getUseDateStr(ElectronicKeyListItem indexEntity) { String useDateStr = ''; - if (indexEntity.keyType == 1) { + if (indexEntity.keyType == XSConstantMacro.keyTypeTime) { //限期 DateTime startDateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.startDate!); @@ -231,15 +232,15 @@ class _ElectronicKeyListPageState extends State { DateTime.fromMillisecondsSinceEpoch(indexEntity.endDate!); useDateStr = '${startDateStr.toLocal().toString().substring(0, 16)}-${endDateStr.toLocal().toString().substring(0, 16)}'; - } else if (indexEntity.keyType == 2) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) { //永久 DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!); useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 永久'; - } else if (indexEntity.keyType == 3) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) { //单次 DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!); useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 单次'; - } else if (indexEntity.keyType == 4) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) { //循环 useDateStr = '循环'; } diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart index d07aaea1..c8971ce7 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart'; import 'package:star_lock/main/lockDetail/lcokSet/basicInformation/basicInformation/KeyDetailEntity.dart'; import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart'; import 'package:star_lock/network/api_repository.dart'; @@ -88,7 +89,7 @@ class _BasicInformationPageState extends State { CommonItem( leftTitel: TranslationLoader .lanKeys!.periodValidity!.tr, - rightTitle: getUseDateStr(itemData), + rightTitle: getUseDateStr(_lockData), allHeight: 70.h, isHaveLine: false), SizedBox( @@ -159,7 +160,7 @@ class _BasicInformationPageState extends State { //使用期限 String getUseDateStr(LockData indexEntity) { String useDateStr = ''; - if (indexEntity.keyType == 1) { + if (indexEntity.keyType == XSConstantMacro.keyTypeTime) { //限期 if (indexEntity.startDate != null && indexEntity.endDate != null) { DateTime startDateStr = @@ -171,13 +172,13 @@ class _BasicInformationPageState extends State { } else { useDateStr = '限期'; } - } else if (indexEntity.keyType == 2) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) { //永久 useDateStr = '永久'; - } else if (indexEntity.keyType == 3) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) { //单次 useDateStr = '单次'; - } else if (indexEntity.keyType == 4) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) { //循环 useDateStr = '循环'; } diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart index 4ef9b2e8..1dcd1833 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart @@ -246,18 +246,7 @@ class _LockSetPageState extends State with RouteAware { rightWidget: SizedBox( width: 60.w, child: _otherUnHaveDoneSwitch()))), // ), - // Obx(() => - Visibility( - visible: true, - child: CommonItem( - leftTitel: '感应距离', - rightTitle: "", - isHaveLine: true, - isHaveDirection: true, - action: () { - Toast.show(msg: "功能暂未开放"); - })), - // ), + // Obx(() => Visibility( visible: true, @@ -292,6 +281,18 @@ class _LockSetPageState extends State with RouteAware { width: 60.w, child: _otherUnHaveDoneSwitch()))), // ), // Obx(() => + Visibility( + visible: true, + child: CommonItem( + leftTitel: '感应距离', + rightTitle: "", + isHaveLine: true, + isHaveDirection: true, + action: () { + Toast.show(msg: "功能暂未开放"); + })), + // ), + // Obx(() => Visibility( visible: true, child: CommonItem( @@ -538,8 +539,8 @@ class _LockSetPageState extends State with RouteAware { } void showDeletPasswordAlertDialog( - BuildContext context, - ) { + BuildContext context, + ) { showDialog( context: context, builder: (BuildContext context) { @@ -549,9 +550,7 @@ class _LockSetPageState extends State with RouteAware { controller: state.passwordTF, sureClick: () { //发送编辑钥匙名称请求 - if (state.passwordTF.text.isNotEmpty) { - - } + if (state.passwordTF.text.isNotEmpty) {} }, cancelClick: () { Navigator.pop(context); diff --git a/star_lock/lib/main/lockMian/lockMain/lockMain_page.dart b/star_lock/lib/main/lockMian/lockMain/lockMain_page.dart index 6ff1b15f..a14db939 100644 --- a/star_lock/lib/main/lockMian/lockMain/lockMain_page.dart +++ b/star_lock/lib/main/lockMian/lockMain/lockMain_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -100,15 +99,15 @@ class _StarLockMainPageState extends State with BaseWidget { Widget unHaveData() { return Column( - // mainAxisAlignment: MainAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, children: [ Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Container( + SizedBox( width: 330.w, - height: 330.w, - margin: EdgeInsets.only(top: 180.h), + // height: 330.w, + // margin: EdgeInsets.only(top: 180.h), // decoration: BoxDecoration( // border: Border.all(width: 4.w, color: AppColors.mainColor), // borderRadius: BorderRadius.circular(110.w), @@ -118,8 +117,8 @@ class _StarLockMainPageState extends State with BaseWidget { padding: const EdgeInsets.all(30.0), child: Image.asset( 'images/main/icon_main_unHaveLockData.png', - width: 150.w, - height: 150.w, + width: 260.w, + height: 260.w, ), ), onTap: () { @@ -136,7 +135,7 @@ class _StarLockMainPageState extends State with BaseWidget { ], ), Container( - padding: EdgeInsets.only(top: 10.h), + padding: EdgeInsets.all(30.w), child: Text( TranslationLoader .lanKeys!.whenAddingLockThePhoneMustBeNextToTheLock!.tr, @@ -146,11 +145,14 @@ class _StarLockMainPageState extends State with BaseWidget { color: Colors.black), )), SizedBox( - height: 200.h, + height: 160.h, ), - SubmitBtn(btnName: '演示模式', onClick: (){ - Get.toNamed(Routers.demoModeLockDetailPage); - },) + SubmitBtn( + btnName: '演示模式', + onClick: () { + Get.toNamed(Routers.demoModeLockDetailPage); + }, + ) ], ); } diff --git a/star_lock/lib/mine/about/about_page.dart b/star_lock/lib/mine/about/about_page.dart index ed317ca5..3b9b53a9 100644 --- a/star_lock/lib/mine/about/about_page.dart +++ b/star_lock/lib/mine/about/about_page.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/appRouters.dart'; +import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart'; import 'package:star_lock/network/api.dart'; import '../../app_settings/app_colors.dart'; @@ -9,19 +10,6 @@ import '../../tools/commonItem.dart'; import '../../tools/titleAppBar.dart'; import '../../translations/trans_lib.dart'; -// 网页的宏定义网址 -class XSWebviewURLMacro { - static String baseWebURL = Api.baseAddress; //base地址 - static String userAgreementURL = '$baseWebURL/app/userAgreement'; //用户协议 - static String privacyPolicyURL = '$baseWebURL/app/privacy'; //隐私政策 - static String collectionListURL = - '$baseWebURL/app/personalInformationCollectionList'; //个人信息收集清单 - static String thirdPartyInfShareListURL = - '$baseWebURL/app/thirdPartyInformationSharingList'; //第三方信息共享清单 - static String appPermissionDescURL = - '$baseWebURL/app/applicationPermissionDescription'; //应用权限说明 -} - class AbountPage extends StatefulWidget { const AbountPage({Key? key}) : super(key: key); @@ -72,7 +60,7 @@ class _AbountPageState extends State { action: () { Navigator.pushNamed(context, Routers.webviewShowPage, arguments: { - "url": XSWebviewURLMacro.userAgreementURL, + "url": XSConstantMacro.introduceURL, "title": '介绍' }); }), @@ -90,7 +78,7 @@ class _AbountPageState extends State { action: () { Navigator.pushNamed(context, Routers.webviewShowPage, arguments: { - "url": XSWebviewURLMacro.userAgreementURL, + "url": XSConstantMacro.userAgreementURL, "title": '用户协议' }); }), @@ -108,7 +96,7 @@ class _AbountPageState extends State { action: () { Navigator.pushNamed(context, Routers.webviewShowPage, arguments: { - "url": XSWebviewURLMacro.privacyPolicyURL, + "url": XSConstantMacro.privacyPolicyURL, "title": '隐私政策' }); }), @@ -127,7 +115,7 @@ class _AbountPageState extends State { action: () { Navigator.pushNamed(context, Routers.webviewShowPage, arguments: { - "url": XSWebviewURLMacro.collectionListURL, + "url": XSConstantMacro.collectionListURL, "title": '个人信息收集清单' }); }), @@ -146,7 +134,7 @@ class _AbountPageState extends State { action: () { Navigator.pushNamed(context, Routers.webviewShowPage, arguments: { - "url": XSWebviewURLMacro.appPermissionDescURL, + "url": XSConstantMacro.appPermissionDescURL, "title": '应用权限说明' }); }), @@ -165,7 +153,7 @@ class _AbountPageState extends State { action: () { Navigator.pushNamed(context, Routers.webviewShowPage, arguments: { - "url": XSWebviewURLMacro.thirdPartyInfShareListURL, + "url": XSConstantMacro.thirdPartyInfShareListURL, "title": '第三方信息共享清单' }); }), diff --git a/star_lock/lib/mine/mine/safeVerify/safeVerify_page.dart b/star_lock/lib/mine/mine/safeVerify/safeVerify_page.dart index a13ea601..e6071d1a 100644 --- a/star_lock/lib/mine/mine/safeVerify/safeVerify_page.dart +++ b/star_lock/lib/mine/mine/safeVerify/safeVerify_page.dart @@ -82,7 +82,7 @@ class _SafeVerifyPageState extends State { Obx(() => Padding( padding: EdgeInsets.only(left: 60.w, right: 60.w), child: Text( - '请点击获取验证码,验证码将发送到${state.loginData.value.mobile}', + '请点击获取验证码,验证码将发送到${state.accountStr.value}', style: TextStyle( color: AppColors.darkGrayTextColor, fontSize: 22.sp), ), diff --git a/star_lock/lib/mine/mine/safeVerify/safeVerify_state.dart b/star_lock/lib/mine/mine/safeVerify/safeVerify_state.dart index 4913a8fc..05ea13a9 100644 --- a/star_lock/lib/mine/mine/safeVerify/safeVerify_state.dart +++ b/star_lock/lib/mine/mine/safeVerify/safeVerify_state.dart @@ -19,6 +19,9 @@ class SafeVerifyState { var xWidth = ''.obs; // 滑动验证码滑动位置 var canSub = false.obs; var date = currentTimeMillis().toString().obs; + var accountStr = ''.obs; + var toggleStr = ''.obs; //可切换字眼 + var isToggle = false.obs; //是否点击切换 bool get codeIsOK => verificationCode.value.isNotEmpty; @@ -42,6 +45,23 @@ class SafeVerifyState { print("getLoginData:$data"); if (data != null && data.isNotEmpty) { loginData.value = LoginData.fromJson(jsonDecode(data)); + + //有手机号无邮箱 优先显示手机号 不可切换 + if (loginData.value.mobile!.isNotEmpty && + loginData.value.email!.isEmpty) { + accountStr.value = loginData.value.mobile!; + isToggle.value = false; + } else if (loginData.value.mobile!.isNotEmpty && + loginData.value.email!.isNotEmpty) { + //有手机号有邮箱 优先显示手机号 可切换至邮箱 + accountStr.value = loginData.value.mobile!; + isToggle.value = true; + } else if (loginData.value.mobile!.isNotEmpty && + loginData.value.email!.isNotEmpty) { + //无手机号有邮箱 优先显示邮箱 不可切换 + accountStr.value = loginData.value.email!; + isToggle.value = false; + } } } diff --git a/star_lock/lib/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_page.dart b/star_lock/lib/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_page.dart index f2e2c3f5..88179e3b 100644 --- a/star_lock/lib/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_page.dart +++ b/star_lock/lib/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_page.dart @@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart'; import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart'; import 'package:star_lock/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetailEntity.dart'; import 'package:star_lock/network/api_repository.dart'; @@ -133,7 +134,7 @@ class _AdministratorDetailsPageState extends State { //使用期限 String getUseDateStr(AuthorizedAdminListItem indexEntity) { String useDateStr = ''; - if (indexEntity.keyType == 1) { + if (indexEntity.keyType == XSConstantMacro.keyTypeTime) { //限期 DateTime startDateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.startDate!); @@ -141,15 +142,15 @@ class _AdministratorDetailsPageState extends State { DateTime.fromMillisecondsSinceEpoch(indexEntity.endDate!); useDateStr = '${startDateStr.toLocal().toString().substring(0, 16)}\n${endDateStr.toLocal().toString().substring(0, 16)}'; - } else if (indexEntity.keyType == 2) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) { //永久 DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!); useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 永久'; - } else if (indexEntity.keyType == 3) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) { //单次 DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!); useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 单次'; - } else if (indexEntity.keyType == 4) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) { //循环 useDateStr = '循环'; } diff --git a/star_lock/lib/mine/mineSet/authorizedAdministrator/authorizedAdministratorList_page.dart b/star_lock/lib/mine/mineSet/authorizedAdministrator/authorizedAdministratorList_page.dart index 379bba0b..a83233f1 100644 --- a/star_lock/lib/mine/mineSet/authorizedAdministrator/authorizedAdministratorList_page.dart +++ b/star_lock/lib/mine/mineSet/authorizedAdministrator/authorizedAdministratorList_page.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart'; import 'package:star_lock/mine/mineSet/authorizedAdministrator/authorizedAdminListEntity.dart'; import 'package:star_lock/network/api_repository.dart'; import 'package:star_lock/tools/baseGetXController.dart'; @@ -212,7 +213,7 @@ class _AuthorizedAdministratorListPageState //使用期限 String getUseDateStr(AuthorizedAdminListItem indexEntity) { String useDateStr = ''; - if (indexEntity.keyType == 1) { + if (indexEntity.keyType == XSConstantMacro.keyTypeTime) { //限期 if (indexEntity.startDate != null && indexEntity.endDate != null) { DateTime startDateStr = @@ -224,13 +225,13 @@ class _AuthorizedAdministratorListPageState } else { useDateStr = '限期'; } - } else if (indexEntity.keyType == 2) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) { //永久 useDateStr = '永久'; - } else if (indexEntity.keyType == 3) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) { //单次 useDateStr = '单次'; - } else if (indexEntity.keyType == 4) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) { //循环 useDateStr = '循环'; } diff --git a/star_lock/lib/mine/mineSet/lockUserManage/ownedKeyList_page.dart b/star_lock/lib/mine/mineSet/lockUserManage/ownedKeyList_page.dart index 539c7b24..2fe20d9d 100644 --- a/star_lock/lib/mine/mineSet/lockUserManage/ownedKeyList_page.dart +++ b/star_lock/lib/mine/mineSet/lockUserManage/ownedKeyList_page.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get_utils/get_utils.dart'; +import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart'; import 'package:star_lock/mine/mineSet/lockUserManage/keyListByUserEntity.dart'; import 'package:star_lock/network/api_repository.dart'; import 'package:star_lock/tools/baseGetXController.dart'; @@ -100,7 +101,7 @@ class _OwnedKeyListPageState extends State { //使用期限 String getUseDateStr(KeyListItem indexEntity) { String useDateStr = ''; - if (indexEntity.keyType == 1) { + if (indexEntity.keyType == XSConstantMacro.keyTypeTime) { //限期 if (indexEntity.startDate != null && indexEntity.endDate != null) { DateTime startDateStr = @@ -112,13 +113,13 @@ class _OwnedKeyListPageState extends State { } else { useDateStr = '限期'; } - } else if (indexEntity.keyType == 2) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) { //永久 useDateStr = '永久'; - } else if (indexEntity.keyType == 3) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) { //单次 useDateStr = '单次'; - } else if (indexEntity.keyType == 4) { + } else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) { //循环 useDateStr = '循环'; } diff --git a/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart b/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart index 644d3471..be9dea06 100644 --- a/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart +++ b/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart @@ -236,7 +236,7 @@ class _MineSetPageState extends State { logic.userLogoutRequest(); }), Container( - padding: EdgeInsets.only(right: 30.w), + padding: EdgeInsets.only(right: 30.w, top: 30.h), // color: Colors.red, child: Row( mainAxisAlignment: MainAxisAlignment.end,