feat: 完善推送绑定设备逻辑:与后台约定新增Device数组字段
This commit is contained in:
parent
05f9cad8c9
commit
057eef285f
@ -70,11 +70,14 @@ class LockMainLogic extends BaseGetXController {
|
||||
}
|
||||
|
||||
Storage.setBool(saveIsVip, entity.data!.isVip == 1);
|
||||
//当 deviceId 为空或 deviceIds 列表中不包含 deviceId 时,都会再次绑定设备
|
||||
if (entity.data!.deviceId != null) {
|
||||
if (entity.data!.deviceId!.isEmpty) {
|
||||
if (entity.data!.deviceId!.isEmpty ||
|
||||
!entity.data!.deviceIds!.contains(entity.data!.deviceId)) {
|
||||
bindPushDevice();
|
||||
}
|
||||
}
|
||||
|
||||
if (entity.data!.starchart != null) {
|
||||
if (entity.data!.starchart!.starchartId == null) {
|
||||
bindStarChart();
|
||||
|
||||
@ -47,8 +47,10 @@ class LockMainXHJLogic extends BaseGetXController {
|
||||
}
|
||||
|
||||
Storage.setBool(saveIsVip, entity.data!.isVip == 1);
|
||||
//当 deviceId 为空或 deviceIds 列表中不包含 deviceId 时,都会再次绑定设备
|
||||
if (entity.data!.deviceId != null) {
|
||||
if (entity.data!.deviceId!.isEmpty) {
|
||||
if (entity.data!.deviceId!.isEmpty ||
|
||||
!entity.data!.deviceIds!.contains(entity.data!.deviceId)) {
|
||||
bindPushDevice();
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,6 +39,7 @@ class MinePersonInfoData {
|
||||
this.countryName,
|
||||
this.isVip,
|
||||
this.deviceId,
|
||||
this.deviceIds,
|
||||
this.lang,
|
||||
this.amazonAlexa,
|
||||
this.googleHome,
|
||||
@ -56,6 +57,7 @@ class MinePersonInfoData {
|
||||
countryName = json['countryName'];
|
||||
isVip = json['isVip'];
|
||||
deviceId = json['deviceId'];
|
||||
deviceIds = json['deviceIds'];
|
||||
lang = json['lang'];
|
||||
amazonAlexa = json['amazonAlexa'] != null
|
||||
? AmazonAlexa.fromJson(json['amazonAlexa'])
|
||||
@ -78,6 +80,7 @@ class MinePersonInfoData {
|
||||
String? countryName;
|
||||
int? isVip;
|
||||
String? deviceId;
|
||||
List? deviceIds;
|
||||
String? lang;
|
||||
AmazonAlexa? amazonAlexa;
|
||||
GoogleHome? googleHome;
|
||||
@ -96,6 +99,7 @@ class MinePersonInfoData {
|
||||
data['countryName'] = countryName;
|
||||
data['isVip'] = isVip;
|
||||
data['deviceId'] = deviceId;
|
||||
data['deviceIds'] = deviceIds;
|
||||
data['lang'] = lang;
|
||||
if (amazonAlexa != null) {
|
||||
data['amazonAlexa'] = amazonAlexa!.toJson();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user