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:
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}",
'${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}',
inputFormatters: <TextInputFormatter>[
LengthLimitingTextInputFormatter(20),
]),

View File

@ -6,7 +6,6 @@ import '../checkingInSetStaffList/checkingInStaffList_entity.dart';
import 'checkingInAddStaffSelectKey_entity.dart';
class CheckingInAddStaffState {
CheckingInAddStaffState() {
final Map<dynamic, dynamic> 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<LockListInfoItemEntity> getKeyInfosData =
LockListInfoItemEntity().obs;
final RxString companyId = ''.obs;

View File

@ -76,7 +76,7 @@ class LockEscalationLogic extends BaseGetXController {
}
// ota
void blueOTAUpgrade(Map data, List<int> token) {
void blueOTAUpgrade(Map<dynamic, dynamic> data, List<int> 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'],

View File

@ -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<LockListGroupView> {
Widget build(BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
children: <Widget>[
Container(
color: widget.backgroundColor ?? Colors.white,
height: 80.h,
@ -54,23 +55,34 @@ class _LockListGroupViewState extends State<LockListGroupView> {
}
List<Widget> _buildExpandRowList() {
List<Widget> widgetList = [];
final List<Widget> widgetList = <Widget>[];
widgetList.add(GestureDetector(
child: Container(
width: ScreenUtil().screenWidth,
color: widget.backgroundColor ?? Colors.white,
child: Row(
children: [
children: <Widget>[
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,

View File

@ -16,9 +16,6 @@ class AdvancedFeaturesWebPage extends StatefulWidget {
}
class _AdvancedFeaturesWebPageState extends State<AdvancedFeaturesWebPage> {
final AdvancedFeaturesWebLogic logic = Get.put(AdvancedFeaturesWebLogic());
final AdvancedFeaturesWebState state =
Get.find<AdvancedFeaturesWebLogic>().state;
@override
Widget build(BuildContext context) {
@ -32,18 +29,13 @@ class _AdvancedFeaturesWebPageState extends State<AdvancedFeaturesWebPage> {
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: <Widget>[
PopScope(
onPopInvoked: logic.canGoBack,
canPop: false,
child: const SizedBox(),
),
Container(
padding: EdgeInsets.only(bottom: 10.w),
child: LinearProgressIndicator(

View File

@ -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<ValueAddedServicesHighFunctionPage> {
final logic = Get.put(ValueAddedServicesHighFunctionLogic());
final state = Get.find<ValueAddedServicesHighFunctionLogic>().state;
final ValueAddedServicesHighFunctionLogic logic =
Get.put(ValueAddedServicesHighFunctionLogic());
final ValueAddedServicesHighFunctionState state =
Get.find<ValueAddedServicesHighFunctionLogic>().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: <Widget>[
Expanded(
child: ListView(
children: [
children: <Widget>[
_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: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
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: <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),
)),
),
),
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: <Widget>[
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: <Widget>[
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: <String, String>{
'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: <Widget>[
_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: <Widget>[
Image.asset(
img,
width: 70.w,
@ -231,7 +270,7 @@ class _ValueAddedServicesHighFunctionPageState
height: 10.h,
),
Column(
children: [
children: <Widget>[
Text(
title,
style: TextStyle(fontSize: 22.sp),
@ -246,30 +285,36 @@ class _ValueAddedServicesHighFunctionPageState
Widget _buyNotes() {
return Column(
children: [
children: <Widget>[
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: <Widget>[
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: <Widget>[
Visibility(
child: Container(
height: 70.h,

View File

@ -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: <String, int>{'type': 1});
}),
_valueAddedServicesItem(
Image.asset('images/mine/icon_mine_valueAddedServices_email.png'),
TranslationLoader.lanKeys!.mail!.tr, () {
Get.toNamed(Routers.valueAddedServicesNoteAndEmailDetailPage,
arguments: {'type': 2});
arguments: <String, int>{'type': 2});
}),
_valueAddedServicesItem(
Image.asset(

View File

@ -66,13 +66,14 @@ class _LoginInputState extends State<LoginInput> {
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: <Widget>[
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<LoginInput> {
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(