Sfoglia il codice sorgente

1.空间不足提示

huangxiaodong 8 mesi fa
parent
commit
c142309b83

+ 1 - 1
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileView/backupsFileRecordCell.m

@@ -192,7 +192,7 @@
     
     [_rightTiplabel mas_makeConstraints:^(MASConstraintMaker *make) {
         make.right.mas_equalTo(-15.0);
-        make.left.mas_equalTo(_progressBgView.mas_centerX);
+        make.left.mas_equalTo(_progressBgView.mas_centerX).offset(-40);
         make.height.mas_equalTo(30);
         make.centerY.mas_equalTo(0);
     }];

+ 17 - 1
创维盒子/双子星云手机/NAS/nasBackupsManager/nasMixBackupsManager.m

@@ -166,6 +166,22 @@
         if(model && model.status == 0){
             [weakSelf checkFileUploadStateFunAfterNetWith:model WithOperation:operation];
         }
+        else if(model && model.status == 5){
+            //备份路径
+            NSString * backupsDefaultPath = [HWDataManager getStringWithKey:stringKeyAddSn(Const_photo_backups_default_path)];
+            NSArray * stringArr = [backupsDefaultPath componentsSeparatedByString:@"/"];
+            NSString *lastStr = stringArr.lastObject;
+            NSString *repStr = [[NSString alloc] initWithFormat:@"/%@",lastStr];
+            NSString *name = [backupsDefaultPath stringByReplacingOccurrencesOfString:repStr withString:@""];
+            name = [iTools changePathToShowPathBy:name];
+            
+            NSString* showTip = [[NSString alloc] initWithFormat:@"【%@】%@",name,NSLocalizedString(@"disk_space_not_tip_for_95",nil)];
+            [[iToast makeText:showTip] show];
+            [weakSelf handleUploadFailOneFileBy:operation];
+            
+            NSString* failTip = [[NSString alloc] initWithFormat:@"【%@】%@",name,NSLocalizedString(@"disk_space_not_tip_for_95_fail_tip",nil)];
+            [[nasBackupsManager shareInstance] changeBackupsFileStateToFailWith:failTip];
+        }
         else{
             [weakSelf handleUploadFailOneFileBy:operation];
             //FileExistRet(-1);
@@ -488,7 +504,7 @@
     [[NSNotificationCenter defaultCenter] postNotificationName:nasBackupsTaskExeError object:operation.fileModel];
     [_uploadingOperationArr removeObject:operation];
     //[self beginUpload];
-    [[nasBackupsManager shareInstance] changeBackupsFileStateToFailWith:@""];
+    //[[nasBackupsManager shareInstance] changeBackupsFileStateToFailWith:@""];
 }
 
 #pragma mark 根据 asset 获取到图片数据

+ 14 - 0
创维盒子/双子星云手机/NAS/nasUploadManager/nasMixUploadManager.m

@@ -183,6 +183,20 @@
         if(model && model.status == 0){
             [weakSelf checkFileUploadStateFunAfterNetWith:model WithOperation:operation];
         }
+        else if(model && model.status == 5){
+            //上传路径
+            NSString * backupsDefaultPath = [HWDataManager getStringWithKey:stringKeyAddSn(Const_photo_upload_default_path)];
+            NSArray * stringArr = [backupsDefaultPath componentsSeparatedByString:@"/"];
+            NSString *lastStr = stringArr.lastObject;
+            NSString *repStr = [[NSString alloc] initWithFormat:@"/%@",lastStr];
+            NSString *name = [backupsDefaultPath stringByReplacingOccurrencesOfString:repStr withString:@""];
+            name = [iTools changePathToShowPathBy:name];
+            
+            NSString* showTip = [[NSString alloc] initWithFormat:@"【%@】%@",name,NSLocalizedString(@"disk_space_not_tip_for_95",nil)];
+            [[iToast makeText:showTip] show];
+            
+            [weakSelf handleUploadFailOneFileBy:operation];
+        }
         else{
             HLog(@"isFileExist接口异常:%@",responseObject)
             [weakSelf handleUploadFailOneFileBy:operation];

+ 3 - 0
创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

@@ -617,3 +617,6 @@
 "backups_get_file_error_too_many" = "获取本机图片或者视频错误过多";
 "common_copy" = "复制";
 "sn_copy_suc" = "SN复制成功";
+"disk_space_not_tip_for_95"   = "可用容量已达到95%,继续上传会导致云机无法操";
+"disk_space_not_tip_for_95_fail_tip"   = "磁盘空间不足";
+