diff --git a/lib/login/login/starLock_login_page.dart b/lib/login/login/starLock_login_page.dart index edf5acfd..671b746f 100755 --- a/lib/login/login/starLock_login_page.dart +++ b/lib/login/login/starLock_login_page.dart @@ -146,7 +146,7 @@ class _StarLockLoginPageState extends State { ), ), hintText: - "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}", + '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}', inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), diff --git a/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_state.dart b/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_state.dart index 1a939a7a..a04a16ab 100755 --- a/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_state.dart +++ b/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_state.dart @@ -6,7 +6,6 @@ import '../checkingInSetStaffList/checkingInStaffList_entity.dart'; import 'checkingInAddStaffSelectKey_entity.dart'; class CheckingInAddStaffState { - CheckingInAddStaffState() { final Map map = Get.arguments; getKeyInfosData.value = map['getKeyInfosData']; @@ -43,8 +42,15 @@ class CheckingInAddStaffState { } else { appUnHaveAccount.value = true; } + + if ((staffListItemData.value.cardStatus ?? 0) == 1) { + //打卡方式是否是正常状态 + appUnHaveAccount.value = true; + attendanceWayNumber.value = ''; + } } } + final Rx getKeyInfosData = LockListInfoItemEntity().obs; final RxString companyId = ''.obs; diff --git a/lib/main/lockDetail/lockSet/lockEscalation/lockEscalation_logic.dart b/lib/main/lockDetail/lockSet/lockEscalation/lockEscalation_logic.dart index 47e04211..63c8a0a5 100755 --- a/lib/main/lockDetail/lockSet/lockEscalation/lockEscalation_logic.dart +++ b/lib/main/lockDetail/lockSet/lockEscalation/lockEscalation_logic.dart @@ -76,7 +76,7 @@ class LockEscalationLogic extends BaseGetXController { } //蓝牙操作 ota 升级 - void blueOTAUpgrade(Map data, List token) { + void blueOTAUpgrade(Map data, List token) { BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState deviceConnectionState) async { if (deviceConnectionState == BluetoothConnectionState.connected) { @@ -92,8 +92,8 @@ class LockEscalationLogic extends BaseGetXController { lockID: BlueManage().connectDeviceName, userID: uid, keyID: BlueManage().connectDeviceName, - platform: int.tryParse(data['platform']) ?? 0, - product: int.tryParse(data['product']) ?? 0, + platform: int.tryParse(data['platform'] ?? '0'), + product: int.tryParse(data['product'] ?? '0'), hwVersion: data['hwVersion'], fwVersion: data['fwVersion'], fwSize: data['fwSize'], diff --git a/lib/main/lockMian/lockList/lockListGroup_view.dart b/lib/main/lockMian/lockList/lockListGroup_view.dart index 40ee97e3..258fed31 100755 --- a/lib/main/lockMian/lockList/lockListGroup_view.dart +++ b/lib/main/lockMian/lockList/lockListGroup_view.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:star_lock/flavors.dart'; import '../../../app_settings/app_colors.dart'; import '../entity/lockListInfo_entity.dart'; @@ -34,7 +35,7 @@ class _LockListGroupViewState extends State { Widget build(BuildContext context) { return Column( mainAxisSize: MainAxisSize.min, - children: [ + children: [ Container( color: widget.backgroundColor ?? Colors.white, height: 80.h, @@ -54,23 +55,34 @@ class _LockListGroupViewState extends State { } List _buildExpandRowList() { - List widgetList = []; + final List widgetList = []; widgetList.add(GestureDetector( child: Container( width: ScreenUtil().screenWidth, color: widget.backgroundColor ?? Colors.white, child: Row( - children: [ + children: [ SizedBox(width: 40.w), - Text( - widget.groupItem.groupName ?? '', - style: widget.textStyle ?? - TextStyle(color: AppColors.blackColor, fontSize: 22.sp), - ), - Expanded( - child: SizedBox( + F.sw( + skyCall: () => Text( + widget.groupItem.groupName ?? '', + style: widget.textStyle ?? + TextStyle( + color: AppColors.blackColor, fontSize: 22.sp), + ), + xhjCall: () => Expanded( + child: Text( + widget.groupItem.groupName ?? '', + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: widget.textStyle ?? + TextStyle( + color: AppColors.blackColor, fontSize: 22.sp), + ), + )), + SizedBox( width: 10.w, - )), + ), AnimatedRotation( turns: _isExpanded ? -0.5 : 0, duration: _animationDuration, diff --git a/lib/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_page.dart b/lib/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_page.dart index 7763bd07..7caee3a9 100755 --- a/lib/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_page.dart +++ b/lib/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_page.dart @@ -16,9 +16,6 @@ class AdvancedFeaturesWebPage extends StatefulWidget { } class _AdvancedFeaturesWebPageState extends State { - final AdvancedFeaturesWebLogic logic = Get.put(AdvancedFeaturesWebLogic()); - final AdvancedFeaturesWebState state = - Get.find().state; @override Widget build(BuildContext context) { @@ -32,18 +29,13 @@ class _AdvancedFeaturesWebPageState extends State { resizeToAvoidBottomInset: false, backgroundColor: const Color(0xFFFFFFFF), appBar: TitleAppBar( - barTitle: state.webBuyTitle.value, + barTitle: logic.state.webBuyTitle.value, haveBack: true, backgroundColor: AppColors.mainColor, backAction: () => logic.canGoBack(false), ), body: Obx(() => Column( children: [ - PopScope( - onPopInvoked: logic.canGoBack, - canPop: false, - child: const SizedBox(), - ), Container( padding: EdgeInsets.only(bottom: 10.w), child: LinearProgressIndicator( diff --git a/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart b/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart index bc254cae..1edf9c7f 100755 --- a/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart +++ b/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart @@ -3,6 +3,7 @@ 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/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_logic.dart'; +import 'package:star_lock/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_state.dart'; import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/use_record_list_arg.dart'; import '../../../appRouters.dart'; @@ -20,8 +21,10 @@ class ValueAddedServicesHighFunctionPage extends StatefulWidget { class _ValueAddedServicesHighFunctionPageState extends State { - final logic = Get.put(ValueAddedServicesHighFunctionLogic()); - final state = Get.find().state; + final ValueAddedServicesHighFunctionLogic logic = + Get.put(ValueAddedServicesHighFunctionLogic()); + final ValueAddedServicesHighFunctionState state = + Get.find().state; @override initState() { @@ -35,16 +38,16 @@ class _ValueAddedServicesHighFunctionPageState return Scaffold( backgroundColor: Colors.white, appBar: TitleAppBar( - barTitle: "高级功能".tr, + barTitle: '高级功能'.tr, haveBack: true, iconColor: Colors.black, titleColor: Colors.black, backgroundColor: Colors.white), body: Column( - children: [ + children: [ Expanded( child: ListView( - children: [ + children: [ _topShowState(), _benefitsContent(), Container(height: 20.h, color: const Color(0xFFF5F5F5)), @@ -69,60 +72,89 @@ class _ValueAddedServicesHighFunctionPageState topRight: Radius.circular(30.h), ), ), - child: GestureDetector( - onTap: () { - Get.toNamed(Routers.advancedFunctionRecordPage, - arguments: UseRecordListArg.vip); - }, - child: Container( - color: Colors.transparent, - child: Stack( - alignment: AlignmentDirectional.centerStart, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - // crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "当前状态:已开通".tr, - style: TextStyle( - fontSize: 24.sp, fontWeight: FontWeight.w600), - ), - SizedBox(height: 5.h), - Obx(() => Text( - "${TranslationLoader.lanKeys!.periodValidity!.tr}:${state.vipExpireDate.value}", - style: TextStyle( - fontSize: 20.sp, fontWeight: FontWeight.w600), - )), - ], // - ), - ], - ), - Positioned( - bottom: 0.h, - right: 0.w, - child: Container( - width: 90.w, - height: 50.h, - decoration: BoxDecoration( - color: const Color(0xFFBDCDDF), - borderRadius: BorderRadius.only( - topLeft: Radius.circular(30.h), - bottomLeft: Radius.circular(30.h), + child: Container( + color: Colors.transparent, + child: Stack( + alignment: AlignmentDirectional.centerStart, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '当前状态:已开通'.tr, + style: TextStyle( + fontSize: 24.sp, fontWeight: FontWeight.w600), + ), + SizedBox(height: 5.h), + Obx(() => Text( + '${TranslationLoader.lanKeys!.periodValidity!.tr}:${state.vipExpireDate.value}', + style: TextStyle( + fontSize: 20.sp, fontWeight: FontWeight.w600), + )), + ], // + ), + ], + ), + Positioned( + bottom: 0.h, + right: 0.w, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + GestureDetector( + onTap: () { + Get.toNamed(Routers.advancedFeaturesWebPage, + arguments: { + 'webBuyType': XSConstantMacro.webBuyTypeVip, + }); + }, + child: Container( + width: 110.w, + height: 50.h, + decoration: BoxDecoration( + color: const Color(0xFFBDCDDF), + borderRadius: BorderRadius.all(Radius.circular(30.h)), + ), + child: Center( + child: Text( + TranslationLoader.lanKeys!.buy!.tr, + style: TextStyle(fontSize: 22.sp), + )), ), ), - child: Center( - child: Text( - TranslationLoader.lanKeys!.record!.tr, - style: TextStyle(fontSize: 22.sp), - )), - )), - ], - ), + SizedBox( + width: 10.w, + ), + GestureDetector( + onTap: () { + Get.toNamed(Routers.advancedFunctionRecordPage, + arguments: UseRecordListArg.vip); + }, + child: Container( + width: 90.w, + height: 50.h, + decoration: BoxDecoration( + color: const Color(0xFFBDCDDF), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(30.h), + bottomLeft: Radius.circular(30.h), + ), + ), + child: Center( + child: Text( + TranslationLoader.lanKeys!.record!.tr, + style: TextStyle(fontSize: 22.sp), + )), + ), + ), + ], + )), + ], ), ), ); @@ -130,35 +162,42 @@ class _ValueAddedServicesHighFunctionPageState Widget _benefitsContent() { return Column( - children: [ + children: [ Container( // color: Colors.red, margin: EdgeInsets.only(left: 130.w, top: 50.h, right: 130.w), padding: EdgeInsets.only(left: 30.w), - child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [ - Image.asset('images/mine/icon_mine_highFunctionContent_left.png', - width: 30.w, height: 30.w), - Expanded( - child: Text( - TranslationLoader - .lanKeys!.advancedFeaturesAndBenefitsContent!.tr, - textAlign: TextAlign.center, - style: - TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600)), - ), - Image.asset('images/mine/icon_mine_highFunctionContent_right.png', - width: 30.w, height: 30.w) - ]), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'images/mine/icon_mine_highFunctionContent_left.png', + width: 30.w, + height: 30.w), + Expanded( + child: Text( + TranslationLoader + .lanKeys!.advancedFeaturesAndBenefitsContent!.tr, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 24.sp, fontWeight: FontWeight.w600)), + ), + Image.asset( + 'images/mine/icon_mine_highFunctionContent_right.png', + width: 30.w, + height: 30.w) + ]), ), SizedBox( height: 10.h, ), GestureDetector( onTap: () { - Navigator.pushNamed(context, Routers.webviewShowPage, arguments: { - "url": XSConstantMacro.vipServiceDetailURL, - "title": '权益内容'.tr - }); + Navigator.pushNamed(context, Routers.webviewShowPage, + arguments: { + 'url': XSConstantMacro.vipServiceDetailURL, + 'title': '权益内容'.tr + }); }, child: Container( margin: EdgeInsets.only(left: 20.w, right: 20.w), @@ -184,25 +223,25 @@ class _ValueAddedServicesHighFunctionPageState crossAxisSpacing: 8.h, // childAspectRatio: 1 / 0.5, physics: const NeverScrollableScrollPhysics(), - children: [ - _buildItem("images/mine/icon_mine_highFunctionContent_dxmb.png", + children: [ + _buildItem('images/mine/icon_mine_highFunctionContent_dxmb.png', TranslationLoader.lanKeys!.smsTemplate!.tr), - _buildItem("images/mine/icon_mine_highFunctionContent_yjmb.png", + _buildItem('images/mine/icon_mine_highFunctionContent_yjmb.png', TranslationLoader.lanKeys!.emailTemplate!.tr), - _buildItem("images/mine/icon_mine_highFunctionContent_sqgly.png", + _buildItem('images/mine/icon_mine_highFunctionContent_sqgly.png', TranslationLoader.lanKeys!.authorizedAdmin!.tr), - _buildItem("images/mine/icon_mine_highFunctionContent_sfz.png", + _buildItem('images/mine/icon_mine_highFunctionContent_sfz.png', TranslationLoader.lanKeys!.lockGroup!.tr), - _buildItem("images/mine/icon_mine_highFunctionContent_bjft.png", + _buildItem('images/mine/icon_mine_highFunctionContent_bjft.png', TranslationLoader.lanKeys!.sendGroupKey!.tr), // _buildItem("images/mine/icon_mine_highFunctionContent_bjft.png", // TranslationLoader.lanKeys!.markedHouseState!.tr), - _buildItem("images/mine/icon_mine_highFunctionContent_fkgj.png", + _buildItem('images/mine/icon_mine_highFunctionContent_fkgj.png', TranslationLoader.lanKeys!.cardIssuingtool!.tr), _buildItem( - "images/mine/icon_mine_highFunctionContent_fkgj.png", '推送'), + 'images/mine/icon_mine_highFunctionContent_fkgj.png', '推送'), _buildItem( - "images/mine/icon_mine_highFunctionContent_fkgj.png", '考勤'), + 'images/mine/icon_mine_highFunctionContent_fkgj.png', '考勤'), ], ), ), @@ -221,7 +260,7 @@ class _ValueAddedServicesHighFunctionPageState ), child: Column( // crossAxisAlignment: CrossAxisAlignment.start, - children: [ + children: [ Image.asset( img, width: 70.w, @@ -231,7 +270,7 @@ class _ValueAddedServicesHighFunctionPageState height: 10.h, ), Column( - children: [ + children: [ Text( title, style: TextStyle(fontSize: 22.sp), @@ -246,30 +285,36 @@ class _ValueAddedServicesHighFunctionPageState Widget _buyNotes() { return Column( - children: [ + children: [ Container( // color: Colors.red, margin: EdgeInsets.only(left: 110.w, top: 50.h, right: 110.w), padding: EdgeInsets.only(left: 30.w), - child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [ - Image.asset('images/mine/icon_mine_highFunctionContent_left.png', - width: 40.w, height: 40.w), - SizedBox( - width: 10.w, - ), - Expanded( - child: Text( - TranslationLoader - .lanKeys!.titleForBuyingAdvancedFeatures!.tr, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 24.sp, fontWeight: FontWeight.w600))), - SizedBox( - width: 10.w, - ), - Image.asset('images/mine/icon_mine_highFunctionContent_right.png', - width: 40.w, height: 40.w) - ]), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'images/mine/icon_mine_highFunctionContent_left.png', + width: 40.w, + height: 40.w), + SizedBox( + width: 10.w, + ), + Expanded( + child: Text( + TranslationLoader + .lanKeys!.titleForBuyingAdvancedFeatures!.tr, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 24.sp, fontWeight: FontWeight.w600))), + SizedBox( + width: 10.w, + ), + Image.asset( + 'images/mine/icon_mine_highFunctionContent_right.png', + width: 40.w, + height: 40.w) + ]), ), SizedBox(height: 20.h), Container( @@ -295,7 +340,7 @@ class _ValueAddedServicesHighFunctionPageState return Container( margin: EdgeInsets.only(top: 30.h, bottom: 30.h), child: Row( - children: [ + children: [ Visibility( child: Container( height: 70.h, diff --git a/lib/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart b/lib/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart index a5d2c715..1462f56e 100755 --- a/lib/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart +++ b/lib/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart @@ -49,13 +49,13 @@ class _ValueAddedServicesPageListState Image.asset('images/mine/icon_mine_valueAddedServices_note.png'), TranslationLoader.lanKeys!.note!.tr, () { Get.toNamed(Routers.valueAddedServicesNoteAndEmailDetailPage, - arguments: {'type': 1}); + arguments: {'type': 1}); }), _valueAddedServicesItem( Image.asset('images/mine/icon_mine_valueAddedServices_email.png'), TranslationLoader.lanKeys!.mail!.tr, () { Get.toNamed(Routers.valueAddedServicesNoteAndEmailDetailPage, - arguments: {'type': 2}); + arguments: {'type': 2}); }), _valueAddedServicesItem( Image.asset( diff --git a/lib/tools/tf_loginInput.dart b/lib/tools/tf_loginInput.dart index b98da00f..c4f45c2b 100755 --- a/lib/tools/tf_loginInput.dart +++ b/lib/tools/tf_loginInput.dart @@ -66,13 +66,14 @@ class _LoginInputState extends State { border: Border(bottom: BorderSide(width: 0.5.h, color: Colors.grey)), ), child: Row( - children: [ - widget.isHaveLeftWidget == true - ? widget.leftWidget ?? const SizedBox() - : SizedBox( - width: 20.w, - height: 40.w, - ), + children: [ + if (widget.isHaveLeftWidget == true) + widget.leftWidget ?? const SizedBox() + else + SizedBox( + width: 20.w, + height: 40.w, + ), Expanded( child: Stack( children: [ @@ -122,8 +123,7 @@ class _LoginInputState extends State { if (isPwd) Padding( padding: EdgeInsets.only( - top: - F.sw(skyCall: () => 27.h, xhjCall: () => 39.h)), + top: F.sw(skyCall: () => 27.h, xhjCall: () => 39.h)), child: Text( pwd, style: TextStyle(