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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -23,7 +23,7 @@ class _ExpireFacePageState extends State<ExpireFacePage> {
final state = Get.find<ExpireFaceLogic>().state;
Future<void> getHttpData() async {
logic.expirFaceListRequest().then((ExpireFingerprintEntity value){
logic.expireFaceList().then((ExpireFingerprintEntity value){
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!.card!.tr, selectType: "2"),
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
@ -101,7 +101,7 @@ class _ExpireLockManageTabbarState extends State<ExpireLockManageTabbar> with Si
ExpirePasswordPage(),
ExpireCardPage(),
ExpireFingerprintPage(),
ExpireFacePage(),
// ExpireFacePage(),
]
),
);

View File

@ -627,6 +627,13 @@ class ApiRepository {
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(
String lockId, String keyboardPwdId, int deleteType) async {

View File

@ -183,7 +183,7 @@ class BaseGetXController extends GetxController {
useDateStr = '单次';
} else if (keyType == XSConstantMacro.keyTypeLoop) {
//
useDateStr = "循环";
useDateStr = "${DateTool().dateToYMDString(startDate.toString())}-${DateTool().dateToYMDString(endDate.toString())}";
}
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+20240328021、打包斯凯、预发布环境给欧阳测试
# 1.0.22+202404031、打包预发布环境给欧阳测试
version: 1.0.22+20240403
# 1.0.23+202404061、打包预发布环境给欧阳测试
version: 1.0.23+20240406
environment:
sdk: '>=2.12.0 <3.0.0'