Skip to content

Commit ab388f1

Browse files
author
ccharlesren
committed
修改冲突
Change-Id: Ife55a7be87256db004c780affe1f2568b54e897b
2 parents 4a411c4 + 50d5c01 commit ab388f1

File tree

50 files changed

+1370
-548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1370
-548
lines changed

.github/script/link_sdk_demo.mobileprovision.asc

Lines changed: 200 additions & 199 deletions
Large diffs are not rendered by default.

Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ PODS:
113113
- nanopb/decode (1.30906.0)
114114
- nanopb/encode (1.30906.0)
115115
- PromisesObjC (1.2.12)
116-
- Protobuf (3.17.0)
116+
- Protobuf (3.18.0)
117117
- QCloudCore (5.5.2)
118118
- QCloudCOSXML/Transfer (5.5.2):
119119
- QCloudCore (= 5.5.2)
@@ -251,7 +251,7 @@ SPEC CHECKSUMS:
251251
MJRefresh: ed450d6eb9d3346a2cb033ab7eb6de090aeef437
252252
nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
253253
PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97
254-
Protobuf: 7327d4444215b5f18e560a97f879ff5503c4581c
254+
Protobuf: 1a37ebea1338949e9ac35a3f06e80b3f536eec8d
255255
QCloudCore: b91a762d280f0a80cc6f537fd186ac43a4a3025e
256256
QCloudCOSXML: a30ab17f45b0cbbcbb218a3677298498e8748a22
257257
SDWebImage: 624d6e296c69b244bcede364c72ae0430ac14681

Source/LinkApp/Classes/Module/EquipmentPanel/Controller/TIoTPanelVC.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPa
833833
if ([dic[@"define"][@"type"] isEqualToString:@"bool"]) {
834834

835835
}
836-
else if ([dic[@"define"][@"type"] isEqualToString:@"enum"]){
836+
else if ([dic[@"define"][@"type"] isEqualToString:@"enum"] || [dic[@"define"][@"type"] isEqualToString:@"stringenum"]){
837837

838838
//trtc特殊判断逻辑
839839
NSString *key = dic[@"id"];

Source/LinkApp/Classes/Module/EquipmentPanel/View/TIoTChoseValueView.m

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,12 @@ - (void)done
140140
{
141141
[self hide];
142142
if (self.updateData) {
143-
self.updateData(@{self.dic[@"id"]:@([self.currentValue intValue])});
143+
NSString *type = _dic[@"define"][@"type"];
144+
if ([type isEqual:@"enum"]) {
145+
self.updateData(@{self.dic[@"id"]:@([self.currentValue intValue])});
146+
} else { //type is stringenum
147+
self.updateData(@{self.dic[@"id"]:self.currentValue});
148+
}
144149
}
145150
}
146151

@@ -164,7 +169,13 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
164169

165170
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
166171
TIoTChoseValueTableViewCell *cell = [TIoTChoseValueTableViewCell cellWithTableView:tableView];
167-
BOOL iS = [self.dataArr[indexPath.row][@"id"] integerValue] == [self.currentValue integerValue];
172+
NSString *type = _dic[@"define"][@"type"];
173+
BOOL iS;
174+
if ([type isEqual:@"enum"]) {
175+
iS = [self.dataArr[indexPath.row][@"id"] integerValue] == [self.currentValue integerValue];
176+
} else { //type is stringenum
177+
iS = [self.dataArr[indexPath.row][@"id"] isEqual:self.currentValue];
178+
}
168179
[cell setTitle:self.dataArr[indexPath.row][@"name"] andSelect:iS];
169180
return cell;
170181
}
@@ -209,6 +220,10 @@ - (void)setDic:(NSDictionary *)dic{
209220
NSDictionary *dataDic = @{@"id":key,@"name":tmpDic[key]};
210221
[self.dataArr addObject:dataDic];
211222
}
223+
if ([self.currentValue isEqual:@""]) {
224+
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
225+
[self selectAt:indexPath];
226+
}
212227
[self.tableView reloadData];
213228
}
214229

Source/LinkApp/Classes/Module/EquipmentPanel/View/TIoTLongCell.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ - (void)setInfo:(NSDictionary *)info
8080
self.rightImg.hidden = NO;
8181
self.swich.hidden = YES;
8282

