Compare commits

..

No commits in common. "bc24ca6146602a42c0cd93075b3f462cedd59d23" and "c9683b4cbaac36da07574d9f7a7fa76f2abd530c" have entirely different histories.

11 changed files with 2073 additions and 1754 deletions

View File

@ -144,7 +144,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
break;
case AppLifecycleState.paused:
// AppLog.log('App--->进入后台');
BlueManage.instance.disconnect();
BlueManage().disconnect();
break;
case AppLifecycleState.resumed:
// AppLog.log('App--->进入前台');

View File

@ -85,12 +85,6 @@ class BlueManage {
return _manager;
}
// 访
static BlueManage get instance {
_manager ??= BlueManage._init();
return _manager!;
}
BlueManage? get manager => shareManager();
void _initBlue() {
@ -100,13 +94,9 @@ class BlueManage {
}
void _initGetMtuSubscription() {
//
_mtuSubscription?.cancel();
_mtuSubscription = null;
_mtuSubscription = bluetoothConnectDevice!.mtu.listen((int value) {
_mtuSubscription ??= bluetoothConnectDevice!.mtu.listen((int value) {
_mtuSize = value - 3;
AppLog.log('设备MTU变化 - 原始值:$value 计算后MTU:$_mtuSize 设备:${bluetoothConnectDevice?.remoteId.str}');
AppLog.log('_mtuSizeValue:$value mtuSize:$_mtuSize');
});
}
@ -964,12 +954,6 @@ class BlueManage {
Future<void> disconnect() async {
try {
connectDeviceMacAddress = '';
// MTU监听
_mtuSubscription?.cancel();
_mtuSubscription = null;
_mtuSize = 20; // MTU为默认值
if (bluetoothConnectionState == BluetoothConnectionState.connected) {
//
await bluetoothConnectDevice!.disconnect(timeout: 3);
@ -991,29 +975,10 @@ class BlueManage {
}
}
// MTU信息
String getMtuDebugInfo() {
return 'MTU Debug Info:\n'
'- Current MTU Size: $_mtuSize\n'
'- Connected Device: ${bluetoothConnectDevice?.remoteId.str ?? "None"}\n'
'- Device Name: $connectDeviceName\n'
'- Connection State: $bluetoothConnectionState\n'
'- MTU Subscription Active: ${_mtuSubscription != null}';
}
void disposed() {
_sendStreamSubscription?.cancel();
_mtuSubscription?.cancel();
_adapterStateStateSubscription?.cancel();
_connectionStateSubscription?.cancel();
//
_mtuSize = 20;
connectDeviceName = '';
connectDeviceMacAddress = '';
bluetoothConnectDevice = null;
scanDevices.clear();
allData.clear();
lastTimeData.clear();
_mtuSubscription!.cancel();
_adapterStateStateSubscription!.cancel();
_connectionStateSubscription!.cancel();
}
}

View File

@ -30,41 +30,39 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
return Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: const Color(0xFFFFFFFF),
appBar: TitleAppBar(barTitle: '注册'.tr, haveBack: true, backgroundColor: AppColors.mainColor),
body: GestureDetector(
onTap: () {
FocusScope.of(context).unfocus();
},
child: ListView(
padding: EdgeInsets.only(top: 40.h, left: 40.w, right: 40.w),
children: <Widget>[
topSelectCountryAndRegionWidget(),
middleTFWidget(),
Obx(() {
return SubmitBtn(
btnName: '注册'.tr,
// backgroundColorList: state.canSub.value ? [AppColors.mainColor] :[Colors.grey],
fontSize: 30.sp,
borderRadius: 20.w,
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
isDisabled: state.canSub.value,
onClick: state.canSub.value
? () {
if (state.agree.value == false) {
logic.showToast('请先同意用户协议及隐私政策'.tr);
return;
} else {
logic.register();
}
appBar: TitleAppBar(
barTitle: '注册'.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: ListView(
padding: EdgeInsets.only(top: 40.h, left: 40.w, right: 40.w),
children: <Widget>[
topSelectCountryAndRegionWidget(),
middleTFWidget(),
Obx(() {
return SubmitBtn(
btnName: '注册'.tr,
// backgroundColorList: state.canSub.value ? [AppColors.mainColor] :[Colors.grey],
fontSize: 30.sp,
borderRadius: 20.w,
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
isDisabled: state.canSub.value,
onClick: state.canSub.value
? () {
if (state.agree.value == false) {
logic.showToast('请先同意用户协议及隐私政策'.tr);
return;
} else {
logic.register();
}
: null);
}),
SizedBox(
height: 20.h,
),
_buildBottomAgreement()
],
),
}
: null);
}),
SizedBox(
height: 20.h,
),
_buildBottomAgreement()
],
));
}
@ -79,7 +77,9 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
width: 340.w,
height: 60.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(30.h)), border: Border.all(width: 1.0, color: AppColors.greyLineColor)),
borderRadius: BorderRadius.all(Radius.circular(30.h)),
border:
Border.all(width: 1.0, color: AppColors.greyLineColor)),
child: Row(
children: <Widget>[
GestureDetector(
@ -93,13 +93,18 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
decoration: state.isIphoneType.value
? BoxDecoration(
color: AppColors.mainColor,
borderRadius: BorderRadius.all(Radius.circular(30.h)),
border: Border.all(width: 1.0, color: AppColors.greyLineColor))
borderRadius:
BorderRadius.all(Radius.circular(30.h)),
border: Border.all(
width: 1.0, color: AppColors.greyLineColor))
: null,
child: Center(
child: Text(
'手机'.tr,
style: TextStyle(color: state.isIphoneType.value ? Colors.white : Colors.black),
style: TextStyle(
color: state.isIphoneType.value
? Colors.white
: Colors.black),
),
),
),
@ -116,14 +121,19 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
decoration: !state.isIphoneType.value
? BoxDecoration(
color: AppColors.mainColor,
borderRadius: BorderRadius.all(Radius.circular(30.h)),
border: Border.all(width: 1.0, color: AppColors.greyLineColor))
borderRadius:
BorderRadius.all(Radius.circular(30.h)),
border: Border.all(
width: 1.0,
color: AppColors.greyLineColor))
: null,
child: Center(
child: Text(
'邮箱'.tr,
style: TextStyle(
color: !state.isIphoneType.value ? Colors.white : Colors.black,
color: !state.isIphoneType.value
? Colors.white
: Colors.black,
),
),
),
@ -153,15 +163,21 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
child: Row(
children: <Widget>[
SizedBox(width: 5.w),
Expanded(child: Text('你所在的国家/地区'.tr, style: TextStyle(fontSize: 26.sp, color: AppColors.blackColor))),
Expanded(
child: Text('你所在的国家/地区'.tr,
style: TextStyle(
fontSize: 26.sp, color: AppColors.blackColor))),
SizedBox(width: 20.w),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Text(
state.isIphoneType.value ? '${state.countryName.value} +${state.countryCode.value}' : state.countryName.value,
state.isIphoneType.value
? '${state.countryName.value} +${state.countryCode.value}'
: state.countryName.value,
textAlign: TextAlign.end,
style: TextStyle(fontSize: 26.sp, color: AppColors.blackColor),
style: TextStyle(
fontSize: 26.sp, color: AppColors.blackColor),
)
],
),
@ -196,7 +212,9 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
Padding(
padding: EdgeInsets.only(right: 5.w, left: 5.w),
child: Image.asset(
state.isIphoneType.value ? 'images/icon_login_account.png' : 'images/icon_login_email.png',
state.isIphoneType.value
? 'images/icon_login_account.png'
: 'images/icon_login_email.png',
width: 30.w,
height: 30.w,
),
@ -230,7 +248,8 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
SizedBox(height: 15.w),
Text(
'密码必须是8-20位至少包括数字/字母/符号中的2种'.tr,
style: TextStyle(color: AppColors.placeholderTextColor, fontSize: 20.sp),
style:
TextStyle(color: AppColors.placeholderTextColor, fontSize: 20.sp),
),
SizedBox(height: 10.w),
LoginInput(
@ -280,9 +299,14 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
onTap: (state.canSendCode.value && state.canResend.value)
? () async {
// Navigator.pushNamed(context, Routers.safetyVerificationPage, arguments: {"countryCode":"+86", "account":state.phoneOrEmailStr.value});
final Object? result = await Navigator.pushNamed(context, Routers.safetyVerificationPage,
arguments: <String, Object>{'countryCode': state.countryCode, 'account': state.phoneOrEmailStr.value});
state.xWidth.value = (result! as Map<String, dynamic>)['xWidth'];
final Object? result = await Navigator.pushNamed(
context, Routers.safetyVerificationPage,
arguments: <String, Object>{
'countryCode': state.countryCode,
'account': state.phoneOrEmailStr.value
});
state.xWidth.value =
(result! as Map<String, dynamic>)['xWidth'];
logic.sendValidationCode();
}
: null,
@ -291,7 +315,10 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
// height: 60.h,
padding: EdgeInsets.all(10.h),
decoration: BoxDecoration(
color: (state.canSendCode.value && state.canResend.value) ? AppColors.mainColor : Colors.grey,
color:
(state.canSendCode.value && state.canResend.value)
? AppColors.mainColor
: Colors.grey,
borderRadius: BorderRadius.circular(5)),
child: Center(
child: Text(state.btnText.value,
@ -320,7 +347,9 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
logic.changeAgreeState();
},
child: Image.asset(
state.agree.value ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png',
state.agree.value
? 'images/icon_round_select.png'
: 'images/icon_round_unSelect.png',
width: 30.w,
height: 30.w,
))),
@ -336,17 +365,29 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: GestureDetector(
child: Text('${'用户协议'.tr}', style: TextStyle(color: AppColors.mainColor, fontSize: 20.sp)),
child: Text('${'用户协议'.tr}',
style: TextStyle(
color: AppColors.mainColor, fontSize: 20.sp)),
onTap: () {
Get.toNamed(Routers.webviewShowPage, arguments: <String, String>{'url': XSConstantMacro.userAgreementURL, 'title': '用户协议'.tr});
Get.toNamed(Routers.webviewShowPage,
arguments: <String, String>{
'url': XSConstantMacro.userAgreementURL,
'title': '用户协议'.tr
});
},
)),
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: GestureDetector(
child: Text('${'隐私政策'.tr}', style: TextStyle(color: AppColors.mainColor, fontSize: 20.sp)),
child: Text('${'隐私政策'.tr}',
style: TextStyle(
color: AppColors.mainColor, fontSize: 20.sp)),
onTap: () {
Get.toNamed(Routers.webviewShowPage, arguments: <String, String>{'url': XSConstantMacro.privacyPolicyURL, 'title': '隐私政策'.tr});
Get.toNamed(Routers.webviewShowPage,
arguments: <String, String>{
'url': XSConstantMacro.privacyPolicyURL,
'title': '隐私政策'.tr
});
},
)),
],

View File

@ -82,7 +82,8 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
backgroundColor: AppColors.mainColor,
actionsList: <Widget>[
Visibility(
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1 || CommonDataManage().currentKeyInfo.keyRight == 1,
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1 ||
CommonDataManage().currentKeyInfo.keyRight == 1,
child: GestureDetector(
child: Image.asset(
'images/icon_tips_Q.png',
@ -91,20 +92,27 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
color: Colors.white,
),
onTap: () {
ShowTipView().showSureAlertDialog('1.锁没有联网密码、IC卡、指纹等开门记录无法实时上传可以点击右上角按钮然后读取记录。'.tr + '\n' + '2.如果您需要保留历史记录,可以点击右上角按钮,然后导出记录'.tr,
tipTitle: '看不到操作记录,可能原因有'.tr, sureStr: '我知道了'.tr);
ShowTipView().showSureAlertDialog(
'1.锁没有联网密码、IC卡、指纹等开门记录无法实时上传可以点击右上角按钮然后读取记录。'.tr +
'\n' +
'2.如果您需要保留历史记录,可以点击右上角按钮,然后导出记录'.tr,
tipTitle: '看不到操作记录,可能原因有'.tr,
sureStr: '我知道了'.tr);
},
)),
Visibility(
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1 || CommonDataManage().currentKeyInfo.keyRight == 1,
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1 ||
CommonDataManage().currentKeyInfo.keyRight == 1,
child: PopupMenuButton<String>(
onSelected: _onMenuItemSelected,
color: Colors.black,
itemBuilder: (BuildContext context) {
return <PopupMenuEntry<String>>[
_buildCustomPopupMenuItem('读取记录'.tr),
if (CommonDataManage().currentKeyInfo.isLockOwner == 1) const PopupMenuDivider(),
if (CommonDataManage().currentKeyInfo.isLockOwner == 1) _buildCustomPopupMenuItem('清空记录'.tr),
if (CommonDataManage().currentKeyInfo.isLockOwner == 1)
const PopupMenuDivider(),
if (CommonDataManage().currentKeyInfo.isLockOwner == 1)
_buildCustomPopupMenuItem('清空记录'.tr),
const PopupMenuDivider(),
_buildCustomPopupMenuItem('导出记录'.tr),
];
@ -122,7 +130,11 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
body: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[topAdvancedCalendarWidget(), eventDropDownWidget(), Expanded(child: timeLineView())],
children: <Widget>[
topAdvancedCalendarWidget(),
eventDropDownWidget(),
Expanded(child: timeLineView())
],
),
floatingActionButton: Visibility(
visible: _isAtBottom,
@ -181,7 +193,8 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
builder: (BuildContext context) {
return ExportRecordDialog(
onExport: (String filePath) {
Get.toNamed(Routers.exportSuccessPage, arguments: <String, String>{'filePath': filePath});
Get.toNamed(Routers.exportSuccessPage,
arguments: <String, String>{'filePath': filePath});
},
);
},
@ -258,7 +271,8 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
String formatTimestampToDateTimeYYYYMMDD(int timestampMs) {
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(timestampMs);
DateFormat formatter = DateFormat('MM${''.tr}dd${''.tr}'); // 2025-08-18 14:30
DateFormat formatter =
DateFormat('MM${''.tr}dd${''.tr}'); // 2025-08-18 14:30
return formatter.format(dateTime);
}
@ -286,71 +300,103 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
final recordType = item.recordType;
switch (recordType) {
case 10:
return '${formatTimestampToHHmm(item.operateDate!)} ' + '指纹'.tr + '开锁'.tr + '${_formatUserNameOrId(item)}';
if (item.username != null && item.username != '') {
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'指纹'.tr +
'开锁'.tr +
'ID${item.username}';
} else {
return item.recordStr ?? '';
}
case 20:
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'密码'.tr +
'开锁'.tr +
'${_formatUserNameOrId(item)}' +
'${'昵称'.tr}${item.username}' +
'${'密码'.tr}${item.keyboardPwd}';
case 30:
return '${formatTimestampToHHmm(item.operateDate!)} ' + ''.tr + '开锁'.tr + '${_formatUserNameOrId(item)}';
return '${formatTimestampToHHmm(item.operateDate!)} ' +
''.tr +
'开锁'.tr +
'${'昵称'.tr}${item.username}';
case 40:
if (item.username != null && item.username != '') {
return '${formatTimestampToHHmm(item.operateDate!)} ' + '蓝牙'.tr + '开锁'.tr + '${_formatUserNameOrId(item)}';
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'蓝牙'.tr +
'开锁'.tr +
'' +
'${'昵称'.tr}'.tr +
'${item.username}';
} else {
return '${formatTimestampToHHmm(item.operateDate!)} ' + '蓝牙'.tr + '开锁'.tr + '' + 'ID'.tr + '${item.userid}';
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'蓝牙'.tr +
'开锁'.tr +
'' +
'ID'.tr +
'${item.userid}';
}
case 50:
return '${formatTimestampToHHmm(item.operateDate!)} ' + '组合模式'.tr + '开锁'.tr + '${_formatUserNameOrId(item)}';
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'组合模式'.tr +
'开锁'.tr +
'${'昵称'.tr}${item.username}';
case 60:
return '${formatTimestampToHHmm(item.operateDate!)} ' + '添加'.tr + '指纹'.tr + '${_formatUserNameOrId(item)}';
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'添加'.tr +
'指纹'.tr +
'${'昵称'.tr}${item.username}';
case 70:
return '${formatTimestampToHHmm(item.operateDate!)} ' + '添加'.tr + '密码'.tr + '${_formatUserNameOrId(item)}';
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'添加'.tr +
'密码'.tr +
'${'昵称'.tr}${item.username}';
case 80:
return '${formatTimestampToHHmm(item.operateDate!)} ' + '添加'.tr + ''.tr + '${_formatUserNameOrId(item)}';
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'添加'.tr +
''.tr +
'${'昵称'.tr}${item.username}';
case 90:
return '${formatTimestampToHHmm(item.operateDate!)} ' + '删除'.tr + '指纹'.tr + '${_formatUserNameOrId(item)}';
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'删除'.tr +
'指纹'.tr +
'${'昵称'.tr}${item.username}';
case 100:
return '${formatTimestampToHHmm(item.operateDate!)} ' + '删除'.tr + '密码'.tr + '${_formatUserNameOrId(item)}';
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'删除'.tr +
'密码'.tr +
'${'昵称'.tr}${item.username}';
case 110:
return '${formatTimestampToHHmm(item.operateDate!)} ' + '删除'.tr + ''.tr + '${_formatUserNameOrId(item)}';
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'删除'.tr +
''.tr +
'${'昵称'.tr}${item.username}';
case 160:
return '${formatTimestampToHHmm(item.operateDate!)} ' + '人脸'.tr + '开锁'.tr + '${_formatUserNameOrId(item)}';
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'人脸'.tr +
'开锁'.tr +
'${'昵称'.tr}${item.username}';
case 190:
return '${formatTimestampToHHmm(item.operateDate!)} ' + '胁迫指纹'.tr + '开锁'.tr + '${_formatUserNameOrId(item)}';
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'胁迫指纹'.tr +
'开锁'.tr +
'${'昵称'.tr}${item.username}';
case 200:
return '${formatTimestampToHHmm(item.operateDate!)} ' + '胁迫密码'.tr + '开锁'.tr + '${_formatUserNameOrId(item)}';
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'胁迫密码'.tr +
'开锁'.tr +
'${'昵称'.tr}${item.username}';
case 210:
return '${formatTimestampToHHmm(item.operateDate!)} ' + '胁迫卡片'.tr + '开锁'.tr + '${_formatUserNameOrId(item)}';
return '${formatTimestampToHHmm(item.operateDate!)} ' +
'胁迫卡片'.tr +
'开锁'.tr +
'${'昵称'.tr}${item.username}';
default:
return item.recordStr ?? '';
}
}
//
String _formatUserNameOrId(DoorLockLogDataItem item) {
final recordStr = item.recordStr;
final idMatch = RegExp(r'ID[:](\w+)').firstMatch(recordStr ?? '');
final idValue = idMatch?.group(1) ?? '';
final name = item.username ?? '';
// ID: ID ID:xxx
if (name.isNotEmpty) {
final idInNameMatch = RegExp(r'^ID[:].+').hasMatch(name);
if (idInNameMatch) {
return name; // "ID:123"
} else {
return '${'昵称'.tr}$name'; //
}
}
// 使 recordStr ID
return 'ID$idValue';
}
Color _buildTextColorByType(DoorLockLogDataItem item) {
final recordType = item.recordType;
switch (recordType) {
@ -374,9 +420,12 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
contentsBuilder: (BuildContext context, int index) {
final DoorLockLogDataItem timelineData = state.lockLogItemList[index];
// 👇 videoUrl build
int? firstVideoIndex = state.lockLogItemList.indexWhere((item) => _checkIsVideoOrImagesType(item));
int? firstVideoIndex = state.lockLogItemList
.indexWhere((item) => _checkIsVideoOrImagesType(item));
bool isInvalid = _checkIsVideoOrImagesType(timelineData) &&
((timelineData.imagesUrl == null && timelineData.videoUrl == null) || (timelineData.videoUrl == '' && timelineData.imagesUrl == ''));
((timelineData.imagesUrl == null &&
timelineData.videoUrl == null) ||
(timelineData.videoUrl == '' && timelineData.imagesUrl == ''));
String typeText = '';
if (timelineData.recordType == 130) {
@ -397,7 +446,8 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text('${formatTimestampToDateTimeYYYYMMDD(timelineData.operateDate!)}',
Text(
'${formatTimestampToDateTimeYYYYMMDD(timelineData.operateDate!)}',
style: TextStyle(
fontSize: 20.sp,
)),
@ -414,7 +464,12 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
),
children: [
TextSpan(
text: _buildIDByType(timelineData) + (isInvalid ? '${typeText}' + '已失效'.tr + '' : ''),
text: _buildIDByType(timelineData) +
(isInvalid
? '${typeText}' +
'已失效'.tr +
''
: ''),
),
WidgetSpan(
alignment: PlaceholderAlignment.middle,
@ -449,7 +504,8 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
height: 12.h,
),
Visibility(
visible: _checkIsVideoOrImagesType(timelineData) && index == firstVideoIndex,
visible: _checkIsVideoOrImagesType(timelineData) &&
index == firstVideoIndex,
child: GestureDetector(
onTap: () async {
await logic.getWebPlayUrl();
@ -524,7 +580,9 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
if (recordData.videoUrl != null && recordData.videoUrl!.isNotEmpty) {
final lockLogItemList = state.lockLogItemList.value;
final list = lockLogItemList
.where((e) => (e.videoUrl != null && e.videoUrl!.isNotEmpty) || (e.imagesUrl != null && e.imagesUrl!.isNotEmpty))
.where((e) =>
(e.videoUrl != null && e.videoUrl!.isNotEmpty) ||
(e.imagesUrl != null && e.imagesUrl!.isNotEmpty))
.map(
(e) => RecordListData(
videoUrl: e.videoUrl,
@ -535,13 +593,16 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
),
)
.toList();
final selectDateString = DateTool().dateToYMDString(state.startDate.value.toString());
final cloudStorageData = CloudStorageData(date: selectDateString, recordList: list);
final selectDateString =
DateTool().dateToYMDString(state.startDate.value.toString());
final cloudStorageData =
CloudStorageData(date: selectDateString, recordList: list);
Get.toNamed(Routers.videoLogDetailPage, arguments: <String, Object>{
'recordData': recordData,
'videoDataList': [cloudStorageData]
});
} else if (recordData.imagesUrl != null && recordData.imagesUrl!.isNotEmpty) {
} else if (recordData.imagesUrl != null &&
recordData.imagesUrl!.isNotEmpty) {
Navigator.push(
context,
MaterialPageRoute(
@ -552,7 +613,8 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
);
}
},
child: ((recordData.imagesUrl != null && recordData.imagesUrl != '') || (recordData.videoUrl != null && recordData.videoUrl != ''))
child: ((recordData.imagesUrl != null && recordData.imagesUrl != '') ||
(recordData.videoUrl != null && recordData.videoUrl != ''))
? Container(
width: 260.w,
height: 260.h,
@ -570,7 +632,8 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
_buildImageOrVideoItem(RecordListData recordData) {
if (recordData.videoUrl != null && recordData.videoUrl!.isNotEmpty) {
return _buildVideoItem(recordData);
} else if (recordData.imagesUrl != null && recordData.imagesUrl!.isNotEmpty) {
} else if (recordData.imagesUrl != null &&
recordData.imagesUrl!.isNotEmpty) {
return _buildImageItem(recordData);
} else {
return SizedBox.shrink();
@ -587,7 +650,8 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
child: Image.network(
recordData.imagesUrl!,
fit: BoxFit.cover,
errorBuilder: (BuildContext context, Object error, StackTrace? stackTrace) {
errorBuilder:
(BuildContext context, Object error, StackTrace? stackTrace) {
//
return Image.asset(
'images/icon_unHaveData.png', //
@ -685,8 +749,11 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
print('外部收到选中: $date');
state.operateDate = date.millisecondsSinceEpoch;
state.startDate.value = DateTime(date.year, date.month, date.day).millisecondsSinceEpoch;
state.endDate.value = DateTime(date.year, date.month, date.day, 23, 59, 59, 999).millisecondsSinceEpoch;
state.startDate.value =
DateTime(date.year, date.month, date.day).millisecondsSinceEpoch;
state.endDate.value =
DateTime(date.year, date.month, date.day, 23, 59, 59, 999)
.millisecondsSinceEpoch;
await logic.mockNetworkDataRequest(isRefresh: true);
},
onWeekChanged: (DateTime start, DateTime end) {

File diff suppressed because it is too large Load Diff

View File

@ -58,26 +58,8 @@ class LockDetailState {
int logCountPage = 10; //
RxInt nextAuthTime = 0.obs; //
int countReq = 10;//
RxInt indexCount = 0.obs;// 0/5
int uploadPasswordPage = 0;//
List<int> uploadPasswordDataList = <int>[];//
int uploadCardPage = 0;//
List<int> uploadCardDataList = <int>[];//
int uploadFingerprintPage = 0;//
List<int> uploadFingerprintDataList = <int>[];//
int uploadFacePage = 0;//
List<int> uploadFaceDataList = <int>[];//
int uploadPalmVeinPage = 0;//
List<int> uploadPalmVeinDataList = <int>[];//
int uploadRemoteControlPage = 0;//
List<int> uploadRemoteControlDataList = <int>[];//
List<int> uploadLockSetDataList = <int>[];//
// LockDetailState() {
// Map map = Get.arguments;
// lockCount = map["lockCount"];
// }
}

View File

@ -29,41 +29,49 @@ class UploadDataLogic extends BaseGetXController {
//
late StreamSubscription<Reply> _replySubscription;
void _initReplySubscription() {
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
_replySubscription =
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
//
if (reply is UpdataLockPasswordListReply && (state.ifCurrentScreen.value == true)) {
if (reply is UpdataLockPasswordListReply &&
(state.ifCurrentScreen.value == true)) {
_replyUpdataLockPasswordListReply(reply);
}
//
if (reply is UpdataLockCardListReply && (state.ifCurrentScreen.value == true)) {
if (reply is UpdataLockCardListReply &&
(state.ifCurrentScreen.value == true)) {
_replyUpdataLockCardListReply(reply);
}
//
if (reply is UpdataLockFingerprintListReply && (state.ifCurrentScreen.value == true)) {
if (reply is UpdataLockFingerprintListReply &&
(state.ifCurrentScreen.value == true)) {
_replyUpdataLockFingerprintListReply(reply);
}
//
if (reply is UpdataLockFaceListReply && (state.ifCurrentScreen.value == true)) {
if (reply is UpdataLockFaceListReply &&
(state.ifCurrentScreen.value == true)) {
_replyUpdataLockFaceListReply(reply);
}
//
if (reply is UpdataLockPalmVeinListReply && (state.ifCurrentScreen.value == true)) {
if (reply is UpdataLockPalmVeinListReply &&
(state.ifCurrentScreen.value == true)) {
_replyUpdataLockPalmVeinListReply(reply);
}
//
if (reply is UpdataLockRemoteControlListReply && (state.ifCurrentScreen.value == true)) {
if (reply is UpdataLockRemoteControlListReply &&
(state.ifCurrentScreen.value == true)) {
_replyUpdataLockRemoteControlListReply(reply);
}
//
if (reply is UpdataLockSetReply && (state.ifCurrentScreen.value == true) && (state.ifSeletUpdataBtnState == true)) {
if (reply is UpdataLockSetReply &&
(state.ifCurrentScreen.value == true) &&
(state.ifSeletUpdataBtnState == true)) {
_replyUpdataLockSetReply(reply);
}
});
@ -78,7 +86,8 @@ class UploadDataLogic extends BaseGetXController {
cancelBlueConnetctToastTimer();
final int dataLength = reply.data[8];
state.uploadPasswordDataList.addAll(reply.data.sublist(9, reply.data.length));
state.uploadPasswordDataList
.addAll(reply.data.sublist(9, reply.data.length));
if (dataLength == 10) {
// 10
state.uploadPasswordPage = state.uploadPasswordPage + 1;
@ -96,7 +105,10 @@ class UploadDataLogic extends BaseGetXController {
// }else{
// //
state.indexCount.value = state.indexCount.value + 1;
_lockDataUpload(uploadType: 2, recordType: 2, records: state.uploadPasswordDataList);
_lockDataUpload(
uploadType: 2,
recordType: 2,
records: state.uploadPasswordDataList);
// }
}
break;
@ -127,7 +139,8 @@ class UploadDataLogic extends BaseGetXController {
cancelBlueConnetctToastTimer();
final int dataLength = reply.data[8];
state.uploadCardDataList.addAll(reply.data.sublist(9, reply.data.length));
state.uploadCardDataList
.addAll(reply.data.sublist(9, reply.data.length));
if (dataLength == 10) {
// 10
state.uploadCardPage = state.uploadCardPage + 1;
@ -144,7 +157,8 @@ class UploadDataLogic extends BaseGetXController {
// }else{
// //
state.indexCount.value = state.indexCount.value + 1;
_lockDataUpload(uploadType: 2, recordType: 3, records: state.uploadCardDataList);
_lockDataUpload(
uploadType: 2, recordType: 3, records: state.uploadCardDataList);
// }
}
break;
@ -174,7 +188,8 @@ class UploadDataLogic extends BaseGetXController {
cancelBlueConnetctToastTimer();
final int dataLength = reply.data[8];
state.uploadFingerprintDataList.addAll(reply.data.sublist(9, reply.data.length));
state.uploadFingerprintDataList
.addAll(reply.data.sublist(9, reply.data.length));
if (dataLength == 10) {
// 10
state.uploadFingerprintPage = state.uploadFingerprintPage + 1;
@ -191,7 +206,10 @@ class UploadDataLogic extends BaseGetXController {
// }else{
// //
state.indexCount.value = state.indexCount.value + 1;
_lockDataUpload(uploadType: 2, recordType: 4, records: state.uploadFingerprintDataList);
_lockDataUpload(
uploadType: 2,
recordType: 4,
records: state.uploadFingerprintDataList);
// }
}
break;
@ -221,7 +239,8 @@ class UploadDataLogic extends BaseGetXController {
cancelBlueConnetctToastTimer();
final int dataLength = reply.data[8];
state.uploadFaceDataList.addAll(reply.data.sublist(9, reply.data.length));
state.uploadFaceDataList
.addAll(reply.data.sublist(9, reply.data.length));
if (dataLength == 10) {
// 10
state.uploadFacePage = state.uploadFacePage + 1;
@ -238,7 +257,8 @@ class UploadDataLogic extends BaseGetXController {
// }else{
//
state.indexCount.value = state.indexCount.value + 1;
_lockDataUpload(uploadType: 2, recordType: 5, records: state.uploadFaceDataList);
_lockDataUpload(
uploadType: 2, recordType: 5, records: state.uploadFaceDataList);
// }
}
break;
@ -268,7 +288,8 @@ class UploadDataLogic extends BaseGetXController {
cancelBlueConnetctToastTimer();
final int dataLength = reply.data[8];
state.uploadPalmVeinDataList.addAll(reply.data.sublist(9, reply.data.length));
state.uploadPalmVeinDataList
.addAll(reply.data.sublist(9, reply.data.length));
if (dataLength == 10) {
// 10
state.uploadPalmVeinPage = state.uploadPalmVeinPage + 1;
@ -285,7 +306,10 @@ class UploadDataLogic extends BaseGetXController {
// }else{
// //
state.indexCount.value = state.indexCount.value + 1;
_lockDataUpload(uploadType: 2, recordType: 6, records: state.uploadPalmVeinDataList);
_lockDataUpload(
uploadType: 2,
recordType: 6,
records: state.uploadPalmVeinDataList);
// }
}
break;
@ -315,7 +339,8 @@ class UploadDataLogic extends BaseGetXController {
cancelBlueConnetctToastTimer();
final int dataLength = reply.data[8];
state.uploadRemoteControlDataList.addAll(reply.data.sublist(9, reply.data.length));
state.uploadRemoteControlDataList
.addAll(reply.data.sublist(9, reply.data.length));
if (dataLength == 10) {
// 10
state.uploadRemoteControlPage = state.uploadRemoteControlPage + 1;
@ -332,7 +357,10 @@ class UploadDataLogic extends BaseGetXController {
// }else{
// //
state.indexCount.value = state.indexCount.value + 1;
_lockDataUpload(uploadType: 2, recordType: 7, records: state.uploadRemoteControlDataList);
_lockDataUpload(
uploadType: 2,
recordType: 7,
records: state.uploadRemoteControlDataList);
// }
}
break;
@ -362,8 +390,10 @@ class UploadDataLogic extends BaseGetXController {
state.indexCount.value = state.indexCount.value + 1;
cancelBlueConnetctToastTimer();
state.uploadLockSetDataList.addAll(reply.data.sublist(7, reply.data.length));
_lockDataUpload(uploadType: 1, recordType: 0, records: state.uploadLockSetDataList);
state.uploadLockSetDataList
.addAll(reply.data.sublist(7, reply.data.length));
_lockDataUpload(
uploadType: 1, recordType: 0, records: state.uploadLockSetDataList);
break;
case 0x06:
//
@ -388,18 +418,22 @@ class UploadDataLogic extends BaseGetXController {
return;
}
state.sureBtnState.value = 1;
showEasyLoading();
showBlueConnetctToastTimer(action: () {
dismissEasyLoading();
AppLog.log('上传密码列表获取超时 关闭加载菊花');
state.sureBtnState.value = 0;
});
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionState) async {
BlueManage().blueSendData(BlueManage().connectDeviceName,
(BluetoothConnectionState connectionState) async {
if (connectionState == BluetoothConnectionState.connected) {
final List<String>? token = await Storage.getStringList(saveBlueToken);
final List<int> getTokenList = changeStringListToIntList(token!);
updataLockPasswordList(getTokenList, state.uploadPasswordPage);
} else if (connectionState == BluetoothConnectionState.disconnected) {
AppLog.log('上传密码列表连接失败 关闭加载菊花');
dismissEasyLoading();
cancelBlueConnetctToastTimer();
state.sureBtnState.value = 0;
@ -412,7 +446,8 @@ class UploadDataLogic extends BaseGetXController {
//
Future<void> updataLockPasswordList(List<int> token, int page) async {
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
final List<String>? privateKey =
await Storage.getStringList(saveBluePrivateKey);
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
@ -437,7 +472,8 @@ class UploadDataLogic extends BaseGetXController {
state.indexCount.value = 0;
state.sureBtnState.value = 0;
});
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionState) async {
BlueManage().blueSendData(BlueManage().connectDeviceName,
(BluetoothConnectionState connectionState) async {
if (connectionState == BluetoothConnectionState.connected) {
final List<String>? token = await Storage.getStringList(saveBlueToken);
final List<int> getTokenList = changeStringListToIntList(token!);
@ -457,7 +493,8 @@ class UploadDataLogic extends BaseGetXController {
// Card列表
Future<void> updataLockCardList(List<int> token, int page) async {
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
final List<String>? privateKey =
await Storage.getStringList(saveBluePrivateKey);
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
@ -482,7 +519,8 @@ class UploadDataLogic extends BaseGetXController {
state.indexCount.value = 0;
state.sureBtnState.value = 0;
});
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionState) async {
BlueManage().blueSendData(BlueManage().connectDeviceName,
(BluetoothConnectionState connectionState) async {
if (connectionState == BluetoothConnectionState.connected) {
final List<String>? token = await Storage.getStringList(saveBlueToken);
final List<int> getTokenList = changeStringListToIntList(token!);
@ -502,7 +540,8 @@ class UploadDataLogic extends BaseGetXController {
//
Future<void> updataLockFingerprintList(List<int> token, int page) async {
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
final List<String>? privateKey =
await Storage.getStringList(saveBluePrivateKey);
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
@ -527,7 +566,8 @@ class UploadDataLogic extends BaseGetXController {
state.indexCount.value = 0;
state.sureBtnState.value = 0;
});
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionState) async {
BlueManage().blueSendData(BlueManage().connectDeviceName,
(BluetoothConnectionState connectionState) async {
if (connectionState == BluetoothConnectionState.connected) {
final List<String>? token = await Storage.getStringList(saveBlueToken);
final List<int> getTokenList = changeStringListToIntList(token!);
@ -547,7 +587,8 @@ class UploadDataLogic extends BaseGetXController {
//
Future<void> updataLockFaceList(List<int> token, int page) async {
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
final List<String>? privateKey =
await Storage.getStringList(saveBluePrivateKey);
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
@ -572,7 +613,8 @@ class UploadDataLogic extends BaseGetXController {
state.indexCount.value = 0;
state.sureBtnState.value = 0;
});
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionState) async {
BlueManage().blueSendData(BlueManage().connectDeviceName,
(BluetoothConnectionState connectionState) async {
if (connectionState == BluetoothConnectionState.connected) {
final List<String>? token = await Storage.getStringList(saveBlueToken);
final List<int> getTokenList = changeStringListToIntList(token!);
@ -592,7 +634,8 @@ class UploadDataLogic extends BaseGetXController {
//
Future<void> updataLockPalmVeinList(List<int> token, int page) async {
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
final List<String>? privateKey =
await Storage.getStringList(saveBluePrivateKey);
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
@ -617,12 +660,14 @@ class UploadDataLogic extends BaseGetXController {
state.indexCount.value = 0;
state.sureBtnState.value = 0;
});
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionState) async {
BlueManage().blueSendData(BlueManage().connectDeviceName,
(BluetoothConnectionState connectionState) async {
if (connectionState == BluetoothConnectionState.connected) {
final List<String>? token = await Storage.getStringList(saveBlueToken);
final List<int> getTokenList = changeStringListToIntList(token!);
updataLockRemoteControlList(getTokenList, state.uploadRemoteControlPage);
updataLockRemoteControlList(
getTokenList, state.uploadRemoteControlPage);
} else if (connectionState == BluetoothConnectionState.disconnected) {
dismissEasyLoading();
cancelBlueConnetctToastTimer();
@ -637,7 +682,8 @@ class UploadDataLogic extends BaseGetXController {
//
Future<void> updataLockRemoteControlList(List<int> token, int page) async {
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
final List<String>? privateKey =
await Storage.getStringList(saveBluePrivateKey);
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
@ -662,7 +708,8 @@ class UploadDataLogic extends BaseGetXController {
state.indexCount.value = 0;
state.sureBtnState.value = 0;
});
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionState) async {
BlueManage().blueSendData(BlueManage().connectDeviceName,
(BluetoothConnectionState connectionState) async {
if (connectionState == BluetoothConnectionState.connected) {
final List<String>? token = await Storage.getStringList(saveBlueToken);
final List<int> getTokenList = changeStringListToIntList(token!);
@ -682,7 +729,8 @@ class UploadDataLogic extends BaseGetXController {
//
Future<void> updataLockSet(List<int> token) async {
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
final List<String>? privateKey =
await Storage.getStringList(saveBluePrivateKey);
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
@ -698,9 +746,16 @@ class UploadDataLogic extends BaseGetXController {
}
//
Future<void> _lockDataUpload({required int uploadType, required int recordType, required List records}) async {
Future<void> _lockDataUpload(
{required int uploadType,
required int recordType,
required List records}) async {
final LoginEntity entity = await ApiRepository.to.lockDataUpload(
lockId: CommonDataManage().currentKeyInfo.lockId!, uploadType: uploadType, recordType: recordType, records: records, isUnShowLoading: false);
lockId: CommonDataManage().currentKeyInfo.lockId!,
uploadType: uploadType,
recordType: recordType,
records: records,
isUnShowLoading: false);
if (entity.errorCode!.codeIsSuccessful) {
if (uploadType == 1) {
// 1
@ -751,32 +806,32 @@ class UploadDataLogic extends BaseGetXController {
} else {
// 2
switch (recordType) {
// case 1:
// //
//
// break;
// case 1:
// //
//
// break;
case 2:
//
//
getUpdataLockCardList();
break;
case 3:
// IC卡上传成功
// IC卡上传成功
getUpdataLockFingerprintList();
break;
case 4:
//
//
getUpdataLockFaceList();
break;
case 5:
//
//
getUpdataLockPalmVeinList();
break;
case 6:
//
//
getUpdataLockRemoteControlList();
break;
case 7:
//
//
getUpdataLockSet();
break;
default:

View File

@ -58,7 +58,7 @@ class LockVoiceSettingLogic extends BaseGetXController {
handleSetResult(reply);
}
});
await initList();
initList();
readLockLanguage();
}

File diff suppressed because it is too large Load Diff

View File

@ -50,21 +50,31 @@ class BaseProvider extends GetConnect with Api {
httpClient.baseUrl = '${F.apiPrefix}/api';
}
httpClient.timeout = timeout!.seconds;
// AppLog.log('timeout:$timeout httpClient.timeout:${httpClient.timeout}');
var res = await super.post(url, body,
contentType: contentType, headers: headers, query: query, decoder: decoder, uploadProgress: uploadProgress);
contentType: contentType,
headers: headers,
query: query,
decoder: decoder,
uploadProgress: uploadProgress);
debugPrint("====1===$url---> ${res.bodyString}");
if (EasyLoading.isShow && !isUnShowLoading!) {
await EasyLoading.dismiss(animation: true);
}
debugPrint("===2====$url---> ${res.bodyString}");
if (res.body == null) {
// EasyLoading.showToast("Network Error!", duration: 2000.milliseconds);
if (res.statusCode == null && isShowErrMsg!) {
EasyLoading.showToast('网络访问失败,请检查网络是否正常'.tr, duration: 2000.milliseconds);
EasyLoading.showToast('网络访问失败,请检查网络是否正常'.tr,
duration: 2000.milliseconds);
// EasyLoading.showToast("Network Error!", duration: 2000.milliseconds);
}
var rs = {'errorMsg': 'Network Error!', 'errorCode': -1, 'data': null, 'description': '表示成功或是。'};
var rs = {
'errorMsg': 'Network Error!',
'errorCode': -1,
'data': null,
'description': '表示成功或是。'
};
return Response(
request: res.request,
statusCode: -1,
@ -74,7 +84,6 @@ class BaseProvider extends GetConnect with Api {
statusText: res.statusText,
);
} else {}
print('isShowNetworkErrorMsg:${isShowNetworkErrorMsg}');
if (isShowNetworkErrorMsg ?? true) {
getDataResult(res.body);
}
@ -102,15 +111,25 @@ class BaseProvider extends GetConnect with Api {
} else {
httpClient.baseUrl = '${F.apiPrefix}/api';
}
var res = await super.get(url, contentType: contentType, headers: headers, query: query, decoder: decoder);
var res = await super.get(url,
contentType: contentType,
headers: headers,
query: query,
decoder: decoder);
if (EasyLoading.isShow && !isUnShowLoading!) {
await EasyLoading.dismiss(animation: true);
}
if (res.body == null) {
if (res.statusCode == null && isShowErrMsg!) {
EasyLoading.showToast('网络访问失败,请检查网络是否正常'.tr, duration: 2000.milliseconds);
EasyLoading.showToast('网络访问失败,请检查网络是否正常'.tr,
duration: 2000.milliseconds);
}
var rs = {'errorMsg': 'Network Error!', 'errorCode': -1, 'data': null, 'description': '表示成功或是。'};
var rs = {
'errorMsg': 'Network Error!',
'errorCode': -1,
'data': null,
'description': '表示成功或是。'
};
return Response(
request: res.request,
statusCode: -1,
@ -147,7 +166,8 @@ class BaseProvider extends GetConnect with Api {
EasyLoading.showToast('数据不存在'.tr, duration: 2000.milliseconds);
break;
case 434: //
ShowTipView().showSureBtnTipsAlert(tipsText: T['errorMsg'], sureText: '');
ShowTipView()
.showSureBtnTipsAlert(tipsText: T['errorMsg'], sureText: '');
break;
}
}

File diff suppressed because it is too large Load Diff