Merge branch 'release' of https://gitee.com/starlock-cn/app-starlock into release
This commit is contained in:
commit
8ce45c56c8
@ -148,7 +148,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
|
|||||||
// AppLog.log('App--->进入前台');
|
// AppLog.log('App--->进入前台');
|
||||||
if (Get.isRegistered<LockMainLogic>()) {
|
if (Get.isRegistered<LockMainLogic>()) {
|
||||||
//进入前台刷新如果存在锁列表则刷新,顺便判断 token 是否过期
|
//进入前台刷新如果存在锁列表则刷新,顺便判断 token 是否过期
|
||||||
Get.find<LockMainLogic>().getStarLockInfo();
|
Get.find<LockMainLogic>().getStarLockInfo(isUnShowLoading: true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case AppLifecycleState.detached:
|
case AppLifecycleState.detached:
|
||||||
|
|||||||
@ -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();
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import 'package:star_lock/app_settings/app_colors.dart';
|
|||||||
import 'package:star_lock/flavors.dart';
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lockDetail/lockDetail_list_page.dart';
|
import 'package:star_lock/main/lockDetail/lockDetail/lockDetail_list_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lockDetail/lockDetail_state.dart';
|
import 'package:star_lock/main/lockDetail/lockDetail/lockDetail_state.dart';
|
||||||
|
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||||
import 'package:star_lock/tools/aliyunRealNameAuth/aliyunRealNameAuthHandle.dart';
|
import 'package:star_lock/tools/aliyunRealNameAuth/aliyunRealNameAuthHandle.dart';
|
||||||
import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
||||||
import 'package:star_lock/tools/showTipView.dart';
|
import 'package:star_lock/tools/showTipView.dart';
|
||||||
@ -93,6 +94,18 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
|
|
||||||
//鑫泓佳布局
|
//鑫泓佳布局
|
||||||
Widget xhjWidget() {
|
Widget xhjWidget() {
|
||||||
|
final bool isShowTip = (state.keyInfos.value.keyType ==
|
||||||
|
XSConstantMacro.keyTypeTime ||
|
||||||
|
state.keyInfos.value.keyType ==
|
||||||
|
XSConstantMacro.keyTypeLoop) && // 限时、循环
|
||||||
|
(DateTool().compareTimeGetDaysFromNow(state.keyInfos.value.endDate!) <=
|
||||||
|
15 &&
|
||||||
|
DateTool()
|
||||||
|
.compareTimeGetDaysFromNow(state.keyInfos.value.endDate!) >=
|
||||||
|
0) && // 0到30天
|
||||||
|
(state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusNormalUse ||
|
||||||
|
state.keyInfos.value.keyStatus ==
|
||||||
|
XSConstantMacro.keyStatusWaitReceive);
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
body: Obx(() {
|
body: Obx(() {
|
||||||
@ -103,7 +116,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.h,
|
height: isShowTip ? 70.h : 10.h,
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 24.w),
|
padding: EdgeInsets.symmetric(horizontal: 24.w),
|
||||||
@ -144,6 +157,23 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: isShowTip,
|
||||||
|
child: Container(
|
||||||
|
// height: 30.h,
|
||||||
|
color: const Color(0xFFFBEFD4),
|
||||||
|
padding: EdgeInsets.only(top: 8.h, bottom: 8.h),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
"${"钥匙将在".tr}${DateTool().compareTimeGetDaysFromNow(state.keyInfos.value.endDate!)}${"天后失效".tr}",
|
||||||
|
style: TextStyle(
|
||||||
|
color: const Color(0xffCBA74B), fontSize: 24.sp))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: state.iSClosedUnlockSuccessfulPopup.value,
|
visible: state.iSClosedUnlockSuccessfulPopup.value,
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -1404,11 +1434,16 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
if (state.openLockBtnState.value == 1) {
|
if (state.openLockBtnState.value == 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
final bool isOpenLockNeedOnline = state.isOpenLockNeedOnline.value == 0;
|
||||||
|
if (!isOpenLockNeedOnline && !isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
state.iSOpenLock.value = true;
|
state.iSOpenLock.value = true;
|
||||||
state.openLockBtnState.value = 1;
|
state.openLockBtnState.value = 1;
|
||||||
state.animationController!.forward();
|
state.animationController!.forward();
|
||||||
AppLog.log('点击开锁');
|
AppLog.log('点击开锁');
|
||||||
if (state.isOpenLockNeedOnline.value == 0) {
|
if (isOpenLockNeedOnline) {
|
||||||
// 不需要联网
|
// 不需要联网
|
||||||
state.openDoorModel = 0;
|
state.openDoorModel = 0;
|
||||||
AppLog.log('点击开锁 state.openDoorModel = 0 不需要联网');
|
AppLog.log('点击开锁 state.openDoorModel = 0 不需要联网');
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:common_utils/common_utils.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/scheduler.dart';
|
import 'package:flutter/scheduler.dart';
|
||||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||||
@ -30,7 +31,8 @@ class LockListLogic extends BaseGetXController {
|
|||||||
LockListInfoGroupEntity? entity;
|
LockListInfoGroupEntity? entity;
|
||||||
|
|
||||||
List<GroupList> get groupDataList {
|
List<GroupList> get groupDataList {
|
||||||
final List<GroupList> list = _groupDataList.map((e)=>e.copy()).toList();
|
final List<GroupList> list =
|
||||||
|
_groupDataList.map((GroupList e) => e.copy()).toList();
|
||||||
if (state.searchStr.value != '' && state.showSearch.value) {
|
if (state.searchStr.value != '' && state.showSearch.value) {
|
||||||
list.forEach((GroupList element) {
|
list.forEach((GroupList element) {
|
||||||
element.lockList?.removeWhere((LockListInfoItemEntity element) =>
|
element.lockList?.removeWhere((LockListInfoItemEntity element) =>
|
||||||
@ -141,6 +143,28 @@ class LockListLogic extends BaseGetXController {
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//判断是否要显示提示
|
||||||
|
bool getShowType(LockListInfoItemEntity keyInfo) {
|
||||||
|
final List<int> keyTypes = <int>[
|
||||||
|
XSConstantMacro.keyTypeTime,
|
||||||
|
XSConstantMacro.keyTypeLoop
|
||||||
|
];
|
||||||
|
final List<int> keyStatus = <int>[
|
||||||
|
XSConstantMacro.keyStatusWaitIneffective,
|
||||||
|
XSConstantMacro.keyStatusFrozen,
|
||||||
|
XSConstantMacro.keyStatusExpired,
|
||||||
|
];
|
||||||
|
final DateTime endDate =
|
||||||
|
DateTime.fromMillisecondsSinceEpoch(keyInfo.endDate ?? 0);
|
||||||
|
final DateTime now = DateTime.now();
|
||||||
|
final bool isKeyType = keyTypes.contains(keyInfo.keyType);
|
||||||
|
final bool isKeyStatus = keyStatus.contains(keyInfo.keyStatus);
|
||||||
|
final Duration difference = endDate.difference(now);
|
||||||
|
final bool isExpirationSoon = isKeyType && difference.inDays <= 15;
|
||||||
|
final bool isShow = isKeyType && isKeyStatus || isExpirationSoon;
|
||||||
|
return isShow;
|
||||||
|
}
|
||||||
|
|
||||||
/// 以下为删除逻辑
|
/// 以下为删除逻辑
|
||||||
void deleyLockLogicOfRoles() {
|
void deleyLockLogicOfRoles() {
|
||||||
if (state.lockListInfoItemEntity.isLockOwner == 1) {
|
if (state.lockListInfoItemEntity.isLockOwner == 1) {
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import 'lockListGroup_view.dart';
|
|||||||
import 'lockList_logic.dart';
|
import 'lockList_logic.dart';
|
||||||
|
|
||||||
class LockListPage extends StatefulWidget {
|
class LockListPage extends StatefulWidget {
|
||||||
|
|
||||||
const LockListPage({required this.lockListInfoGroupEntity, Key? key})
|
const LockListPage({required this.lockListInfoGroupEntity, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
final LockListInfoGroupEntity lockListInfoGroupEntity;
|
final LockListInfoGroupEntity lockListInfoGroupEntity;
|
||||||
@ -229,13 +228,7 @@ class _LockListPageState extends State<LockListPage> with RouteAware {
|
|||||||
)),
|
)),
|
||||||
SizedBox(height: 20.h),
|
SizedBox(height: 20.h),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: (keyInfo.keyType == XSConstantMacro.keyTypeTime ||
|
visible: logic.getShowType(keyInfo),
|
||||||
keyInfo.keyType == XSConstantMacro.keyTypeLoop) &&
|
|
||||||
(keyInfo.keyStatus ==
|
|
||||||
XSConstantMacro.keyStatusWaitIneffective ||
|
|
||||||
keyInfo.keyStatus == XSConstantMacro.keyStatusFrozen ||
|
|
||||||
keyInfo.keyStatus == XSConstantMacro.keyStatusExpired),
|
|
||||||
// visible: true,
|
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
SizedBox(width: 30.w),
|
SizedBox(width: 30.w),
|
||||||
|
|||||||
@ -360,14 +360,7 @@ class _LockListXHJPageState extends State<LockListXHJPage> with RouteAware {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: (keyInfo.keyType == XSConstantMacro.keyTypeTime ||
|
visible: logic.getShowType(keyInfo),
|
||||||
keyInfo.keyType == XSConstantMacro.keyTypeLoop) &&
|
|
||||||
(keyInfo.keyStatus ==
|
|
||||||
XSConstantMacro.keyStatusWaitIneffective ||
|
|
||||||
keyInfo.keyStatus ==
|
|
||||||
XSConstantMacro.keyStatusFrozen ||
|
|
||||||
keyInfo.keyStatus ==
|
|
||||||
XSConstantMacro.keyStatusExpired),
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(top: 5.h),
|
padding: EdgeInsets.only(top: 5.h),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|||||||
@ -179,7 +179,7 @@ class LockMainLogic extends BaseGetXController {
|
|||||||
|
|
||||||
list.lockList ??= <LockListInfoItemEntity>[];
|
list.lockList ??= <LockListInfoItemEntity>[];
|
||||||
final int keyIndex = lockList.indexWhere(
|
final int keyIndex = lockList.indexWhere(
|
||||||
(LockListInfoItemEntity lock) => lock.keyId == keyId) ??
|
(LockListInfoItemEntity lock) => lock.lockId == lockId) ??
|
||||||
-1;
|
-1;
|
||||||
if (keyIndex != -1) {
|
if (keyIndex != -1) {
|
||||||
//已存在
|
//已存在
|
||||||
|
|||||||
@ -38,7 +38,7 @@ class AppUnlockNeedMobileNetworkingLockLogic extends BaseGetXController {
|
|||||||
|
|
||||||
//刷新锁列表,更新锁详情--手机需联网标识
|
//刷新锁列表,更新锁详情--手机需联网标识
|
||||||
if (Get.isRegistered<LockMainLogic>()) {
|
if (Get.isRegistered<LockMainLogic>()) {
|
||||||
Get.find<LockMainLogic>().getStarLockInfo();
|
Get.find<LockMainLogic>().getStarLockInfo(isUnShowLoading: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,6 +24,7 @@ class MessageManagement {
|
|||||||
if (extra.isEmpty) {
|
if (extra.isEmpty) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
AppLog.log(message.toString());
|
||||||
_shuntingBus(extra);
|
_shuntingBus(extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -76,7 +76,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# 1.0.66+2024061802:xhj 线上环境,提交测试:回归 bug
|
# 1.0.66+2024061802:xhj 线上环境,提交测试:回归 bug
|
||||||
# 1.0.67+2024062501:xhj 线上环境,提交测试:回归 测试部门bug
|
# 1.0.67+2024062501:xhj 线上环境,提交测试:回归 测试部门bug
|
||||||
|
|
||||||
version: 1.0.67+2024062501
|
version: 1.0.68+2024062601
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user