1、修改密码模块bug。2、增加版本号给欧阳打包
This commit is contained in:
parent
0ed1f579c7
commit
7295fbae50
@ -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,
|
||||
|
||||
@ -143,6 +143,8 @@ class CheckingInAddStaffLogic extends BaseGetXController{
|
||||
super.onReady();
|
||||
print("onReady()");
|
||||
_initLoadDataAction();
|
||||
|
||||
changeInput(state.staffNameController);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -9,11 +9,14 @@ class PasswordKeyDetailState {
|
||||
final changeType = '1'.obs; //1-通过APP走蓝牙修改,不传默认1,必需先通过APP 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"];
|
||||
|
||||
@ -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),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -261,7 +261,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> wit
|
||||
);
|
||||
}
|
||||
|
||||
// 自定义是否永久
|
||||
// 自定义是管理员密码
|
||||
Widget keyIfAdministratorWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
|
||||
@ -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!;
|
||||
|
||||
@ -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(() {});
|
||||
});
|
||||
}
|
||||
|
||||
@ -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(),
|
||||
]
|
||||
),
|
||||
);
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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+2024032802:1、打包斯凯、预发布环境给欧阳测试
|
||||
# 1.0.22+20240403:1、打包预发布环境给欧阳测试
|
||||
version: 1.0.22+20240403
|
||||
# 1.0.23+20240406:1、打包预发布环境给欧阳测试
|
||||
|
||||
version: 1.0.23+20240406
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user