Merge branch 'release' of gitee.com:starlock-cn/app-starlock into release

This commit is contained in:
“DaisyWu” 2024-07-08 18:18:26 +08:00
commit 3373b16d74
8 changed files with 199 additions and 144 deletions

View File

@ -146,7 +146,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
), ),
), ),
hintText: hintText:
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}", '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}',
inputFormatters: <TextInputFormatter>[ inputFormatters: <TextInputFormatter>[
LengthLimitingTextInputFormatter(20), LengthLimitingTextInputFormatter(20),
]), ]),

View File

@ -6,7 +6,6 @@ import '../checkingInSetStaffList/checkingInStaffList_entity.dart';
import 'checkingInAddStaffSelectKey_entity.dart'; import 'checkingInAddStaffSelectKey_entity.dart';
class CheckingInAddStaffState { class CheckingInAddStaffState {
CheckingInAddStaffState() { CheckingInAddStaffState() {
final Map<dynamic, dynamic> map = Get.arguments; final Map<dynamic, dynamic> map = Get.arguments;
getKeyInfosData.value = map['getKeyInfosData']; getKeyInfosData.value = map['getKeyInfosData'];
@ -43,8 +42,15 @@ class CheckingInAddStaffState {
} else { } else {
appUnHaveAccount.value = true; appUnHaveAccount.value = true;
} }
if ((staffListItemData.value.cardStatus ?? 0) == 1) {
//
appUnHaveAccount.value = true;
attendanceWayNumber.value = '';
} }
} }
}
final Rx<LockListInfoItemEntity> getKeyInfosData = final Rx<LockListInfoItemEntity> getKeyInfosData =
LockListInfoItemEntity().obs; LockListInfoItemEntity().obs;
final RxString companyId = ''.obs; final RxString companyId = ''.obs;

View File

