Pārlūkot izejas kodu

1.app安装到TV 只能选中一个 选中多个隐藏菜单

huangxiaodong 1 dienu atpakaļ
vecāks
revīzija
d8d14bfbef

+ 10 - 2
创维盒子/code/NAS/NasPreviewAPPViewController.m

@@ -41,6 +41,7 @@
     BOOL hadUploadTaskType;
     BOOL hadDownloadTaskType;
     BOOL canShareType;
+    BOOL canInstallTVType;
     
     BOOL isDefaultTabType;//默认云机
     BOOL isSecondTabType;//点击了未安装应用
@@ -758,6 +759,13 @@
     
     if(_didSelectListArr.count > 0){
         [self  setViewEditTypeFun];
+        
+        if(_didSelectListArr.count == 1){
+            self.curEditTypeBottomView.isCanInstallToTVType = canInstallTVType;
+        }
+        else{
+            self.curEditTypeBottomView.isCanInstallToTVType = NO;
+        }
     }
     else{
         [self userCancelEditTypeFun];
@@ -1390,8 +1398,8 @@
     [[netWorkManager shareInstance] CommonGetWithCallBackCode:querySwitchButton Parameters:paraDict success:^(id  _Nonnull responseObject){
         queryShareModel *queryShareMod = [[queryShareModel alloc] initWithDictionary:responseObject error:nil];
         if(queryShareMod){
-            BOOL canInstallToTVType = queryShareMod.data.configValue;
-            weakSelf.curEditTypeBottomView.isCanInstallToTVType = canInstallToTVType;
+            self->canInstallTVType = queryShareMod.data.configValue;
+            weakSelf.curEditTypeBottomView.isCanInstallToTVType = self->canInstallTVType;
         }
         
     } failure:^(NSError * _Nonnull error) {

+ 9 - 2
创维盒子/code/NAS/NasSearchAppViewController.m

@@ -23,6 +23,7 @@
 @interface NasSearchAppViewController ()<UITableViewDelegate,UITableViewDataSource,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
 {
     BOOL canShareType;
+    BOOL canInstallTVType;
 }
 @property (nonatomic, strong) UITableView *tableView;
 
@@ -355,6 +356,12 @@
     
     if(_didSelectListArr.count > 0){
         [self  setViewEditTypeFun];
+        if(_didSelectListArr.count == 1){
+            self.curEditTypeBottomView.isCanInstallToTVType = canInstallTVType;
+        }
+        else{
+            self.curEditTypeBottomView.isCanInstallToTVType = NO;
+        }
     }
     else{
         [self userCancelEditTypeFun];
@@ -662,8 +669,8 @@
     [[netWorkManager shareInstance] CommonGetWithCallBackCode:querySwitchButton Parameters:paraDict success:^(id  _Nonnull responseObject){
         queryShareModel *queryShareMod = [[queryShareModel alloc] initWithDictionary:responseObject error:nil];
         if(queryShareMod){
-            BOOL canInstallToTVType = queryShareMod.data.configValue;
-            weakSelf.curEditTypeBottomView.isCanInstallToTVType = canInstallToTVType;
+            self->canInstallTVType = queryShareMod.data.configValue;
+            weakSelf.curEditTypeBottomView.isCanInstallToTVType = self->canInstallTVType;
         }
         
     } failure:^(NSError * _Nonnull error) {

+ 7 - 1
创维盒子/code/NAS/view/editAPPBottomView.m

@@ -283,9 +283,15 @@
     
     
     if (_isCanDeleteType) {
+        
+        CGFloat curRight = -curButFullWidth;
+        if (!_isCanInstallToTVType) {
+            curRight = 0.f;
+        }
+        
         [_threeButton mas_remakeConstraints:^(MASConstraintMaker *make) {
             make.width.mas_equalTo(curButFullWidth);
-            make.right.mas_equalTo(-curButFullWidth);
+            make.right.mas_equalTo(curRight);
             make.height.mas_equalTo(60);
             make.top.mas_equalTo(0);
         }];