修改密码删除修改问题
This commit is contained in:
parent
79b51b00dc
commit
5f00e8fa93
@ -125,8 +125,6 @@ PODS:
|
|||||||
- Flutter
|
- Flutter
|
||||||
- package_info_plus (0.4.5):
|
- package_info_plus (0.4.5):
|
||||||
- Flutter
|
- Flutter
|
||||||
- partial_media_permissions (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- path_provider_foundation (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
@ -186,7 +184,6 @@ DEPENDENCIES:
|
|||||||
- just_audio (from `.symlinks/plugins/just_audio/ios`)
|
- just_audio (from `.symlinks/plugins/just_audio/ios`)
|
||||||
- network_info_plus (from `.symlinks/plugins/network_info_plus/ios`)
|
- network_info_plus (from `.symlinks/plugins/network_info_plus/ios`)
|
||||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||||
- partial_media_permissions (from `.symlinks/plugins/partial_media_permissions/ios`)
|
|
||||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||||
@ -277,8 +274,6 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/network_info_plus/ios"
|
:path: ".symlinks/plugins/network_info_plus/ios"
|
||||||
package_info_plus:
|
package_info_plus:
|
||||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||||
partial_media_permissions:
|
|
||||||
:path: ".symlinks/plugins/partial_media_permissions/ios"
|
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||||
permission_handler_apple:
|
permission_handler_apple:
|
||||||
@ -340,7 +335,6 @@ SPEC CHECKSUMS:
|
|||||||
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
|
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
|
||||||
network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f
|
network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f
|
||||||
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
||||||
partial_media_permissions: 0fd34002b1dbfd5e8b4c60eb0d99e8e755a77f76
|
|
||||||
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
||||||
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
||||||
ReachabilitySwift: 2128f3a8c9107e1ad33574c6e58e8285d460b149
|
ReachabilitySwift: 2128f3a8c9107e1ad33574c6e58e8285d460b149
|
||||||
|
|||||||
@ -32,7 +32,6 @@ class FingerprintDetailLogic extends BaseGetXController{
|
|||||||
|
|
||||||
// 添加指纹开始
|
// 添加指纹开始
|
||||||
Future<void> _replyAddFingerprintBegin(Reply reply) async {
|
Future<void> _replyAddFingerprintBegin(Reply reply) async {
|
||||||
|
|
||||||
int status = reply.data[2];
|
int status = reply.data[2];
|
||||||
switch(status){
|
switch(status){
|
||||||
case 0x00:
|
case 0x00:
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class PasswordKeyDetailLogic extends BaseGetXController {
|
|||||||
void _initReplySubscription() {
|
void _initReplySubscription() {
|
||||||
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((reply) async {
|
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((reply) async {
|
||||||
// 设置自定义密码
|
// 设置自定义密码
|
||||||
if (reply is SenderCustomPasswordsReply) {
|
if (reply is SenderCustomPasswordsReply && state.ifCurrentScreen.value == true) {
|
||||||
int status = reply.data[2];
|
int status = reply.data[2];
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
|
|||||||
@ -267,11 +267,11 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
|||||||
return senderDate;
|
return senderDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
void showCupertinoAlertDialog(
|
void showCupertinoAlertDialog(BuildContext context, TextEditingController inputController) {
|
||||||
BuildContext context, TextEditingController inputController) {
|
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
|
state.ifCurrentScreen.value = true;
|
||||||
return ShowTFView(
|
return ShowTFView(
|
||||||
title: inputController == state.inputNameController
|
title: inputController == state.inputNameController
|
||||||
? "${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}"
|
? "${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}"
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import 'package:date_format/date_format.dart';
|
|||||||
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:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/app_settings/app_settings.dart';
|
||||||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyDetailChangeDate/passwordKeyDetailChangeDate_logic.dart';
|
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyDetailChangeDate/passwordKeyDetailChangeDate_logic.dart';
|
||||||
import 'package:star_lock/tools/pickers/pickers.dart';
|
import 'package:star_lock/tools/pickers/pickers.dart';
|
||||||
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
||||||
@ -43,9 +44,16 @@ class _PasswordKeyDetailChangeDatePage
|
|||||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// if (state.lockId.value != 0 && state.pwdId.value.isNotEmpty) {
|
if (state.itemData.value.startDate! >= state.itemData.value.endDate!) {
|
||||||
|
logic.showToast("失效时间要大于生效时间".tr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DateTime.now().millisecondsSinceEpoch >= state.itemData.value.endDate!) {
|
||||||
|
logic.showToast("失效时间要大于当前时间".tr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
logic.senderCustomPasswords();
|
logic.senderCustomPasswords();
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -55,89 +63,77 @@ class _PasswordKeyDetailChangeDatePage
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget buildMainUI() {
|
Widget buildMainUI() {
|
||||||
String getStartDate = "";
|
// String getStartDate = "";
|
||||||
String getEndDate = "";
|
// String getEndDate = "";
|
||||||
if (state.itemData.value.startDate != 0) {
|
// if (state.itemData.value.startDate != 0) {
|
||||||
DateTime startDateStr =
|
// DateTime startDateStr =
|
||||||
DateTime.fromMillisecondsSinceEpoch(state.itemData.value.startDate!);
|
// DateTime.fromMillisecondsSinceEpoch(state.itemData.value.startDate!);
|
||||||
getStartDate = startDateStr.toLocal().toString().substring(0, 16);
|
// getStartDate = startDateStr.toLocal().toString().substring(0, 16);
|
||||||
} else {
|
// } else {
|
||||||
// DateTime startDateStr =
|
// // DateTime startDateStr =
|
||||||
// DateTime.fromMillisecondsSinceEpoch(DateTime.now().millisecondsSinceEpoch);
|
// // DateTime.fromMillisecondsSinceEpoch(DateTime.now().millisecondsSinceEpoch);
|
||||||
// getStartDate = startDateStr.toLocal().toString().substring(0, 16);
|
// // getStartDate = startDateStr.toLocal().toString().substring(0, 16);
|
||||||
|
//
|
||||||
getStartDate = "${formatDate(DateTime.now(), [
|
// getStartDate = "${formatDate(DateTime.now(), [
|
||||||
yyyy,
|
// yyyy,
|
||||||
'-',
|
// '-',
|
||||||
mm,
|
// mm,
|
||||||
'-',
|
// '-',
|
||||||
dd,
|
// dd,
|
||||||
' ',
|
// ' ',
|
||||||
HH,
|
// HH,
|
||||||
])}:00"; //生效时间
|
// ])}:00"; //生效时间
|
||||||
// state.selectEffectiveDate.value = getStartDate;
|
// // state.selectEffectiveDate.value = getStartDate;
|
||||||
state.itemData.value.startDate =
|
// state.itemData.value.startDate =
|
||||||
DateTime.parse(getStartDate).millisecondsSinceEpoch;
|
// DateTime.parse(getStartDate).millisecondsSinceEpoch;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (state.itemData.value.endDate != 0) {
|
// if (state.itemData.value.endDate != 0) {
|
||||||
DateTime endDateStr =
|
// DateTime endDateStr =
|
||||||
DateTime.fromMillisecondsSinceEpoch(state.itemData.value.endDate!);
|
// DateTime.fromMillisecondsSinceEpoch(state.itemData.value.endDate!);
|
||||||
getEndDate = endDateStr.toLocal().toString().substring(0, 16);
|
// getEndDate = endDateStr.toLocal().toString().substring(0, 16);
|
||||||
} else {
|
// } else {
|
||||||
// DateTime endDateStr =
|
// // DateTime endDateStr =
|
||||||
// DateTime.fromMillisecondsSinceEpoch(DateTime.now().millisecondsSinceEpoch);
|
// // DateTime.fromMillisecondsSinceEpoch(DateTime.now().millisecondsSinceEpoch);
|
||||||
// getEndDate = endDateStr.toLocal().toString().substring(0, 16);
|
// // getEndDate = endDateStr.toLocal().toString().substring(0, 16);
|
||||||
|
//
|
||||||
getEndDate = "${formatDate(DateTime.now(), [
|
// getEndDate = "${formatDate(DateTime.now(), [
|
||||||
yyyy,
|
// yyyy,
|
||||||
'-',
|
// '-',
|
||||||
mm,
|
// mm,
|
||||||
'-',
|
// '-',
|
||||||
dd,
|
// dd,
|
||||||
' ',
|
// ' ',
|
||||||
HH,
|
// HH,
|
||||||
])}:00"; //失效时间
|
// ])}:00"; //失效时间
|
||||||
state.itemData.value.endDate =
|
// state.itemData.value.endDate =
|
||||||
DateTime.parse(getEndDate).millisecondsSinceEpoch;
|
// DateTime.parse(getEndDate).millisecondsSinceEpoch;
|
||||||
}
|
// }
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||||
rightTitle: state.selectEffectiveDate.value.isNotEmpty
|
rightTitle: state.selectEffectiveDate.value,
|
||||||
? state.selectEffectiveDate.value
|
|
||||||
: getStartDate,
|
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
PDuration selectDate = PDuration.parse(
|
PDuration selectDate = PDuration.parse(
|
||||||
DateTime.parse(state.selectEffectiveDate.value));
|
DateTime.parse(state.selectEffectiveDate.value));
|
||||||
Pickers.showDatePicker(context,
|
Pickers.showDatePicker(context, selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||||
selectDate: selectDate, mode: DateMode.YMDH, onConfirm: (p) {
|
state.selectEffectiveDate.value = DateTool().getYMDHNDateString(p, 1);
|
||||||
state.selectEffectiveDate.value =
|
state.itemData.value.startDate = DateTool().dateToTimestamp(state.selectEffectiveDate.value, 1); //更新开始时间
|
||||||
DateTool().getYMDHNDateString(p, 1);
|
|
||||||
// state.effectiveDateTime = DateTime.parse(state.selectEffectiveDate.value);
|
|
||||||
state.itemData.value.startDate = DateTool().dateToTimestamp(
|
|
||||||
state.selectEffectiveDate.value, 1); //更新开始时间
|
|
||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||||
rightTitle: state.selectFailureDate.value.isNotEmpty
|
rightTitle: state.selectFailureDate.value,
|
||||||
? state.selectFailureDate.value
|
|
||||||
: getEndDate,
|
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
PDuration selectDate = PDuration.parse(
|
PDuration selectDate = PDuration.parse(DateTime.parse(state.selectFailureDate.value));
|
||||||
DateTime.parse(state.selectFailureDate.value));
|
Pickers.showDatePicker(context, selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||||
Pickers.showDatePicker(context,
|
state.selectFailureDate.value = DateTool().getYMDHNDateString(p, 1);
|
||||||
selectDate: selectDate, mode: DateMode.YMDH, onConfirm: (p) {
|
state.itemData.value.endDate = DateTool().dateToTimestamp(state.selectFailureDate.value, 1); //更新结束时间
|
||||||
state.selectFailureDate.value =
|
|
||||||
DateTool().getYMDHNDateString(p, 1);
|
|
||||||
state.itemData.value.endDate = DateTool()
|
|
||||||
.dateToTimestamp(state.selectFailureDate.value, 1); //更新结束时间
|
|
||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.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';
|
||||||
|
|
||||||
class PasswordKeyDetailChangeDateState {
|
class PasswordKeyDetailChangeDateState {
|
||||||
final itemData = PasswordKeyListItem().obs;
|
final itemData = PasswordKeyListItem().obs;
|
||||||
@ -15,6 +16,8 @@ class PasswordKeyDetailChangeDateState {
|
|||||||
Map map = Get.arguments;
|
Map map = Get.arguments;
|
||||||
if ((map["itemData"] != null)) {
|
if ((map["itemData"] != null)) {
|
||||||
itemData.value = map["itemData"];
|
itemData.value = map["itemData"];
|
||||||
|
selectEffectiveDate.value = itemData.value.startDate == 0 ? DateTool().getNowDateWithType(2) : DateTool().dateToYMDHNString(itemData.value.startDate.toString());
|
||||||
|
selectFailureDate.value = itemData.value.endDate == 0 ? DateTool().getNowDateWithType(2) : DateTool().dateToYMDHNString(itemData.value.endDate.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,8 +41,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# 1.0.31+2024050301 打包鑫锁提审华为
|
# 1.0.31+2024050301 打包鑫锁提审华为
|
||||||
# 1.0.32+2024051001:打包给欧阳回归测试
|
# 1.0.32+2024051001:打包给欧阳回归测试
|
||||||
# 1.0.33+2024051401:打包给欧阳回归测试
|
# 1.0.33+2024051401:打包给欧阳回归测试
|
||||||
|
# 1.0.34+2024051402:打包给欧阳回归测试
|
||||||
|
|
||||||
version: 1.0.33+2024051401
|
version: 1.0.34+2024051402
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user