fix: 调整第三方平台设置
This commit is contained in:
parent
4f1b1dd02f
commit
e1011688de
@ -46,7 +46,7 @@ class BlueManage {
|
|||||||
StreamSubscription<BluetoothConnectionState>? _connectionStateSubscription;
|
StreamSubscription<BluetoothConnectionState>? _connectionStateSubscription;
|
||||||
|
|
||||||
StreamSubscription<int>? _mtuSubscription;
|
StreamSubscription<int>? _mtuSubscription;
|
||||||
int? _mtuSize = 20;
|
int? _mtuSize = 30;
|
||||||
|
|
||||||
// 当前连接设备的名字
|
// 当前连接设备的名字
|
||||||
String connectDeviceName = '';
|
String connectDeviceName = '';
|
||||||
@ -813,30 +813,33 @@ class BlueManage {
|
|||||||
|
|
||||||
/// 写入蓝牙特征值,并等待响应
|
/// 写入蓝牙特征值,并等待响应
|
||||||
Future<void> writeCharacteristicWithResponse(List<int> value) async {
|
Future<void> writeCharacteristicWithResponse(List<int> value) async {
|
||||||
// 如果MTU还是默认值,尝试重新请求
|
|
||||||
if (_mtuSize == 23 && bluetoothConnectDevice != null) {
|
|
||||||
try {
|
|
||||||
if (Platform.isAndroid) {
|
|
||||||
await bluetoothConnectDevice!.requestMtu(512);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
AppLog.log('重新请求MTU失败: $e');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
final List<BluetoothService> services = await bluetoothConnectDevice!.discoverServices();
|
final List<BluetoothService> services = await bluetoothConnectDevice!.discoverServices();
|
||||||
for (final BluetoothService service in services) {
|
for (final BluetoothService service in services) {
|
||||||
if (service.uuid == _serviceIdConnect) {
|
if (service.uuid == _serviceIdConnect) {
|
||||||
for (final BluetoothCharacteristic characteristic in service.characteristics) {
|
for (final BluetoothCharacteristic characteristic in service.characteristics) {
|
||||||
if (characteristic.characteristicUuid == _characteristicIdWrite) {
|
if (characteristic.characteristicUuid == _characteristicIdWrite) {
|
||||||
try {
|
try {
|
||||||
|
_initGetMtuSubscription();
|
||||||
|
// 如果MTU还是默认值,尝试重新请求
|
||||||
|
if ((_mtuSize == 23 || _mtuSize == 20) && bluetoothConnectDevice != null) {
|
||||||
|
try {
|
||||||
|
if (Platform.isAndroid) {
|
||||||
|
await bluetoothConnectDevice!.requestMtu(512);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
AppLog.log('重新请求MTU失败: $e');
|
||||||
|
}
|
||||||
|
}
|
||||||
// 添加重试机制
|
// 添加重试机制
|
||||||
int retryCount = 0;
|
int retryCount = 0;
|
||||||
const int maxRetries = 3;
|
const int maxRetries = 3;
|
||||||
const int retryDelayMs = 500;
|
const int retryDelayMs = 500;
|
||||||
|
|
||||||
final List<int> valueList = value;
|
final List<int> valueList = value;
|
||||||
|
AppLog.log('发送数据时当前的mtuSize是:${_mtuSize}');
|
||||||
final List subData = splitList(valueList, _mtuSize!);
|
final List subData = splitList(valueList, _mtuSize!);
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < subData.length; i++) {
|
for (int i = 0; i < subData.length; i++) {
|
||||||
// 对每个数据包都应用重试逻辑
|
// 对每个数据包都应用重试逻辑
|
||||||
bool packetSent = false;
|
bool packetSent = false;
|
||||||
|
|||||||
@ -1,24 +1,109 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
class ActivateInfoResponse {
|
class ActivateInfoResponse {
|
||||||
ActivateInfoResponse({
|
ActivateInfoResponse({
|
||||||
this.description,
|
this.description,
|
||||||
this.errorCode,
|
this.errorCode,
|
||||||
this.data, // 现在是一个 List<ActivateInfo>
|
this.data, // 现在是一个 List<ActivateInfo>
|
||||||
this.errorMsg,
|
this.errorMsg,
|
||||||
});
|
});
|
||||||
|
|
||||||
ActivateInfoResponse.fromJson(dynamic json) {
|
ActivateInfoResponse.fromJson(dynamic json) {
|
||||||
description = json['description'];
|
description = json['description'];
|
||||||
errorCode = json['errorCode'];
|
errorCode = json['errorCode'];
|
||||||
// 修改这里:如果 json['data'] 是列表,则解析为 List<ActivateInfo>;否则为空列表
|
// 修改这里:直接解析为单个 ActivateInfo 对象
|
||||||
data = json['data'] != null
|
data = json['data'] != null ? ActivateInfo.fromJson(json['data']) : null;
|
||||||
? (json['data'] as List).map((item) => ActivateInfo.fromJson(item)).toList()
|
|
||||||
: [];
|
|
||||||
errorMsg = json['errorMsg'];
|
errorMsg = json['errorMsg'];
|
||||||
}
|
}
|
||||||
|
|
||||||
String? description;
|
String? description;
|
||||||
int? errorCode;
|
int? errorCode;
|
||||||
List<ActivateInfo>? data; // 改为 List<ActivateInfo>
|
ActivateInfo? data; // 改为 List<ActivateInfo>
|
||||||
|
String? errorMsg;
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final map = <String, dynamic>{};
|
||||||
|
map['description'] = description;
|
||||||
|
map['errorCode'] = errorCode;
|
||||||
|
if (data != null) {
|
||||||
|
// 修改这里:将单个 ActivateInfo 对象转换为 JSON
|
||||||
|
map['data'] = data!.toJson();
|
||||||
|
}
|
||||||
|
map['errorMsg'] = errorMsg;
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ActivateInfoResponse{description: $description, errorCode: $errorCode, data: $data, errorMsg: $errorMsg}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ActivateInfo {
|
||||||
|
String? authCode;
|
||||||
|
String? activatedAt;
|
||||||
|
Map<String, dynamic>? extraParams; // 修改为 Map 类型
|
||||||
|
|
||||||
|
ActivateInfo({
|
||||||
|
this.authCode,
|
||||||
|
this.activatedAt,
|
||||||
|
this.extraParams,
|
||||||
|
});
|
||||||
|
|
||||||
|
ActivateInfo.fromJson(dynamic json) {
|
||||||
|
authCode = json['auth_code'] ?? '';
|
||||||
|
activatedAt = json['activated_at'] ?? '';
|
||||||
|
// 修改这里:将 extraParams 解析为 Map 对象
|
||||||
|
if (json['extra_params'] != null) {
|
||||||
|
if (json['extra_params'] is Map) {
|
||||||
|
extraParams = json['extra_params'];
|
||||||
|
} else if (json['extra_params'] is String) {
|
||||||
|
// 如果是字符串,尝试解析为 JSON 对象
|
||||||
|
try {
|
||||||
|
extraParams = jsonDecode(json['extra_params']);
|
||||||
|
} catch (e) {
|
||||||
|
// 解析失败则设为 null 或空 map
|
||||||
|
extraParams = {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
extraParams = {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final map = <String, dynamic>{};
|
||||||
|
map['authCode'] = authCode;
|
||||||
|
map['activatedAt'] = activatedAt;
|
||||||
|
map['extraParams'] = extraParams;
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ActivateInfo{authCode: $authCode, activatedAt: $activatedAt, extraParams: $extraParams}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TppSupportResponse {
|
||||||
|
TppSupportResponse({
|
||||||
|
this.description,
|
||||||
|
this.errorCode,
|
||||||
|
this.data, // 现在是一个 List<ActivateInfo>
|
||||||
|
this.errorMsg,
|
||||||
|
});
|
||||||
|
|
||||||
|
TppSupportResponse.fromJson(dynamic json) {
|
||||||
|
description = json['description'];
|
||||||
|
errorCode = json['errorCode'];
|
||||||
|
// 修改这里:如果 json['data'] 是列表,则解析为 List<ActivateInfo>;否则为空列表
|
||||||
|
data = json['data'] != null ? (json['data'] as List).map((item) => TppSupportInfo.fromJson(item)).toList() : [];
|
||||||
|
errorMsg = json['errorMsg'];
|
||||||
|
}
|
||||||
|
|
||||||
|
String? description;
|
||||||
|
int? errorCode;
|
||||||
|
List<TppSupportInfo>? data; // 改为 List<ActivateInfo>
|
||||||
String? errorMsg;
|
String? errorMsg;
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@ -35,33 +120,28 @@ class ActivateInfoResponse {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'ActivateInfoResponse{description: $description, errorCode: $errorCode, data: $data, errorMsg: $errorMsg}';
|
return 'TppSupportResponse{description: $description, errorCode: $errorCode, data: $data, errorMsg: $errorMsg}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ActivateInfo {
|
class TppSupportInfo {
|
||||||
String? platformName;
|
|
||||||
int? platform;
|
int? platform;
|
||||||
|
String? platformName;
|
||||||
|
|
||||||
ActivateInfo({
|
TppSupportInfo({
|
||||||
this.platformName,
|
|
||||||
this.platform,
|
this.platform,
|
||||||
|
this.platformName,
|
||||||
});
|
});
|
||||||
|
|
||||||
ActivateInfo.fromJson(dynamic json) {
|
TppSupportInfo.fromJson(dynamic json) {
|
||||||
platformName = json['platformName'] ?? '';
|
platform = json['platform'] as int? ?? -1;
|
||||||
platform = json['platform'] ?? '';
|
platformName = json['platform_name'] as String? ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final map = <String, dynamic>{};
|
final map = <String, dynamic>{};
|
||||||
map['platformName'] = platformName;
|
|
||||||
map['platform'] = platform;
|
map['platform'] = platform;
|
||||||
|
map['platform_name'] = platformName;
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
return 'ActivateInfo{platformName: $platformName, platform: $platform}';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -658,6 +658,7 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
if (list.isEmpty) {
|
if (list.isEmpty) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
AppLog.log('list:${list}');
|
||||||
final KeyOperationRecordEntity entity =
|
final KeyOperationRecordEntity entity =
|
||||||
await ApiRepository.to.lockRecordUploadData(lockId: state.keyInfos.value.lockId.toString(), records: list);
|
await ApiRepository.to.lockRecordUploadData(lockId: state.keyInfos.value.lockId.toString(), records: list);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
|||||||
@ -29,7 +29,24 @@ class ThirdPartyPlatformLogic extends BaseGetXController {
|
|||||||
super.onReady();
|
super.onReady();
|
||||||
await getActivateInfo();
|
await getActivateInfo();
|
||||||
_initReplySubscription();
|
_initReplySubscription();
|
||||||
getServerDatetime();
|
await getServerDatetime();
|
||||||
|
showEasyLoading();
|
||||||
|
showBlueConnetctToastTimer(action: () {
|
||||||
|
dismissEasyLoading();
|
||||||
|
});
|
||||||
|
BlueManage().blueSendData(
|
||||||
|
BlueManage().connectDeviceName,
|
||||||
|
(BluetoothConnectionState connectionState) async {
|
||||||
|
if (connectionState == BluetoothConnectionState.connected) {
|
||||||
|
IoSenderManage.readRegisterKey(
|
||||||
|
lockID: BlueManage().connectDeviceName,
|
||||||
|
);
|
||||||
|
} else if (connectionState == BluetoothConnectionState.disconnected) {
|
||||||
|
dismissEasyLoading();
|
||||||
|
cancelBlueConnetctToastTimer();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -57,6 +74,7 @@ class ThirdPartyPlatformLogic extends BaseGetXController {
|
|||||||
Future<void> getServerDatetime() async {
|
Future<void> getServerDatetime() async {
|
||||||
final GetServerDatetimeEntity entity = await ApiRepository.to.getServerDatetimeData(isUnShowLoading: true);
|
final GetServerDatetimeEntity entity = await ApiRepository.to.getServerDatetimeData(isUnShowLoading: true);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
state.serverTime = entity.data!.date! ~/ 1000;
|
||||||
state.differentialTime = entity.data!.date! ~/ 1000 - DateTime.now().millisecondsSinceEpoch ~/ 1000;
|
state.differentialTime = entity.data!.date! ~/ 1000 - DateTime.now().millisecondsSinceEpoch ~/ 1000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -72,7 +90,6 @@ class ThirdPartyPlatformLogic extends BaseGetXController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
|
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
|
||||||
AppLog.log('输出了listen:${_replySubscription.hashCode}');
|
|
||||||
if (reply is SenderReadRegisterKeyCommandReply) {
|
if (reply is SenderReadRegisterKeyCommandReply) {
|
||||||
_handleReadRegisterKeyReply(reply);
|
_handleReadRegisterKeyReply(reply);
|
||||||
}
|
}
|
||||||
@ -158,7 +175,7 @@ class ThirdPartyPlatformLogic extends BaseGetXController {
|
|||||||
uuid: response.data?.extraParams?['uuid'],
|
uuid: response.data?.extraParams?['uuid'],
|
||||||
key: response.data?.authCode,
|
key: response.data?.authCode,
|
||||||
mac: response.data?.extraParams?['mac'],
|
mac: response.data?.extraParams?['mac'],
|
||||||
platform: 1,
|
platform: state.selectPlatFormIndex.value,
|
||||||
utcTimeStamp: getUTCNetTime(),
|
utcTimeStamp: getUTCNetTime(),
|
||||||
);
|
);
|
||||||
} else if (connectionState == BluetoothConnectionState.disconnected) {
|
} else if (connectionState == BluetoothConnectionState.disconnected) {
|
||||||
@ -191,25 +208,11 @@ class ThirdPartyPlatformLogic extends BaseGetXController {
|
|||||||
|
|
||||||
void savePlatFormSetting() {
|
void savePlatFormSetting() {
|
||||||
if (state.selectPlatFormIndex.value == 1 || state.selectPlatFormIndex.value == 0) {
|
if (state.selectPlatFormIndex.value == 1 || state.selectPlatFormIndex.value == 0) {
|
||||||
showEasyLoading();
|
if (state.registerKey.isNotEmpty) {
|
||||||
showBlueConnetctToastTimer(action: () {
|
_requestAuthorizationCode();
|
||||||
dismissEasyLoading();
|
}
|
||||||
});
|
|
||||||
BlueManage().blueSendData(
|
|
||||||
BlueManage().connectDeviceName,
|
|
||||||
(BluetoothConnectionState connectionState) async {
|
|
||||||
if (connectionState == BluetoothConnectionState.connected) {
|
|
||||||
IoSenderManage.readRegisterKey(
|
|
||||||
lockID: BlueManage().connectDeviceName,
|
|
||||||
);
|
|
||||||
} else if (connectionState == BluetoothConnectionState.disconnected) {
|
|
||||||
dismissEasyLoading();
|
|
||||||
cancelBlueConnetctToastTimer();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
showToast('目前只支持切换至涂鸦智能协议'.tr);
|
showToast('目前只支持切换至涂鸦智能、锁通通协议'.tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,15 +235,14 @@ class ThirdPartyPlatformLogic extends BaseGetXController {
|
|||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
|
final platform = reply.data[7];
|
||||||
// 提取 RegisterKey (从第7个字节开始,长度为40)
|
// 提取 RegisterKey (从第7个字节开始,长度为40)
|
||||||
final List<int> registerKeyBytes = reply.data.sublist(7, 47);
|
final List<int> registerKeyBytes = reply.data.sublist(8, 48);
|
||||||
final String registerKey = String.fromCharCodes(registerKeyBytes);
|
final String registerKey = String.fromCharCodes(registerKeyBytes);
|
||||||
|
state.selectPlatFormIndex.value = platform;
|
||||||
|
print('platform: $platform');
|
||||||
print('Register Key: $registerKey');
|
print('Register Key: $registerKey');
|
||||||
state.registerKey.value = registerKey;
|
state.registerKey.value = registerKey;
|
||||||
if (registerKey.isNotEmpty) {
|
|
||||||
_requestAuthorizationCode();
|
|
||||||
}
|
|
||||||
//成功
|
//成功
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
@ -265,8 +267,8 @@ class ThirdPartyPlatformLogic extends BaseGetXController {
|
|||||||
IoSenderManage.senderGetStarLockStatuInfo(
|
IoSenderManage.senderGetStarLockStatuInfo(
|
||||||
lockID: BlueManage().connectDeviceName,
|
lockID: BlueManage().connectDeviceName,
|
||||||
userID: await Storage.getUid(),
|
userID: await Storage.getUid(),
|
||||||
utcTimeStamp: 0,
|
utcTimeStamp: state.serverTime,
|
||||||
unixTimeStamp: 0,
|
unixTimeStamp: getLocalTime2(),
|
||||||
isBeforeAddUser: false,
|
isBeforeAddUser: false,
|
||||||
privateKey: getPrivateKeyList,
|
privateKey: getPrivateKeyList,
|
||||||
);
|
);
|
||||||
@ -278,6 +280,18 @@ class ThirdPartyPlatformLogic extends BaseGetXController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int getLocalTime() {
|
||||||
|
final DateTime now = DateTime.now();
|
||||||
|
final Duration timeZoneOffset = now.timeZoneOffset;
|
||||||
|
return state.differentialTime + timeZoneOffset.inSeconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getLocalTime2() {
|
||||||
|
final DateTime now = DateTime.now();
|
||||||
|
final Duration timeZoneOffset = now.timeZoneOffset;
|
||||||
|
return state.serverTime + timeZoneOffset.inSeconds;
|
||||||
|
}
|
||||||
|
|
||||||
void _handleAuthorizationCodeReply(SenderAuthorizationCodeCommandReply reply) {
|
void _handleAuthorizationCodeReply(SenderAuthorizationCodeCommandReply reply) {
|
||||||
final int status = reply.data[6];
|
final int status = reply.data[6];
|
||||||
switch (status) {
|
switch (status) {
|
||||||
@ -285,7 +299,12 @@ class ThirdPartyPlatformLogic extends BaseGetXController {
|
|||||||
//成功
|
//成功
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
showToast('操作成功,请在24小时内用涂鸦APP添加门锁,否则将过期'.tr);
|
if (state.selectPlatFormIndex.value == 1) {
|
||||||
|
showSuccess('操作成功,请尽快用"涂鸦”APP配置,如不使用请关闭该设置支持'.tr);
|
||||||
|
} else if (state.selectPlatFormIndex.value == 0) {
|
||||||
|
showSuccess('操作成功'.tr);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//失败
|
//失败
|
||||||
|
|||||||
@ -128,25 +128,27 @@ class _ThirdPartyPlatformPageState extends State<ThirdPartyPlatformPage> {
|
|||||||
// 最后一个元素不显示分割线(取反)
|
// 最后一个元素不显示分割线(取反)
|
||||||
isHaveDirection: false,
|
isHaveDirection: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: Radio<String>(
|
rightWidget: Obx(
|
||||||
// Radio 的值:使用平台的唯一标识(如 id)
|
() => Radio<String>(
|
||||||
value: platform,
|
// Radio 的值:使用平台的唯一标识(如 id)
|
||||||
// 当前选中的值:与 selectPlatFormIndex 关联的 id
|
value: platform,
|
||||||
groupValue: state.platFormSet.value[state.selectPlatFormIndex.value],
|
// 当前选中的值:与 selectPlatFormIndex 关联的 id
|
||||||
// 选中颜色(可选,默认主题色)
|
groupValue: state.platFormSet.value[state.selectPlatFormIndex.value],
|
||||||
activeColor: AppColors.mainColor,
|
// 选中颜色(可选,默认主题色)
|
||||||
// 点击 Radio 时回调(更新选中索引)
|
activeColor: AppColors.mainColor,
|
||||||
onChanged: (value) {
|
// 点击 Radio 时回调(更新选中索引)
|
||||||
if (value != null) {
|
onChanged: (value) {
|
||||||
setState(() {
|
if (value != null) {
|
||||||
// 找到当前选中平台的索引(根据 id 匹配)
|
setState(() {
|
||||||
final newIndex = state.platFormSet.value.indexWhere((p) => p == value);
|
// 找到当前选中平台的索引(根据 id 匹配)
|
||||||
if (newIndex != -1) {
|
final newIndex = state.platFormSet.value.indexWhere((p) => p == value);
|
||||||
state.selectPlatFormIndex.value = newIndex;
|
if (newIndex != -1) {
|
||||||
}
|
state.selectPlatFormIndex.value = newIndex;
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
},
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
action: () {
|
action: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class ThirdPartyPlatformState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Rx<LockSetInfoData> lockSetInfoData = LockSetInfoData().obs;
|
Rx<LockSetInfoData> lockSetInfoData = LockSetInfoData().obs;
|
||||||
int differentialTime = 0;// 服务器时间即UTC+0时间
|
int differentialTime = 0; // 服务器时间即UTC+0时间
|
||||||
|
|
||||||
// 响应式字符串集合(自动触发 UI 更新)
|
// 响应式字符串集合(自动触发 UI 更新)
|
||||||
final RxList<String> platFormSet = List.of({
|
final RxList<String> platFormSet = List.of({
|
||||||
@ -25,8 +25,11 @@ class ThirdPartyPlatformState {
|
|||||||
// 响应式字符串集合(自动触发 UI 更新)
|
// 响应式字符串集合(自动触发 UI 更新)
|
||||||
final RxList<TppSupportInfo> tppSupportList = RxList<TppSupportInfo>([]);
|
final RxList<TppSupportInfo> tppSupportList = RxList<TppSupportInfo>([]);
|
||||||
|
|
||||||
RxInt selectPlatFormIndex = 1.obs;
|
RxInt selectPlatFormIndex = (-1).obs;
|
||||||
|
RxBool openNumber = false.obs;
|
||||||
RxString registerKey = ''.obs;
|
RxString registerKey = ''.obs;
|
||||||
|
|
||||||
Map lockInfo = {};
|
Map lockInfo = {};
|
||||||
|
|
||||||
|
int serverTime = 0; // 服务器时间即UTC+0时间
|
||||||
}
|
}
|
||||||
|
|||||||
@ -305,6 +305,8 @@ abstract class Api {
|
|||||||
'/lockSetting/updateLockSetting'; // 设置语音包
|
'/lockSetting/updateLockSetting'; // 设置语音包
|
||||||
final String reportBuyRequestURL =
|
final String reportBuyRequestURL =
|
||||||
'/service/reportBuyRequest'; // 上报增值服务购买请求
|
'/service/reportBuyRequest'; // 上报增值服务购买请求
|
||||||
final String getActivateInfoURL =
|
final String getTppSupportURL =
|
||||||
'/api/authCode/getTppSupport'; // 查询ttp
|
'/api/authCode/getTppSupport'; // 查询ttp
|
||||||
|
final String getActivateInfoURL =
|
||||||
|
'/api/authCode/getActivateInfo'; // 查询ttp
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user