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);
|
Storage.setBool(saveIsVip, entity.data!.isVip == 1);
|
||||||
|
//当 deviceId 为空或 deviceIds 列表中不包含 deviceId 时,都会再次绑定设备
|
||||||
if (entity.data!.deviceId != null) {
|
if (entity.data!.deviceId != null) {
|
||||||
if (entity.data!.deviceId!.isEmpty) {
|
if (entity.data!.deviceId!.isEmpty ||
|
||||||
|
!entity.data!.deviceIds!.contains(entity.data!.deviceId)) {
|
||||||
bindPushDevice();
|
bindPushDevice();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.data!.starchart != null) {
|
if (entity.data!.starchart != null) {
|
||||||
if (entity.data!.starchart!.starchartId == null) {
|
if (entity.data!.starchart!.starchartId == null) {
|
||||||
bindStarChart();
|
bindStarChart();
|
||||||
|
|||||||
@ -47,8 +47,10 @@ class LockMainXHJLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Storage.setBool(saveIsVip, entity.data!.isVip == 1);
|
Storage.setBool(saveIsVip, entity.data!.isVip == 1);
|
||||||
|
//当 deviceId 为空或 deviceIds 列表中不包含 deviceId 时,都会再次绑定设备
|
||||||
if (entity.data!.deviceId != null) {
|
if (entity.data!.deviceId != null) {
|
||||||
if (entity.data!.deviceId!.isEmpty) {
|
if (entity.data!.deviceId!.isEmpty ||
|
||||||
|
!entity.data!.deviceIds!.contains(entity.data!.deviceId)) {
|
||||||
bindPushDevice();
|
bindPushDevice();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,6 +39,7 @@ class MinePersonInfoData {
|
|||||||
this.countryName,
|
this.countryName,
|
||||||
this.isVip,
|
this.isVip,
|
||||||
this.deviceId,
|
this.deviceId,
|
||||||
|
this.deviceIds,
|
||||||
this.lang,
|
this.lang,
|
||||||
this.amazonAlexa,
|
this.amazonAlexa,
|
||||||
this.googleHome,
|
this.googleHome,
|
||||||
@ -56,6 +57,7 @@ class MinePersonInfoData {
|
|||||||
countryName = json['countryName'];
|
countryName = json['countryName'];
|
||||||
isVip = json['isVip'];
|
isVip = json['isVip'];
|
||||||
deviceId = json['deviceId'];
|
deviceId = json['deviceId'];
|
||||||
|
deviceIds = json['deviceIds'];
|
||||||
lang = json['lang'];
|
lang = json['lang'];
|
||||||
amazonAlexa = json['amazonAlexa'] != null
|
amazonAlexa = json['amazonAlexa'] != null
|
||||||
? AmazonAlexa.fromJson(json['amazonAlexa'])
|
? AmazonAlexa.fromJson(json['amazonAlexa'])
|
||||||
@ -78,6 +80,7 @@ class MinePersonInfoData {
|
|||||||
String? countryName;
|
String? countryName;
|
||||||
int? isVip;
|
int? isVip;
|
||||||
String? deviceId;
|
String? deviceId;
|
||||||
|
List? deviceIds;
|
||||||
String? lang;
|
String? lang;
|
||||||
AmazonAlexa? amazonAlexa;
|
AmazonAlexa? amazonAlexa;
|
||||||
GoogleHome? googleHome;
|
GoogleHome? googleHome;
|
||||||
@ -96,6 +99,7 @@ class MinePersonInfoData {
|
|||||||
data['countryName'] = countryName;
|
data['countryName'] = countryName;
|
||||||
data['isVip'] = isVip;
|
data['isVip'] = isVip;
|
||||||
data['deviceId'] = deviceId;
|
data['deviceId'] = deviceId;
|
||||||
|
data['deviceIds'] = deviceIds;
|
||||||
data['lang'] = lang;
|
data['lang'] = lang;
|
||||||
if (amazonAlexa != null) {
|
if (amazonAlexa != null) {
|
||||||
data['amazonAlexa'] = amazonAlexa!.toJson();
|
data['amazonAlexa'] = amazonAlexa!.toJson();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user