83-
if ([define[@"type"] isEqualToString:@"enum"]) {
83+
if ([define[@"type"] isEqualToString:@"enum"] || [define[@"type"] isEqualToString:@"stringenum"]) {
8484
[self.imgV setImage:[[UIImage imageNamed:@"c_color"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]];
8585
// NSString *key = [NSString stringWithFormat:@"%@",info[@"status"][@"Value"]];
8686
if (![NSString isNullOrNilWithObject:defaultKey]) {

Source/LinkApp/Classes/Module/EquipmentPanel/View/TIoTMediumCell.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ - (void)setInfo:(NSDictionary *)info
8181
self.righImg.hidden = NO;
8282
self.swich.hidden = YES;
8383

84-
if ([define[@"type"] isEqualToString:@"enum"]) {
84+
if ([define[@"type"] isEqualToString:@"enum"] || [define[@"type"] isEqualToString:@"stringenum"]) {
8585
[self.imgV setImage:[[UIImage imageNamed:@"c_color"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]];
8686

8787
// NSString *key = [NSString stringWithFormat:@"%@",info[@"status"][@"Value"]];

Source/LinkApp/Classes/Module/Home/View/TIoTShortcutView.m

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
348348

349349
};
350350
return cell;
351-
}else if ([model[@"define"][@"type"] isEqualToString:@"enum"]) {
351+
}else if ([model[@"define"][@"type"] isEqualToString:@"enum"] || [model[@"define"][@"type"] isEqualToString:@"stringenum"]) {
352352
TIoTShortcutViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:kShortcutViewCellID forIndexPath:indexPath];
353353
cell.propertyName = model[@"name"]?:@"";
354354
__weak typeof(self)weakSelf = self;
@@ -371,13 +371,17 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
371371
TIoTPropertiesModel *propertyModel = [TIoTPropertiesModel yy_modelWithDictionary:model];
372372
clickValueView.model = propertyModel;
373373

374-
clickValueView.chooseTaskValueBlock = ^(NSString * _Nonnull valueString, TIoTPropertiesModel * _Nonnull model) {
374+
clickValueView.chooseTaskValueBlock = ^(NSString * _Nonnull keyString, NSString * _Nonnull valueString, TIoTPropertiesModel * _Nonnull model) {
375375

376376
for (int i= 0; i < model.define.mapping.allValues.count; i++) {
377-
NSString *key = [NSString stringWithFormat:@"%d",i];
378-
NSString *value = model.define.mapping[key];
379-
if ([value isEqualToString:valueString]) {
380-
[weakSelf reportDeviceData:@{model.id:@(i)}];
377+
if ([model.define.type isEqual:@"stringenum"]) {
378+
[weakSelf reportDeviceData:@{model.id:keyString}];
379+
} else {
380+
NSString *key = [NSString stringWithFormat:@"%d",i];
381+
NSString *value = model.define.mapping[key];
382+
if ([value isEqualToString:valueString]) {
383+
[weakSelf reportDeviceData:@{model.id:@(i)}];
384+
}
381385
}
382386
}
383387

Source/LinkApp/Classes/Module/Home/View/TIoTShortcutViewCell.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ - (void)switchTrunOnOrOff:(UIButton *)sender {
8989
if (self.intOrFloatUpdate) {
9090
self.intOrFloatUpdate();
9191
}
92-
}else if ([typeString isEqualToString:@"enum"]) {
92+
}else if ([typeString isEqualToString:@"enum"] || [typeString isEqualToString:@"stringenum"]) {
9393
if (self.enumUpdate) {
9494
self.enumUpdate();
9595
}

Source/LinkApp/Classes/Module/Intelligent/Controller/TIoTAddAutoIntelligentVC.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ - (void)loadAutoSceneDetailData {
202202
if ([propertieModel.define.type isEqualToString:@"enum"] || [propertieModel.define.type isEqualToString:@"bool"]) {
203203
NSString *keyString = [NSString stringWithFormat:@"%d",model.Property.Value.intValue];
204204
valueString = [propertieModel.define.mapping objectForKey:keyString];
205+
}else if ([propertieModel.define.type isEqualToString:@"stringenum"]){
206+
207+
NSString *keyString = [NSString stringWithFormat:@"%@",model.Property.Value];
208+
valueString = [propertieModel.define.mapping objectForKey:keyString];
205209
}else if ([propertieModel.define.type isEqualToString:@"int"] || [propertieModel.define.type isEqualToString:@"float"]){
206210

207211
if ([propertieModel.define.type isEqualToString:@"int"]) {
@@ -295,6 +299,10 @@ - (void)loadAutoSceneDetailData {
295299

296300
NSString *keyString = [NSString stringWithFormat:@"%d",number.intValue];
297301
valueString = [propertieModel.define.mapping objectForKey:keyString];
302+
}else if ([propertieModel.define.type isEqualToString:@"stringenum"]) {
303+
304+
NSString *keyString = [NSString stringWithFormat:@"%@",number];
305+
valueString = [propertieModel.define.mapping objectForKey:keyString];
298306
}else if ([propertieModel.define.type isEqualToString:@"int"] || [propertieModel.define.type isEqualToString:@"float"]){
299307

300308
if ([propertieModel.define.type isEqualToString:@"int"]) {

Source/LinkApp/Classes/Module/Intelligent/Controller/TIoTAddManualIntelligentVC.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ - (void)loadManualSceneList {
143143

144144
NSString *keyString = [NSString stringWithFormat:@"%d",number.intValue];
145145
valueString = [propertieModel.define.mapping objectForKey:keyString];
146+
}else if ([propertieModel.define.type isEqualToString:@"stringenum"]){
147+
148+
NSString *keyString = [NSString stringWithFormat:@"%@",number];
149+
valueString = [propertieModel.define.mapping objectForKey:keyString];
146150
}else if ([propertieModel.define.type isEqualToString:@"int"] || [propertieModel.define.type isEqualToString:@"float"]){
147151

148152
if ([propertieModel.define.type isEqualToString:@"int"]) {

0 commit comments

Comments
 (0)