Merge branch 'release' of gitee.com:starlock-cn/app-starlock into release
This commit is contained in:
commit
00c1004c77
@ -924,5 +924,6 @@
|
|||||||
"导出成功":"Export success",
|
"导出成功":"Export success",
|
||||||
"发送钥匙": "Send key",
|
"发送钥匙": "Send key",
|
||||||
"进度": "Progress",
|
"进度": "Progress",
|
||||||
"失败": "Failure"
|
"失败": "Failure",
|
||||||
|
"人脸详情": "Face details"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -956,5 +956,6 @@
|
|||||||
"导出成功":"导出成功",
|
"导出成功":"导出成功",
|
||||||
"发送钥匙": "发送钥匙",
|
"发送钥匙": "发送钥匙",
|
||||||
"进度": "进度",
|
"进度": "进度",
|
||||||
"失败": "失败"
|
"失败": "失败",
|
||||||
|
"人脸详情": "人脸详情"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -921,6 +921,7 @@
|
|||||||
"导出成功":"导出成功",
|
"导出成功":"导出成功",
|
||||||
"发送钥匙": "发送钥匙",
|
"发送钥匙": "发送钥匙",
|
||||||
"进度": "进度",
|
"进度": "进度",
|
||||||
"失败": "失败"
|
"失败": "失败",
|
||||||
|
"人脸详情": "人脸详情"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:crypto/crypto.dart' as crypto;
|
||||||
import 'package:star_lock/tools/dateTool.dart';
|
import 'package:star_lock/tools/dateTool.dart';
|
||||||
|
|
||||||
import '../io_tool/io_tool.dart';
|
|
||||||
import '../sm4Encipher/sm4.dart';
|
|
||||||
import '../io_reply.dart';
|
import '../io_reply.dart';
|
||||||
import '../io_sender.dart';
|
import '../io_sender.dart';
|
||||||
|
import '../io_tool/io_tool.dart';
|
||||||
import '../io_type.dart';
|
import '../io_type.dart';
|
||||||
import 'package:crypto/crypto.dart' as crypto;
|
import '../sm4Encipher/sm4.dart';
|
||||||
|
|
||||||
///TODO:添加人脸
|
///TODO:添加人脸
|
||||||
/*
|
/*
|
||||||
@ -70,7 +70,7 @@ class SenderAddFaceCommand extends SenderProtocol {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
List<int> messageDetail() {
|
List<int> messageDetail() {
|
||||||
List<int> data = [];
|
final List<int> data = [];
|
||||||
List<int> subData = [];
|
List<int> subData = [];
|
||||||
List<int> ebcData = [];
|
List<int> ebcData = [];
|
||||||
|
|
||||||
@ -82,13 +82,13 @@ class SenderAddFaceCommand extends SenderProtocol {
|
|||||||
data.add(81);
|
data.add(81);
|
||||||
|
|
||||||
// keyID 40
|
// keyID 40
|
||||||
int keyIDLength = utf8.encode(keyID!).length;
|
final int keyIDLength = utf8.encode(keyID!).length;
|
||||||
subData.addAll(utf8.encode(keyID!));
|
subData.addAll(utf8.encode(keyID!));
|
||||||
subData = getFixedLengthList(subData, 40 - keyIDLength);
|
subData = getFixedLengthList(subData, 40 - keyIDLength);
|
||||||
// AppLog.log("keyID:$keyID utf8.encode(keyID!):${utf8.encode(keyID!)}");
|
// AppLog.log("keyID:$keyID utf8.encode(keyID!):${utf8.encode(keyID!)}");
|
||||||
|
|
||||||
//userID 20
|
//userID 20
|
||||||
int userIDLength = utf8.encode(userID!).length;
|
final int userIDLength = utf8.encode(userID!).length;
|
||||||
subData.addAll(utf8.encode(userID!));
|
subData.addAll(utf8.encode(userID!));
|
||||||
subData = getFixedLengthList(subData, 20 - userIDLength);
|
subData = getFixedLengthList(subData, 20 - userIDLength);
|
||||||
// AppLog.log("userID:$userID utf8.encode(userID!):${utf8.encode(userID!)}");
|
// AppLog.log("userID:$userID utf8.encode(userID!):${utf8.encode(userID!)}");
|
||||||
@ -129,28 +129,28 @@ class SenderAddFaceCommand extends SenderProtocol {
|
|||||||
subData.add((startDate! & 0xff000000) >> 24);
|
subData.add((startDate! & 0xff000000) >> 24);
|
||||||
subData.add((startDate! & 0xff0000) >> 16);
|
subData.add((startDate! & 0xff0000) >> 16);
|
||||||
subData.add((startDate! & 0xff00) >> 8);
|
subData.add((startDate! & 0xff00) >> 8);
|
||||||
subData.add((startDate! & 0xff));
|
subData.add(startDate! & 0xff);
|
||||||
|
|
||||||
// endDate 4
|
// endDate 4
|
||||||
subData.add((endDate! & 0xff000000) >> 24);
|
subData.add((endDate! & 0xff000000) >> 24);
|
||||||
subData.add((endDate! & 0xff0000) >> 16);
|
subData.add((endDate! & 0xff0000) >> 16);
|
||||||
subData.add((endDate! & 0xff00) >> 8);
|
subData.add((endDate! & 0xff00) >> 8);
|
||||||
subData.add((endDate! & 0xff));
|
subData.add(endDate! & 0xff);
|
||||||
// AppLog.log("addFingerprint startDate:${DateTool().dateToYMDHNString(startDate.toString())} endDate:${DateTool().dateToYMDHNString(endDate.toString())}");
|
// AppLog.log("addFingerprint startDate:${DateTool().dateToYMDHNString(startDate.toString())} endDate:${DateTool().dateToYMDHNString(endDate.toString())}");
|
||||||
|
|
||||||
// startTime 4
|
// startTime 4
|
||||||
List<int> startTimeList = [0,0,0,0];
|
final List<int> startTimeList = [0,0,0,0];
|
||||||
if(startTime!.contains(":")){
|
if(startTime!.contains(':')){
|
||||||
List<String> getStartTimeList = startTime!.split(":");
|
final List<String> getStartTimeList = startTime!.split(':');
|
||||||
startTimeList[2] = int.parse(getStartTimeList[0]);
|
startTimeList[2] = int.parse(getStartTimeList[0]);
|
||||||
startTimeList[3] = int.parse(getStartTimeList[1]);
|
startTimeList[3] = int.parse(getStartTimeList[1]);
|
||||||
}
|
}
|
||||||
subData.addAll(startTimeList);
|
subData.addAll(startTimeList);
|
||||||
|
|
||||||
// endTime 4
|
// endTime 4
|
||||||
List<int> endTimeList = [0,0,0,0];
|
final List<int> endTimeList = [0,0,0,0];
|
||||||
if(endTime!.contains(":")){
|
if(endTime!.contains(':')){
|
||||||
List<String> getendTimeList = endTime!.split(":");
|
final List<String> getendTimeList = endTime!.split(':');
|
||||||
endTimeList[2] = int.parse(getendTimeList[0]);
|
endTimeList[2] = int.parse(getendTimeList[0]);
|
||||||
endTimeList[3] = int.parse(getendTimeList[1]);
|
endTimeList[3] = int.parse(getendTimeList[1]);
|
||||||
}
|
}
|
||||||
@ -160,7 +160,7 @@ class SenderAddFaceCommand extends SenderProtocol {
|
|||||||
//AuthCodeLen 1
|
//AuthCodeLen 1
|
||||||
subData.add(0);
|
subData.add(0);
|
||||||
} else {
|
} else {
|
||||||
List<int> authCodeData = [];
|
final List<int> authCodeData = [];
|
||||||
//KeyID
|
//KeyID
|
||||||
authCodeData.addAll(utf8.encode(keyID!));
|
authCodeData.addAll(utf8.encode(keyID!));
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ class SenderAddFaceCommand extends SenderProtocol {
|
|||||||
authCodeData.addAll(signKey!);
|
authCodeData.addAll(signKey!);
|
||||||
|
|
||||||
// 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
// 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
||||||
var authCode = crypto.md5.convert(authCodeData);
|
final authCode = crypto.md5.convert(authCodeData);
|
||||||
|
|
||||||
subData.add(authCode.bytes.length);
|
subData.add(authCode.bytes.length);
|
||||||
subData.addAll(authCode.bytes);
|
subData.addAll(authCode.bytes);
|
||||||
@ -183,7 +183,7 @@ class SenderAddFaceCommand extends SenderProtocol {
|
|||||||
data.addAll(subData);
|
data.addAll(subData);
|
||||||
|
|
||||||
if ((data.length % 16) != 0) {
|
if ((data.length % 16) != 0) {
|
||||||
int add = (16 - data.length % 16);
|
final int add = 16 - data.length % 16;
|
||||||
for (int i = 0; i < add; i++) {
|
for (int i = 0; i < add; i++) {
|
||||||
data.add(0);
|
data.add(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,7 +80,7 @@ class SenderCancelAddFaceCommand extends SenderProtocol {
|
|||||||
data.addAll(subData);
|
data.addAll(subData);
|
||||||
|
|
||||||
if ((data.length % 16) != 0) {
|
if ((data.length % 16) != 0) {
|
||||||
int add = (16 - data.length % 16);
|
int add = 16 - data.length % 16;
|
||||||
for (int i = 0; i < add; i++) {
|
for (int i = 0; i < add; i++) {
|
||||||
data.add(0);
|
data.add(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:star_lock/app_settings/app_settings.dart';
|
import 'package:star_lock/app_settings/app_settings.dart';
|
||||||
import 'package:star_lock/login/forgetPassword/starLock_forgetPassword_logic.dart';
|
import 'package:star_lock/login/forgetPassword/starLock_forgetPassword_logic.dart';
|
||||||
import 'package:star_lock/login/forgetPassword/starLock_forgetPassword_state.dart';
|
import 'package:star_lock/login/forgetPassword/starLock_forgetPassword_state.dart';
|
||||||
|
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||||
|
|
||||||
import '../../appRouters.dart';
|
import '../../appRouters.dart';
|
||||||
import '../../app_settings/app_colors.dart';
|
import '../../app_settings/app_colors.dart';
|
||||||
@ -23,9 +24,12 @@ class StarLockForgetPasswordPage extends StatefulWidget {
|
|||||||
_StarLockForgetPasswordPageState();
|
_StarLockForgetPasswordPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage> {
|
class _StarLockForgetPasswordPageState
|
||||||
final StarLockForgetPasswordLogic logic = Get.put(StarLockForgetPasswordLogic());
|
extends State<StarLockForgetPasswordPage> {
|
||||||
final StarLockForgetPasswordState state = Get.find<StarLockForgetPasswordLogic>().state;
|
final StarLockForgetPasswordLogic logic =
|
||||||
|
Get.put(StarLockForgetPasswordLogic());
|
||||||
|
final StarLockForgetPasswordState state =
|
||||||
|
Get.find<StarLockForgetPasswordLogic>().state;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -57,7 +61,8 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
SizedBox(width: 5.w),
|
SizedBox(width: 5.w),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
child: Text(
|
||||||
|
TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.sp, color: AppColors.blackColor))),
|
fontSize: 26.sp, color: AppColors.blackColor))),
|
||||||
SizedBox(width: 20.w),
|
SizedBox(width: 20.w),
|
||||||
@ -65,14 +70,14 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
|
|||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Obx(() => Text(
|
Obx(() => Text(
|
||||||
'${state.countryName} +${state.countryCode}',
|
'${state.countryName} +${state.countryCode}',
|
||||||
// state.isIphoneType.value
|
// state.isIphoneType.value
|
||||||
// ? '${state.countryName} +${state.countryCode}'
|
// ? '${state.countryName} +${state.countryCode}'
|
||||||
// : "${state.countryName}",
|
// : "${state.countryName}",
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.sp, color: AppColors.blackColor),
|
fontSize: 26.sp, color: AppColors.blackColor),
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(width: 5.w),
|
SizedBox(width: 5.w),
|
||||||
@ -95,14 +100,16 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
|
|||||||
logic.checkNext(state.phoneController);
|
logic.checkNext(state.phoneController);
|
||||||
},
|
},
|
||||||
leftWidget: Padding(
|
leftWidget: Padding(
|
||||||
padding: EdgeInsets.only(top: 30.w, bottom: 20.w, right: 5.w, left: 5.w),
|
padding: EdgeInsets.only(
|
||||||
|
top: 30.w, bottom: 20.w, right: 5.w, left: 5.w),
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
'images/icon_login_account.png',
|
'images/icon_login_account.png',
|
||||||
width: 36.w,
|
width: 36.w,
|
||||||
height: 36.w,
|
height: 36.w,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
hintText:TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
hintText:
|
||||||
|
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
inputFormatters: <TextInputFormatter>[
|
inputFormatters: <TextInputFormatter>[
|
||||||
LengthLimitingTextInputFormatter(30),
|
LengthLimitingTextInputFormatter(30),
|
||||||
@ -232,6 +239,11 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
|
|||||||
isDisabled: state.canSub.value,
|
isDisabled: state.canSub.value,
|
||||||
onClick: state.canSub.value
|
onClick: state.canSub.value
|
||||||
? () {
|
? () {
|
||||||
|
final bool isNetWork =
|
||||||
|
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
if (!isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
logic.resetPassword();
|
logic.resetPassword();
|
||||||
}
|
}
|
||||||
: null);
|
: null);
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
@ -7,6 +6,7 @@ import 'package:star_lock/appRouters.dart';
|
|||||||
import 'package:star_lock/app_settings/app_colors.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
import 'package:star_lock/login/forgetPassword/starLock_forgetPassword_logic.dart';
|
import 'package:star_lock/login/forgetPassword/starLock_forgetPassword_logic.dart';
|
||||||
import 'package:star_lock/login/forgetPassword/starLock_forgetPassword_state.dart';
|
import 'package:star_lock/login/forgetPassword/starLock_forgetPassword_state.dart';
|
||||||
|
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||||
import 'package:star_lock/tools/submitBtn.dart';
|
import 'package:star_lock/tools/submitBtn.dart';
|
||||||
import 'package:star_lock/tools/tf_loginInput.dart';
|
import 'package:star_lock/tools/tf_loginInput.dart';
|
||||||
import 'package:star_lock/tools/titleAppBar.dart';
|
import 'package:star_lock/tools/titleAppBar.dart';
|
||||||
@ -22,8 +22,10 @@ class StarLockForgetPasswordXHJPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _StarLockForgetPasswordPageState
|
class _StarLockForgetPasswordPageState
|
||||||
extends State<StarLockForgetPasswordXHJPage> {
|
extends State<StarLockForgetPasswordXHJPage> {
|
||||||
final StarLockForgetPasswordLogic logic = Get.put(StarLockForgetPasswordLogic());
|
final StarLockForgetPasswordLogic logic =
|
||||||
final StarLockForgetPasswordState state = Get.find<StarLockForgetPasswordLogic>().state;
|
Get.put(StarLockForgetPasswordLogic());
|
||||||
|
final StarLockForgetPasswordState state =
|
||||||
|
Get.find<StarLockForgetPasswordLogic>().state;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -102,7 +104,7 @@ class _StarLockForgetPasswordPageState
|
|||||||
padding: EdgeInsets.only(top: 30.w, bottom: 20.w, left: 5.w),
|
padding: EdgeInsets.only(top: 30.w, bottom: 20.w, left: 5.w),
|
||||||
),
|
),
|
||||||
label:
|
label:
|
||||||
'${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}',
|
'${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}',
|
||||||
inputFormatters: <TextInputFormatter>[
|
inputFormatters: <TextInputFormatter>[
|
||||||
LengthLimitingTextInputFormatter(20),
|
LengthLimitingTextInputFormatter(20),
|
||||||
]),
|
]),
|
||||||
@ -122,7 +124,7 @@ class _StarLockForgetPasswordPageState
|
|||||||
padding: EdgeInsets.only(top: 30.w, bottom: 20.w, left: 5.w),
|
padding: EdgeInsets.only(top: 30.w, bottom: 20.w, left: 5.w),
|
||||||
),
|
),
|
||||||
label:
|
label:
|
||||||
'${TranslationLoader.lanKeys!.sure!.tr}${TranslationLoader.lanKeys!.password!.tr}',
|
'${TranslationLoader.lanKeys!.sure!.tr}${TranslationLoader.lanKeys!.password!.tr}',
|
||||||
inputFormatters: <TextInputFormatter>[
|
inputFormatters: <TextInputFormatter>[
|
||||||
LengthLimitingTextInputFormatter(20),
|
LengthLimitingTextInputFormatter(20),
|
||||||
]),
|
]),
|
||||||
@ -136,7 +138,7 @@ class _StarLockForgetPasswordPageState
|
|||||||
},
|
},
|
||||||
leftWidget: SizedBox(),
|
leftWidget: SizedBox(),
|
||||||
hintText:
|
hintText:
|
||||||
'${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}',
|
'${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}',
|
||||||
inputFormatters: <TextInputFormatter>[
|
inputFormatters: <TextInputFormatter>[
|
||||||
LengthLimitingTextInputFormatter(20),
|
LengthLimitingTextInputFormatter(20),
|
||||||
]),
|
]),
|
||||||
@ -179,14 +181,21 @@ class _StarLockForgetPasswordPageState
|
|||||||
Obx(() {
|
Obx(() {
|
||||||
return SubmitBtn(
|
return SubmitBtn(
|
||||||
btnName:
|
btnName:
|
||||||
'${TranslationLoader.lanKeys!.reset!.tr}${TranslationLoader.lanKeys!.password!.tr}',
|
'${TranslationLoader.lanKeys!.reset!.tr}${TranslationLoader.lanKeys!.password!.tr}',
|
||||||
// backgroundColorList: state.canSub.value ? [AppColors.mainColor] :[Colors.grey],
|
// backgroundColorList: state.canSub.value ? [AppColors.mainColor] :[Colors.grey],
|
||||||
fontSize: 30.sp,
|
fontSize: 30.sp,
|
||||||
borderRadius: 20.w,
|
borderRadius: 20.w,
|
||||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
isDisabled: state.canSub.value,
|
isDisabled: state.canSub.value,
|
||||||
onClick: state.canSub.value
|
onClick: state.canSub.value
|
||||||
? logic.resetPassword
|
? () {
|
||||||
|
final bool isNetWork =
|
||||||
|
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
if (!isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
logic.resetPassword();
|
||||||
|
}
|
||||||
: null);
|
: null);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -36,7 +36,9 @@ FutureOr<void> main() async {
|
|||||||
Future<void>.delayed(const Duration(milliseconds: 500), () async {
|
Future<void>.delayed(const Duration(milliseconds: 500), () async {
|
||||||
final GetAppInfo entity = await ApiRepository.to.getAppInfo();
|
final GetAppInfo entity = await ApiRepository.to.getAppInfo();
|
||||||
CustomerTool.init(entity.data?.wechatServiceUrl ?? '');
|
CustomerTool.init(entity.data?.wechatServiceUrl ?? '');
|
||||||
WxPayTool.setAssociationUrl(entity.data!.appSiteUrl!);
|
if (entity.data?.appSiteUrl != null) {
|
||||||
|
WxPayTool.setAssociationUrl(entity.data!.appSiteUrl!);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/main/lockDetail/card/cardList/cardList_state.dart';
|
import 'package:star_lock/main/lockDetail/card/cardList/cardList_state.dart';
|
||||||
|
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||||
|
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
@ -68,6 +69,11 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
|
final bool isNetWork =
|
||||||
|
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
if (!isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ShowTipView().showIosTipWithContentDialog(
|
ShowTipView().showIosTipWithContentDialog(
|
||||||
'重置后,该锁的卡都将被删除哦,确认要重置吗?'.tr, () async {
|
'重置后,该锁的卡都将被删除哦,确认要重置吗?'.tr, () async {
|
||||||
state.isDeletAll = true;
|
state.isDeletAll = true;
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
|||||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_logic.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_logic.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_state.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_state.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
||||||
|
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||||
import 'package:star_lock/tools/noData.dart';
|
import 'package:star_lock/tools/noData.dart';
|
||||||
import 'package:star_lock/tools/storage.dart';
|
import 'package:star_lock/tools/storage.dart';
|
||||||
|
|
||||||
@ -67,6 +68,11 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
final bool? isDemoMode =
|
final bool? isDemoMode =
|
||||||
await Storage.getBool(ifIsDemoModeOrNot);
|
await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
|
final bool isNetWork =
|
||||||
|
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
if (!isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ShowTipView().showIosTipWithContentDialog(
|
ShowTipView().showIosTipWithContentDialog(
|
||||||
'该锁的电子钥匙都将被删除'.tr, logic.resetElectronicKeyListRequest);
|
'该锁的电子钥匙都将被删除'.tr, logic.resetElectronicKeyListRequest);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -4,7 +4,6 @@ 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_colors.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey/massSendElectronicKey_state.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';
|
||||||
import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart';
|
import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart';
|
||||||
@ -16,6 +15,7 @@ import '../../../../../tools/dateTool.dart';
|
|||||||
import '../../../../../tools/storage.dart';
|
import '../../../../../tools/storage.dart';
|
||||||
import '../../../../../translations/trans_lib.dart';
|
import '../../../../../translations/trans_lib.dart';
|
||||||
import 'massSendElectronicKey_logic.dart';
|
import 'massSendElectronicKey_logic.dart';
|
||||||
|
import 'massSendElectronicKey_state.dart';
|
||||||
|
|
||||||
class MassSendElectronicKeyPage extends StatefulWidget {
|
class MassSendElectronicKeyPage extends StatefulWidget {
|
||||||
const MassSendElectronicKeyPage({required this.type, Key? key}) : super(key: key);
|
const MassSendElectronicKeyPage({required this.type, Key? key}) : super(key: key);
|
||||||
|
|||||||
@ -174,6 +174,8 @@ class FaceDetailLogic extends BaseGetXController {
|
|||||||
showToast('修改成功', something: () {
|
showToast('修改成功', something: () {
|
||||||
Get.back(result: 'addScuess');
|
Get.back(result: 'addScuess');
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
Get.back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: '人脸详情',
|
barTitle: '人脸详情'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
),
|
),
|
||||||
@ -44,7 +44,9 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
|||||||
rightTitle: state.typeNumber.value,
|
rightTitle: state.typeNumber.value,
|
||||||
isHaveDirection: false,
|
isHaveDirection: false,
|
||||||
isHaveLine: true)),
|
isHaveLine: true)),
|
||||||
Obx(() => lockDataListItem(TranslationLoader.lanKeys!.name!.tr, state.typeName.value, () {
|
Obx(() => lockDataListItem(
|
||||||
|
TranslationLoader.lanKeys!.name!.tr, state.typeName.value,
|
||||||
|
() {
|
||||||
// showCupertinoAlertDialog(context);
|
// showCupertinoAlertDialog(context);
|
||||||
ShowTipView().showTFViewAlertDialog(
|
ShowTipView().showTFViewAlertDialog(
|
||||||
state.changeNameController,
|
state.changeNameController,
|
||||||
@ -54,7 +56,6 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
|||||||
logic.showToast('请输入姓名'.tr);
|
logic.showToast('请输入姓名'.tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Get.back();
|
|
||||||
state.typeName.value = state.changeNameController.text;
|
state.typeName.value = state.changeNameController.text;
|
||||||
logic.updateFaceNameData();
|
logic.updateFaceNameData();
|
||||||
}, inputFormatters: <TextInputFormatter>[
|
}, inputFormatters: <TextInputFormatter>[
|
||||||
@ -64,8 +65,8 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
|||||||
})),
|
})),
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: state.keyType.value == 4 ||
|
visible: state.keyType.value == 4 ||
|
||||||
state.keyType.value == 2 ||
|
state.keyType.value == 2 ||
|
||||||
state.keyType.value == 1,
|
state.keyType.value == 1,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||||
allHeight: 70.h,
|
allHeight: 70.h,
|
||||||
@ -187,11 +188,12 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
|||||||
rightTitle: '',
|
rightTitle: '',
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.lockOperatingRecordPage, arguments: <String, Object?>{
|
Get.toNamed(Routers.lockOperatingRecordPage,
|
||||||
'type': 4,
|
arguments: <String, Object?>{
|
||||||
'id': state.faceItemData.value.faceId.toString(),
|
'type': 4,
|
||||||
'recordName': state.faceItemData.value.faceName
|
'id': state.faceItemData.value.faceId.toString(),
|
||||||
});
|
'recordName': state.faceItemData.value.faceName
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
// SizedBox(height: 40.h),
|
// SizedBox(height: 40.h),
|
||||||
// addControlsBtn(type),
|
// addControlsBtn(type),
|
||||||
@ -215,12 +217,14 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget lockDataListItem(String leftTitle, String conentStr, Function()? action){
|
Widget lockDataListItem(
|
||||||
|
String leftTitle, String conentStr, Function()? action) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
// height: 70.h,
|
// height: 70.h,
|
||||||
padding: EdgeInsets.only(left: 20.w, right: 10.w, top: 15.h, bottom: 15.h),
|
padding:
|
||||||
|
EdgeInsets.only(left: 20.w, right: 10.w, top: 15.h, bottom: 15.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
border: Border(
|
border: Border(
|
||||||
@ -228,15 +232,17 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
|||||||
color: AppColors.greyLineColor, // 设置边框颜色
|
color: AppColors.greyLineColor, // 设置边框颜色
|
||||||
width: 2.0.h, // 设置边框宽度
|
width: 2.0.h, // 设置边框宽度
|
||||||
),
|
),
|
||||||
)
|
)),
|
||||||
),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(leftTitle, style: TextStyle(fontSize: 22.sp)),
|
Text(leftTitle, style: TextStyle(fontSize: 22.sp)),
|
||||||
SizedBox(width: 10.w),
|
SizedBox(width: 10.w),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(conentStr, textAlign:TextAlign.end, style: TextStyle(fontSize: 22.sp, ))
|
child: Text(conentStr,
|
||||||
),
|
textAlign: TextAlign.end,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22.sp,
|
||||||
|
))),
|
||||||
SizedBox(width: 10.w),
|
SizedBox(width: 10.w),
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'images/icon_right_grey.png',
|
'images/icon_right_grey.png',
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import 'package:flutter_easyloading/flutter_easyloading.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/main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
||||||
|
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||||
import 'package:star_lock/tools/keySearchWidget.dart';
|
import 'package:star_lock/tools/keySearchWidget.dart';
|
||||||
import 'package:star_lock/tools/left_slide/left_slide_actions.dart';
|
import 'package:star_lock/tools/left_slide/left_slide_actions.dart';
|
||||||
import 'package:star_lock/tools/showTipView.dart';
|
import 'package:star_lock/tools/showTipView.dart';
|
||||||
@ -63,6 +64,11 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
|
final bool isNetWork =
|
||||||
|
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
if (!isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// showDeletAlertDialog(context);
|
// showDeletAlertDialog(context);
|
||||||
ShowTipView().showIosTipWithContentDialog(
|
ShowTipView().showIosTipWithContentDialog(
|
||||||
"重置后,该锁的人脸都将被删除哦,确认要重置吗?", () async {
|
"重置后,该锁的人脸都将被删除哦,确认要重置吗?", () async {
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintList_state.dart';
|
import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintList_state.dart';
|
||||||
|
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||||
|
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
@ -69,6 +70,11 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
|
final bool isNetWork =
|
||||||
|
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
if (!isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ShowTipView().showIosTipWithContentDialog(
|
ShowTipView().showIosTipWithContentDialog(
|
||||||
'重置后,该锁的指纹都将被删除哦,确认要重置吗?'.tr, () async {
|
'重置后,该锁的指纹都将被删除哦,确认要重置吗?'.tr, () async {
|
||||||
state.isDeletAll = true;
|
state.isDeletAll = true;
|
||||||
|
|||||||
@ -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/fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
||||||
import 'package:star_lock/main/lockDetail/iris/irisList/irisList_logic.dart';
|
import 'package:star_lock/main/lockDetail/iris/irisList/irisList_logic.dart';
|
||||||
|
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||||
import 'package:star_lock/tools/keySearchWidget.dart';
|
import 'package:star_lock/tools/keySearchWidget.dart';
|
||||||
import 'package:star_lock/tools/left_slide/left_slide_actions.dart';
|
import 'package:star_lock/tools/left_slide/left_slide_actions.dart';
|
||||||
|
|
||||||
@ -44,6 +45,11 @@ class _IrisListPageState extends State<IrisListPage> {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
|
final bool isNetWork =
|
||||||
|
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
if (!isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
showDeletAlertDialog(context);
|
showDeletAlertDialog(context);
|
||||||
} else {
|
} else {
|
||||||
// Get.toNamed(Routers.selectLockTypePage);
|
// Get.toNamed(Routers.selectLockTypePage);
|
||||||
|
|||||||
@ -90,7 +90,7 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
// 更新电量
|
// 更新电量
|
||||||
uploadElectricQuantityRequest();
|
uploadElectricQuantityRequest();
|
||||||
//锁数据更新
|
//锁数据更新
|
||||||
getLockRecordLastUploadDataTime();
|
// getLockRecordLastUploadDataTime();
|
||||||
resetOpenDoorState();
|
resetOpenDoorState();
|
||||||
state.animationController!.stop();
|
state.animationController!.stop();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -525,7 +525,7 @@ class LockSetLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// 以下为删除逻辑
|
/// 以下为删除逻辑
|
||||||
deleyLockLogicOfRoles() {
|
void deleyLockLogicOfRoles() {
|
||||||
if (state.lockBasicInfo.value.isLockOwner == 1) {
|
if (state.lockBasicInfo.value.isLockOwner == 1) {
|
||||||
// 超级管理员必须通过连接蓝牙删除
|
// 超级管理员必须通过连接蓝牙删除
|
||||||
ShowTipView().showIosTipWithContentDialog('删除锁后,所有信息都会一起删除,确定删除锁吗?'.tr,
|
ShowTipView().showIosTipWithContentDialog('删除锁后,所有信息都会一起删除,确定删除锁吗?'.tr,
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lockSet/lockSet/checkingInInfoData_entity.dart';
|
import 'package:star_lock/main/lockDetail/lockSet/lockSet/checkingInInfoData_entity.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSet_state.dart';
|
import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSet_state.dart';
|
||||||
|
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||||
|
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
@ -28,9 +29,7 @@ class LockSetPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
||||||
final LockSetLogic logic = Get.put(LockSetLogic());
|
final LockSetLogic logic = Get.put(LockSetLogic());
|
||||||
final LockSetState state = Get
|
final LockSetState state = Get.find<LockSetLogic>().state;
|
||||||
.find<LockSetLogic>()
|
|
||||||
.state;
|
|
||||||
|
|
||||||
Future<void> getHttpData() async {
|
Future<void> getHttpData() async {
|
||||||
logic.getLockSettingInfoData().then((LockSetInfoEntity value) {
|
logic.getLockSettingInfoData().then((LockSetInfoEntity value) {
|
||||||
@ -65,8 +64,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Obx(() =>
|
child: Obx(() => ListView(
|
||||||
ListView(
|
|
||||||
children: getListWidget(),
|
children: getListWidget(),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
@ -104,47 +102,43 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
}),
|
}),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
// 自动闭锁
|
// 自动闭锁
|
||||||
Obx(() =>
|
Obx(() => Visibility(
|
||||||
Visibility(
|
visible: state.lockFeature.value.autoLock == 1,
|
||||||
visible: state.lockFeature.value.autoLock == 1,
|
child: CommonItem(
|
||||||
child: CommonItem(
|
leftTitel: TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
||||||
leftTitel: TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
rightTitle: (state.lockSettingInfo.value.autoLock ?? 0) > 0
|
||||||
rightTitle: (state.lockSettingInfo.value.autoLock ?? 0) > 0
|
? '${state.lockSetInfoData.value.lockSettingInfo!.autoLockSecond ?? 0}s'
|
||||||
? '${state.lockSetInfoData.value.lockSettingInfo!
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
.autoLockSecond ?? 0}s'
|
isHaveLine: true,
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
// isHaveRightWidget: true,
|
||||||
isHaveDirection: true,
|
// rightWidget: rightText((state.lockSetInfoData.value.lockSetting!.autoLock ?? 0) > 0
|
||||||
// isHaveRightWidget: true,
|
// ? "${state.lockSetInfoData.value.lockSetting!.autoLockSecond ?? 0}s"
|
||||||
// rightWidget: rightText((state.lockSetInfoData.value.lockSetting!.autoLock ?? 0) > 0
|
// : TranslationLoader.lanKeys!.closed!.tr),
|
||||||
// ? "${state.lockSetInfoData.value.lockSetting!.autoLockSecond ?? 0}s"
|
action: () {
|
||||||
// : TranslationLoader.lanKeys!.closed!.tr),
|
Get.toNamed(Routers.automaticBlockingPage,
|
||||||
action: () {
|
arguments: <String, LockSetInfoData>{
|
||||||
Get.toNamed(Routers.automaticBlockingPage,
|
'lockSetInfoData': state.lockSetInfoData.value,
|
||||||
arguments: <String, LockSetInfoData>{
|
// 'lockBasicInfo': state.lockBasicInfo.value
|
||||||
'lockSetInfoData': state.lockSetInfoData.value,
|
});
|
||||||
// 'lockBasicInfo': state.lockBasicInfo.value
|
}))),
|
||||||
});
|
|
||||||
}))),
|
|
||||||
// 常开模式
|
// 常开模式
|
||||||
Obx(() =>
|
Obx(() => Visibility(
|
||||||
Visibility(
|
visible: state.lockFeature.value.passageMode == 1,
|
||||||
visible: state.lockFeature.value.passageMode == 1,
|
child: CommonItem(
|
||||||
child: CommonItem(
|
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
||||||
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
rightTitle: (state.lockSettingInfo.value.passageMode ?? 0) == 1
|
||||||
rightTitle: (state.lockSettingInfo.value.passageMode ?? 0) ==
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
1
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
isHaveLine: true,
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
action: () {
|
||||||
isHaveDirection: true,
|
Get.toNamed(Routers.normallyOpenModePage,
|
||||||
action: () {
|
arguments: <String, Object>{
|
||||||
Get.toNamed(Routers.normallyOpenModePage,
|
'lockSetInfoData': state.lockSetInfoData.value,
|
||||||
arguments: <String, Object>{
|
'lockBasicInfo': state.lockBasicInfo.value
|
||||||
'lockSetInfoData': state.lockSetInfoData.value,
|
});
|
||||||
'lockBasicInfo': state.lockBasicInfo.value
|
}))),
|
||||||
});
|
|
||||||
}))),
|
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
@ -153,10 +147,10 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(
|
Get.toNamed(Routers.lockTimePage,
|
||||||
Routers.lockTimePage, arguments: <String, LockSetInfoData>{
|
arguments: <String, LockSetInfoData>{
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
SizedBox(height: 30.h),
|
SizedBox(height: 30.h),
|
||||||
Container(
|
Container(
|
||||||
@ -166,10 +160,14 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isDelete: true,
|
isDelete: true,
|
||||||
onClick: () {
|
onClick: () {
|
||||||
// logic.deletUserAction();
|
// logic.deletUserAction();
|
||||||
|
|
||||||
// logic.deletLockInfoData();
|
// logic.deletLockInfoData();
|
||||||
// showDeletAlertDialog(context);
|
// showDeletAlertDialog(context);
|
||||||
// showDeletPasswordAlertDialog(context);
|
// showDeletPasswordAlertDialog(context);
|
||||||
|
final bool isNetWork =
|
||||||
|
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
if (!isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
logic.deleyLockLogicOfRoles();
|
logic.deleyLockLogicOfRoles();
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
@ -242,27 +240,25 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
// })),
|
// })),
|
||||||
// SizedBox(height: 10.h),
|
// SizedBox(height: 10.h),
|
||||||
// 自动闭锁
|
// 自动闭锁
|
||||||
Obx(() =>
|
Obx(() => Visibility(
|
||||||
Visibility(
|
visible: state.lockFeature.value.autoLock == 1,
|
||||||
visible: state.lockFeature.value.autoLock == 1,
|
child: CommonItem(
|
||||||
child: CommonItem(
|
leftTitel: TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
||||||
leftTitel: TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
rightTitle: state.lockSettingInfo.value.autoLock! > 0
|
||||||
rightTitle: state.lockSettingInfo.value.autoLock! > 0
|
? '${state.lockSetInfoData.value.lockSettingInfo!.autoLockSecond}s'
|
||||||
? '${state.lockSetInfoData.value.lockSettingInfo!
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
.autoLockSecond}s'
|
isHaveLine: true,
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
// isHaveRightWidget: true,
|
||||||
isHaveDirection: true,
|
// rightWidget: rightText((state.lockSetInfoData.value.lockSetting!.autoLock ?? 0) > 0
|
||||||
// isHaveRightWidget: true,
|
// ? "${state.lockSetInfoData.value.lockSetting!.autoLockSecond ?? 0}s"
|
||||||
// rightWidget: rightText((state.lockSetInfoData.value.lockSetting!.autoLock ?? 0) > 0
|
// : TranslationLoader.lanKeys!.closed!.tr),
|
||||||
// ? "${state.lockSetInfoData.value.lockSetting!.autoLockSecond ?? 0}s"
|
action: () {
|
||||||
// : TranslationLoader.lanKeys!.closed!.tr),
|
Get.toNamed(Routers.automaticBlockingPage,
|
||||||
action: () {
|
arguments: <String, LockSetInfoData>{
|
||||||
Get.toNamed(Routers.automaticBlockingPage,
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
arguments: <String, LockSetInfoData>{
|
});
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
}))),
|
||||||
});
|
|
||||||
}))),
|
|
||||||
// 锁声音
|
// 锁声音
|
||||||
Obx(() {
|
Obx(() {
|
||||||
String titleStr = '';
|
String titleStr = '';
|
||||||
@ -302,80 +298,72 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
}));
|
}));
|
||||||
}),
|
}),
|
||||||
// 防撬报警
|
// 防撬报警
|
||||||
Obx(() =>
|
Obx(() => Visibility(
|
||||||
Visibility(
|
visible: state.lockFeature.value.antiPrySwitch == 1,
|
||||||
visible: state.lockFeature.value.antiPrySwitch == 1,
|
child: CommonItem(
|
||||||
child: CommonItem(
|
leftTitel: TranslationLoader.lanKeys!.burglarAlarm!.tr,
|
||||||
leftTitel: TranslationLoader.lanKeys!.burglarAlarm!.tr,
|
rightTitle: (state.lockSettingInfo.value.antiPrySwitch ?? 0) == 1
|
||||||
rightTitle: (state.lockSettingInfo.value.antiPrySwitch ??
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
0) == 1
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
isHaveLine: true,
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
action: () {
|
||||||
isHaveDirection: true,
|
Get.toNamed(Routers.burglarAlarmPage,
|
||||||
action: () {
|
arguments: <String, LockSetInfoData>{
|
||||||
Get.toNamed(Routers.burglarAlarmPage,
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
arguments: <String, LockSetInfoData>{
|
});
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
}))),
|
||||||
});
|
|
||||||
}))),
|
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
// 常开模式
|
// 常开模式
|
||||||
Obx(() =>
|
Obx(() => Visibility(
|
||||||
Visibility(
|
visible: state.lockFeature.value.passageMode == 1,
|
||||||
visible: state.lockFeature.value.passageMode == 1,
|
// visible: true,
|
||||||
// visible: true,
|
child: CommonItem(
|
||||||
child: CommonItem(
|
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
||||||
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
rightTitle: (state.lockSettingInfo.value.passageMode ?? 0) == 1
|
||||||
rightTitle: (state.lockSettingInfo.value.passageMode ?? 0) ==
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
1
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
isHaveLine: true,
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
action: () {
|
||||||
isHaveDirection: true,
|
Get.toNamed(Routers.normallyOpenModePage,
|
||||||
action: () {
|
arguments: <String, LockSetInfoData>{
|
||||||
Get.toNamed(Routers.normallyOpenModePage,
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
arguments: <String, LockSetInfoData>{
|
});
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
}))),
|
||||||
});
|
|
||||||
}))),
|
|
||||||
// 远程开锁
|
// 远程开锁
|
||||||
Obx(() =>
|
Obx(() => Visibility(
|
||||||
Visibility(
|
visible: state.lockFeature.value.remoteUnlock == 1,
|
||||||
visible: state.lockFeature.value.remoteUnlock == 1,
|
child: CommonItem(
|
||||||
child: CommonItem(
|
leftTitel: TranslationLoader.lanKeys!.remoteUnlocking!.tr,
|
||||||
leftTitel: TranslationLoader.lanKeys!.remoteUnlocking!.tr,
|
rightTitle: (state.lockSettingInfo.value.remoteUnlock ?? 0) == 1
|
||||||
rightTitle: (state.lockSettingInfo.value.remoteUnlock ?? 0) ==
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
1
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
isHaveLine: true,
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
action: () {
|
||||||
isHaveDirection: true,
|
Get.toNamed(Routers.remoteUnlockingPage,
|
||||||
action: () {
|
arguments: <String, LockSetInfoData>{
|
||||||
Get.toNamed(Routers.remoteUnlockingPage,
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
arguments: <String, LockSetInfoData>{
|
});
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
}))),
|
||||||
});
|
|
||||||
}))),
|
|
||||||
// 重置键
|
// 重置键
|
||||||
Obx(() =>
|
Obx(() => Visibility(
|
||||||
Visibility(
|
visible: state.lockBasicInfo.value.isLockOwner == 1 &&
|
||||||
visible: state.lockBasicInfo.value.isLockOwner == 1 &&
|
state.lockFeature.value.resetSwitch == 1,
|
||||||
state.lockFeature.value.resetSwitch == 1,
|
child: CommonItem(
|
||||||
child: CommonItem(
|
leftTitel: TranslationLoader.lanKeys!.resetButton!.tr,
|
||||||
leftTitel: TranslationLoader.lanKeys!.resetButton!.tr,
|
rightTitle: (state.lockSettingInfo.value.resetSwitch ?? 0) == 1
|
||||||
rightTitle: (state.lockSettingInfo.value.resetSwitch ?? 0) ==
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
1
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
isHaveLine: true,
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
action: () {
|
||||||
isHaveDirection: true,
|
Get.toNamed(Routers.resetButtonPage,
|
||||||
action: () {
|
arguments: <String, LockSetInfoData>{
|
||||||
Get.toNamed(Routers.resetButtonPage,
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
arguments: <String, LockSetInfoData>{
|
});
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
}))),
|
||||||
});
|
|
||||||
}))),
|
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
//---田总新增展示
|
//---田总新增展示
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
@ -409,20 +397,19 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
//猫眼设置
|
//猫眼设置
|
||||||
Obx(() =>
|
Obx(() => Visibility(
|
||||||
Visibility(
|
visible: state.lockFeature.value.isSupportCatEye == 1,
|
||||||
visible: state.lockFeature.value.isSupportCatEye == 1,
|
child: CommonItem(
|
||||||
child: CommonItem(
|
leftTitel: TranslationLoader.lanKeys!.catEyeSet!.tr,
|
||||||
leftTitel: TranslationLoader.lanKeys!.catEyeSet!.tr,
|
rightTitle: '',
|
||||||
rightTitle: '',
|
isHaveLine: true,
|
||||||
isHaveLine: true,
|
isHaveDirection: true,
|
||||||
isHaveDirection: true,
|
action: () {
|
||||||
action: () {
|
Get.toNamed(Routers.catEyeSetPage,
|
||||||
Get.toNamed(Routers.catEyeSetPage,
|
arguments: <String, LockSetInfoData>{
|
||||||
arguments: <String, LockSetInfoData>{
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
});
|
||||||
});
|
}))),
|
||||||
}))),
|
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
//自动亮屏已包括至面容开锁模块
|
//自动亮屏已包括至面容开锁模块
|
||||||
// Visibility(
|
// Visibility(
|
||||||
@ -477,7 +464,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
// 蓝牙广播(关闭则不能使用蓝牙主动开锁)
|
// 蓝牙广播(关闭则不能使用蓝牙主动开锁)
|
||||||
/* 2024-01-12 会议确定去掉“蓝牙广播” by DaisyWu
|
/* 2024-01-12 会议确定去掉“蓝牙广播” by DaisyWu
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.bluetoothBroadcast!.tr,
|
leftTitel: TranslationLoader.lanKeys!.bluetoothBroadcast!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
@ -511,66 +498,62 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
// }),
|
// }),
|
||||||
// 考勤
|
// 考勤
|
||||||
Obx(
|
Obx(
|
||||||
() =>
|
() => Visibility(
|
||||||
Visibility(
|
visible: state.lockBasicInfo.value.isLockOwner == 1 &&
|
||||||
visible: state.lockBasicInfo.value.isLockOwner == 1 &&
|
state.lockFeature.value.attendance == 1,
|
||||||
state.lockFeature.value.attendance == 1,
|
child: CommonItem(
|
||||||
child: CommonItem(
|
leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr,
|
||||||
leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr,
|
rightTitle: '',
|
||||||
rightTitle: '',
|
isHaveLine: true,
|
||||||
isHaveLine: true,
|
isHaveRightWidget: true,
|
||||||
isHaveRightWidget: true,
|
rightWidget: _openCheckInSwitch())),
|
||||||
rightWidget: _openCheckInSwitch())),
|
|
||||||
),
|
),
|
||||||
// 开锁提醒
|
// 开锁提醒
|
||||||
Obx(
|
Obx(
|
||||||
() =>
|
() => Visibility(
|
||||||
Visibility(
|
visible: state.lockBasicInfo.value.isLockOwner == 1 &&
|
||||||
visible: state.lockBasicInfo.value.isLockOwner == 1 &&
|
state.lockFeature.value.unlockReminder == 1,
|
||||||
state.lockFeature.value.unlockReminder == 1,
|
child: CommonItem(
|
||||||
child: CommonItem(
|
leftTitel: TranslationLoader.lanKeys!.unlockReminder!.tr,
|
||||||
leftTitel: TranslationLoader.lanKeys!.unlockReminder!.tr,
|
rightTitle: '',
|
||||||
rightTitle: '',
|
isHaveLine: true,
|
||||||
isHaveLine: true,
|
isHaveRightWidget: true,
|
||||||
isHaveRightWidget: true,
|
rightWidget: _lockRemindSwitch())),
|
||||||
rightWidget: _lockRemindSwitch())),
|
|
||||||
),
|
),
|
||||||
// APP开锁时是否需联网
|
// APP开锁时是否需联网
|
||||||
Obx(
|
Obx(
|
||||||
() =>
|
() => Visibility(
|
||||||
Visibility(
|
visible: state.lockBasicInfo.value.isLockOwner == 1 &&
|
||||||
visible: state.lockBasicInfo.value.isLockOwner == 1 &&
|
state.lockFeature.value.appUnlockOnline == 1,
|
||||||
state.lockFeature.value.appUnlockOnline == 1,
|
child: CommonItem(
|
||||||
child: CommonItem(
|
leftTitel: TranslationLoader
|
||||||
leftTitel: TranslationLoader
|
.lanKeys!.whetherInternetRequiredWhenUnlocking!.tr,
|
||||||
.lanKeys!.whetherInternetRequiredWhenUnlocking!.tr,
|
rightTitle: '',
|
||||||
rightTitle: '',
|
isHaveLine: false,
|
||||||
isHaveLine: false,
|
isHaveRightWidget: true,
|
||||||
isHaveRightWidget: true,
|
rightWidget: _openLockNeedOnlineSwitch()),
|
||||||
rightWidget: _openLockNeedOnlineSwitch()),
|
),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
// wifi配网
|
// wifi配网
|
||||||
Obx(
|
Obx(
|
||||||
() =>
|
() => Visibility(
|
||||||
Visibility(
|
visible: state.lockFeature.value.wifi == 1,
|
||||||
visible: state.lockFeature.value.wifi == 1,
|
child: CommonItem(
|
||||||
child: CommonItem(
|
leftTitel:
|
||||||
leftTitel:
|
|
||||||
TranslationLoader.lanKeys!.wifiDistributionNetwork!.tr,
|
TranslationLoader.lanKeys!.wifiDistributionNetwork!.tr,
|
||||||
rightTitle: '',
|
rightTitle: '',
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.wifiListPage,
|
Get.toNamed(Routers.wifiListPage,
|
||||||
arguments: <String, LockSetInfoData>{
|
arguments: <String, LockSetInfoData>{
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
});
|
});
|
||||||
// Get.toNamed(Routers.configuringWifiPage, arguments: {
|
// Get.toNamed(Routers.configuringWifiPage, arguments: {
|
||||||
// 'lockSetInfoData': state.lockSetInfoData.value
|
// 'lockSetInfoData': state.lockSetInfoData.value
|
||||||
// });
|
// });
|
||||||
})),
|
})),
|
||||||
),
|
),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
// 锁时间
|
// 锁时间
|
||||||
@ -582,10 +565,10 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(
|
Get.toNamed(Routers.lockTimePage,
|
||||||
Routers.lockTimePage, arguments: <String, LockSetInfoData>{
|
arguments: <String, LockSetInfoData>{
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
@ -676,12 +659,11 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: state.isAttendance.value == 1,
|
value: state.isAttendance.value == 1,
|
||||||
onChanged: (bool value) {
|
onChanged: (bool value) {
|
||||||
logic.openCheckingInData((
|
logic.openCheckingInData(
|
||||||
CheckingInInfoDataEntity checkingInInfoDataEntity) {
|
(CheckingInInfoDataEntity checkingInInfoDataEntity) {
|
||||||
if (checkingInInfoDataEntity.data!.companyId == 0) {
|
if (checkingInInfoDataEntity.data!.companyId == 0) {
|
||||||
// logic.showCupertinoAlertDialog(context);
|
// logic.showCupertinoAlertDialog(context);
|
||||||
ShowTipView().showIosTipWithContentDialog(
|
ShowTipView().showIosTipWithContentDialog('创建公司后,考勤功能才能使用'.tr, () {
|
||||||
'创建公司后,考勤功能才能使用'.tr, () {
|
|
||||||
// 删除锁
|
// 删除锁
|
||||||
Get.toNamed(Routers.checkInCreatCompanyPage,
|
Get.toNamed(Routers.checkInCreatCompanyPage,
|
||||||
arguments: <String, LockSetInfoData>{
|
arguments: <String, LockSetInfoData>{
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import 'package:flutter/cupertino.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/main/lockMian/lockMain/lockMain_logic.dart';
|
||||||
import 'package:star_lock/tools/noData.dart';
|
import 'package:star_lock/tools/noData.dart';
|
||||||
|
|
||||||
import '../../../../../appRouters.dart';
|
import '../../../../../appRouters.dart';
|
||||||
@ -19,6 +20,7 @@ class WirelessKeyboardPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
|
class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
|
||||||
List dataList = [];
|
List dataList = [];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@ -34,6 +36,11 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
|
|||||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
final bool isNetWork =
|
||||||
|
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
if (!isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
_showDialog(context);
|
_showDialog(context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@ -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/fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
||||||
import 'package:star_lock/main/lockDetail/palm/palmList/palmList_logic.dart';
|
import 'package:star_lock/main/lockDetail/palm/palmList/palmList_logic.dart';
|
||||||
|
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||||
import 'package:star_lock/tools/keySearchWidget.dart';
|
import 'package:star_lock/tools/keySearchWidget.dart';
|
||||||
import 'package:star_lock/tools/left_slide/left_slide_actions.dart';
|
import 'package:star_lock/tools/left_slide/left_slide_actions.dart';
|
||||||
|
|
||||||
@ -44,6 +45,11 @@ class _PalmListPageState extends State<PalmListPage> {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
|
final bool isNetWork =
|
||||||
|
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
if (!isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
showDeletAlertDialog(context);
|
showDeletAlertDialog(context);
|
||||||
} else {
|
} else {
|
||||||
// Get.toNamed(Routers.selectLockTypePage);
|
// Get.toNamed(Routers.selectLockTypePage);
|
||||||
|
|||||||
@ -57,7 +57,7 @@ class PasswordKeyDetailLogic extends BaseGetXController {
|
|||||||
pwdNo: state.itemData.value.pwdUserNo!,
|
pwdNo: state.itemData.value.pwdUserNo!,
|
||||||
pwd: state.inputPwdController.text,
|
pwd: state.inputPwdController.text,
|
||||||
useCountLimit: 0xffff,
|
useCountLimit: 0xffff,
|
||||||
operate: state.isDeletPasswordKey.value == true ? 2 : 1,
|
operate: state.itemData.value.isCustom == 1 ? (state.isDeletPasswordKey.value == true ? 2 : 1) : 3,
|
||||||
isAdmin: state.isAdministrator.value == true ? 1 : 0,
|
isAdmin: state.isAdministrator.value == true ? 1 : 0,
|
||||||
startTime:state.itemData.value.startDate! ~/ 1000,
|
startTime:state.itemData.value.startDate! ~/ 1000,
|
||||||
endTime:state.itemData.value.endDate! ~/ 1000,
|
endTime:state.itemData.value.endDate! ~/ 1000,
|
||||||
@ -147,7 +147,7 @@ class PasswordKeyDetailLogic extends BaseGetXController {
|
|||||||
pwdNo: state.itemData.value.pwdUserNo!,
|
pwdNo: state.itemData.value.pwdUserNo!,
|
||||||
pwd: state.inputPwdController.text,
|
pwd: state.inputPwdController.text,
|
||||||
useCountLimit: 0xffff,
|
useCountLimit: 0xffff,
|
||||||
operate: state.itemData.value.isCustom == 1 ? state.isDeletPasswordKey.value == true ? 2 : 1 : 3,
|
operate: state.itemData.value.isCustom == 1 ? (state.isDeletPasswordKey.value == true ? 2 : 1) : 3,
|
||||||
isAdmin: state.isAdministrator.value == true ? 1 : 0,
|
isAdmin: state.isAdministrator.value == true ? 1 : 0,
|
||||||
startTime:state.itemData.value.startDate! ~/ 1000,
|
startTime:state.itemData.value.startDate! ~/ 1000,
|
||||||
endTime:state.itemData.value.endDate! ~/ 1000,
|
endTime:state.itemData.value.endDate! ~/ 1000,
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKe
|
|||||||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_logic.dart';
|
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_logic.dart';
|
||||||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_state.dart';
|
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_state.dart';
|
||||||
import 'package:star_lock/main/lockMian/entity/lockListInfo_entity.dart';
|
import 'package:star_lock/main/lockMian/entity/lockListInfo_entity.dart';
|
||||||
|
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||||
import 'package:star_lock/tools/noData.dart';
|
import 'package:star_lock/tools/noData.dart';
|
||||||
import 'package:star_lock/tools/storage.dart';
|
import 'package:star_lock/tools/storage.dart';
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
@ -67,6 +68,11 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
|||||||
final bool? isDemoMode =
|
final bool? isDemoMode =
|
||||||
await Storage.getBool(ifIsDemoModeOrNot);
|
await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
|
final bool isNetWork =
|
||||||
|
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
if (!isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (state.itemDataList.isEmpty) {
|
if (state.itemDataList.isEmpty) {
|
||||||
logic.showToast('暂无密码,无需重置'.tr);
|
logic.showToast('暂无密码,无需重置'.tr);
|
||||||
return;
|
return;
|
||||||
@ -227,7 +233,8 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
|||||||
Row(
|
Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: passwordKeyListItem.keyboardPwdStatus == 2 || passwordKeyListItem.keyboardPwdStatus == 3
|
width: passwordKeyListItem.keyboardPwdStatus == 2 ||
|
||||||
|
passwordKeyListItem.keyboardPwdStatus == 3
|
||||||
? 1.sw - 110.w - 100.w
|
? 1.sw - 110.w - 100.w
|
||||||
: 1.sw - 110.w - 50.w,
|
: 1.sw - 110.w - 50.w,
|
||||||
child: Row(children: <Widget>[
|
child: Row(children: <Widget>[
|
||||||
@ -247,7 +254,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
|||||||
'已过期'.tr,
|
'已过期'.tr,
|
||||||
style: TextStyle(color: Colors.red, fontSize: 20.sp),
|
style: TextStyle(color: Colors.red, fontSize: 20.sp),
|
||||||
)
|
)
|
||||||
else if (passwordKeyListItem.keyboardPwdStatus == 3)
|
else if (passwordKeyListItem.keyboardPwdStatus == 3)
|
||||||
Text(
|
Text(
|
||||||
'未生效'.tr,
|
'未生效'.tr,
|
||||||
style: TextStyle(color: Colors.red, fontSize: 20.sp),
|
style: TextStyle(color: Colors.red, fontSize: 20.sp),
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import 'package:flutter/cupertino.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/main/lockMian/lockMain/lockMain_logic.dart';
|
||||||
|
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
@ -44,6 +45,11 @@ class _RemoteControlListPageState extends State<RemoteControlListPage> {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
|
final bool isNetWork =
|
||||||
|
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
if (!isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
showDeletAlertDialog(context);
|
showDeletAlertDialog(context);
|
||||||
} else {
|
} else {
|
||||||
// Get.toNamed(Routers.selectLockTypePage);
|
// Get.toNamed(Routers.selectLockTypePage);
|
||||||
|
|||||||
@ -109,11 +109,20 @@ class LockMainLogic extends BaseGetXController {
|
|||||||
result != ConnectivityResult.none) {
|
result != ConnectivityResult.none) {
|
||||||
// 从无网络到有网络
|
// 从无网络到有网络
|
||||||
state.networkConnectionStatus.value = 1;
|
state.networkConnectionStatus.value = 1;
|
||||||
getStarLockInfo();
|
getStarLockInfo(isUnShowLoading: true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 判断是否有网络
|
||||||
|
bool judgeTheNetwork() {
|
||||||
|
final bool isNetwork = state.networkConnectionStatus.value == 1;
|
||||||
|
if (!isNetwork) {
|
||||||
|
EasyLoading.showToast('网络访问失败,请检查网络是否正常'.tr);
|
||||||
|
}
|
||||||
|
return isNetwork;
|
||||||
|
}
|
||||||
|
|
||||||
/// 检测推送是否开启
|
/// 检测推送是否开启
|
||||||
Future<void> checkWhetherPushIsEnabled() async {
|
Future<void> checkWhetherPushIsEnabled() async {
|
||||||
bool notificationEnabled = false;
|
bool notificationEnabled = false;
|
||||||
@ -261,6 +270,7 @@ class LockMainLogic extends BaseGetXController {
|
|||||||
super.onInit();
|
super.onInit();
|
||||||
checkWhetherPushIsEnabled();
|
checkWhetherPushIsEnabled();
|
||||||
_initSubscription();
|
_initSubscription();
|
||||||
|
connectListener();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -270,4 +280,11 @@ class LockMainLogic extends BaseGetXController {
|
|||||||
});
|
});
|
||||||
super.onClose();
|
super.onClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LockMainLogic? to() {
|
||||||
|
if (Get.isRegistered<LockMainLogic>()) {
|
||||||
|
return Get.find<LockMainLogic>();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -75,7 +75,7 @@ abstract class Api {
|
|||||||
final String openCheckingInURL =
|
final String openCheckingInURL =
|
||||||
'/attendanceCompany/isExistenceCompany'; // 开启考勤获取是否有公司
|
'/attendanceCompany/isExistenceCompany'; // 开启考勤获取是否有公司
|
||||||
final String setCheckInCreateCompanyURL =
|
final String setCheckInCreateCompanyURL =
|
||||||
'/attendanceCompany/add'; // 设置考勤时创建公司
|
'/v2/attendanceCompany/add'; // 设置考勤时创建公司
|
||||||
final String deleteCompanyURL = '/attendanceCompany/delete'; // 删除公司
|
final String deleteCompanyURL = '/attendanceCompany/delete'; // 删除公司
|
||||||
|
|
||||||
final String getAttendanceRecordListByDateURL =
|
final String getAttendanceRecordListByDateURL =
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|
||||||
@ -8,34 +7,47 @@ class ShowDeleteAdministratorIsHaveAllDataWidget extends StatefulWidget {
|
|||||||
BlockIsHaveAllDataCallback? blockIsHaveAllDataCallback;
|
BlockIsHaveAllDataCallback? blockIsHaveAllDataCallback;
|
||||||
String? contentStr;
|
String? contentStr;
|
||||||
|
|
||||||
ShowDeleteAdministratorIsHaveAllDataWidget({Key? key, this.contentStr, this.blockIsHaveAllDataCallback}) : super(key: key);
|
ShowDeleteAdministratorIsHaveAllDataWidget(
|
||||||
|
{Key? key, this.contentStr, this.blockIsHaveAllDataCallback})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<ShowDeleteAdministratorIsHaveAllDataWidget> createState() => _ShowDeleteAdministratorIsHaveAllDataWidgetState();
|
State<ShowDeleteAdministratorIsHaveAllDataWidget> createState() =>
|
||||||
|
_ShowDeleteAdministratorIsHaveAllDataWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ShowDeleteAdministratorIsHaveAllDataWidgetState extends State<ShowDeleteAdministratorIsHaveAllDataWidget> {
|
class _ShowDeleteAdministratorIsHaveAllDataWidgetState
|
||||||
|
extends State<ShowDeleteAdministratorIsHaveAllDataWidget> {
|
||||||
bool selet = false;
|
bool selet = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Row(
|
return GestureDetector(
|
||||||
children: [
|
onTap: () {
|
||||||
GestureDetector(
|
setState(() {
|
||||||
onTap: () {
|
selet = !selet;
|
||||||
setState(() {
|
widget.blockIsHaveAllDataCallback!(selet);
|
||||||
selet = !selet;
|
});
|
||||||
widget.blockIsHaveAllDataCallback!(selet);
|
},
|
||||||
});
|
child: Row(
|
||||||
},
|
children: <Widget>[
|
||||||
child: Image.asset(
|
Image.asset(
|
||||||
selet ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png',
|
selet
|
||||||
width: 30.w,
|
? 'images/icon_round_select.png'
|
||||||
height: 30.w,
|
: 'images/icon_round_unSelect.png',
|
||||||
)),
|
width: 30.w,
|
||||||
SizedBox(width: 15.w,),
|
height: 30.w,
|
||||||
Expanded(child: Text(widget.contentStr!, maxLines: 2, textAlign: TextAlign.start, style: TextStyle(fontSize: 24.sp))),
|
),
|
||||||
],
|
SizedBox(
|
||||||
|
width: 15.w,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Text(widget.contentStr!,
|
||||||
|
maxLines: 2,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
style: TextStyle(fontSize: 24.sp))),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
14
pre_build.sh
14
pre_build.sh
@ -10,7 +10,7 @@
|
|||||||
# 设置
|
# 设置
|
||||||
environment="xhj"
|
environment="xhj"
|
||||||
main_file="lib/main_xhj_full.dart"
|
main_file="lib/main_xhj_full.dart"
|
||||||
version_string="1.0.52"
|
version_string="1.0.66"
|
||||||
file_path="lib/network/api.dart"
|
file_path="lib/network/api.dart"
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
@ -38,7 +38,17 @@ esac
|
|||||||
|
|
||||||
echo "API 前缀为: $api_prefix"
|
echo "API 前缀为: $api_prefix"
|
||||||
|
|
||||||
urls=$(curl -s -X POST -d "version=$version_string" "$environment/api/app/getDeprecatedApiList" | jq -r '.data[].url')
|
response=$(curl -s -X POST -d "version=$version_string" "$api_prefix/api/app/checkAppBuildVersion")
|
||||||
|
error_code=$(echo $response | jq '.errorCode')
|
||||||
|
|
||||||
|
# 判断是否成功
|
||||||
|
if [ "$error_code" != "0" ]; then
|
||||||
|
error_msg=$(echo $response | jq -r '.errorMsg')
|
||||||
|
echo "失败:$error_msg"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
urls=$(curl -s -X POST -d "version=$version_string" "$api_prefix/api/app/getDeprecatedApiList" | jq -r '.data[].url')
|
||||||
echo "* 成功获取废弃 api 数据"
|
echo "* 成功获取废弃 api 数据"
|
||||||
|
|
||||||
# 解析 api 文件数据
|
# 解析 api 文件数据
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user