修改密码详情修改有效期问题
This commit is contained in:
parent
f615616f0e
commit
a260543bb5
@ -681,6 +681,7 @@
|
||||
"密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。": "After the password is generated, please use it once for activation before 23:59 on the same day, otherwise it will be invalid after 0 o'clock. After the password is activated, it can be used unlimited times within the validity period.",
|
||||
"密码生成后,请在当日23:59前使用,否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。": "After the password is generated, please use it before 23:59 on the same day, otherwise it will be invalid after 0 o'clock. The clear code is used to clear all the passwords generated before 0 o'clock today.",
|
||||
"密码生成后,请在当日23:59前使用,否则过0点后失效。": "After the password is generated, please use it before 23:59 on the same day, otherwise it will be invalid after 0 o'clock.",
|
||||
"清空密码底部提示": "The password is valid until 24 o 'clock on the day of emptying\nEmpty content 1: All passwords except custom generated before 0 o 'clock on the same day (passwords generated after 0 o 'clock on the same day are not affected by the empty password and can continue to be used) \nEmpty content 2: Clear passwords Clear all custom passwords (used and unused) immediately after use \nTo completely clear all passwords, use the Reset All Passwords feature",
|
||||
"相机": "camera",
|
||||
"相册": "photos",
|
||||
"读写": "storage",
|
||||
|
||||
@ -708,6 +708,7 @@
|
||||
"密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。": "密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。",
|
||||
"密码生成后,请在当日23:59前使用,否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。":"密码生成后,请在当日23:59前使用,否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。",
|
||||
"密码生成后,请在当日23:59前使用,否则过0点后失效。": "密码生成后,请在当日23:59前使用,否则过0点后失效。",
|
||||
"清空密码底部提示": "清空密码底部提示",
|
||||
"密码不一致哦":"密码不一致哦",
|
||||
|
||||
"相机": "相机",
|
||||
|
||||
@ -683,6 +683,7 @@
|
||||
"密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。": "密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。",
|
||||
"密码生成后,请在当日23:59前使用,否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。": "密码生成后,请在当日23:59前使用,否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。",
|
||||
"密码生成后,请在当日23:59前使用,否则过0点后失效。": "密码生成后,请在当日23:59前使用,否则过0点后失效。",
|
||||
"清空密码底部提示": "清空密码当日24点前有效\n清空内容1:当日0点前生成的除自定义以外所有密码(当日0点后生成的密码,不受清空密码影响,可继续使用)\n清空内容2:清空密码使用后,立即清除所有自定义密码(含使用过和未使用过的)\n如需彻底清除所有密码,请使用重置所有密码功能",
|
||||
"密码不一致哦": "密码不一致哦",
|
||||
"相机": "相机",
|
||||
"相册": "相册",
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_addFace.dart';
|
||||
import 'package:star_lock/blue/io_type.dart';
|
||||
import 'package:star_lock/main/lockDetail/face/addFace/addFace_state.dart';
|
||||
import 'package:star_lock/tools/eventBusEventManage.dart';
|
||||
|
||||
@ -23,8 +23,7 @@ class AddFaceLogic extends BaseGetXController {
|
||||
// 监听设备返回的数据
|
||||
late StreamSubscription<Reply> _replySubscription;
|
||||
void _initReplySubscription() {
|
||||
_replySubscription =
|
||||
EventBusManager().eventBus!.on<Reply>().listen((reply) async {
|
||||
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((reply) async {
|
||||
// 添加人脸开始
|
||||
if (reply is SenderAddFaceReply && state.ifCurrentScreen.value == true) {
|
||||
_replyAddFaceBegin(reply);
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/scheduler.dart';
|
||||
@ -5,7 +6,6 @@ import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_getStarLockStatusInfo.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
|
||||
import 'package:star_lock/widget/permission/permission_dialog.dart';
|
||||
@ -191,7 +191,7 @@ class LockDetailLogic extends BaseGetXController {
|
||||
AppLog.log("dataLength:$dataLength");
|
||||
if (dataLength > 0) {
|
||||
reply.data.removeRange(0, 7);
|
||||
// 把得到的数据按8位分割成数组 然后塞进一个新的数组里面
|
||||
// 把得到的数据按17个字节分割成数组 然后塞进一个新的数组里面
|
||||
if (reply.data.length < 17) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ 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 'package:star_lock/tools/showTipView.dart';
|
||||
|
||||
@ -104,22 +103,21 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
||||
});
|
||||
if (backData != null) {
|
||||
state.itemData.value.startDate =
|
||||
int.parse(backData["beginTimeTimestamp"]) * 1000;
|
||||
int.parse(backData["beginTimeTimestamp"]);
|
||||
state.itemData.value.endDate =
|
||||
int.parse(backData["endTimeTimestamp"]) * 1000;
|
||||
int.parse(backData["endTimeTimestamp"]);
|
||||
// 改了日期之后,永久只能改限时的
|
||||
state.itemData.value.keyboardPwdType = 3;
|
||||
setState(() {});
|
||||
}
|
||||
})),
|
||||
Obx(() => Visibility(
|
||||
visible: (state.isCirculation.value == false) && (state.itemData.value.isCustom! != 1),
|
||||
child: CommonItem(
|
||||
leftTitel: "结束时间",
|
||||
rightTitle: DateTool().dateToYMDHNString(
|
||||
state.itemData.value.endDate.toString()),
|
||||
isHaveLine: true),
|
||||
)),
|
||||
// Obx(() => Visibility(
|
||||
// visible: (state.isCirculation.value == false) && (state.itemData.value.isCustom! != 1),
|
||||
// child: CommonItem(
|
||||
// leftTitel: "结束时间",
|
||||
// rightTitle: DateTool().dateToYMDHNString(state.itemData.value.endDate.toString()),
|
||||
// isHaveLine: true),
|
||||
// )),
|
||||
Container(height: 10.h),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.sender!.tr,
|
||||
|
||||
@ -2,6 +2,7 @@ import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_settings.dart';
|
||||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyDetailChangeDate/passwordKeyDetailChangeDate_state.dart';
|
||||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKeyEntity.dart';
|
||||
import 'package:star_lock/network/api_repository.dart';
|
||||
@ -103,6 +104,7 @@ class PasswordKeyDetailChangeDateLogic extends BaseGetXController {
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast("修改成功", something: (){
|
||||
eventBus.fire(GetPasswordListRefreshUI());
|
||||
AppLog.log("beginTimeTimestamp:$beginTimeTimestamp endTimeTimestamp:$endTimeTimestamp");
|
||||
Get.back(result: {
|
||||
"beginTimeTimestamp": beginTimeTimestamp.toString(),
|
||||
"endTimeTimestamp": endTimeTimestamp.toString(),
|
||||
|
||||
@ -290,52 +290,52 @@ class PasswordKeyListLogic extends BaseGetXController {
|
||||
case 5:
|
||||
//周未循环 5 在周未开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周末".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${"周末".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
break;
|
||||
case 6:
|
||||
//每日循环 6 每天开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"每日".tr}$starHour:00-$endHour:00 ${"循环"}';
|
||||
'${"每日".tr}$starHour:00-$endHour:00 ${"循环"}';
|
||||
break;
|
||||
case 7:
|
||||
//工作日循环 7 工作日开始和结束时间指定的时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"工作日".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${"工作日".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
break;
|
||||
case 8:
|
||||
//周一循环 8 每周一开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周一".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${"周一".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
break;
|
||||
case 9:
|
||||
//周二循环 9 每周二开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周二".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${"周二".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
break;
|
||||
case 10:
|
||||
//周三循环 10 每周三开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周三".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${"周三".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
break;
|
||||
case 11:
|
||||
//周四循环 11 每周四开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周四".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${"周四".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
break;
|
||||
case 12:
|
||||
//周五循环 12 每周五开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周五".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${"周五".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
break;
|
||||
case 13:
|
||||
//周六循环 13 每周六开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周六".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${"周六".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
break;
|
||||
case 14:
|
||||
//周天循环 14 每周日开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周日".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${"周日".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@ -193,7 +193,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
|
||||
state.nameController),
|
||||
keyBottomWidget(
|
||||
"清空密码使用一次后失效。清空内容1:今日0点前生成的除自定义以外所有密码(日0点后生成的密码,不受清空密码影响,可继续使用。清空内容2:清空密码使用后,立即清除所有自定义密码。如需彻底清除所有密码,请使用重置所有密码功能".tr)
|
||||
"清空密码底部提示".tr)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user