Переглянути джерело

1.model跟着数据结构换

huangxiaodong 1 рік тому
батько
коміт
ce9c64f6bf

+ 4 - 4
创维盒子/双子星云手机.xcodeproj/project.pbxproj

@@ -4130,7 +4130,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Manual;
-				CURRENT_PROJECT_VERSION = 24;
+				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = "";
 				"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -4187,7 +4187,7 @@
 					"$(PROJECT_DIR)/双子星云手机/Vendor/UDP/RayProxy",
 					"$(PROJECT_DIR)/RayProxy",
 				);
-				MARKETING_VERSION = 1.3.3;
+				MARKETING_VERSION = 1.4.0;
 				PRODUCT_BUNDLE_IDENTIFIER = com.armcloud.privacy.x.box;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
@@ -4211,7 +4211,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Manual;
-				CURRENT_PROJECT_VERSION = 24;
+				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = "";
 				"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -4268,7 +4268,7 @@
 					"$(PROJECT_DIR)/双子星云手机/Vendor/UDP/RayProxy",
 					"$(PROJECT_DIR)/RayProxy",
 				);
-				MARKETING_VERSION = 1.3.3;
+				MARKETING_VERSION = 1.4.0;
 				PRODUCT_BUNDLE_IDENTIFIER = com.armcloud.privacy.x.box;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";

+ 5 - 3
创维盒子/双子星云手机/Class/Set/previewFile/imageDetailsScrollViewController.m

@@ -94,6 +94,7 @@
     //_curScrollView.placeholderImage = [UIImage imageNamed:@"uploadFile_image"];
     [self.view addSubview:_curScrollView];
     _curScrollView.backgroundColor = [UIColor lightGrayColor];
+    _curScrollView.hidden = YES;
     
     [_curScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.mas_equalTo(0);
@@ -102,20 +103,21 @@
         make.bottom.mas_equalTo(-(60+ AdaptTabHeight));
     }];
 
+    KWeakSelf
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
         [self->_curScrollView makeScrollViewScrollToIndex:self->_index];
+        [weakSelf setTitleLabelTextFunBy:self->_index];
+        self->_curScrollView.hidden = NO;
     });
     
-    KWeakSelf
     _curScrollView.itemDidScrollOperationBlock = ^(NSInteger currentIndex) {
         [weakSelf setTitleLabelTextFunBy:currentIndex];
     };
