1、修改密码模块bug。2、增加版本号给欧阳打包

This commit is contained in:
魏少阳 2024-04-06 09:19:35 +08:00
parent 0ed1f579c7
commit 7295fbae50
15 changed files with 80 additions and 48 deletions

View File

@ -196,14 +196,14 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
Widget middleTFWidget() { Widget middleTFWidget() {
return Column( return Column(
children: [ children: [
LoginInput( Obx(() => LoginInput(
controller: state.phoneOrEmailController, controller: state.phoneOrEmailController,
onchangeAction: (v) { onchangeAction: (v) {
logic.checkNext(state.phoneOrEmailController); logic.checkNext(state.phoneOrEmailController);
}, },
leftWidget: leftWidget:
// Image.asset('images/icon_login_account.png', width: 30.w, height: 30.w,), // Image.asset('images/icon_login_account.png', width: 30.w, height: 30.w,),
Padding( Padding(
padding: EdgeInsets.only(right: 10.w, left: 5.w), padding: EdgeInsets.only(right: 10.w, left: 5.w),
child: Image.asset( child: Image.asset(
'images/icon_login_account.png', 'images/icon_login_account.png',
@ -211,12 +211,12 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
height: 30.w, height: 30.w,
), ),
), ),
hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${state.isIphoneType.value ? "手机号" : TranslationLoader.lanKeys!.email!.tr}",
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
inputFormatters: [ inputFormatters: [
// FilteringTextInputFormatter.allow(RegExp('[0-9]')), // FilteringTextInputFormatter.allow(RegExp('[0-9]')),
LengthLimitingTextInputFormatter(30), LengthLimitingTextInputFormatter(30),
]), ])),
SizedBox(height: 10.w), SizedBox(height: 10.w),
LoginInput( LoginInput(
controller: state.pwdController, controller: state.pwdController,

View File

@ -143,6 +143,8 @@ class CheckingInAddStaffLogic extends BaseGetXController{
super.onReady(); super.onReady();
print("onReady()"); print("onReady()");
_initLoadDataAction(); _initLoadDataAction();
changeInput(state.staffNameController);
} }
@override @override

View File

@ -65,10 +65,10 @@ class AdminOpenLockPasswordLogic extends BaseGetXController{
var privateKey = await Storage.getStringList(saveBluePrivateKey); var privateKey = await Storage.getStringList(saveBluePrivateKey);
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!); List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
IoSenderManage.changeAdministratorPasswordCommand( IoSenderManage.senderCustomPasswordsCommand(
keyID: "1", keyID: "1",
userID: await Storage.getUid(), userID: await Storage.getUid(),
pwdNo: 0, pwdNo: 254,
pwd:state.changePwdController.text, pwd:state.changePwdController.text,
useCountLimit: 0xff, useCountLimit: 0xff,
startTime: 0x11223344, startTime: 0x11223344,
@ -237,10 +237,23 @@ class AdminOpenLockPasswordLogic extends BaseGetXController{
List<int> getTokenList = changeStringListToIntList(token!); List<int> getTokenList = changeStringListToIntList(token!);
print("openDoorTokenPubToken:$getTokenList"); print("openDoorTokenPubToken:$getTokenList");
IoSenderManage.changeAdministratorPasswordCommand( // IoSenderManage.changeAdministratorPasswordCommand(
// keyID: "1",
// userID: await Storage.getUid(),
// pwdNo: 0,
// pwd:state.changePwdController.text,
// useCountLimit: 0xff,
// startTime: 0x11223344,
// endTime: 0x11223344,
// needAuthor: 1,
// signKey: signKeyDataList,
// privateKey: getPrivateKeyList,
// token: getTokenList);
IoSenderManage.senderCustomPasswordsCommand(
keyID: "1", keyID: "1",
userID: await Storage.getUid(), userID: await Storage.getUid(),
pwdNo: 0, pwdNo: 254,
pwd:state.changePwdController.text, pwd:state.changePwdController.text,
useCountLimit: 0xff, useCountLimit: 0xff,
startTime: 0x11223344, startTime: 0x11223344,

View File

@ -55,10 +55,8 @@ class PasswordKeyDetailLogic extends BaseGetXController {
String getUseDateStr() { String getUseDateStr() {
int? getPwdType = state.itemData.value.keyboardPwdType; int? getPwdType = state.itemData.value.keyboardPwdType;
String useDateStr = ''; String useDateStr = '';
DateTime startDateStr = DateTime startDateStr = DateTime.fromMillisecondsSinceEpoch(state.itemData.value.startDate!);
DateTime.fromMillisecondsSinceEpoch(state.itemData.value.startDate!); DateTime endDateStr = DateTime.fromMillisecondsSinceEpoch(state.itemData.value.endDate!);
DateTime endDateStr =
DateTime.fromMillisecondsSinceEpoch(state.itemData.value.endDate!);
int starHour = startDateStr.hour; int starHour = startDateStr.hour;
int endHour = endDateStr.hour; int endHour = endDateStr.hour;
@ -67,62 +65,75 @@ class PasswordKeyDetailLogic extends BaseGetXController {
// 1 6使 // 1 6使
useDateStr = useDateStr =
'${startDateStr.toLocal().toString().substring(0, 16)}\n${endDateStr.toLocal().toString().substring(0, 16)}'; '${startDateStr.toLocal().toString().substring(0, 16)}\n${endDateStr.toLocal().toString().substring(0, 16)}';
state.isCirculation.value = false;
break; break;
case 2: case 2:
// 2 24使 // 2 24使
useDateStr = '永久'; useDateStr = '永久';
state.isCirculation.value = false;
break; break;
case 3: case 3:
// 3 24使 // 3 24使
useDateStr = useDateStr =
'${startDateStr.toLocal().toString().substring(0, 16)}\n${endDateStr.toLocal().toString().substring(0, 16)}'; '${startDateStr.toLocal().toString().substring(0, 16)}\n${endDateStr.toLocal().toString().substring(0, 16)}';
state.isCirculation.value = false;
break; break;
case 4: case 4:
// 4 使使 // 4 使使
useDateStr = useDateStr =
'${startDateStr.toLocal().toString().substring(0, 16)}\n${endDateStr.toLocal().toString().substring(0, 16)}'; '${startDateStr.toLocal().toString().substring(0, 16)}\n${endDateStr.toLocal().toString().substring(0, 16)}';
state.isCirculation.value = false;
break; break;
case 5: case 5:
// 5 // 5
useDateStr = '周末 $starHour:00-$endHour:00'; useDateStr = '周末 $starHour:00-$endHour:00';
state.isCirculation.value = true;
break; break;
case 6: case 6:
// 6 // 6
useDateStr = '周日 $starHour:00-$endHour:00'; useDateStr = '周日 $starHour:00-$endHour:00';
state.isCirculation.value = true;
break; break;
case 7: case 7:
// 7 // 7
useDateStr = '工作日 $starHour:00-$endHour:00'; useDateStr = '工作日 $starHour:00-$endHour:00';
state.isCirculation.value = true;
break; break;
case 8: case 8:
// 8 // 8
useDateStr = '周一 $starHour:00-$endHour:00'; useDateStr = '周一 $starHour:00-$endHour:00';
state.isCirculation.value = true;
break; break;
case 9: case 9:
// 9 // 9
useDateStr = '周二 $starHour:00-$endHour:00'; useDateStr = '周二 $starHour:00-$endHour:00';
state.isCirculation.value = true;
break; break;
case 10: case 10:
// 10 // 10
useDateStr = '周三 $starHour:00-$endHour:00'; useDateStr = '周三 $starHour:00-$endHour:00';
state.isCirculation.value = true;
break; break;
case 11: case 11:
// 11 // 11
useDateStr = '周四 $starHour:00-$endHour:00'; useDateStr = '周四 $starHour:00-$endHour:00';
state.isCirculation.value = true;
break; break;
case 12: case 12:
// 12 // 12
useDateStr = '周五 $starHour:00-$endHour:00'; useDateStr = '周五 $starHour:00-$endHour:00';
state.isCirculation.value = true;
break; break;
case 13: case 13:
// 13 // 13
useDateStr = '周六 $starHour:00-$endHour:00'; useDateStr = '周六 $starHour:00-$endHour:00';
state.isCirculation.value = true;
break; break;
case 14: case 14:
// 14 // 14
useDateStr = '周天 $starHour:00-$endHour:00'; useDateStr = '周天 $starHour:00-$endHour:00';
state.isCirculation.value = true;
break; break;
default: default:
} }
return useDateStr; return useDateStr;

View File

@ -4,6 +4,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_logic.dart'; import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_logic.dart';
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart'; import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart';
import 'package:star_lock/tools/dateTool.dart';
import 'package:star_lock/tools/showTFView.dart'; import 'package:star_lock/tools/showTFView.dart';
import '../../../../appRouters.dart'; import '../../../../appRouters.dart';
@ -53,13 +54,10 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
Obx(() => CommonItem( Obx(() => CommonItem(
leftTitel: TranslationLoader.lanKeys!.password!.tr, leftTitel: TranslationLoader.lanKeys!.password!.tr,
rightTitle: state.keyboardPwd.value, rightTitle: state.keyboardPwd.value,
isHaveDirection: (state.itemData.value.keyboardPwdType == 1 || isHaveDirection: state.itemData.value.isCustom! == 1 ? true : false,
state.itemData.value.keyboardPwdType == 4)
? false
: true,
isHaveLine: true, isHaveLine: true,
action: () { action: () {
if (state.itemData.value.keyboardPwdType == 1 || state.itemData.value.keyboardPwdType == 4) { if (state.itemData.value.isCustom! != 1) {
return; return;
} else { } else {
showCupertinoAlertDialog(context, state.inputPwdController); showCupertinoAlertDialog(context, state.inputPwdController);
@ -77,13 +75,12 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
Obx(() => CommonItem( Obx(() => CommonItem(
leftTitel: "有效期", leftTitel: "有效期",
rightTitle: logic.getUseDateStr(), rightTitle: logic.getUseDateStr(),
isHaveDirection: ((state.itemData.value.keyboardPwdType! > 3 && isHaveLine: state.isCirculation.value,
state.itemData.value.keyboardPwdType! < 15) || state.itemData.value.keyboardPwdType! == 1) ? false : true, isHaveDirection: state.itemData.value.isCustom! == 1 ? true : false,
allHeight: allHeight:
state.itemData.value.keyboardPwdType == 3 ? 90.h : 65.h, state.itemData.value.keyboardPwdType == 3 ? 90.h : 65.h,
action: () async { action: () async {
if ((state.itemData.value.keyboardPwdType! > 3 && if (state.itemData.value.isCustom! != 1) {
state.itemData.value.keyboardPwdType! < 15 ) || state.itemData.value.keyboardPwdType! == 1) {
return; return;
} }
var backData = await Get.toNamed(Routers.passwordKeyDetailChangeDatePage, arguments: { var backData = await Get.toNamed(Routers.passwordKeyDetailChangeDatePage, arguments: {
@ -98,6 +95,13 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
setState(() {}); setState(() {});
} }
})), })),
Obx(() => Visibility(
visible: state.isCirculation.value,
child: CommonItem(
leftTitel: "结束时间",
rightTitle: DateTool().dateToYMDHNString(state.itemData.value.endDate.toString()),
isHaveLine: true),
)),
Container(height: 10.h), Container(height: 10.h),
CommonItem( CommonItem(
leftTitel: TranslationLoader.lanKeys!.sender!.tr, leftTitel: TranslationLoader.lanKeys!.sender!.tr,

View File

@ -9,11 +9,14 @@ class PasswordKeyDetailState {
final changeType = '1'.obs; //1-APP走蓝牙修改1APP SDK蓝牙修改后调用该接口 2-WiFi锁修改WiFi锁或有连接网关2 final changeType = '1'.obs; //1-APP走蓝牙修改1APP SDK蓝牙修改后调用该接口 2-WiFi锁修改WiFi锁或有连接网关2
final keyboardPwd = ''.obs; final keyboardPwd = ''.obs;
final keyboardPwdName = ''.obs; final keyboardPwdName = ''.obs;
final keyboardPwdType = ''.obs;// 1 2 3 4 5 6 7 8 9 10 11 12 13 14
final isCirculation = false.obs;//
// final hoursStart = 0.obs; // final hoursStart = 0.obs;
// final hoursEnd = 0.obs; // final hoursEnd = 0.obs;
// final startDate = 0.obs; // final startDate = 0.obs;
// final endDate = 0.obs; // final endDate = 0.obs;
//
PasswordKeyDetailState() { PasswordKeyDetailState() {
Map map = Get.arguments; Map map = Get.arguments;
itemData.value = map["itemData"]; itemData.value = map["itemData"];

View File

@ -233,9 +233,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
useDateStr, useDateStr,
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(fontSize: 18.sp, color: AppColors.placeholderTextColor),
fontSize: 18.sp,
color: AppColors.placeholderTextColor),
), ),
), ),
], ],

View File

@ -19,14 +19,6 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
final PasswordKeyPerpetualState state = PasswordKeyPerpetualState(); final PasswordKeyPerpetualState state = PasswordKeyPerpetualState();
/// ///
// StreamSubscription? getPasswordTypeUpdateIndexEvent;
// void getPasswordTypeUpdateIndexAction() {
// getPasswordTypeUpdateIndexEvent =
// eventBus.on<GetPasswordTypeUpdateIndex>().listen((event) {
// state.widgetType.value = event.passwordType;
// });
// }
/** /**
1 6使 1 6使
2 24使 2 24使
@ -200,11 +192,11 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
IoSenderManage.senderCustomPasswordsCommand( IoSenderManage.senderCustomPasswordsCommand(
keyID: "1", keyID: "1",
userID: await Storage.getUid(), userID: await Storage.getUid(),
pwdNo: 1, pwdNo: state.isAdministrator.value == true ? 254 : 1,
pwd:state.pwdController.text, pwd:state.pwdController.text,
useCountLimit: 0xff, useCountLimit: 0xff,
startTime: 0x11223344, startTime: state.effectiveDateTime.value.millisecondsSinceEpoch~/1000,
endTime: 0x11223344, endTime: state.failureDateTime.value.millisecondsSinceEpoch~/1000,
needAuthor: 1, needAuthor: 1,
signKey: signKeyDataList, signKey: signKeyDataList,
privateKey: getPrivateKeyList, privateKey: getPrivateKeyList,
@ -264,8 +256,8 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
pwdNo: state.isAdministrator.value == true ? 254 : 1, pwdNo: state.isAdministrator.value == true ? 254 : 1,
pwd: state.pwdController.text, pwd: state.pwdController.text,
useCountLimit: 0xff, useCountLimit: 0xff,
startTime: 0x11223344, startTime: state.effectiveDateTime.value.millisecondsSinceEpoch~/1000,
endTime: 0x11223344, endTime: state.failureDateTime.value.millisecondsSinceEpoch~/1000,
needAuthor: 1, needAuthor: 1,
signKey: signKeyDataList, signKey: signKeyDataList,
privateKey: getPrivateKeyList, privateKey: getPrivateKeyList,

View File

@ -261,7 +261,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> wit
); );
} }
// //
Widget keyIfAdministratorWidget() { Widget keyIfAdministratorWidget() {
return Column( return Column(
children: [ children: [

View File

@ -9,8 +9,8 @@ class ExpireFaceLogic extends BaseGetXController {
ExpireFaceState state = ExpireFaceState(); ExpireFaceState state = ExpireFaceState();
// //
Future<ExpireFingerprintEntity> expirFaceListRequest() async { Future<ExpireFingerprintEntity> expireFaceList() async {
ExpireFingerprintEntity entity = await ApiRepository.to.expireFingerprintList(pageNo.toString(), pageSize.toString()); ExpireFingerprintEntity entity = await ApiRepository.to.expireFaceList(pageNo.toString(), pageSize.toString());
if(entity.errorCode!.codeIsSuccessful){ if(entity.errorCode!.codeIsSuccessful){
if (pageNo == 1) { if (pageNo == 1) {
state.dataList.value = entity.data!.list!; state.dataList.value = entity.data!.list!;

View File

@ -23,7 +23,7 @@ class _ExpireFacePageState extends State<ExpireFacePage> {
final state = Get.find<ExpireFaceLogic>().state; final state = Get.find<ExpireFaceLogic>().state;
Future<void> getHttpData() async { Future<void> getHttpData() async {
logic.expirFaceListRequest().then((ExpireFingerprintEntity value){ logic.expireFaceList().then((ExpireFingerprintEntity value){
if(mounted) setState(() {}); if(mounted) setState(() {});
}); });
} }

View File

@ -28,7 +28,7 @@ class _ExpireLockManageTabbarState extends State<ExpireLockManageTabbar> with Si
ItemView(title: TranslationLoader.lanKeys!.password!.tr, selectType: "1"), ItemView(title: TranslationLoader.lanKeys!.password!.tr, selectType: "1"),
ItemView(title: TranslationLoader.lanKeys!.card!.tr, selectType: "2"), ItemView(title: TranslationLoader.lanKeys!.card!.tr, selectType: "2"),
ItemView(title: TranslationLoader.lanKeys!.fingerprint!.tr, selectType: "3"), ItemView(title: TranslationLoader.lanKeys!.fingerprint!.tr, selectType: "3"),
ItemView(title: TranslationLoader.lanKeys!.face!.tr, selectType: "4"), // ItemView(title: TranslationLoader.lanKeys!.face!.tr, selectType: "4"),
]; ];
@override @override
@ -101,7 +101,7 @@ class _ExpireLockManageTabbarState extends State<ExpireLockManageTabbar> with Si
ExpirePasswordPage(), ExpirePasswordPage(),
ExpireCardPage(), ExpireCardPage(),
ExpireFingerprintPage(), ExpireFingerprintPage(),
ExpireFacePage(), // ExpireFacePage(),
] ]
), ),
); );

View File

@ -627,6 +627,13 @@ class ApiRepository {
return ExpireFingerprintEntity.fromJson(res.body); return ExpireFingerprintEntity.fromJson(res.body);
} }
//
Future<ExpireFingerprintEntity> expireFaceList(
String pageNo, String pageSize) async {
final res = await apiProvider.expireFaceList(pageNo, pageSize);
return ExpireFingerprintEntity.fromJson(res.body);
}
// //
Future<PasswordKeyEntity> deleteKeyboardPwd( Future<PasswordKeyEntity> deleteKeyboardPwd(
String lockId, String keyboardPwdId, int deleteType) async { String lockId, String keyboardPwdId, int deleteType) async {

View File

@ -183,7 +183,7 @@ class BaseGetXController extends GetxController {
useDateStr = '单次'; useDateStr = '单次';
} else if (keyType == XSConstantMacro.keyTypeLoop) { } else if (keyType == XSConstantMacro.keyTypeLoop) {
// //
useDateStr = "循环"; useDateStr = "${DateTool().dateToYMDString(startDate.toString())}-${DateTool().dateToYMDString(endDate.toString())}";
} }
return useDateStr; return useDateStr;

View File

@ -25,7 +25,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# 1.0.21+2024032801同为斯凯环境也区分删减版和完整版通过main_sky_lite.dart/main_sky_full.dart切换 # 1.0.21+2024032801同为斯凯环境也区分删减版和完整版通过main_sky_lite.dart/main_sky_full.dart切换
# 1.0.21+20240328021、打包斯凯、预发布环境给欧阳测试 # 1.0.21+20240328021、打包斯凯、预发布环境给欧阳测试
# 1.0.22+202404031、打包预发布环境给欧阳测试 # 1.0.22+202404031、打包预发布环境给欧阳测试
version: 1.0.22+20240403 # 1.0.23+202404061、打包预发布环境给欧阳测试
version: 1.0.23+20240406
environment: environment:
sdk: '>=2.12.0 <3.0.0' sdk: '>=2.12.0 <3.0.0'