@ -76,7 +76,7 @@ class LockEscalationLogic extends BaseGetXController {
} }
// ota // ota
void blueOTAUpgrade(Map data, List<int> token) { void blueOTAUpgrade(Map<dynamic, dynamic> data, List<int> token) {
BlueManage().blueSendData(BlueManage().connectDeviceName, BlueManage().blueSendData(BlueManage().connectDeviceName,
(BluetoothConnectionState deviceConnectionState) async { (BluetoothConnectionState deviceConnectionState) async {
if (deviceConnectionState == BluetoothConnectionState.connected) { if (deviceConnectionState == BluetoothConnectionState.connected) {
@ -92,8 +92,8 @@ class LockEscalationLogic extends BaseGetXController {
lockID: BlueManage().connectDeviceName, lockID: BlueManage().connectDeviceName,
userID: uid, userID: uid,
keyID: BlueManage().connectDeviceName, keyID: BlueManage().connectDeviceName,
platform: int.tryParse(data['platform']) ?? 0, platform: int.tryParse(data['platform'] ?? '0'),
product: int.tryParse(data['product']) ?? 0, product: int.tryParse(data['product'] ?? '0'),
hwVersion: data['hwVersion'], hwVersion: data['hwVersion'],
fwVersion: data['fwVersion'], fwVersion: data['fwVersion'],
fwSize: data['fwSize'], fwSize: data['fwSize'],

View File

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:star_lock/flavors.dart';
import '../../../app_settings/app_colors.dart'; import '../../../app_settings/app_colors.dart';
import '../entity/lockListInfo_entity.dart'; import '../entity/lockListInfo_entity.dart';
@ -34,7 +35,7 @@ class _LockListGroupViewState extends State<LockListGroupView> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: <Widget>[
Container( Container(
color: widget.backgroundColor ?? Colors.white, color: widget.backgroundColor ?? Colors.white,
height: 80.h, height: 80.h,
@ -54,23 +55,34 @@ class _LockListGroupViewState extends State<LockListGroupView> {
} }
List<Widget> _buildExpandRowList() { List<Widget> _buildExpandRowList() {
List<Widget> widgetList = []; final List<Widget> widgetList = <Widget>[];
widgetList.add(GestureDetector( widgetList.add(GestureDetector(
child: Container( child: Container(
width: ScreenUtil().screenWidth, width: ScreenUtil().screenWidth,
color: widget.backgroundColor ?? Colors.white, color: widget.backgroundColor ?? Colors.white,
child: Row( child: Row(
children: [ children: <Widget>[
SizedBox(width: 40.w), SizedBox(width: 40.w),
Text( F.sw(
skyCall: () => Text(
widget.groupItem.groupName ?? '', widget.groupItem.groupName ?? '',
style: widget.textStyle ?? style: widget.textStyle ??
TextStyle(color: AppColors.blackColor, fontSize: 22.sp), 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),
), ),
Expanded(
child: SizedBox(
width: 10.w,
)), )),
SizedBox(
width: 10.w,
),
AnimatedRotation( AnimatedRotation(
turns: _isExpanded ? -0.5 : 0, turns: _isExpanded ? -0.5 : 0,
duration: _animationDuration, duration: _animationDuration,

View File

@ -16,9 +16,6 @@ class AdvancedFeaturesWebPage extends StatefulWidget {
} }
class _AdvancedFeaturesWebPageState extends State<AdvancedFeaturesWebPage> { class _AdvancedFeaturesWebPageState extends State<AdvancedFeaturesWebPage> {
final AdvancedFeaturesWebLogic logic = Get.put(AdvancedFeaturesWebLogic());
final AdvancedFeaturesWebState state =
Get.find<AdvancedFeaturesWebLogic>().state;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -32,18 +29,13 @@ class _AdvancedFeaturesWebPageState extends State<AdvancedFeaturesWebPage> {
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: const Color(0xFFFFFFFF), backgroundColor: const Color(0xFFFFFFFF),
appBar: TitleAppBar( appBar: TitleAppBar(
barTitle: state.webBuyTitle.value, barTitle: logic.state.webBuyTitle.value,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor, backgroundColor: AppColors.mainColor,
backAction: () => logic.canGoBack(false), backAction: () => logic.canGoBack(false),
), ),
body: Obx(() => Column( body: Obx(() => Column(
children: <Widget>[ children: <Widget>[
PopScope(
onPopInvoked: logic.canGoBack,
canPop: false,
child: const SizedBox(),
),
Container( Container(
padding: EdgeInsets.only(bottom: 10.w), padding: EdgeInsets.only(bottom: 10.w),
child: LinearProgressIndicator( child: LinearProgressIndicator(

View File

@ -3,6 +3,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.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_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 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/use_record_list_arg.dart';
import '../../../appRouters.dart'; import '../../../appRouters.dart';
@ -20,8 +21,10 @@ class ValueAddedServicesHighFunctionPage extends StatefulWidget {
class _ValueAddedServicesHighFunctionPageState class _ValueAddedServicesHighFunctionPageState
extends State<ValueAddedServicesHighFunctionPage> { extends State<ValueAddedServicesHighFunctionPage> {
final logic = Get.put(ValueAddedServicesHighFunctionLogic()); final ValueAddedServicesHighFunctionLogic logic =
final state = Get.find<ValueAddedServicesHighFunctionLogic>().state; Get.put(ValueAddedServicesHighFunctionLogic());
final ValueAddedServicesHighFunctionState state =
Get.find<ValueAddedServicesHighFunctionLogic>().state;
@override @override
initState() { initState() {
@ -35,16 +38,16 @@ class _ValueAddedServicesHighFunctionPageState
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBar: TitleAppBar( appBar: TitleAppBar(
barTitle: "高级功能".tr, barTitle: '高级功能'.tr,
haveBack: true, haveBack: true,
iconColor: Colors.black, iconColor: Colors.black,
titleColor: Colors.black, titleColor: Colors.black,
backgroundColor: Colors.white), backgroundColor: Colors.white),
body: Column( body: Column(
children: [ children: <Widget>[
Expanded( Expanded(
child: ListView( child: ListView(
children: [ children: <Widget>[
_topShowState(), _topShowState(),
_benefitsContent(), _benefitsContent(),
Container(height: 20.h, color: const Color(0xFFF5F5F5)), Container(height: 20.h, color: const Color(0xFFF5F5F5)),
@ -69,32 +72,27 @@ class _ValueAddedServicesHighFunctionPageState
topRight: Radius.circular(30.h), topRight: Radius.circular(30.h),
), ),
), ),
child: GestureDetector(
onTap: () {
Get.toNamed(Routers.advancedFunctionRecordPage,
arguments: UseRecordListArg.vip);
},
child: Container( child: Container(
color: Colors.transparent, color: Colors.transparent,
child: Stack( child: Stack(
alignment: AlignmentDirectional.centerStart, alignment: AlignmentDirectional.centerStart,
children: [ children: <Widget>[
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: <Widget>[
Column( Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: <Widget>[
Text( Text(
"当前状态:已开通".tr, '当前状态:已开通'.tr,
style: TextStyle( style: TextStyle(
fontSize: 24.sp, fontWeight: FontWeight.w600), fontSize: 24.sp, fontWeight: FontWeight.w600),
), ),
SizedBox(height: 5.h), SizedBox(height: 5.h),
Obx(() => Text( Obx(() => Text(
"${TranslationLoader.lanKeys!.periodValidity!.tr}:${state.vipExpireDate.value}", '${TranslationLoader.lanKeys!.periodValidity!.tr}:${state.vipExpireDate.value}',
style: TextStyle( style: TextStyle(
fontSize: 20.sp, fontWeight: FontWeight.w600), fontSize: 20.sp, fontWeight: FontWeight.w600),
)), )),
@ -105,6 +103,38 @@ class _ValueAddedServicesHighFunctionPageState
Positioned( Positioned(
bottom: 0.h, bottom: 0.h,
right: 0.w, right: 0.w,
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
GestureDetector(
onTap: () {
Get.toNamed(Routers.advancedFeaturesWebPage,
arguments: <String, int>{
'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),
)),
),
),
SizedBox(
width: 10.w,
),
GestureDetector(
onTap: () {
Get.toNamed(Routers.advancedFunctionRecordPage,
arguments: UseRecordListArg.vip);
},
child: Container( child: Container(
width: 90.w, width: 90.w,
height: 50.h, height: 50.h,
@ -120,34 +150,42 @@ class _ValueAddedServicesHighFunctionPageState
TranslationLoader.lanKeys!.record!.tr, TranslationLoader.lanKeys!.record!.tr,
style: TextStyle(fontSize: 22.sp), style: TextStyle(fontSize: 22.sp),
)), )),
),
),
],
)), )),
], ],
), ),
), ),
),
); );
} }
Widget _benefitsContent() { Widget _benefitsContent() {
return Column( return Column(
children: [ children: <Widget>[
Container( Container(
// color: Colors.red, // color: Colors.red,
margin: EdgeInsets.only(left: 130.w, top: 50.h, right: 130.w), margin: EdgeInsets.only(left: 130.w, top: 50.h, right: 130.w),
padding: EdgeInsets.only(left: 30.w), padding: EdgeInsets.only(left: 30.w),
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [ child: Row(
Image.asset('images/mine/icon_mine_highFunctionContent_left.png', mainAxisAlignment: MainAxisAlignment.center,
width: 30.w, height: 30.w), children: <Widget>[
Image.asset(
'images/mine/icon_mine_highFunctionContent_left.png',
width: 30.w,
height: 30.w),
Expanded( Expanded(
child: Text( child: Text(
TranslationLoader TranslationLoader
.lanKeys!.advancedFeaturesAndBenefitsContent!.tr, .lanKeys!.advancedFeaturesAndBenefitsContent!.tr,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: style: TextStyle(
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600)), fontSize: 24.sp, fontWeight: FontWeight.w600)),
), ),
Image.asset('images/mine/icon_mine_highFunctionContent_right.png', Image.asset(
width: 30.w, height: 30.w) 'images/mine/icon_mine_highFunctionContent_right.png',
width: 30.w,
height: 30.w)
]), ]),
), ),
SizedBox( SizedBox(
@ -155,9 +193,10 @@ class _ValueAddedServicesHighFunctionPageState
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
Navigator.pushNamed(context, Routers.webviewShowPage, arguments: { Navigator.pushNamed(context, Routers.webviewShowPage,
"url": XSConstantMacro.vipServiceDetailURL, arguments: <String, String>{
"title": '权益内容'.tr 'url': XSConstantMacro.vipServiceDetailURL,
'title': '权益内容'.tr
}); });
}, },
child: Container( child: Container(
@ -184,25 +223,25 @@ class _ValueAddedServicesHighFunctionPageState
crossAxisSpacing: 8.h, crossAxisSpacing: 8.h,
// childAspectRatio: 1 / 0.5, // childAspectRatio: 1 / 0.5,
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
children: [ children: <Widget>[
_buildItem("images/mine/icon_mine_highFunctionContent_dxmb.png", _buildItem('images/mine/icon_mine_highFunctionContent_dxmb.png',
TranslationLoader.lanKeys!.smsTemplate!.tr), TranslationLoader.lanKeys!.smsTemplate!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_yjmb.png", _buildItem('images/mine/icon_mine_highFunctionContent_yjmb.png',
TranslationLoader.lanKeys!.emailTemplate!.tr), TranslationLoader.lanKeys!.emailTemplate!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_sqgly.png", _buildItem('images/mine/icon_mine_highFunctionContent_sqgly.png',
TranslationLoader.lanKeys!.authorizedAdmin!.tr), TranslationLoader.lanKeys!.authorizedAdmin!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_sfz.png", _buildItem('images/mine/icon_mine_highFunctionContent_sfz.png',
TranslationLoader.lanKeys!.lockGroup!.tr), TranslationLoader.lanKeys!.lockGroup!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_bjft.png", _buildItem('images/mine/icon_mine_highFunctionContent_bjft.png',
TranslationLoader.lanKeys!.sendGroupKey!.tr), TranslationLoader.lanKeys!.sendGroupKey!.tr),
// _buildItem("images/mine/icon_mine_highFunctionContent_bjft.png", // _buildItem("images/mine/icon_mine_highFunctionContent_bjft.png",
// TranslationLoader.lanKeys!.markedHouseState!.tr), // TranslationLoader.lanKeys!.markedHouseState!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_fkgj.png", _buildItem('images/mine/icon_mine_highFunctionContent_fkgj.png',
TranslationLoader.lanKeys!.cardIssuingtool!.tr), TranslationLoader.lanKeys!.cardIssuingtool!.tr),
_buildItem( _buildItem(
"images/mine/icon_mine_highFunctionContent_fkgj.png", '推送'), 'images/mine/icon_mine_highFunctionContent_fkgj.png', '推送'),
_buildItem( _buildItem(
"images/mine/icon_mine_highFunctionContent_fkgj.png", '考勤'), 'images/mine/icon_mine_highFunctionContent_fkgj.png', '考勤'),
], ],
), ),
), ),
@ -221,7 +260,7 @@ class _ValueAddedServicesHighFunctionPageState
), ),
child: Column( child: Column(
// crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: <Widget>[
Image.asset( Image.asset(
img, img,
width: 70.w, width: 70.w,
@ -231,7 +270,7 @@ class _ValueAddedServicesHighFunctionPageState
height: 10.h, height: 10.h,
), ),
Column( Column(
children: [ children: <Widget>[
Text( Text(
title, title,
style: TextStyle(fontSize: 22.sp), style: TextStyle(fontSize: 22.sp),
@ -246,14 +285,18 @@ class _ValueAddedServicesHighFunctionPageState
Widget _buyNotes() { Widget _buyNotes() {
return Column( return Column(
children: [ children: <Widget>[
Container( Container(
// color: Colors.red, // color: Colors.red,
margin: EdgeInsets.only(left: 110.w, top: 50.h, right: 110.w), margin: EdgeInsets.only(left: 110.w, top: 50.h, right: 110.w),
padding: EdgeInsets.only(left: 30.w), padding: EdgeInsets.only(left: 30.w),
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [ child: Row(
Image.asset('images/mine/icon_mine_highFunctionContent_left.png', mainAxisAlignment: MainAxisAlignment.center,
width: 40.w, height: 40.w), children: <Widget>[
Image.asset(
'images/mine/icon_mine_highFunctionContent_left.png',
width: 40.w,
height: 40.w),
SizedBox( SizedBox(
width: 10.w, width: 10.w,
), ),
@ -267,8 +310,10 @@ class _ValueAddedServicesHighFunctionPageState
SizedBox( SizedBox(
width: 10.w, width: 10.w,
), ),
Image.asset('images/mine/icon_mine_highFunctionContent_right.png', Image.asset(
width: 40.w, height: 40.w) 'images/mine/icon_mine_highFunctionContent_right.png',
width: 40.w,
height: 40.w)
]), ]),
), ),
SizedBox(height: 20.h), SizedBox(height: 20.h),
@ -295,7 +340,7 @@ class _ValueAddedServicesHighFunctionPageState
return Container( return Container(
margin: EdgeInsets.only(top: 30.h, bottom: 30.h), margin: EdgeInsets.only(top: 30.h, bottom: 30.h),
child: Row( child: Row(
children: [ children: <Widget>[
Visibility( Visibility(
child: Container( child: Container(
height: 70.h, height: 70.h,

View File

@ -49,13 +49,13 @@ class _ValueAddedServicesPageListState
Image.asset('images/mine/icon_mine_valueAddedServices_note.png'), Image.asset('images/mine/icon_mine_valueAddedServices_note.png'),
TranslationLoader.lanKeys!.note!.tr, () { TranslationLoader.lanKeys!.note!.tr, () {
Get.toNamed(Routers.valueAddedServicesNoteAndEmailDetailPage, Get.toNamed(Routers.valueAddedServicesNoteAndEmailDetailPage,
arguments: {'type': 1}); arguments: <String, int>{'type': 1});
}), }),
_valueAddedServicesItem( _valueAddedServicesItem(
Image.asset('images/mine/icon_mine_valueAddedServices_email.png'), Image.asset('images/mine/icon_mine_valueAddedServices_email.png'),
TranslationLoader.lanKeys!.mail!.tr, () { TranslationLoader.lanKeys!.mail!.tr, () {
Get.toNamed(Routers.valueAddedServicesNoteAndEmailDetailPage, Get.toNamed(Routers.valueAddedServicesNoteAndEmailDetailPage,
arguments: {'type': 2}); arguments: <String, int>{'type': 2});
}), }),
_valueAddedServicesItem( _valueAddedServicesItem(
Image.asset( Image.asset(

View File

@ -66,10 +66,11 @@ class _LoginInputState extends State<LoginInput> {
border: Border(bottom: BorderSide(width: 0.5.h, color: Colors.grey)), border: Border(bottom: BorderSide(width: 0.5.h, color: Colors.grey)),
), ),
child: Row( child: Row(
children: [ children: <Widget>[
widget.isHaveLeftWidget == true if (widget.isHaveLeftWidget == true)
? widget.leftWidget ?? const SizedBox() widget.leftWidget ?? const SizedBox()
: SizedBox( else
SizedBox(
width: 20.w, width: 20.w,
height: 40.w, height: 40.w,
), ),
@ -122,8 +123,7 @@ class _LoginInputState extends State<LoginInput> {
if (isPwd) if (isPwd)
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: top: F.sw(skyCall: () => 27.h, xhjCall: () => 39.h)),
F.sw(skyCall: () => 27.h, xhjCall: () => 39.h)),
child: Text( child: Text(
pwd, pwd,
style: TextStyle( style: TextStyle(