-    
 }
 
 - (void)setTitleLabelTextFunBy:(NSInteger)index
 {
-    if(index >0 &&  index < _totalDataArr.count){
+    if(index >=0 &&  index < _totalDataArr.count){
         NASFilePicDataArrModel *dataModel = _totalDataArr[index];
         self.titleLabel.text = dataModel.name;
     }

+ 6 - 1
创维盒子/双子星云手机/Class/Set/previewFile/model/NASFilePicModel.h

@@ -26,8 +26,13 @@ NS_ASSUME_NONNULL_BEGIN
 @end
 
 @protocol NASFilePicTimeArrModel;
+@interface NASFilePicSecondModel : SuperModel
+@property (nonatomic, strong) NSArray<NASFilePicTimeArrModel>* fileList;
+@end
+
+
 @interface NASFilePicModel : SuperModel
-@property (nonatomic, strong) NSArray<NASFilePicTimeArrModel>* data;
+@property (nonatomic, strong) NASFilePicSecondModel* data;
 @end
 
 NS_ASSUME_NONNULL_END

+ 4 - 0
创维盒子/双子星云手机/Class/Set/previewFile/model/NASFilePicModel.m

@@ -15,6 +15,10 @@
 
 @end
 
+@implementation NASFilePicSecondModel
+
+@end
+
 @implementation NASFilePicModel
 
 @end

+ 56 - 44
创维盒子/双子星云手机/Class/Set/previewFile/previewImageOrVideoViewController.m

@@ -46,7 +46,7 @@
 @property(nonatomic,strong) editTypeBottomView*curEditTypeBottomView;
 @property(nonatomic,strong) UIButton*uploadFileButton;
 
-@property(nonatomic,strong) couldPhoneFileListModel *curCouldPhoneFileListMod;
+//@property(nonatomic,strong) couldPhoneFileListModel *curCouldPhoneFileListMod;
 
 @property(nonatomic,strong) NASFilePicModel *curNASFilePicModel;
 
@@ -332,14 +332,14 @@
 #pragma mark - 瀑布流委托
 - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
     if(_curNASFilePicModel){
-        return _curNASFilePicModel.data.count;
+        return _curNASFilePicModel.data.fileList.count;
     }
     return 1;
 }
 - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
 
-    if(_curNASFilePicModel && _curNASFilePicModel.data.count >section){
-        NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data[section];
+    if(_curNASFilePicModel && _curNASFilePicModel.data.fileList.count >section){
+        NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data.fileList[section];
         return timeArrModel.list.count;
     }
     return 0;
@@ -356,8 +356,8 @@
     }
     
     
-    if(_curNASFilePicModel && _curNASFilePicModel.data.count > section){
-        NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data[section];
+    if(_curNASFilePicModel && _curNASFilePicModel.data.fileList.count > section){
+        NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data.fileList[section];
         if (timeArrModel.list.count > row) {
             NASFilePicDataArrModel * dataModel = timeArrModel.list[row];
             
@@ -392,8 +392,8 @@
         NSInteger section = indexPath.section;
         titleLabelReusableView *headerView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"titleLabelReusableView" forIndexPath:indexPath];
         
-        if(_curNASFilePicModel && _curNASFilePicModel.data.count > section){
-            NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data[section];
+        if(_curNASFilePicModel && _curNASFilePicModel.data.fileList.count > section){
+            NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data.fileList[section];
             headerView.titlelabel.text = timeArrModel.time;
         }
         return headerView;
@@ -412,8 +412,8 @@
      NSInteger row = indexPath.row;
      NSInteger section = indexPath.section;
     
-    if(_curNASFilePicModel && _curNASFilePicModel.data.count > section){
-        NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data[section];
+    if(_curNASFilePicModel && _curNASFilePicModel.data.fileList.count > section){
+        NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data.fileList[section];
         if (timeArrModel.list.count > row) {
             //NASFilePicDataArrModel * dataModel = timeArrModel.list[row];
             
@@ -541,21 +541,21 @@
 
 - (void)userCheckFilePreviewByRow:(NSInteger)row
 {
-    if(row < _curCouldPhoneFileListMod.data.list.count){
-        couldPhoneFileModel* fileModel = _curCouldPhoneFileListMod.data.list[row];
-        
-        if(fileModel.isSelectType){
-            [_didSelectListArr removeObject:fileModel];
-        }
-        else{
-            [_didSelectListArr addObject:fileModel];
-        }
-        
-         fileModel.isSelectType = !fileModel.isSelectType;
-        //[self.tableView reloadData];
-        //[self.dataCollectionView reloadData];
-        [self setEditTypeTitleFun];
-    }
+//    if(row < _curCouldPhoneFileListMod.data.list.count){
+//        couldPhoneFileModel* fileModel = _curCouldPhoneFileListMod.data.list[row];
+//        
+//        if(fileModel.isSelectType){
+//            [_didSelectListArr removeObject:fileModel];
+//        }
+//        else{
+//            [_didSelectListArr addObject:fileModel];
+//        }
+//        
+//         fileModel.isSelectType = !fileModel.isSelectType;
+//        //[self.tableView reloadData];
+//        //[self.dataCollectionView reloadData];
+//        [self setEditTypeTitleFun];
+//    }
 }
 
 - (void)didClickSelectAllButton:(UIButton*)button
@@ -565,22 +565,22 @@
     
     [_didSelectListArr removeAllObjects];
     
-    for (couldPhoneFileModel* fileModel in _curCouldPhoneFileListMod.data.list) {
-        
-        if(!button.selected){
-            fileModel.isSelectType = button.selected;
-        }
-        else{
-            [_didSelectListArr addObject:fileModel];
-            if([self userCheckFileModel:fileModel withShowTip:NO]){
-                fileModel.isSelectType = button.selected;
-            }
-            else{
-                isNeedShowTip = YES;
-            }
-        }
-        
-    }
+//    for (couldPhoneFileModel* fileModel in _curCouldPhoneFileListMod.data.list) {
+//        
+//        if(!button.selected){
+//            fileModel.isSelectType = button.selected;
+//        }
+//        else{
+//            [_didSelectListArr addObject:fileModel];
+//            if([self userCheckFileModel:fileModel withShowTip:NO]){
+//                fileModel.isSelectType = button.selected;
+//            }
+//            else{
+//                isNeedShowTip = YES;
+//            }
+//        }
+//        
+//    }
     
     if(isNeedShowTip){
         if(_isPhotoType){
@@ -846,11 +846,23 @@
         [paraDict setValue:@"video" forKey:@"type"];
     }
     
+    NSArray *diskNameArr = [_defaultDiskPath componentsSeparatedByString:@"/"];
+    if(diskNameArr && diskNameArr.count >= 2){
+        
+        NSString *name = diskNameArr.lastObject;
+        if(name.length == 0)
+        {
+            name = diskNameArr[diskNameArr.count -2];
+        }
+        
+        [paraDict setValue:name forKey:@"path"];
+    }
+    
     
     [self showNewIndicatorHaveStrWithCanBack:YES canTouch:NO showText:NSLocalizedString(@"common_loading_tip",nil)];
     
     KWeakSelf
-    [[netWorkManager shareInstance] cloudPhoneGETCallBackCode:@"getFileList" Parameters:paraDict success:^(id  _Nonnull responseObject) {
+    [[netWorkManager shareInstance] cloudPhoneGETCallBackCode:@"getFileListByDay" Parameters:paraDict success:^(id  _Nonnull responseObject) {
         [weakSelf removeNewIndicatorHaveStr];
         weakSelf.curNASFilePicModel = [[NASFilePicModel alloc] initWithDictionary:responseObject error:nil];
         [weakSelf.dataCollectionView    reloadData];
@@ -866,8 +878,8 @@
         NSMutableArray *totalArr = [NSMutableArray new];
         NSInteger index = 0;
         
-        for (int i=0; i<_curNASFilePicModel.data.count; i++) {
-            NASFilePicTimeArrModel *timeModel = _curNASFilePicModel.data[i];
+        for (int i=0; i<_curNASFilePicModel.data.fileList.count; i++) {
+            NASFilePicTimeArrModel *timeModel = _curNASFilePicModel.data.fileList[i];
             
             if(i == section){
                 index = totalArr.count + row;

+ 11 - 4
创维盒子/双子星云手机/Class/Set/view/allVersionView.m

@@ -183,6 +183,7 @@
                 cell.detailTextLabel.text = _couldphoneSysInfoMod.data.data.hostAgentVer;
                 break;
             case 3:
+                cell.detailTextLabel.numberOfLines = 0;
                 cell.detailTextLabel.text = [[NSString alloc] initWithFormat:@"%@(%@)",_couldphoneSysInfoMod.data.data.AgentVersion.versionName,_couldphoneSysInfoMod.data.data.AgentVersion.versionCode];
                 break;
             case 4:
@@ -224,12 +225,18 @@
             }
                 break;
             case 10:{
-                NSString *curIp = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.ip;
-                NSString * networkStr = @"_LAN";
+//                NSString *curIp = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.ip;
+//                NSString * networkStr = @"_LAN";
+//                if(![connectDeviceManager shareInstance].isPingOk){
+//                    networkStr = @"_Not_LAN";
+//                }
+//                cell.detailTextLabel.text = [[NSString alloc] initWithFormat:@"%@%@",curIp,networkStr];
+                
+                NSString * networkStr = @"公网";
                 if(![connectDeviceManager shareInstance].isPingOk){
-                    networkStr = @"_Not_LAN";
+                    networkStr = @"局域网";
                 }
-                cell.detailTextLabel.text = [[NSString alloc] initWithFormat:@"%@%@",curIp,networkStr];
+                cell.detailTextLabel.text = networkStr;
             }
                 break;
         }

+ 1 - 1
创维盒子/双子星云手机/connectDeviceManager/connectDeviceManager.m

@@ -125,7 +125,7 @@ static connectDeviceManager *connectDeviceManagerInstance = nil;
             if(!connected || needReconnect){
                 weakSelf.curConnectDeviceState = DeviceConnectGetThridOK;
                 NSString *ipStr = weakSelf.DeviceThirdIdMod.data.ip;
-                //[weakSelf startPingDeviceIp:ipStr];
+                [weakSelf startPingDeviceIp:ipStr];
                 [weakSelf initRuiyunSDKFun];
             }