1,修复开锁页-操作记录-点进去后圈几圈的加载图标后(也有提示操作失败后)空白显示,手动刷新后才出现数据
2,修复我的页-增值服务-邮件 购买后进入,短信当前剩余数量会先显示0再跳到500,有时只显示0不跳转到数量 问题 3,修复我的页-增值服务-短信 购买后进入,短信当前剩余数量会先显示0再跳到500,有时只显示0不跳转到数量 问题 4,操作记录实体类更新 新增keyboardPwd字段 5,增值服务--短信、邮件请求方法逻辑顺序更改
This commit is contained in:
parent
58fb182534
commit
89c7f57e2b
@ -1,9 +1,4 @@
|
|||||||
class DoorLockLogEntity {
|
class DoorLockLogEntity {
|
||||||
int? errorCode;
|
|
||||||
String? description;
|
|
||||||
String? errorMsg;
|
|
||||||
Data? data;
|
|
||||||
|
|
||||||
DoorLockLogEntity(
|
DoorLockLogEntity(
|
||||||
{this.errorCode, this.description, this.errorMsg, this.data});
|
{this.errorCode, this.description, this.errorMsg, this.data});
|
||||||
|
|
||||||
@ -13,6 +8,10 @@ class DoorLockLogEntity {
|
|||||||
errorMsg = json['errorMsg'];
|
errorMsg = json['errorMsg'];
|
||||||
data = json['data'] != null ? Data.fromJson(json['data']) : null;
|
data = json['data'] != null ? Data.fromJson(json['data']) : null;
|
||||||
}
|
}
|
||||||
|
int? errorCode;
|
||||||
|
String? description;
|
||||||
|
String? errorMsg;
|
||||||
|
Data? data;
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final Map<String, dynamic> data = <String, dynamic>{};
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
@ -27,12 +26,6 @@ class DoorLockLogEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Data {
|
class Data {
|
||||||
List<DoorLockLogDataItem>? itemList;
|
|
||||||
int? pageNo;
|
|
||||||
int? pageSize;
|
|
||||||
int? pages;
|
|
||||||
int? total;
|
|
||||||
|
|
||||||
Data({this.itemList, this.pageNo, this.pageSize, this.pages, this.total});
|
Data({this.itemList, this.pageNo, this.pageSize, this.pages, this.total});
|
||||||
|
|
||||||
Data.fromJson(Map<String, dynamic> json) {
|
Data.fromJson(Map<String, dynamic> json) {
|
||||||
@ -47,6 +40,11 @@ class Data {
|
|||||||
pages = json['pages'];
|
pages = json['pages'];
|
||||||
total = json['total'];
|
total = json['total'];
|
||||||
}
|
}
|
||||||
|
List<DoorLockLogDataItem>? itemList;
|
||||||
|
int? pageNo;
|
||||||
|
int? pageSize;
|
||||||
|
int? pages;
|
||||||
|
int? total;
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final Map<String, dynamic> data = <String, dynamic>{};
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
@ -62,18 +60,6 @@ class Data {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class DoorLockLogDataItem {
|
class DoorLockLogDataItem {
|
||||||
int? recordId;
|
|
||||||
int? lockId;
|
|
||||||
String? lockAlias;
|
|
||||||
int? recordType;
|
|
||||||
String? recordTypeName;
|
|
||||||
String? username;
|
|
||||||
int? operateDate;
|
|
||||||
String? imagesUrl;
|
|
||||||
String? videoUrl;
|
|
||||||
String? headUrl;
|
|
||||||
String? userid;
|
|
||||||
|
|
||||||
DoorLockLogDataItem(
|
DoorLockLogDataItem(
|
||||||
{this.recordId,
|
{this.recordId,
|
||||||
this.lockId,
|
this.lockId,
|
||||||
@ -85,7 +71,8 @@ class DoorLockLogDataItem {
|
|||||||
this.imagesUrl,
|
this.imagesUrl,
|
||||||
this.videoUrl,
|
this.videoUrl,
|
||||||
this.headUrl,
|
this.headUrl,
|
||||||
this.userid});
|
this.userid,
|
||||||
|
this.keyboardPwd});
|
||||||
|
|
||||||
DoorLockLogDataItem.fromJson(Map<String, dynamic> json) {
|
DoorLockLogDataItem.fromJson(Map<String, dynamic> json) {
|
||||||
recordId = json['recordId'];
|
recordId = json['recordId'];
|
||||||
@ -99,7 +86,20 @@ class DoorLockLogDataItem {
|
|||||||
videoUrl = json['videoUrl'];
|
videoUrl = json['videoUrl'];
|
||||||
headUrl = json['headUrl'];
|
headUrl = json['headUrl'];
|
||||||
userid = json['userid'];
|
userid = json['userid'];
|
||||||
|
keyboardPwd = json['keyboardPwd'];
|
||||||
}
|
}
|
||||||
|
int? recordId;
|
||||||
|
int? lockId;
|
||||||
|
String? lockAlias;
|
||||||
|
int? recordType;
|
||||||
|
String? recordTypeName;
|
||||||
|
String? username;
|
||||||
|
int? operateDate;
|
||||||
|
String? imagesUrl;
|
||||||
|
String? videoUrl;
|
||||||
|
String? headUrl;
|
||||||
|
String? userid;
|
||||||
|
String? keyboardPwd;
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final Map<String, dynamic> data = <String, dynamic>{};
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
@ -114,6 +114,7 @@ class DoorLockLogDataItem {
|
|||||||
data['videoUrl'] = videoUrl;
|
data['videoUrl'] = videoUrl;
|
||||||
data['headUrl'] = headUrl;
|
data['headUrl'] = headUrl;
|
||||||
data['userid'] = userid;
|
data['userid'] = userid;
|
||||||
|
data['keyboardPwd'] = keyboardPwd;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,11 +37,11 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
// 根据时间查解析数据
|
// 根据时间查解析数据
|
||||||
Future<void> _replyReferEventRecordTime(Reply reply) async {
|
Future<void> _replyReferEventRecordTime(Reply reply) async {
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
int status = reply.data[2];
|
final int status = reply.data[2];
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
int dataLength = (reply.data[5] << 8) + reply.data[6];
|
final int dataLength = (reply.data[5] << 8) + reply.data[6];
|
||||||
// AppLog.log("dataLength:$dataLength");
|
// AppLog.log("dataLength:$dataLength");
|
||||||
// var dataLength = reply.data[5];
|
// var dataLength = reply.data[5];
|
||||||
if (dataLength > 0) {
|
if (dataLength > 0) {
|
||||||
@ -50,27 +50,27 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
if (reply.data.length < 17) {
|
if (reply.data.length < 17) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var getList = splitList(reply.data, 17);
|
final getList = splitList(reply.data, 17);
|
||||||
// AppLog.log("getList:$getList");
|
// AppLog.log("getList:$getList");
|
||||||
var uploadList = [];
|
final uploadList = [];
|
||||||
for (int i = 0; i < getList.length; i++) {
|
for (int i = 0; i < getList.length; i++) {
|
||||||
var indexList = getList[i];
|
final indexList = getList[i];
|
||||||
// AppLog.log("indexList:$indexList");
|
// AppLog.log("indexList:$indexList");
|
||||||
var indexMap = {};
|
final indexMap = {};
|
||||||
indexMap['type'] = indexList[0].toString();
|
indexMap['type'] = indexList[0].toString();
|
||||||
int operateDate = 0;
|
final int operateDate = 0;
|
||||||
if (indexList[0] == 2) {
|
if (indexList[0] == 2) {
|
||||||
var passwordData = indexList.sublist(7, 17);
|
final passwordData = indexList.sublist(7, 17);
|
||||||
var password = utf8String(passwordData);
|
final password = utf8String(passwordData);
|
||||||
indexMap['user'] = password.toString();
|
indexMap['user'] = password.toString();
|
||||||
} else {
|
} else {
|
||||||
int userNo = (indexList[1] * 256) + indexList[2];
|
final int userNo = (indexList[1] * 256) + indexList[2];
|
||||||
indexMap['user'] = userNo.toString();
|
indexMap['user'] = userNo.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
indexMap['success'] = '1';
|
indexMap['success'] = '1';
|
||||||
|
|
||||||
int time = ((0xff & indexList[(3)]) << 24 |
|
final int time = ((0xff & indexList[(3)]) << 24 |
|
||||||
(0xff & indexList[4]) << 16 |
|
(0xff & indexList[4]) << 16 |
|
||||||
(0xff & indexList[5]) << 8 |
|
(0xff & indexList[5]) << 8 |
|
||||||
(0xFF & indexList[6]));
|
(0xFF & indexList[6]));
|
||||||
@ -108,14 +108,16 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
||||||
(BluetoothConnectionState connectionStateState) async {
|
(BluetoothConnectionState connectionStateState) async {
|
||||||
if (connectionStateState == BluetoothConnectionState.connected) {
|
if (connectionStateState == BluetoothConnectionState.connected) {
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
final privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
final List<int> getPrivateKeyList =
|
||||||
|
changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
var token = await Storage.getStringList(saveBlueToken);
|
final token = await Storage.getStringList(saveBlueToken);
|
||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
final publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
final List<int> getPublicKeyList =
|
||||||
|
changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
IoSenderManage.senderReferEventRecordTimeCommand(
|
IoSenderManage.senderReferEventRecordTimeCommand(
|
||||||
keyID: BlueManage().connectDeviceName,
|
keyID: BlueManage().connectDeviceName,
|
||||||
@ -156,6 +158,7 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
// 更新数据列表
|
// 更新数据列表
|
||||||
state.lockLogItemList.addAll(entity.data!.itemList!);
|
state.lockLogItemList.addAll(entity.data!.itemList!);
|
||||||
|
state.lockLogItemList.refresh();
|
||||||
// 更新页码
|
// 更新页码
|
||||||
pageNo++;
|
pageNo++;
|
||||||
}
|
}
|
||||||
@ -231,7 +234,7 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
super.onReady();
|
super.onReady();
|
||||||
|
|
||||||
// 获取是否是演示模式 演示模式不获取接口
|
// 获取是否是演示模式 演示模式不获取接口
|
||||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
// _initReplySubscription();
|
// _initReplySubscription();
|
||||||
|
|
||||||
@ -245,22 +248,20 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
super.onInit();
|
super.onInit();
|
||||||
|
|
||||||
// 获取是否是演示模式 演示模式不获取接口
|
// 获取是否是演示模式 演示模式不获取接口
|
||||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
getLockRecordLastUploadDataTime();
|
getLockRecordLastUploadDataTime();
|
||||||
// senderReferEventRecordTime();
|
|
||||||
// senderReferEventRecordNumber();
|
|
||||||
_initReplySubscription();
|
_initReplySubscription();
|
||||||
|
mockNetworkDataRequest(isRefresh: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> onClose() async {
|
Future<void> onClose() async {
|
||||||
// TODO: implement onClose
|
|
||||||
super.onClose();
|
super.onClose();
|
||||||
|
|
||||||
//获取是否是演示模式 演示模式不获取接口
|
//获取是否是演示模式 演示模式不获取接口
|
||||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
_replySubscription.cancel();
|
_replySubscription.cancel();
|
||||||
_getDoorLockLogListRefreshUIEvent?.cancel();
|
_getDoorLockLogListRefreshUIEvent?.cancel();
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_entity.dart';
|
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_entity.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_entity.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesNoteAndEmailDetail/valueAddedServicesNoteAndEmailDetail_state.dart';
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesNoteAndEmailDetail/valueAddedServicesNoteAndEmailDetail_state.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
import '../../../network/api_repository.dart';
|
import '../../../network/api_repository.dart';
|
||||||
@ -10,7 +12,8 @@ class ValueAddedServicesNoteAndEmailDetailLogic extends BaseGetXController {
|
|||||||
|
|
||||||
//获取增值服务用户余量包
|
//获取增值服务用户余量包
|
||||||
Future<void> getServiceUserPackage() async {
|
Future<void> getServiceUserPackage() async {
|
||||||
var entity = await ApiRepository.to.getServiceUserPackage();
|
final ValueAddedServicesHighFunctionEntity entity =
|
||||||
|
await ApiRepository.to.getServiceUserPackage();
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
if (state.selectType.value == 1) {
|
if (state.selectType.value == 1) {
|
||||||
state.remainCount.value = entity.data!.smsCount!;
|
state.remainCount.value = entity.data!.smsCount!;
|
||||||
@ -19,6 +22,7 @@ class ValueAddedServicesNoteAndEmailDetailLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
state.remainCount.refresh();
|
state.remainCount.refresh();
|
||||||
}
|
}
|
||||||
|
getServicePackageBuyUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
//增值服务套餐购包链接
|
//增值服务套餐购包链接
|
||||||
@ -36,9 +40,19 @@ class ValueAddedServicesNoteAndEmailDetailLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onReady() {
|
||||||
super.onInit();
|
super.onReady();
|
||||||
|
|
||||||
getServiceUserPackage();
|
// 监听 selectType 的变化
|
||||||
|
ever(state.selectType, (_) {
|
||||||
|
getServiceUserPackage();
|
||||||
|
});
|
||||||
|
|
||||||
|
if (Get.arguments != null && Get.arguments['type'] != null) {
|
||||||
|
state.selectType.value = Get.arguments['type'];
|
||||||
|
state.selectType.refresh();
|
||||||
|
} else {
|
||||||
|
getServiceUserPackage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,6 @@ import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/use_r
|
|||||||
|
|
||||||
import '../../../appRouters.dart';
|
import '../../../appRouters.dart';
|
||||||
import '../../../app_settings/app_colors.dart';
|
import '../../../app_settings/app_colors.dart';
|
||||||
import '../../../tools/commonItem.dart';
|
|
||||||
import '../../../tools/titleAppBar.dart';
|
import '../../../tools/titleAppBar.dart';
|
||||||
import '../../../translations/trans_lib.dart';
|
import '../../../translations/trans_lib.dart';
|
||||||
|
|
||||||
@ -30,7 +29,8 @@ class _ValueAddedServicesNoteAndEmailDetailPageState
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
logic.getServicePackageBuyUrl();
|
// logic.getServicePackageBuyUrl();
|
||||||
|
logic.getServiceUserPackage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -84,11 +84,12 @@ class _ValueAddedServicesNoteAndEmailDetailPageState
|
|||||||
))),
|
))),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routers.advancedFeaturesWebPage, arguments: {
|
Get.toNamed(Routers.advancedFeaturesWebPage,
|
||||||
'webBuyType': state.selectType.value == 1
|
arguments: <String, int>{
|
||||||
? XSConstantMacro.webBuyTypeSMS
|
'webBuyType': state.selectType.value == 1
|
||||||
: XSConstantMacro.webBuyTypeEmail,
|
? XSConstantMacro.webBuyTypeSMS
|
||||||
});
|
: XSConstantMacro.webBuyTypeEmail,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 50,
|
width: 50,
|
||||||
|
|||||||
@ -5,6 +5,7 @@ class ValueAddedServicesNoteAndEmailDetailState {
|
|||||||
if (Get.arguments is Map && Get.arguments.isNotEmpty) {
|
if (Get.arguments is Map && Get.arguments.isNotEmpty) {
|
||||||
if (Get.arguments['type'] != null) {
|
if (Get.arguments['type'] != null) {
|
||||||
selectType.value = Get.arguments['type'];
|
selectType.value = Get.arguments['type'];
|
||||||
|
selectType.refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user