Forráskód Böngészése

1.接口字段更新以及修复bug

huangxiaodong 2 hónapja%!(EXTRA string=óta)
szülő
commit
b3b58b93d9

+ 14 - 3
创维盒子/code/Class/Set/uploadFile/downLoadFile/view/downLoadPreViewCell.m

@@ -412,12 +412,23 @@
     
 
     //时间戳转换为日期
-    NSString *timeStr = [[NSString alloc] initWithFormat:@"%ld",curGetInstalledAppMod.time];
-    NSString *dateStr = [iTools getDateStringWithTimeStr:timeStr];
+//    NSString *timeStr = [[NSString alloc] initWithFormat:@"%ld",curGetInstalledAppMod.time];
+//    NSString *dateStr = [iTools getDateStringWithTimeStr:timeStr];
+    
+    NSString *dateStr = @"";
+    if (curGetInstalledAppMod.time.length > 10) {
+        dateStr = [curGetInstalledAppMod.time substringToIndex:10];
+    }
     
     
     NSString * totalSizeStr = nil;
-    NSInteger totalSize_k = curGetInstalledAppMod.length / 1024;
+    
+    NSInteger totalSize_all = curGetInstalledAppMod.size;
+    if (totalSize_all == 0) {
+        totalSize_all = curGetInstalledAppMod.length;
+    }
+    
+    NSInteger totalSize_k = totalSize_all / 1024;
     if(totalSize_k == 0){
         totalSize_k = 1;
     }

+ 24 - 1
创维盒子/code/NAS/NasPreviewAPPViewController.m

@@ -198,6 +198,10 @@
         make.bottom.mas_equalTo(-30 - AdaptTabHeight);
     }];
     
+    // 添加拖拽手势
+   UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePan:)];
+   [_uploadFileButton addGestureRecognizer:panGesture];
+    
     NSMutableArray *arr = [NSMutableArray new];
     NSArray *diskList = ksharedAppDelegate.cloudPhoneExtraFileListMod.data;
     if(diskList && [diskList isKindOfClass:[NSArray class]]){
@@ -306,6 +310,24 @@
     
 }
 
+#pragma mark 处理拖拽手势
+- (void)handlePan:(UIPanGestureRecognizer *)gesture {
+    if (gesture.state == UIGestureRecognizerStateChanged) {
+        // 获取手指拖拽的偏移量
+        CGPoint translation = [gesture translationInView:self.view];
+        
+        // 更新视图位置
+        CGPoint newCenter = CGPointMake(
+            _uploadFileButton.center.x + translation.x,
+            _uploadFileButton.center.y + translation.y
+        );
+        _uploadFileButton.center = newCenter;
+        
+        // 重置偏移量,避免累加
+        [gesture setTranslation:CGPointZero inView:self.view];
+    }
+}
+
 
 #pragma mark - 懒加载
 - (UITableView *)tableView{
@@ -603,7 +625,8 @@
 {
     self.appInstallTypeV.hidden = !isDefaultTabType;
     
-    if(isDefaultTabType && !isSecondTabType){
+    if(isDefaultTabType //&& !isSecondTabType
+       ){
         _curInstalledAppListMod = _getInstalledAppListMod;
         self.curEditTypeBottomView.isCanDeleteType = NO;
         

+ 3 - 1
创维盒子/code/NAS/model/getInstalledAppListModel.h

@@ -14,8 +14,10 @@ NS_ASSUME_NONNULL_BEGIN
 @property(nonatomic,copy) NSString* fileType;//文件类型
 @property(nonatomic,copy) NSString* name;//名称
 @property(nonatomic,copy) NSString* icon;//图片
+@property(nonatomic,assign) NSInteger size;//文件大小
 @property(nonatomic,assign) NSInteger length;//文件大小
-@property(nonatomic,assign) NSInteger time;//时间戳
+//@property(nonatomic,assign) NSInteger time;//时间戳
+@property(nonatomic,copy) NSString* time;//时间戳
 
 //自定义
 @property (nonatomic, assign) BOOL isSelectType;