Merge remote-tracking branch 'origin/develop_sky' into develop_sky_testci
# Conflicts: # .gitlab-ci.yml # android/Gemfile.lock # lib/main/lockDetail/fingerprint/fingerprintList/fingerprintList_logic.dart
This commit is contained in:
commit
78ae2c3239
@ -62,7 +62,7 @@ variables:
|
||||
before_script:
|
||||
- ls -li
|
||||
- export NEXT_VERSION="$(cat app_new.version)"
|
||||
# - flutter pub get
|
||||
# - flutter pub get
|
||||
- export PATH="/opt/homebrew/bin:$PATH"
|
||||
- eval "$(rbenv init -)"
|
||||
- bundle config mirror.https://rubygems.org https://gems.ruby-china.com
|
||||
@ -76,7 +76,7 @@ variables:
|
||||
before_script:
|
||||
- ls -li
|
||||
- export NEXT_VERSION="$(cat app_new.version)"
|
||||
# - flutter pub get
|
||||
# - flutter pub get
|
||||
- export PATH="/opt/homebrew/bin:$PATH"
|
||||
- eval "$(rbenv init -)"
|
||||
- bundle config mirror.https://rubygems.org https://gems.ruby-china.com
|
||||
|
||||
231
android/Gemfile.lock
Normal file
231
android/Gemfile.lock
Normal file
@ -0,0 +1,231 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (3.0.7)
|
||||
base64
|
||||
nkf
|
||||
rexml
|
||||
addressable (2.8.7)
|
||||
public_suffix (>= 2.0.2, < 7.0)
|
||||
artifactory (3.0.17)
|
||||
atomos (0.1.3)
|
||||
aws-eventstream (1.3.2)
|
||||
aws-partitions (1.1107.0)
|
||||
aws-sdk-core (3.224.0)
|
||||
aws-eventstream (~> 1, >= 1.3.0)
|
||||
aws-partitions (~> 1, >= 1.992.0)
|
||||
aws-sigv4 (~> 1.9)
|
||||
base64
|
||||
jmespath (~> 1, >= 1.6.1)
|
||||
logger
|
||||
aws-sdk-kms (1.101.0)
|
||||
aws-sdk-core (~> 3, >= 3.216.0)
|
||||
aws-sigv4 (~> 1.5)
|
||||
aws-sdk-s3 (1.186.1)
|
||||
aws-sdk-core (~> 3, >= 3.216.0)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.5)
|
||||
aws-sigv4 (1.11.0)
|
||||
aws-eventstream (~> 1, >= 1.0.2)
|
||||
babosa (1.0.4)
|
||||
base64 (0.2.0)
|
||||
claide (1.1.0)
|
||||
colored (1.2)
|
||||
colored2 (3.1.2)
|
||||
commander (4.6.0)
|
||||
highline (~> 2.0.0)
|
||||
declarative (0.0.20)
|
||||
digest-crc (0.7.0)
|
||||
rake (>= 12.0.0, < 14.0.0)
|
||||
domain_name (0.5.20190701)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
dotenv (2.8.1)
|
||||
emoji_regex (3.2.3)
|
||||
excon (0.109.0)
|
||||
faraday (1.10.4)
|
||||
faraday-em_http (~> 1.0)
|
||||
faraday-em_synchrony (~> 1.0)
|
||||
faraday-excon (~> 1.1)
|
||||
faraday-httpclient (~> 1.0)
|
||||
faraday-multipart (~> 1.0)
|
||||
faraday-net_http (~> 1.0)
|
||||
faraday-net_http_persistent (~> 1.0)
|
||||
faraday-patron (~> 1.0)
|
||||
faraday-rack (~> 1.0)
|
||||
faraday-retry (~> 1.0)
|
||||
ruby2_keywords (>= 0.0.4)
|
||||
faraday-cookie_jar (0.0.7)
|
||||
faraday (>= 0.8.0)
|
||||
http-cookie (~> 1.0.0)
|
||||
faraday-em_http (1.0.0)
|
||||
faraday-em_synchrony (1.0.0)
|
||||
faraday-excon (1.1.0)
|
||||
faraday-httpclient (1.0.1)
|
||||
faraday-multipart (1.1.0)
|
||||
multipart-post (~> 2.0)
|
||||
faraday-net_http (1.0.2)
|
||||
faraday-net_http_persistent (1.2.0)
|
||||
faraday-patron (1.0.0)
|
||||
faraday-rack (1.0.0)
|
||||
faraday-retry (1.0.3)
|
||||
faraday_middleware (1.2.1)
|
||||
faraday (~> 1.0)
|
||||
fastimage (2.4.0)
|
||||
fastlane (2.227.2)
|
||||
CFPropertyList (>= 2.3, < 4.0.0)
|
||||
addressable (>= 2.8, < 3.0.0)
|
||||
artifactory (~> 3.0)
|
||||
aws-sdk-s3 (~> 1.0)
|
||||
babosa (>= 1.0.3, < 2.0.0)
|
||||
bundler (>= 1.12.0, < 3.0.0)
|
||||
colored (~> 1.2)
|
||||
commander (~> 4.6)
|
||||
dotenv (>= 2.1.1, < 3.0.0)
|
||||
emoji_regex (>= 0.1, < 4.0)
|
||||
excon (>= 0.71.0, < 1.0.0)
|
||||
faraday (~> 1.0)
|
||||
faraday-cookie_jar (~> 0.0.6)
|
||||
faraday_middleware (~> 1.0)
|
||||
fastimage (>= 2.1.0, < 3.0.0)
|
||||
fastlane-sirp (>= 1.0.0)
|
||||
gh_inspector (>= 1.1.2, < 2.0.0)
|
||||
google-apis-androidpublisher_v3 (~> 0.3)
|
||||
google-apis-playcustomapp_v1 (~> 0.1)
|
||||
google-cloud-env (>= 1.6.0, < 2.0.0)
|
||||
google-cloud-storage (~> 1.31)
|
||||
highline (~> 2.0)
|
||||
http-cookie (~> 1.0.5)
|
||||
json (< 3.0.0)
|
||||
jwt (>= 2.1.0, < 3)
|
||||
mini_magick (>= 4.9.4, < 5.0.0)
|
||||
multipart-post (>= 2.0.0, < 3.0.0)
|
||||
naturally (~> 2.2)
|
||||
optparse (>= 0.1.1, < 1.0.0)
|
||||
plist (>= 3.1.0, < 4.0.0)
|
||||
rubyzip (>= 2.0.0, < 3.0.0)
|
||||
security (= 0.1.5)
|
||||
simctl (~> 1.6.3)
|
||||
terminal-notifier (>= 2.0.0, < 3.0.0)
|
||||
terminal-table (~> 3)
|
||||
tty-screen (>= 0.6.3, < 1.0.0)
|
||||
tty-spinner (>= 0.8.0, < 1.0.0)
|
||||
word_wrap (~> 1.0.0)
|
||||
xcodeproj (>= 1.13.0, < 2.0.0)
|
||||
xcpretty (~> 0.4.1)
|
||||
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
|
||||
fastlane-plugin-pgyer (0.2.9)
|
||||
fastlane-sirp (1.0.0)
|
||||
sysrandom (~> 1.0)
|
||||
gh_inspector (1.1.3)
|
||||
google-apis-androidpublisher_v3 (0.54.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-core (0.11.3)
|
||||
addressable (~> 2.5, >= 2.5.1)
|
||||
googleauth (>= 0.16.2, < 2.a)
|
||||
httpclient (>= 2.8.1, < 3.a)
|
||||
mini_mime (~> 1.0)
|
||||
representable (~> 3.0)
|
||||
retriable (>= 2.0, < 4.a)
|
||||
rexml
|
||||
google-apis-iamcredentials_v1 (0.17.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-playcustomapp_v1 (0.13.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-storage_v1 (0.29.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-cloud-core (1.6.1)
|
||||
google-cloud-env (>= 1.0, < 3.a)
|
||||
google-cloud-errors (~> 1.0)
|
||||
google-cloud-env (1.6.0)
|
||||
faraday (>= 0.17.3, < 3.0)
|
||||
google-cloud-errors (1.3.1)
|
||||
google-cloud-storage (1.45.0)
|
||||
addressable (~> 2.8)
|
||||
digest-crc (~> 0.4)
|
||||
google-apis-iamcredentials_v1 (~> 0.1)
|
||||
google-apis-storage_v1 (~> 0.29.0)
|
||||
google-cloud-core (~> 1.6)
|
||||
googleauth (>= 0.16.2, < 2.a)
|
||||
mini_mime (~> 1.0)
|
||||
googleauth (1.8.1)
|
||||
faraday (>= 0.17.3, < 3.a)
|
||||
jwt (>= 1.4, < 3.0)
|
||||
multi_json (~> 1.11)
|
||||
os (>= 0.9, < 2.0)
|
||||
signet (>= 0.16, < 2.a)
|
||||
highline (2.0.3)
|
||||
http-cookie (1.0.8)
|
||||
domain_name (~> 0.5)
|
||||
httpclient (2.9.0)
|
||||
mutex_m
|
||||
jmespath (1.6.2)
|
||||
json (2.7.6)
|
||||
jwt (2.10.1)
|
||||
base64
|
||||
logger (1.7.0)
|
||||
mini_magick (4.13.2)
|
||||
mini_mime (1.1.5)
|
||||
multi_json (1.15.0)
|
||||
multipart-post (2.4.1)
|
||||
mutex_m (0.3.0)
|
||||
nanaimo (0.4.0)
|
||||
naturally (2.2.1)
|
||||
nkf (0.2.0)
|
||||
optparse (0.6.0)
|
||||
os (1.1.4)
|
||||
plist (3.7.2)
|
||||
public_suffix (5.1.1)
|
||||
rake (13.2.1)
|
||||
representable (3.2.0)
|
||||
declarative (< 0.1.0)
|
||||
trailblazer-option (>= 0.1.1, < 0.2.0)
|
||||
uber (< 0.2.0)
|
||||
retriable (3.1.2)
|
||||
rexml (3.4.1)
|
||||
rouge (3.28.0)
|
||||
ruby2_keywords (0.0.5)
|
||||
rubyzip (2.4.1)
|
||||
security (0.1.5)
|
||||
signet (0.18.0)
|
||||
addressable (~> 2.8)
|
||||
faraday (>= 0.17.5, < 3.a)
|
||||
jwt (>= 1.5, < 3.0)
|
||||
multi_json (~> 1.10)
|
||||
simctl (1.6.10)
|
||||
CFPropertyList
|
||||
naturally
|
||||
sysrandom (1.0.5)
|
||||
terminal-notifier (2.0.0)
|
||||
terminal-table (3.0.2)
|
||||
unicode-display_width (>= 1.1.1, < 3)
|
||||
trailblazer-option (0.1.2)
|
||||
tty-cursor (0.7.1)
|
||||
tty-screen (0.8.2)
|
||||
tty-spinner (0.9.3)
|
||||
tty-cursor (~> 0.7)
|
||||
uber (0.1.0)
|
||||
unf (0.2.0)
|
||||
unicode-display_width (2.6.0)
|
||||
word_wrap (1.0.0)
|
||||
xcodeproj (1.27.0)
|
||||
CFPropertyList (>= 2.3.3, < 4.0)
|
||||
atomos (~> 0.1.3)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
colored2 (~> 3.1)
|
||||
nanaimo (~> 0.4.0)
|
||||
rexml (>= 3.3.6, < 4.0)
|
||||
xcpretty (0.4.1)
|
||||
rouge (~> 3.28.0)
|
||||
xcpretty-travis-formatter (1.0.1)
|
||||
xcpretty (~> 0.2, >= 0.0.7)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
fastlane
|
||||
fastlane-plugin-pgyer
|
||||
nkf (= 0.2.0)
|
||||
|
||||
BUNDLED WITH
|
||||
1.17.2
|
||||
@ -405,6 +405,7 @@ class FingerprintListLogic extends BaseGetXController {
|
||||
_teamEvent = eventBus
|
||||
.on<OtherTypeRefreshListEvent>()
|
||||
.listen((OtherTypeRefreshListEvent event) async {
|
||||
// 立即刷新数据
|
||||
await getFingerprintsListData(isRefresh: true);
|
||||
});
|
||||
}
|
||||
@ -459,8 +460,9 @@ class FingerprintListLogic extends BaseGetXController {
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
_initReplySubscription();
|
||||
_initRefreshAction();
|
||||
|
||||
// _initRefreshAction();
|
||||
// 初始加载数据
|
||||
await getFingerprintsListData(isRefresh: true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
@ -7,6 +6,8 @@ import 'package:star_lock/blue/io_protocol/io_updataLockRemoteControlList.dart';
|
||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import 'package:star_lock/tools/commonDataManage.dart';
|
||||
import 'package:star_lock/tools/eventBusEventManage.dart';
|
||||
import 'package:star_lock/tools/storage.dart';
|
||||
|
||||
import '../../../../app_settings/app_settings.dart';
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
@ -21,48 +22,56 @@ import '../../../../blue/io_tool/io_tool.dart';
|
||||
import '../../../../blue/io_tool/manager_event_bus.dart';
|
||||
import '../../../../blue/sender_manage.dart';
|
||||
import '../../../../network/api_repository.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
import 'uploadData_state.dart';
|
||||
|
||||
class UploadDataLogic extends BaseGetXController{
|
||||
UploadDataState state = UploadDataState();
|
||||
class UploadDataLogic extends BaseGetXController {
|
||||
final UploadDataState state = UploadDataState();
|
||||
|
||||
// 监听蓝牙协议返回结果
|
||||
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);
|
||||
}
|
||||
});
|
||||
@ -71,21 +80,22 @@ class UploadDataLogic extends BaseGetXController{
|
||||
// 上传数据获取锁密码列表
|
||||
Future<void> _replyUpdataLockPasswordListReply(Reply reply) async {
|
||||
final int status = reply.data[2];
|
||||
switch(status){
|
||||
switch (status) {
|
||||
case 0x00:
|
||||
//成功
|
||||
//成功
|
||||
cancelBlueConnetctToastTimer();
|
||||
|
||||
final int dataLength = reply.data[8];
|
||||
state.uploadPasswordDataList.addAll(reply.data.sublist(9, reply.data.length));
|
||||
if(dataLength == 10){
|
||||
state.uploadPasswordDataList
|
||||
.addAll(reply.data.sublist(9, reply.data.length));
|
||||
if (dataLength == 10) {
|
||||
// 当数据是10的时候继续请求
|
||||
state.uploadPasswordPage = state.uploadPasswordPage + 1;
|
||||
|
||||
final List<int> token = reply.data.sublist(3, 7);
|
||||
showEasyLoading();
|
||||
updataLockPasswordList(token, state.uploadPasswordPage);
|
||||
}else{
|
||||
} else {
|
||||
// dismissEasyLoading();
|
||||
|
||||
// 当数据不是10的时候解析数据上传
|
||||
@ -95,12 +105,15 @@ 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;
|
||||
case 0x06:
|
||||
//无权限
|
||||
//无权限
|
||||
final List<int> token = reply.data.sublist(3, 7);
|
||||
final List<String> saveStrList = changeIntListToStringList(token);
|
||||
Storage.setStringList(saveBlueToken, saveStrList);
|
||||
@ -120,14 +133,15 @@ class UploadDataLogic extends BaseGetXController{
|
||||
// 上传数据获取锁卡列表
|
||||
Future<void> _replyUpdataLockCardListReply(Reply reply) async {
|
||||
final int status = reply.data[2];
|
||||
switch(status){
|
||||
switch (status) {
|
||||
case 0x00:
|
||||
//成功
|
||||
cancelBlueConnetctToastTimer();
|
||||
|
||||
final int dataLength = reply.data[8];
|
||||
state.uploadCardDataList.addAll(reply.data.sublist(9, reply.data.length));
|
||||
if(dataLength == 10){
|
||||
state.uploadCardDataList
|
||||
.addAll(reply.data.sublist(9, reply.data.length));
|
||||
if (dataLength == 10) {
|
||||
// 当数据是10的时候继续请求
|
||||
state.uploadCardPage = state.uploadCardPage + 1;
|
||||
|
||||
@ -135,7 +149,7 @@ class UploadDataLogic extends BaseGetXController{
|
||||
|
||||
showEasyLoading();
|
||||
updataLockCardList(token, state.uploadCardPage);
|
||||
}else{
|
||||
} else {
|
||||
// // 当数据不是10的时候解析数据上传
|
||||
// if(state.uploadCardDataList.isEmpty){
|
||||
// // 如果是空的直接上传下一个
|
||||
@ -143,12 +157,13 @@ 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;
|
||||
case 0x06:
|
||||
//无权限
|
||||
//无权限
|
||||
final List<int> token = reply.data.sublist(3, 7);
|
||||
final List<String> saveStrList = changeIntListToStringList(token);
|
||||
Storage.setStringList(saveBlueToken, saveStrList);
|
||||
@ -167,14 +182,15 @@ class UploadDataLogic extends BaseGetXController{
|
||||
// 上传数据获取锁指纹列表
|
||||
Future<void> _replyUpdataLockFingerprintListReply(Reply reply) async {
|
||||
final int status = reply.data[2];
|
||||
switch(status){
|
||||
switch (status) {
|
||||
case 0x00:
|
||||
//成功
|
||||
//成功
|
||||
cancelBlueConnetctToastTimer();
|
||||
|
||||
final int dataLength = reply.data[8];
|
||||
state.uploadFingerprintDataList.addAll(reply.data.sublist(9, reply.data.length));
|
||||
if(dataLength == 10){
|
||||
state.uploadFingerprintDataList
|
||||
.addAll(reply.data.sublist(9, reply.data.length));
|
||||
if (dataLength == 10) {
|
||||
// 当数据是10的时候继续请求
|
||||
state.uploadFingerprintPage = state.uploadFingerprintPage + 1;
|
||||
|
||||
@ -182,7 +198,7 @@ class UploadDataLogic extends BaseGetXController{
|
||||
|
||||
showEasyLoading();
|
||||
updataLockFingerprintList(token, state.uploadFingerprintPage);
|
||||
}else{
|
||||
} else {
|
||||
// // 当数据不是10的时候解析数据上传
|
||||
// if(state.uploadFingerprintDataList.isEmpty){
|
||||
// // 如果是空的直接上传下一个
|
||||
@ -190,12 +206,15 @@ 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;
|
||||
case 0x06:
|
||||
//无权限
|
||||
//无权限
|
||||
final List<int> token = reply.data.sublist(3, 7);
|
||||
final List<String> saveStrList = changeIntListToStringList(token);
|
||||
Storage.setStringList(saveBlueToken, saveStrList);
|
||||
@ -214,14 +233,15 @@ class UploadDataLogic extends BaseGetXController{
|
||||
// 上传数据获取锁人脸列表解析
|
||||
Future<void> _replyUpdataLockFaceListReply(Reply reply) async {
|
||||
final int status = reply.data[2];
|
||||
switch(status){
|
||||
switch (status) {
|
||||
case 0x00:
|
||||
//成功
|
||||
cancelBlueConnetctToastTimer();
|
||||
|
||||
final int dataLength = reply.data[8];
|
||||
state.uploadFaceDataList.addAll(reply.data.sublist(9, reply.data.length));
|
||||
if(dataLength == 10){
|
||||
state.uploadFaceDataList
|
||||
.addAll(reply.data.sublist(9, reply.data.length));
|
||||
if (dataLength == 10) {
|
||||
// 当数据是10的时候继续请求
|
||||
state.uploadFacePage = state.uploadFacePage + 1;
|
||||
|
||||
@ -229,20 +249,21 @@ class UploadDataLogic extends BaseGetXController{
|
||||
|
||||
showEasyLoading();
|
||||
updataLockFaceList(token, state.uploadFacePage);
|
||||
}else{
|
||||
} else {
|
||||
// // 当数据不是10的时候解析数据上传
|
||||
// if(state.uploadFaceDataList.isEmpty){
|
||||
// // 如果是空的直接上传下一个
|
||||
// getUpdataLockPalmVeinList();
|
||||
// }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;
|
||||
case 0x06:
|
||||
//无权限
|
||||
//无权限
|
||||
final List<int> token = reply.data.sublist(3, 7);
|
||||
final List<String> saveStrList = changeIntListToStringList(token);
|
||||
Storage.setStringList(saveBlueToken, saveStrList);
|
||||
@ -261,14 +282,15 @@ class UploadDataLogic extends BaseGetXController{
|
||||
// 上传数据获取锁掌静脉列表解析
|
||||
Future<void> _replyUpdataLockPalmVeinListReply(Reply reply) async {
|
||||
final int status = reply.data[2];
|
||||
switch(status){
|
||||
switch (status) {
|
||||
case 0x00:
|
||||
//成功
|
||||
cancelBlueConnetctToastTimer();
|
||||
|
||||
final int dataLength = reply.data[8];
|
||||
state.uploadPalmVeinDataList.addAll(reply.data.sublist(9, reply.data.length));
|
||||
if(dataLength == 10){
|
||||
state.uploadPalmVeinDataList
|
||||
.addAll(reply.data.sublist(9, reply.data.length));
|
||||
if (dataLength == 10) {
|
||||
// 当数据是10的时候继续请求
|
||||
state.uploadPalmVeinPage = state.uploadPalmVeinPage + 1;
|
||||
|
||||
@ -276,7 +298,7 @@ class UploadDataLogic extends BaseGetXController{
|
||||
|
||||
showEasyLoading();
|
||||
updataLockPalmVeinList(token, state.uploadPalmVeinPage);
|
||||
}else{
|
||||
} else {
|
||||
// // 当数据不是10的时候解析数据上传
|
||||
// if(state.uploadPalmVeinDataList.isEmpty){
|
||||
// // 不需要上传 如果是空的直接上传下一个
|
||||
@ -284,12 +306,15 @@ 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;
|
||||
case 0x06:
|
||||
//无权限
|
||||
//无权限
|
||||
final List<int> token = reply.data.sublist(3, 7);
|
||||
final List<String> saveStrList = changeIntListToStringList(token);
|
||||
Storage.setStringList(saveBlueToken, saveStrList);
|
||||
@ -308,14 +333,15 @@ class UploadDataLogic extends BaseGetXController{
|
||||
// 上传数据获取锁遥控列表解析
|
||||
Future<void> _replyUpdataLockRemoteControlListReply(Reply reply) async {
|
||||
final int status = reply.data[2];
|
||||
switch(status){
|
||||
switch (status) {
|
||||
case 0x00:
|
||||
//成功
|
||||
cancelBlueConnetctToastTimer();
|
||||
|
||||
final int dataLength = reply.data[8];
|
||||
state.uploadRemoteControlDataList.addAll(reply.data.sublist(9, reply.data.length));
|
||||
if(dataLength == 10){
|
||||
state.uploadRemoteControlDataList
|
||||
.addAll(reply.data.sublist(9, reply.data.length));
|
||||
if (dataLength == 10) {
|
||||
// 当数据是10的时候继续请求
|
||||
state.uploadRemoteControlPage = state.uploadRemoteControlPage + 1;
|
||||
|
||||
@ -323,7 +349,7 @@ class UploadDataLogic extends BaseGetXController{
|
||||
|
||||
showEasyLoading();
|
||||
updataLockRemoteControlList(token, state.uploadRemoteControlPage);
|
||||
}else{
|
||||
} else {
|
||||
// // 当数据不是10的时候解析数据上传
|
||||
// if(state.uploadPalmVeinDataList.isEmpty){
|
||||
// // 不需要上传 如果是空的直接上传下一个
|
||||
@ -331,12 +357,15 @@ 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;
|
||||
case 0x06:
|
||||
//无权限
|
||||
//无权限
|
||||
final List<int> token = reply.data.sublist(3, 7);
|
||||
final List<String> saveStrList = changeIntListToStringList(token);
|
||||
Storage.setStringList(saveBlueToken, saveStrList);
|
||||
@ -355,17 +384,19 @@ class UploadDataLogic extends BaseGetXController{
|
||||
// 上传数据获取锁设置解析
|
||||
Future<void> _replyUpdataLockSetReply(Reply reply) async {
|
||||
final int status = reply.data[2];
|
||||
switch(status){
|
||||
switch (status) {
|
||||
case 0x00:
|
||||
//成功
|
||||
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:
|
||||
//无权限
|
||||
//无权限
|
||||
final List<int> token = reply.data.sublist(3, 7);
|
||||
final List<String> saveStrList = changeIntListToStringList(token);
|
||||
Storage.setStringList(saveBlueToken, saveStrList);
|
||||
@ -383,18 +414,19 @@ class UploadDataLogic extends BaseGetXController{
|
||||
|
||||
// 上传数据获取锁密码列表
|
||||
Future<void> getUpdataLockPasswordList() async {
|
||||
if(state.sureBtnState.value == 1){
|
||||
if (state.sureBtnState.value == 1) {
|
||||
return;
|
||||
}
|
||||
state.sureBtnState.value = 1;
|
||||
|
||||
showEasyLoading();
|
||||
showBlueConnetctToastTimer(action: (){
|
||||
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!);
|
||||
@ -405,7 +437,7 @@ class UploadDataLogic extends BaseGetXController{
|
||||
dismissEasyLoading();
|
||||
cancelBlueConnetctToastTimer();
|
||||
state.sureBtnState.value = 0;
|
||||
if(state.ifCurrentScreen.value == true){
|
||||
if (state.ifCurrentScreen.value == true) {
|
||||
showBlueConnetctToast();
|
||||
}
|
||||
}
|
||||
@ -414,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);
|
||||
@ -428,19 +461,19 @@ class UploadDataLogic extends BaseGetXController{
|
||||
token: token,
|
||||
needAuthor: 1,
|
||||
signKey: signKeyDataList,
|
||||
privateKey: getPrivateKeyList
|
||||
);
|
||||
privateKey: getPrivateKeyList);
|
||||
}
|
||||
|
||||
// 上传数据获取锁Card列表
|
||||
Future<void> getUpdataLockCardList() async {
|
||||
showEasyLoading();
|
||||
showBlueConnetctToastTimer(action: (){
|
||||
showBlueConnetctToastTimer(action: () {
|
||||
dismissEasyLoading();
|
||||
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!);
|
||||
@ -451,7 +484,7 @@ class UploadDataLogic extends BaseGetXController{
|
||||
cancelBlueConnetctToastTimer();
|
||||
state.sureBtnState.value = 0;
|
||||
state.indexCount.value = 0;
|
||||
if(state.ifCurrentScreen.value == true){
|
||||
if (state.ifCurrentScreen.value == true) {
|
||||
showBlueConnetctToast();
|
||||
}
|
||||
}
|
||||
@ -460,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);
|
||||
@ -474,19 +508,19 @@ class UploadDataLogic extends BaseGetXController{
|
||||
token: token,
|
||||
needAuthor: 1,
|
||||
signKey: signKeyDataList,
|
||||
privateKey: getPrivateKeyList
|
||||
);
|
||||
privateKey: getPrivateKeyList);
|
||||
}
|
||||
|
||||
// 上传数据获取锁指纹列表
|
||||
Future<void> getUpdataLockFingerprintList() async {
|
||||
showEasyLoading();
|
||||
showBlueConnetctToastTimer(action: (){
|
||||
showBlueConnetctToastTimer(action: () {
|
||||
dismissEasyLoading();
|
||||
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!);
|
||||
@ -497,7 +531,7 @@ class UploadDataLogic extends BaseGetXController{
|
||||
cancelBlueConnetctToastTimer();
|
||||
state.sureBtnState.value = 0;
|
||||
state.indexCount.value = 0;
|
||||
if(state.ifCurrentScreen.value == true){
|
||||
if (state.ifCurrentScreen.value == true) {
|
||||
showBlueConnetctToast();
|
||||
}
|
||||
}
|
||||
@ -506,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);
|
||||
@ -520,19 +555,19 @@ class UploadDataLogic extends BaseGetXController{
|
||||
token: token,
|
||||
needAuthor: 1,
|
||||
signKey: signKeyDataList,
|
||||
privateKey: getPrivateKeyList
|
||||
);
|
||||
privateKey: getPrivateKeyList);
|
||||
}
|
||||
|
||||
// 上传数据获取锁人脸列表
|
||||
Future<void> getUpdataLockFaceList() async {
|
||||
showEasyLoading();
|
||||
showBlueConnetctToastTimer(action: (){
|
||||
showBlueConnetctToastTimer(action: () {
|
||||
dismissEasyLoading();
|
||||
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!);
|
||||
@ -543,7 +578,7 @@ class UploadDataLogic extends BaseGetXController{
|
||||
cancelBlueConnetctToastTimer();
|
||||
state.sureBtnState.value = 0;
|
||||
state.indexCount.value = 0;
|
||||
if(state.ifCurrentScreen.value == true){
|
||||
if (state.ifCurrentScreen.value == true) {
|
||||
showBlueConnetctToast();
|
||||
}
|
||||
}
|
||||
@ -552,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);
|
||||
@ -566,20 +602,19 @@ class UploadDataLogic extends BaseGetXController{
|
||||
token: token,
|
||||
needAuthor: 1,
|
||||
signKey: signKeyDataList,
|
||||
privateKey: getPrivateKeyList
|
||||
);
|
||||
privateKey: getPrivateKeyList);
|
||||
}
|
||||
|
||||
|
||||
// 上传数据获取锁掌静脉列表
|
||||
Future<void> getUpdataLockPalmVeinList() async {
|
||||
showEasyLoading();
|
||||
showBlueConnetctToastTimer(action: (){
|
||||
showBlueConnetctToastTimer(action: () {
|
||||
dismissEasyLoading();
|
||||
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!);
|
||||
@ -590,7 +625,7 @@ class UploadDataLogic extends BaseGetXController{
|
||||
cancelBlueConnetctToastTimer();
|
||||
state.sureBtnState.value = 0;
|
||||
state.indexCount.value = 0;
|
||||
if(state.ifCurrentScreen.value == true){
|
||||
if (state.ifCurrentScreen.value == true) {
|
||||
showBlueConnetctToast();
|
||||
}
|
||||
}
|
||||
@ -599,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);
|
||||
@ -613,30 +649,31 @@ class UploadDataLogic extends BaseGetXController{
|
||||
token: token,
|
||||
needAuthor: 1,
|
||||
signKey: signKeyDataList,
|
||||
privateKey: getPrivateKeyList
|
||||
);
|
||||
privateKey: getPrivateKeyList);
|
||||
}
|
||||
|
||||
// 上传数据获取锁遥控列表
|
||||
Future<void> getUpdataLockRemoteControlList() async {
|
||||
showEasyLoading();
|
||||
showBlueConnetctToastTimer(action: (){
|
||||
showBlueConnetctToastTimer(action: () {
|
||||
dismissEasyLoading();
|
||||
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();
|
||||
state.sureBtnState.value = 0;
|
||||
state.indexCount.value = 0;
|
||||
if(state.ifCurrentScreen.value == true){
|
||||
if (state.ifCurrentScreen.value == true) {
|
||||
showBlueConnetctToast();
|
||||
}
|
||||
}
|
||||
@ -645,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);
|
||||
@ -659,19 +697,19 @@ class UploadDataLogic extends BaseGetXController{
|
||||
token: token,
|
||||
needAuthor: 1,
|
||||
signKey: signKeyDataList,
|
||||
privateKey: getPrivateKeyList
|
||||
);
|
||||
privateKey: getPrivateKeyList);
|
||||
}
|
||||
|
||||
// 上传数据获取设置
|
||||
Future<void> getUpdataLockSet() async {
|
||||
showEasyLoading();
|
||||
showBlueConnetctToastTimer(action: (){
|
||||
showBlueConnetctToastTimer(action: () {
|
||||
dismissEasyLoading();
|
||||
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 +720,7 @@ class UploadDataLogic extends BaseGetXController{
|
||||
cancelBlueConnetctToastTimer();
|
||||
state.sureBtnState.value = 0;
|
||||
state.indexCount.value = 0;
|
||||
if(state.ifCurrentScreen.value == true){
|
||||
if (state.ifCurrentScreen.value == true) {
|
||||
showBlueConnetctToast();
|
||||
}
|
||||
}
|
||||
@ -691,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);
|
||||
@ -703,32 +742,29 @@ class UploadDataLogic extends BaseGetXController{
|
||||
token: token,
|
||||
needAuthor: 1,
|
||||
signKey: signKeyDataList,
|
||||
privateKey: getPrivateKeyList
|
||||
);
|
||||
privateKey: getPrivateKeyList);
|
||||
}
|
||||
|
||||
// 锁数据上传服务器
|
||||
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,
|
||||
uploadType: uploadType,
|
||||
recordType: recordType,
|
||||
records:records,
|
||||
isUnShowLoading: false
|
||||
);
|
||||
if(entity.errorCode!.codeIsSuccessful){
|
||||
if(uploadType == 1){
|
||||
records: records,
|
||||
isUnShowLoading: false);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
if (uploadType == 1) {
|
||||
// 1设置
|
||||
state.indexCount.value = 0;
|
||||
state.sureBtnState.value = 0;
|
||||
showToast('上传成功'.tr);
|
||||
}else{
|
||||
} else {
|
||||
// 2开门方式
|
||||
switch(recordType){
|
||||
switch (recordType) {
|
||||
// case 1:
|
||||
// // 电子钥匙
|
||||
//
|
||||
@ -761,13 +797,38 @@ class UploadDataLogic extends BaseGetXController{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
state.indexCount.value = 0;
|
||||
state.sureBtnState.value = 0;
|
||||
dismissEasyLoading();
|
||||
}
|
||||
}
|
||||
|
||||
// 上传数据成功后的回调
|
||||
void onUploadSuccess() {
|
||||
// 发送事件通知指纹列表刷新
|
||||
eventBus.fire(OtherTypeRefreshListEvent());
|
||||
// 返回上一页
|
||||
Get.back();
|
||||
}
|
||||
|
||||
// 在上传数据成功的地方调用
|
||||
Future<void> uploadData() async {
|
||||
try {
|
||||
// ... existing upload code ...
|
||||
|
||||
// 假设这是上传成功的标志
|
||||
bool uploadSuccess = true; // 这里需要根据实际的上传结果来设置
|
||||
|
||||
if (uploadSuccess) {
|
||||
onUploadSuccess();
|
||||
}
|
||||
} catch (e) {
|
||||
// 处理错误
|
||||
print('Upload failed: $e');
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
super.onReady();
|
||||
@ -783,5 +844,4 @@ class UploadDataLogic extends BaseGetXController{
|
||||
|
||||
_replySubscription.cancel();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user