Merge branch 'release_hyx' into release
This commit is contained in:
commit
9031329f52
@ -127,6 +127,8 @@ PODS:
|
|||||||
- Flutter
|
- Flutter
|
||||||
- network_info_plus (0.0.1):
|
- network_info_plus (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- open_filex (0.0.2):
|
||||||
|
- Flutter
|
||||||
- package_info_plus (0.4.5):
|
- package_info_plus (0.4.5):
|
||||||
- Flutter
|
- Flutter
|
||||||
- path_provider_foundation (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
@ -188,6 +190,7 @@ DEPENDENCIES:
|
|||||||
- jpush_flutter (from `.symlinks/plugins/jpush_flutter/ios`)
|
- jpush_flutter (from `.symlinks/plugins/jpush_flutter/ios`)
|
||||||
- just_audio (from `.symlinks/plugins/just_audio/ios`)
|
- just_audio (from `.symlinks/plugins/just_audio/ios`)
|
||||||
- network_info_plus (from `.symlinks/plugins/network_info_plus/ios`)
|
- network_info_plus (from `.symlinks/plugins/network_info_plus/ios`)
|
||||||
|
- open_filex (from `.symlinks/plugins/open_filex/ios`)
|
||||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||||
@ -280,6 +283,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/just_audio/ios"
|
:path: ".symlinks/plugins/just_audio/ios"
|
||||||
network_info_plus:
|
network_info_plus:
|
||||||
:path: ".symlinks/plugins/network_info_plus/ios"
|
:path: ".symlinks/plugins/network_info_plus/ios"
|
||||||
|
open_filex:
|
||||||
|
:path: ".symlinks/plugins/open_filex/ios"
|
||||||
package_info_plus:
|
package_info_plus:
|
||||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
@ -344,6 +349,7 @@ SPEC CHECKSUMS:
|
|||||||
jpush_flutter: 1f436f1a02db5c5ef9e9b42378f557096ccd328b
|
jpush_flutter: 1f436f1a02db5c5ef9e9b42378f557096ccd328b
|
||||||
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
|
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
|
||||||
network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f
|
network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f
|
||||||
|
open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4
|
||||||
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
||||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||||
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
||||||
|
|||||||
@ -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) {
|
||||||
//已存在
|
//已存在
|
||||||
|
|||||||
@ -24,6 +24,7 @@ class MessageManagement {
|
|||||||
if (extra.isEmpty) {
|
if (extra.isEmpty) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
AppLog.log(message.toString());
|
||||||
_shuntingBus(extra);
|
_shuntingBus(extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user