浏览代码

1.上传文件 部分UI和逻辑

huangxiaodong 2 年之前
父节点
当前提交
074614d9fb
共有 33 个文件被更改,包括 951 次插入84 次删除
  1. 32 8
      创维盒子/双子星云手机.xcodeproj/project.pbxproj
  2. 22 0
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_Video.imageset/Contents.json
  3. 二进制
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_Video.imageset/uploadFile_Video@2x.png
  4. 二进制
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_Video.imageset/uploadFile_Video@3x.png
  5. 22 0
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_image.imageset/Contents.json
  6. 二进制
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_image.imageset/uploadFile_image@2x.png
  7. 二进制
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_image.imageset/uploadFile_image@3x.png
  8. 22 0
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_noData.imageset/Contents.json
  9. 二进制
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_noData.imageset/uploadFile_noData@2x.png
  10. 二进制
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_noData.imageset/uploadFile_noData@3x.png
  11. 22 0
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_start.imageset/Contents.json
  12. 二进制
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_start.imageset/uploadFile_start@2x.png
  13. 二进制
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_start.imageset/uploadFile_start@3x.png
  14. 22 0
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_suspend.imageset/Contents.json
  15. 二进制
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_suspend.imageset/uploadFile_suspend@2x.png
  16. 二进制
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_suspend.imageset/uploadFile_suspend@3x.png
  17. 22 0
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_wait.imageset/Contents.json
  18. 二进制
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_wait.imageset/uploadFile_wait@2x.png
  19. 二进制
      创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_wait.imageset/uploadFile_wait@3x.png
  20. 5 0
      创维盒子/双子星云手机/Class/Set/MySetViewController.m
  21. 9 2
      创维盒子/双子星云手机/Class/Set/uploadFile/model/uploadFileDataModel.h
  22. 19 0
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordBodyView.h
  23. 219 0
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordBodyView.m
  24. 18 0
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordCell.h
  25. 208 0
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordCell.m
  26. 19 0
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordheadView.h
  27. 109 0
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordheadView.m
  28. 0 42
      创维盒子/双子星云手机/Class/Set/uploadFile/uoloadFileRecordViewController.m
  29. 50 29
      创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileManager/uploadFileManager.m
  30. 1 1
      创维盒子/双子星云手机/Class/Set/uploadFile/uoloadFileRecordViewController.h
  31. 127 0
      创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileRecordViewController.m
  32. 2 2
      创维盒子/双子星云手机/Class/Set/uploadFile/uploadImageOrVideoViewController.m
  33. 1 0
      创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

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

@@ -157,8 +157,8 @@
 		6B0582702AFF692700D37290 /* photoPreViewBottomView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B05826E2AFF692700D37290 /* photoPreViewBottomView.m */; };
 		6B0582782AFF7C6D00D37290 /* TZAssetModel+imageData.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0582762AFF7C6D00D37290 /* TZAssetModel+imageData.h */; };
 		6B0582792AFF7C6D00D37290 /* TZAssetModel+imageData.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B0582772AFF7C6D00D37290 /* TZAssetModel+imageData.m */; };
-		6B0582802B01C67400D37290 /* uoloadFileRecordViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B05827E2B01C67400D37290 /* uoloadFileRecordViewController.h */; };
-		6B0582812B01C67400D37290 /* uoloadFileRecordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B05827F2B01C67400D37290 /* uoloadFileRecordViewController.m */; };
+		6B0582802B01C67400D37290 /* uploadFileRecordViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B05827E2B01C67400D37290 /* uploadFileRecordViewController.h */; };
+		6B0582812B01C67400D37290 /* uploadFileRecordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B05827F2B01C67400D37290 /* uploadFileRecordViewController.m */; };
 		6B0582852B0457C400D37290 /* uploadFileManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0582832B0457C400D37290 /* uploadFileManager.h */; };
 		6B0582862B0457C400D37290 /* uploadFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B0582842B0457C400D37290 /* uploadFileManager.m */; };
 		6B0582892B045E0B00D37290 /* uploadFileDataModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0582872B045E0B00D37290 /* uploadFileDataModel.h */; };
@@ -168,6 +168,12 @@
 		6B3F963A2AD2AD0B008E349E /* newWorkInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B3F96392AD2AD0B008E349E /* newWorkInterface.h */; };
 		6B7B65582AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B7B65562AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h */; };
 		6B7B65592AD9227700BE8CB3 /* PlayerViewController+otherDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6B7B65572AD9227700BE8CB3 /* PlayerViewController+otherDelegate.mm */; };
+		6B8FF6B92B04E19600800981 /* uploadFileRecordheadView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B8FF6B72B04E19600800981 /* uploadFileRecordheadView.h */; };
+		6B8FF6BA2B04E19600800981 /* uploadFileRecordheadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8FF6B82B04E19600800981 /* uploadFileRecordheadView.m */; };
+		6B8FF6BD2B04EB7100800981 /* uploadFileRecordBodyView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B8FF6BB2B04EB7100800981 /* uploadFileRecordBodyView.h */; };
+		6B8FF6BE2B04EB7100800981 /* uploadFileRecordBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8FF6BC2B04EB7100800981 /* uploadFileRecordBodyView.m */; };
+		6B8FF6C12B05B24D00800981 /* uploadFileRecordCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B8FF6BF2B05B24D00800981 /* uploadFileRecordCell.h */; };
+		6B8FF6C22B05B24D00800981 /* uploadFileRecordCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8FF6C02B05B24D00800981 /* uploadFileRecordCell.m */; };
 		6BBB35D92AE7645200E4A59B /* RunInBackground.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 6BBB35D62AE7645200E4A59B /* RunInBackground.mp3 */; };
 		6BBB35DD2AE76AD800E4A59B /* AudioSessionObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BBB35DB2AE76AD800E4A59B /* AudioSessionObject.h */; };
 		6BBB35DE2AE76AD800E4A59B /* AudioSessionObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BBB35DC2AE76AD800E4A59B /* AudioSessionObject.m */; };
@@ -504,8 +510,8 @@
 		6B05826E2AFF692700D37290 /* photoPreViewBottomView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = photoPreViewBottomView.m; sourceTree = "<group>"; };
 		6B0582762AFF7C6D00D37290 /* TZAssetModel+imageData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TZAssetModel+imageData.h"; sourceTree = "<group>"; };
 		6B0582772AFF7C6D00D37290 /* TZAssetModel+imageData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "TZAssetModel+imageData.m"; sourceTree = "<group>"; };
-		6B05827E2B01C67400D37290 /* uoloadFileRecordViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uoloadFileRecordViewController.h; sourceTree = "<group>"; };
-		6B05827F2B01C67400D37290 /* uoloadFileRecordViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = uoloadFileRecordViewController.m; sourceTree = "<group>"; };
+		6B05827E2B01C67400D37290 /* uploadFileRecordViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadFileRecordViewController.h; sourceTree = "<group>"; };
+		6B05827F2B01C67400D37290 /* uploadFileRecordViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = uploadFileRecordViewController.m; sourceTree = "<group>"; };
 		6B0582832B0457C400D37290 /* uploadFileManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadFileManager.h; sourceTree = "<group>"; };
 		6B0582842B0457C400D37290 /* uploadFileManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = uploadFileManager.m; sourceTree = "<group>"; };
 		6B0582872B045E0B00D37290 /* uploadFileDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadFileDataModel.h; sourceTree = "<group>"; };
@@ -531,6 +537,12 @@
 		6B7B656E2ADEAE3D00BE8CB3 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/HWAboutViewController.strings; sourceTree = "<group>"; };
 		6B7B656F2ADEAE3D00BE8CB3 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/HWHistoryViewController.strings; sourceTree = "<group>"; };
 		6B7B65702ADEAE3D00BE8CB3 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = "<group>"; };
+		6B8FF6B72B04E19600800981 /* uploadFileRecordheadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadFileRecordheadView.h; sourceTree = "<group>"; };
+		6B8FF6B82B04E19600800981 /* uploadFileRecordheadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = uploadFileRecordheadView.m; sourceTree = "<group>"; };
+		6B8FF6BB2B04EB7100800981 /* uploadFileRecordBodyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadFileRecordBodyView.h; sourceTree = "<group>"; };
+		6B8FF6BC2B04EB7100800981 /* uploadFileRecordBodyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = uploadFileRecordBodyView.m; sourceTree = "<group>"; };
+		6B8FF6BF2B05B24D00800981 /* uploadFileRecordCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadFileRecordCell.h; sourceTree = "<group>"; };
+		6B8FF6C02B05B24D00800981 /* uploadFileRecordCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = uploadFileRecordCell.m; sourceTree = "<group>"; };
 		6BBB35D62AE7645200E4A59B /* RunInBackground.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = RunInBackground.mp3; sourceTree = "<group>"; };
 		6BBB35DB2AE76AD800E4A59B /* AudioSessionObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AudioSessionObject.h; sourceTree = "<group>"; };
 		6BBB35DC2AE76AD800E4A59B /* AudioSessionObject.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AudioSessionObject.m; sourceTree = "<group>"; };
@@ -1125,8 +1137,8 @@
 				6B05815F2AFCD0DF00D37290 /* uploadImageOrVideoViewController.m */,
 				6B0582612AFF4B7D00D37290 /* PhotoPreviewViewController.h */,
 				6B0582622AFF4B7D00D37290 /* PhotoPreviewViewController.m */,
-				6B05827E2B01C67400D37290 /* uoloadFileRecordViewController.h */,
-				6B05827F2B01C67400D37290 /* uoloadFileRecordViewController.m */,
+				6B05827E2B01C67400D37290 /* uploadFileRecordViewController.h */,
+				6B05827F2B01C67400D37290 /* uploadFileRecordViewController.m */,
 			);
 			path = uploadFile;
 			sourceTree = "<group>";
@@ -1146,6 +1158,12 @@
 				6B0581B12AFE02B100D37290 /* uploadFileBottomView.m */,
 				6B05826D2AFF692700D37290 /* photoPreViewBottomView.h */,
 				6B05826E2AFF692700D37290 /* photoPreViewBottomView.m */,
+				6B8FF6B72B04E19600800981 /* uploadFileRecordheadView.h */,
+				6B8FF6B82B04E19600800981 /* uploadFileRecordheadView.m */,
+				6B8FF6BB2B04EB7100800981 /* uploadFileRecordBodyView.h */,
+				6B8FF6BC2B04EB7100800981 /* uploadFileRecordBodyView.m */,
+				6B8FF6BF2B05B24D00800981 /* uploadFileRecordCell.h */,
+				6B8FF6C02B05B24D00800981 /* uploadFileRecordCell.m */,
 			);
 			path = photoView;
 			sourceTree = "<group>";
@@ -1607,7 +1625,7 @@
 				184C8ADA2A949DAC00F26650 /* HaveNewVersionView.h in Headers */,
 				6BBB35DD2AE76AD800E4A59B /* AudioSessionObject.h in Headers */,
 				6B0582782AFF7C6D00D37290 /* TZAssetModel+imageData.h in Headers */,
-				6B0582802B01C67400D37290 /* uoloadFileRecordViewController.h in Headers */,
+				6B0582802B01C67400D37290 /* uploadFileRecordViewController.h in Headers */,
 				183AE6D12A8CA98C00B11CB0 /* CloudPhoneAPI.h in Headers */,
 				1868201D2AB97BE1005702A6 /* TipsQRCodeViewController.h in Headers */,
 				181E85002A8F6B1800292B96 /* LogoSelectView.h in Headers */,
@@ -1630,6 +1648,7 @@
 				18FCE53E2AD136670020F623 /* PlayerViewController+AdjustBtnFrame.h in Headers */,
 				6B05815B2AFC851E00D37290 /* mySetHeadView.h in Headers */,
 				6BF52CAD2AD82EA500A617DB /* PlayerControlButTipView.h in Headers */,
+				6B8FF6BD2B04EB7100800981 /* uploadFileRecordBodyView.h in Headers */,
 				6B0582892B045E0B00D37290 /* uploadFileDataModel.h in Headers */,
 				6BF52C972AD5546500A617DB /* SimplePing.h in Headers */,
 				6B3F96342AD2A15A008E349E /* netWorkManager.h in Headers */,
@@ -1637,8 +1656,10 @@
 				6B05826F2AFF692700D37290 /* photoPreViewBottomView.h in Headers */,
 				6B7B65582AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h in Headers */,
 				186820212AB98600005702A6 /* QRCodeScanViewController.h in Headers */,
+				6B8FF6B92B04E19600800981 /* uploadFileRecordheadView.h in Headers */,
 				18FCE5482AD15E750020F623 /* PlayerViewController+AppDelegate.h in Headers */,
 				181E84F72A8F451D00292B96 /* MineViewCell.h in Headers */,
+				6B8FF6C12B05B24D00800981 /* uploadFileRecordCell.h in Headers */,
 				183AE6D42A8CAFAE00B11CB0 /* UIView+View.h in Headers */,
 				6B0581AF2AFCF57300D37290 /* AJPhotoGroupCell.h in Headers */,
 				184C8ACC2A94557200F26650 /* HidenMaskSetViewController.h in Headers */,
@@ -1981,6 +2002,7 @@
 				6BBB35E32AE935C000E4A59B /* DDYLanguageTool.m in Sources */,
 				6BBB35DE2AE76AD800E4A59B /* AudioSessionObject.m in Sources */,
 				181E84FC2A8F57A500292B96 /* ChangeLogoViewController.m in Sources */,
+				6B8FF6BA2B04E19600800981 /* uploadFileRecordheadView.m in Sources */,
 				A031DD7F27EC78C800909527 /* HWAgreementViewController.m in Sources */,
 				183AE64F2A8A2CF000B11CB0 /* UIImageView+AFNetworking.m in Sources */,
 				183AE6592A8A2CF000B11CB0 /* AFSecurityPolicy.m in Sources */,
@@ -2013,6 +2035,7 @@
 				183AE7C82A8CB39100B11CB0 /* SafeForKey.m in Sources */,
 				183AE6042A89CE3C00B11CB0 /* JSONModel.m in Sources */,
 				18FCE5492AD15E750020F623 /* PlayerViewController+AppDelegate.m in Sources */,
+				6B8FF6BE2B04EB7100800981 /* uploadFileRecordBodyView.m in Sources */,
 				6BF52C9A2AD5546500A617DB /* WHPingTester.m in Sources */,
 				6BFF268D2AF8E1C600FCB4F7 /* forgetPwdViewController.m in Sources */,
 				183AE6082A89CE3C00B11CB0 /* JSONHTTPClient.m in Sources */,
@@ -2050,6 +2073,7 @@
 				A08A94FB27E9A4E400C544BB /* BGDB.m in Sources */,
 				A003F6B427D841EE00715CBF /* UITextfield+NLLimit.m in Sources */,
 				6BFF26892AF8949F00FCB4F7 /* playerShowSecretkeyView.m in Sources */,
+				6B8FF6C22B05B24D00800981 /* uploadFileRecordCell.m in Sources */,
 				A003F6A727D841C800715CBF /* BaseNavigationController.m in Sources */,
 				A00221E427EB256D00E45F78 /* HWFolderModel.m in Sources */,
 				183AE6B02A8C9EAB00B11CB0 /* RCCommandHelp.m in Sources */,
@@ -2080,7 +2104,7 @@
 				184C8ACD2A94557200F26650 /* HidenMaskSetViewController.m in Sources */,
 				18963B472AB84398006E7C50 /* GuideView.m in Sources */,
 				18FCE5452AD136FF0020F623 /* ShortcutManager.m in Sources */,
-				6B0582812B01C67400D37290 /* uoloadFileRecordViewController.m in Sources */,
+				6B0582812B01C67400D37290 /* uploadFileRecordViewController.m in Sources */,
 				A003F6A827D841C800715CBF /* BaseModel.m in Sources */,
 				A0295B1627EDA0EC009C5D8B /* HWHistoryModel.m in Sources */,
 				183AE6B42A8CA00300B11CB0 /* PlayerView.m in Sources */,

+ 22 - 0
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_Video.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "uploadFile_Video@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "uploadFile_Video@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

二进制
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_Video.imageset/uploadFile_Video@2x.png


二进制
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_Video.imageset/uploadFile_Video@3x.png


+ 22 - 0
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_image.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "uploadFile_image@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "uploadFile_image@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

二进制
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_image.imageset/uploadFile_image@2x.png


二进制
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_image.imageset/uploadFile_image@3x.png


+ 22 - 0
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_noData.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "uploadFile_noData@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "uploadFile_noData@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

二进制
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_noData.imageset/uploadFile_noData@2x.png


二进制
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_noData.imageset/uploadFile_noData@3x.png


+ 22 - 0
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_start.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "uploadFile_start@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "uploadFile_start@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

二进制
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_start.imageset/uploadFile_start@2x.png


二进制
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_start.imageset/uploadFile_start@3x.png


+ 22 - 0
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_suspend.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "uploadFile_suspend@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "uploadFile_suspend@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

二进制
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_suspend.imageset/uploadFile_suspend@2x.png


二进制
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_suspend.imageset/uploadFile_suspend@3x.png


+ 22 - 0
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_wait.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "uploadFile_wait@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "uploadFile_wait@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

二进制
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_wait.imageset/uploadFile_wait@2x.png


二进制
创维盒子/双子星云手机/Assets.xcassets/Set/uploadFile_wait.imageset/uploadFile_wait@3x.png


+ 5 - 0
创维盒子/双子星云手机/Class/Set/MySetViewController.m

@@ -23,6 +23,7 @@
 #import "mySetHeadView.h"
 #import "uploadImageOrVideoViewController.h"
 #import "TZImagePickerController.h"
+#import "uploadFileRecordViewController.h"
 
 @interface MySetViewController ()<HelpDownScrollViewDelegate,UITableViewDelegate,UITableViewDataSource,ComontAlretViewControllerDelegate>
 {
@@ -87,6 +88,10 @@
             [self.navigationController pushViewController:vc animated:YES];
             
         }
+        else if(tag == 1){
+            uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
+            [self.navigationController pushViewController:vc animated:YES];
+        }
     };
     
     return bgView;

+ 9 - 2
创维盒子/双子星云手机/Class/Set/uploadFile/model/uploadFileDataModel.h

@@ -14,15 +14,22 @@ typedef enum{
     uploadStateUploading,
     uploadStateSuspend,
     uploadStateFail,
-    uploadStateDone,//需要去掉imageData
+    uploadStateDone,//
 }uploadStateType;
 
+typedef enum{
+    uploadFileTypeImage = 0,
+    uploadFileTypeVideo,
+    uploadFileTypeUnkonw,
+}uploadFileType;
+
 //self.fileName = [assetModel.asset valueForKey:@"filename"];
 @interface uploadFileDataModel : JSONModel
 //目前上传用到的字段有
 @property (nonatomic, copy)  NSString *filename;
 @property (nonatomic, retain) NSData *_Nullable imageData;
-@property (nonatomic, assign)  uploadStateType uploadType;
+@property (nonatomic, assign)  uploadStateType curUploadStateType;
+@property (nonatomic, assign)  uploadFileType curUploadFileType;
 @property (nonatomic, assign)  NSInteger didUploadBytes;//已经上传的字节数
 @end
 

+ 19 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordBodyView.h

@@ -0,0 +1,19 @@
+//
+//  uploadFileRecordBodyView.h
+//  隐私保护
+//
+//  Created by xd h on 2023/11/15.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface uploadFileRecordBodyView : UIView
+//点击
+@property (nonatomic,copy) void (^didScrollFun)(NSInteger index);
+@property(nonatomic,assign) NSInteger selectIndex;// 从1开始
+@property (nonatomic, strong) NSMutableArray *allDataArr;
+@end
+
+NS_ASSUME_NONNULL_END

+ 219 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordBodyView.m

@@ -0,0 +1,219 @@
+//
+//  uploadFileRecordBodyView.m
+//  隐私保护
+//
+//  Created by xd h on 2023/11/15.
+//
+
+#import "uploadFileRecordBodyView.h"
+#import "uploadFileRecordCell.h"
+#import "UIScrollView+EmptyDataSet.h"
+#import "uploadFileDataModel.h"
+
+@interface uploadFileRecordBodyView ()<UITableViewDelegate,UITableViewDataSource,UIScrollViewDelegate,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
+@property (nonatomic,strong) UIScrollView *bgScrollV;
+
+@end
+
+@implementation uploadFileRecordBodyView
+
+- (id)initWithFrame:(CGRect)frame{
+    self = [super initWithFrame:frame];
+    
+    _selectIndex = 1;
+    [self drawAnyView];
+    
+    return self;
+}
+
+- (void)drawAnyView{
+    [self setBackgroundColor:[UIColor whiteColor]];
+    
+    NSInteger maxNum = 3;
+    
+    _bgScrollV = [[UIScrollView alloc] init];
+    _bgScrollV.showsHorizontalScrollIndicator = NO;
+    _bgScrollV.pagingEnabled = YES;
+    _bgScrollV.delegate = self;
+    [self addSubview:_bgScrollV];
+    
+    [_bgScrollV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.top.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+    }];
+    
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.15 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        mainBlock(^{
+            CGRect frame = self->_bgScrollV.frame;
+            self->_bgScrollV.contentSize = CGSizeMake(maxNum* SCREEN_W, frame.size.height);
+            
+            for (NSInteger i= 0; i<maxNum; i++) {
+                UITableView *curTableview = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
+                curTableview.delegate = self;
+                curTableview.dataSource = self;
+                curTableview.showsVerticalScrollIndicator = NO;
+                curTableview.showsHorizontalScrollIndicator = NO;
+        //        _tableView.contentInset = UIEdgeInsetsMake(-H_STATE_BAR, 0, 0, 0);
+                [curTableview setSeparatorStyle:(UITableViewCellSeparatorStyleNone)];
+                [curTableview setSeparatorColor:[UIColor clearColor]];
+                [curTableview setBackgroundColor:[UIColor clearColor]];
+                [curTableview setTableFooterView:[UIView new]];
+                [curTableview setBounces:YES];
+                if (@available(iOS 15.0, *)) {
+                    curTableview.sectionHeaderTopPadding = 0;
+                }
+                [self->_bgScrollV addSubview:curTableview];
+                
+                curTableview.tag = 10 +i;
+                
+                //空数据引入第三方开源处理
+                curTableview.emptyDataSetSource = self;
+                curTableview.emptyDataSetDelegate = self;
+                
+                [curTableview mas_makeConstraints:^(MASConstraintMaker *make) {
+                    make.left.mas_equalTo(SCREEN_W * i);
+                    make.width.mas_equalTo(SCREEN_W);
+                    make.top.mas_equalTo(0);
+                    make.height.mas_equalTo(frame.size.height);
+                }];
+            }
+        });
+    });
+    
+    
+}
+
+
+#pragma mark - 列表委托
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
+    return 1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    
+    NSInteger tag = tableView.tag - 10;
+    
+    if(_allDataArr && tag <_allDataArr.count){
+        NSMutableArray *curArr = _allDataArr[tag];
+        
+        return curArr.count;
+    }
+    
+    return 0;
+    
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    NSInteger row = indexPath.row;
+    static NSString *identifier = @"uploadFileRecordCell";
+    
+    uploadFileRecordCell * cell =  [tableView dequeueReusableCellWithIdentifier:identifier];
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    if (!cell){
+        cell = [[uploadFileRecordCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
+        [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
+        [cell setBackgroundColor:[UIColor clearColor]];
+        [cell setAccessoryType:(UITableViewCellAccessoryNone)];
+    }
+    
+    NSInteger tag = tableView.tag - 10;
+    
+    if(_allDataArr && tag <_allDataArr.count){
+        NSMutableArray *curArr = _allDataArr[tag];
+        
+        if(row < curArr.count){
+            uploadFileDataModel *model = curArr[row];
+            cell.curUploadFileDataModel = model;
+        }
+    }
+    
+
+    return cell;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    return 70;
+}
+
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    
+}
+
+//- (void)scrollViewDidScroll:(UIScrollView *)scrollView
+- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
+{
+    if(_bgScrollV != scrollView) return;
+    
+    CGFloat x = scrollView.contentOffset.x;
+    NSInteger index = (x+1)/SCREEN_W;
+    
+    index += 1;//因为头部是从1开始的
+    
+     //HLog(@"index:%ld",index);
+    if(_didScrollFun){
+        _didScrollFun(index);
+    }
+    
+}
+
+#pragma mark 空数据
+- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView {
+    
+    return [UIImage imageNamed:@"uploadFile_noData"];
+}
+
+- (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView {
+    NSString *text = NSLocalizedString(@"File_upload_Record_no_data",nil);
+    
+    NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:16.0f],
+                                 NSForegroundColorAttributeName: HW999999Color};
+    
+    return [[NSAttributedString alloc] initWithString:text attributes:attributes];
+}
+
+//调整图片位置
+- (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView {
+    return -150;
+}
+
+- (void)setSelectIndex:(NSInteger)selectIndex
+{
+    _selectIndex = selectIndex;
+    
+    CGPoint poit = _bgScrollV.contentOffset;
+    poit.x = SCREEN_W * (selectIndex -1);
+    
+    [UIView animateWithDuration:0.2 animations:^{
+        self->_bgScrollV.contentOffset = poit;
+    }];
+}
+
+- (void)setAllDataArr:(NSMutableArray *)allDataArr
+{
+    _allDataArr = allDataArr;
+    
+    //刷新数据
+    [self reloadAllDataFun];
+}
+
+#pragma mark 熟悉全部数据
+- (void)reloadAllDataFun
+{
+    mainBlock(^{
+        NSArray *subViews = [self->_bgScrollV subviews];
+        
+        for (UITableView *tableView in subViews) {
+            if([tableView isKindOfClass:[UITableView class]]){
+                [tableView reloadData];
+            }
+        }
+    });
+    
+}
+
+@end

+ 18 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordCell.h

@@ -0,0 +1,18 @@
+//
+//  uploadFileRecordCell.h
+//  隐私保护
+//
+//  Created by xd h on 2023/11/16.
+//
+
+#import <UIKit/UIKit.h>
+#import "uploadFileDataModel.h"
+NS_ASSUME_NONNULL_BEGIN
+
+@interface uploadFileRecordCell : UITableViewCell
+
+@property(nonatomic,strong)uploadFileDataModel * curUploadFileDataModel;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 208 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordCell.m

@@ -0,0 +1,208 @@
+//
+//  uploadFileRecordCell.m
+//  隐私保护
+//
+//  Created by xd h on 2023/11/16.
+//
+
+#import "uploadFileRecordCell.h"
+@interface uploadFileRecordCell ()
+@property(nonatomic,strong) UIImageView *fileImageView;
+@property(nonatomic,strong) UIImageView *upLoadStateImageView;
+
+@property(nonatomic,strong) UIView *progressBgView;
+@property(nonatomic,strong) UIView *progressSelectView;
+@property(nonatomic,strong) CAGradientLayer *glayer;
+
+@property(nonatomic,strong) UILabel *fileNamelabel;
+@property(nonatomic,strong) UILabel *fileProgresslabel;
+@property(nonatomic,strong) UILabel *fileSpeedlabel;
+@end
+
+@implementation uploadFileRecordCell
+
+- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
+{
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    
+    if (self)
+    {
+        [self drawView];
+    }
+    
+    return self;
+}
+
+- (void)drawView
+{
+    _fileImageView = [[UIImageView alloc] init];
+    //_fileImageView.backgroundColor = [UIColor greenColor];
+    [self.contentView addSubview:_fileImageView];
+    
+    [_fileImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(15);
+        make.width.mas_equalTo(34);
+        make.height.mas_equalTo(34);
+        make.bottom.mas_equalTo(-18);
+    }];
+    
+    _upLoadStateImageView = [[UIImageView alloc] init];
+    //_upLoadStateImageView.backgroundColor = [UIColor redColor];
+    [self.contentView addSubview:_upLoadStateImageView];
+    
+    [_upLoadStateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-15);
+        make.width.mas_equalTo(34);
+        make.height.mas_equalTo(34);
+        make.bottom.mas_equalTo(-18);
+    }];
+    
+    _progressBgView = [[UIView alloc] init];
+    _progressBgView.backgroundColor = [UIColor hwColor:@"#F9F9F9" alpha:1.0];
+    _progressBgView.layer.cornerRadius = 1.5;
+    [self.contentView addSubview:_progressBgView];
+    
+    [_progressBgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(_fileImageView.mas_right).offset(10);
+        make.right.mas_equalTo(_upLoadStateImageView.mas_left).offset(-10);
+        make.height.mas_equalTo(2);
+        make.centerY.mas_equalTo(0);
+    }];
+    
+    _progressSelectView = [[UIView alloc] init];
+    //_progressSelectView.backgroundColor = [UIColor hwColor:@"#F9F9F9" alpha:1.0];
+    _progressSelectView.layer.cornerRadius = 1.5;
+    _progressSelectView.layer.masksToBounds = YES;
+    [_progressBgView addSubview:_progressSelectView];
+    
+//    [_progressSelectView mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.left.mas_equalTo(0);
+//        make.right.mas_equalTo(-100);
+//        make.height.mas_equalTo(3);
+//        make.centerY.mas_equalTo(0);
+//    }];
+    
+    // gradient
+    _glayer = [CAGradientLayer layer];
+    _glayer.startPoint = CGPointMake(0, 0.5);
+    _glayer.endPoint = CGPointMake(1, 0.5);
+    _glayer.colors = @[(__bridge id)[UIColor hwColor:@"#0BDDFD" alpha:1.0].CGColor, (__bridge id)[UIColor hwColor:@"#048CFB" alpha:1.0].CGColor];
+    _glayer.locations = @[@(0), @(1.0f)];
+    [_progressSelectView.layer addSublayer:_glayer];
+    
+//    CGRect frame = CGRectMake(0, 0, 100, 3);
+//    _progressSelectView.frame = frame;
+//    _glayer.frame = frame;
+    
+    
+    _fileNamelabel = [[UILabel alloc] init];
+    _fileNamelabel.font = [UIFont boldSystemFontOfSize:16.0];
+    //_fileNamelabel.backgroundColor = [UIColor greenColor];
+    [self.contentView addSubview:_fileNamelabel];
+    
+    [_fileNamelabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(_fileImageView.mas_right).offset(10);
+        make.right.mas_equalTo(_upLoadStateImageView.mas_left).offset(-10);
+        make.height.mas_equalTo(19);
+        make.bottom.mas_equalTo(_progressBgView.mas_top).offset(-3);
+    }];
+    
+    _fileProgresslabel = [[UILabel alloc] init];
+    _fileProgresslabel.font = [UIFont systemFontOfSize:12.0];
+    _fileProgresslabel.textColor = [UIColor hwColor:@"#959799" alpha:1.0];
+    //_fileProgresslabel.backgroundColor = [UIColor greenColor];
+    [self.contentView addSubview:_fileProgresslabel];
+    
+    [_fileProgresslabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(_fileImageView.mas_right).offset(10);
+        make.right.mas_equalTo(_progressBgView.mas_centerX);
+        make.height.mas_equalTo(15);
+        make.top.mas_equalTo(_progressBgView.mas_bottom).offset(3);
+    }];
+    
+    _fileSpeedlabel = [[UILabel alloc] init];
+    _fileSpeedlabel.font = [UIFont systemFontOfSize:12.0];
+    _fileSpeedlabel.textColor = [UIColor hwColor:@"#959799" alpha:1.0];
+    _fileSpeedlabel.textAlignment = NSTextAlignmentRight;
+    //_fileSpeedlabel.backgroundColor = [UIColor blackColor];
+    [self.contentView addSubview:_fileSpeedlabel];
+    
+    [_fileSpeedlabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(_upLoadStateImageView.mas_left).offset(-10);
+        make.left.mas_equalTo(_progressBgView.mas_centerX);
+        make.height.mas_equalTo(15);
+        make.top.mas_equalTo(_progressBgView.mas_bottom).offset(3);
+    }];
+}
+
+- (void)setCurUploadFileDataModel:(uploadFileDataModel *)curUploadFileDataModel
+{
+    _fileImageView.image = [UIImage imageWithData:curUploadFileDataModel.imageData];
+    _fileSpeedlabel.hidden = YES;
+    
+    if(curUploadFileDataModel.curUploadStateType == uploadStateWait){
+        _upLoadStateImageView.image = [UIImage imageNamed:@"uploadFile_wait"];
+    }
+    else if(curUploadFileDataModel.curUploadStateType == uploadStateUploading){
+        _upLoadStateImageView.image = [UIImage imageNamed:@"uploadFile_suspend"];
+        _fileSpeedlabel.hidden = NO;
+    }
+    else if(curUploadFileDataModel.curUploadStateType == uploadStateSuspend){
+        _upLoadStateImageView.image = [UIImage imageNamed:@"uploadFile_start"];
+    }
+    else{
+        _upLoadStateImageView.hidden = YES;
+        _progressBgView.hidden = YES;
+    }
+    
+    _fileNamelabel.text = curUploadFileDataModel.filename;
+    
+    //进度设置
+    CGRect frame = _progressBgView.frame;
+    
+    NSInteger totalSize = [curUploadFileDataModel.imageData length];
+    CGFloat curProgress = curUploadFileDataModel.didUploadBytes/(totalSize*1.0);
+    
+    if(curProgress > 1){
+        curProgress = 1;
+    }
+    
+    frame.size.width =  frame.size.width * curProgress;
+    
+    [UIView animateWithDuration:0.1 animations:^{
+        self->_progressSelectView.frame = frame;
+        self->_glayer.frame = frame;
+    }];
+    
+    NSString * totalSizeStr = nil;
+    NSInteger totalSize_k = totalSize / 1024;
+    if(totalSize_k < 1024){
+        totalSizeStr = [[NSString alloc] initWithFormat:@"%ldKB",totalSize_k];
+    }
+    else if( totalSize_k >= 1024 && totalSize_k < 1024*1024){
+        totalSizeStr = [[NSString alloc] initWithFormat:@"%.1fMB",totalSize_k/1024.0];
+        
+    }
+    else{
+        totalSizeStr = [[NSString alloc] initWithFormat:@"%.2fG",totalSize_k/1024.0/1024.0];
+    }
+    
+    NSString * didUploadStr = nil;
+    NSInteger didUploadSize_k = curUploadFileDataModel.didUploadBytes / 1024;
+    if(didUploadSize_k < 1024){
+        didUploadStr = [[NSString alloc] initWithFormat:@"%ldKB",didUploadSize_k];
+    }
+    else if( didUploadSize_k >= 1024 && didUploadSize_k < 1024*1024){
+        didUploadStr = [[NSString alloc] initWithFormat:@"%.1fMB",didUploadSize_k/1024.0];
+        
+    }
+    else{
+        didUploadStr = [[NSString alloc] initWithFormat:@"%.2fG",didUploadSize_k/1024.0/1024.0];
+    }
+    
+    _fileProgresslabel.text = [[NSString alloc] initWithFormat:@"%@/%@",didUploadStr,totalSizeStr];
+    
+    _fileSpeedlabel.text = @"--";
+}
+
+@end

+ 19 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordheadView.h

@@ -0,0 +1,19 @@
+//
+//  uploadFileRecordheadView.h
+//  隐私保护
+//
+//  Created by xd h on 2023/11/15.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface uploadFileRecordheadView : UIView
+@property(nonatomic,assign) NSInteger selectIndex;//
+
+//点击
+@property (nonatomic,copy) void (^didClickButFun)(NSInteger index);
+@end
+
+NS_ASSUME_NONNULL_END

+ 109 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordheadView.m

@@ -0,0 +1,109 @@
+//
+//  uploadFileRecordheadView.m
+//  隐私保护
+//
+//  Created by xd h on 2023/11/15.
+//
+
+#import "uploadFileRecordheadView.h"
+@interface uploadFileRecordheadView()
+@property(nonatomic,strong) UIView *selectBgView;//
+@property(nonatomic,assign) CGFloat butWidth;//
+@end
+
+@implementation uploadFileRecordheadView
+
+- (id)initWithFrame:(CGRect)frame{
+    self = [super initWithFrame:frame];
+    
+    [self drawAnyView];
+    
+    return self;
+}
+
+- (void)drawAnyView{
+    [self setBackgroundColor:[UIColor hwColor:@"#F9F9F9" alpha:1.0]];
+    self.layer.cornerRadius = 8;
+    
+    NSArray *titleArr =  @[@"上传中",@"上传成功",@"上传失败"];
+    
+    _butWidth = (SCREEN_W - 30)/3.0;
+    
+ 
+    for (NSInteger i=0; i<titleArr.count; i++) {
+   
+        NSString* title = titleArr[i];
+        
+        UIButton *but = [[UIButton alloc] init];
+        but.tag = i+1;
+        [but setTitle:title forState:UIControlStateNormal];
+        [but setTitleColor:[UIColor hwColor:@"#666666" alpha:1.0] forState:UIControlStateNormal];
+        [but setTitleColor:[UIColor hwColor:@"#0A132B" alpha:1.0] forState:UIControlStateSelected];
+        but.titleLabel.font = [UIFont systemFontOfSize:14.0];
+        [but addTarget:self action:@selector(didClickButFun:) forControlEvents:UIControlEventTouchUpInside];
+        [self addSubview:but];
+        
+        [but mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(i*_butWidth);
+            make.width.mas_equalTo(_butWidth);
+            make.top.mas_equalTo(0);
+            make.bottom.mas_equalTo(0);
+        }];
+        
+        if(i==0){
+            but.selected = YES;
+            
+            _selectBgView = [[UIView alloc] init];
+            _selectBgView.backgroundColor = [UIColor whiteColor];
+            _selectBgView.layer.cornerRadius = 8;
+            [self insertSubview:_selectBgView atIndex:0];
+            
+            [_selectBgView mas_makeConstraints:^(MASConstraintMaker *make) {
+                make.left.mas_equalTo(10);
+                make.width.mas_equalTo(_butWidth -20);
+                make.top.mas_equalTo(6);
+                make.bottom.mas_equalTo(-6);
+            }];
+        }
+    }
+    
+}
+
+#pragma mark 按钮点击
+- (void)didClickButFun:(UIButton*)but
+{
+    NSInteger tag = but.tag;
+    
+    self.selectIndex = tag;
+    
+    if(_didClickButFun){
+        _didClickButFun(tag);
+    }
+}
+
+- (void)setSelectIndex:(NSInteger)selectIndex
+{
+    _selectIndex = selectIndex;
+    
+    NSArray *subViews = [self subviews];
+    
+    for (UIButton *but in subViews) {
+        if([but isKindOfClass:[UIButton class]]){
+            if(but.tag == selectIndex){
+                but.selected = YES;
+            }
+            else{
+                but.selected = NO;
+            }
+        }
+    }
+    
+    CGRect frame = _selectBgView.frame;
+    frame.origin.x = (_selectIndex -1)* _butWidth + 10;
+    
+    [UIView animateWithDuration:0.2 animations:^{
+        self->_selectBgView.frame = frame;
+    }];
+}
+
+@end

+ 0 - 42
创维盒子/双子星云手机/Class/Set/uploadFile/uoloadFileRecordViewController.m

@@ -1,42 +0,0 @@
-//
-//  uoloadFileRecordViewController.m
-//  隐私保护
-//
-//  Created by xd h on 2023/11/13.
-//
-
-#import "uoloadFileRecordViewController.h"
-#import "uploadFileManager.h"
-#import "uploadFileDataModel.h"
-
-@interface uoloadFileRecordViewController ()
-
-//选中的项 TZAssetModel
-@property (nonatomic, strong) NSMutableArray *indexPathsForSelectedItems;
-@end
-
-@implementation uoloadFileRecordViewController
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    // Do any additional setup after loading the view.
-    
-    [self.view setBackgroundColor:HWF5F7FAColor];
-    
-    self.titleLabel.text = NSLocalizedString(@"my_set_no_File_upload_record",nil) ;
-    
-    [self.toolBar setHidden:YES];
-    [self.navigationBar setHidden:YES];
-    [self.navBarBGView setHidden:NO];
-    
-    
-}
-
--(void)gotoUploadFile:(NSMutableArray*)indexPathsForSelectedItems
-{
-    
-    _indexPathsForSelectedItems = [[uploadFileManager shareInstance] handlTZAssetModelToUploadFileDataFunBy:indexPathsForSelectedItems];
-    
-}
-
-@end

+ 50 - 29
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileManager/uploadFileManager.m

@@ -41,7 +41,16 @@ static uploadFileManager * cur_uploadFileShareInstance = nil;
         uploadFileDataModel * curModel = [uploadFileDataModel new];
         curModel.imageData = model.imageData;
         curModel.filename = [model.asset valueForKey:@"filename"];
-        curModel.uploadType = uploadStateWait;
+        curModel.curUploadStateType = uploadStateWait;
+        
+        if(model.type == TZAssetModelMediaTypeVideo){
+            curModel.curUploadFileType = uploadFileTypeVideo;
+        }
+        else{
+            curModel.curUploadFileType = uploadFileTypeImage;
+        }
+        
+        
         [_fileModelDataArr addObject:curModel];
         
         //保存到数据库
@@ -51,8 +60,29 @@ static uploadFileManager * cur_uploadFileShareInstance = nil;
         }];
     }
     
+    KWeakSelf
     if(_fileModelDataArr.count > 0){
-        [self beginUploadFileFun];
+        
+        //骚操作 重新查出来 拿到bg_id
+        [uploadFileDataModel bg_findAsync:upLoadFile_image_tableName limit:_fileModelDataArr.count orderBy:nil desc:YES complete:^(NSArray * _Nullable array) {
+            
+            for (int i=0; i<array.count; i++) {
+                uploadFileDataModel *bg_mod  = array[i];
+                
+                for (uploadFileDataModel *data_mod in _fileModelDataArr) {
+                    if([data_mod.filename isEqualToString:bg_mod.filename]){
+                        data_mod.bg_id = bg_mod.bg_id;
+                        //HLog(@"bg_id:%@",data_mod.bg_id);
+                        break;
+                    }
+                }
+            }
+            
+            [weakSelf beginUploadFileFun];
+        }];
+        
+        
+        //[self beginUploadFileFun];
     }
     
     return _fileModelDataArr;
@@ -68,45 +98,36 @@ static uploadFileManager * cur_uploadFileShareInstance = nil;
 //修改文件上传的状态
 - (void)changeUploadFileState:(uploadStateType)curUploadStateType withDidUploadBytes:(NSInteger)didUpLoadBytes  complete:(custom_complete_B)complete
 {
-//    _curUploadFileDataModel.imageData = nil;
-//    _curUploadFileDataModel.uploadType = uploadStateDone;
-//
-    
-    NSNumber * numberUploadState = nil;
-    
-    if(curUploadStateType == uploadStateDone)
-    {
-        numberUploadState =  [NSNumber numberWithInt:uploadStateUploading];
-    }
-    else{
-        numberUploadState =  [NSNumber numberWithInt:uploadStateDone];
-    }
     
+    //NSNumber * numberUploadState = nil;
     NSString* where = nil;
     
-    if(curUploadStateType == uploadStateDone)
-    {
-        where = [NSString stringWithFormat:@"where %@=%@ and %@=%@ ",bg_sqlKey(@"filename"),bg_sqlValue(_curUploadFileDataModel.filename),bg_sqlKey(@"uploadType"),bg_sqlValue(numberUploadState)];
-    }
-    else
-    {
-        where = [NSString stringWithFormat:@"where %@=%@ and %@!=%@ ",bg_sqlKey(@"filename"),bg_sqlValue(_curUploadFileDataModel.filename),bg_sqlKey(@"uploadType"),bg_sqlValue(numberUploadState)];
-    }
-    
+//    if(curUploadStateType == uploadStateDone)
+//    {//只有上传中的才可能是完成的
+//        numberUploadState =  [NSNumber numberWithInt:uploadStateUploading];
+//        where = [NSString stringWithFormat:@"where %@=%@ and %@=%@ ",bg_sqlKey(@"filename"),bg_sqlValue(_curUploadFileDataModel.filename),bg_sqlKey(@"curUploadStateType"),bg_sqlValue(numberUploadState)];
+//    }
+//    else
+//    {//查找非上传完成的
+//        numberUploadState =  [NSNumber numberWithInt:uploadStateDone];
+//        where = [NSString stringWithFormat:@"where %@=%@ and %@!=%@ ",bg_sqlKey(@"filename"),bg_sqlValue(_curUploadFileDataModel.filename),bg_sqlKey(@"curUploadStateType"),bg_sqlValue(numberUploadState)];
+//    }
     
+    where = [NSString stringWithFormat:@"where %@=%@ ",bg_sqlKey(@"bg_id"),bg_sqlValue(_curUploadFileDataModel.bg_id)];
+    HLog(@"ffff:%@",_curUploadFileDataModel.bg_id);
     
     [uploadFileDataModel bg_findAsync:upLoadFile_image_tableName where:where complete:^(NSArray * _Nullable array) {
         for (uploadFileDataModel * curModel in array) {
-            curModel.uploadType = curUploadStateType;
+            curModel.curUploadStateType = curUploadStateType;
             curModel.didUploadBytes = didUpLoadBytes;
             
-            if(curUploadStateType == uploadStateDone){
-                curModel.imageData = [NSData data];
-            }
-            
             [curModel bg_saveOrUpdateAsync:^(BOOL isSuccess) {
                 HLog(@"%@ 写入 %@", self->_curUploadFileDataModel.filename, isSuccess ? @"成功":@"失败");
             }];
+            
+            if(curUploadStateType == uploadStateDone){
+                HLog(@"");
+            }
         }
         
         complete(YES);

+ 1 - 1
创维盒子/双子星云手机/Class/Set/uploadFile/uoloadFileRecordViewController.h

@@ -11,7 +11,7 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface uoloadFileRecordViewController : BaseViewController
+@interface uploadFileRecordViewController : BaseViewController
 
 -(void)gotoUploadFile:(NSMutableArray*)indexPathsForSelectedItems;
 @end

+ 127 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileRecordViewController.m

@@ -0,0 +1,127 @@
+//
+//  uoloadFileRecordViewController.m
+//  隐私保护
+//
+//  Created by xd h on 2023/11/13.
+//
+
+#import "uploadFileRecordViewController.h"
+#import "uploadFileManager.h"
+#import "uploadFileDataModel.h"
+#import "uploadFileRecordheadView.h"
+#import "uploadFileRecordBodyView.h"
+
+@interface uploadFileRecordViewController ()
+
+//选中的项
+@property (nonatomic, strong) NSMutableArray *indexPathsForSelectedItems;
+@property (nonatomic, strong) uploadFileRecordheadView *uploadFileRecordheadV;
+@property (nonatomic, strong) uploadFileRecordBodyView *uploadFileRecordBodyV;
+@property (nonatomic, strong) NSMutableArray *allDataArr;
+@end
+
+@implementation uploadFileRecordViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    //[self.view setBackgroundColor:HWF5F7FAColor];
+    [self.view setBackgroundColor:[UIColor whiteColor]];
+    
+    self.titleLabel.text = NSLocalizedString(@"my_set_no_File_upload_record",nil) ;
+    
+    [self.toolBar setHidden:YES];
+    [self.navigationBar setHidden:YES];
+    [self.navBarBGView setHidden:NO];
+    self.navBarBGView.backgroundColor = [UIColor whiteColor];
+    
+    [self initbaseUIFun];
+    [self getDataInDatabaseFun];
+}
+
+#pragma mark UI
+- (void)initbaseUIFun
+{
+    _uploadFileRecordheadV = [[uploadFileRecordheadView alloc] init];
+    [self.view addSubview:_uploadFileRecordheadV];
+    
+    [_uploadFileRecordheadV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(15);
+        make.right.mas_equalTo(-15);
+        make.top.mas_equalTo(self.navBarBGView.mas_bottom).offset(15.0);
+        make.height.mas_equalTo(50);
+    }];
+    
+    KWeakSelf
+#pragma mark 头部点击事件
+    _uploadFileRecordheadV.didClickButFun = ^(NSInteger index) {
+        [weakSelf didClickHeadFun: index];
+    };
+    
+    _uploadFileRecordBodyV = [[uploadFileRecordBodyView alloc] init];
+    [self.view addSubview:_uploadFileRecordBodyV];
+    
+    [_uploadFileRecordBodyV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.top.mas_equalTo(_uploadFileRecordheadV.mas_bottom).offset(0.0);
+        make.bottom.mas_equalTo(0);
+    }];
+    
+    _uploadFileRecordBodyV.didScrollFun = ^(NSInteger index) {
+        [weakSelf didScorllBodyFun:index];
+    };
+}
+
+#pragma mark 头部点击 背景滚动
+- (void)didClickHeadFun:(NSInteger)index
+{
+    _uploadFileRecordBodyV.selectIndex = index;
+}
+
+- (void)didScorllBodyFun:(NSInteger)index
+{
+    _uploadFileRecordheadV.selectIndex = index;
+}
+
+-(void)gotoUploadFile:(NSMutableArray*)indexPathsForSelectedItems
+{
+    
+    _indexPathsForSelectedItems = [[uploadFileManager shareInstance] handlTZAssetModelToUploadFileDataFunBy:indexPathsForSelectedItems];
+    HLog(@"11");
+}
+
+#pragma mark 读取数据库数据
+- (void)getDataInDatabaseFun
+{
+    _allDataArr = [NSMutableArray new];
+    
+    KWeakSelf
+    [uploadFileDataModel bg_findAllAsync:upLoadFile_image_tableName complete:^(NSArray * _Nullable array) {
+        NSMutableArray *failArr = [NSMutableArray new];
+        NSMutableArray *doneArr = [NSMutableArray new];
+        NSMutableArray *otherArr = [NSMutableArray new];
+        
+            for (uploadFileDataModel * curModel in array) {
+                if(curModel.curUploadStateType == uploadStateFail){
+                    [failArr addObject:curModel];
+                }
+                else if(curModel.curUploadStateType == uploadStateDone){
+                    [doneArr addObject:curModel];
+                }
+                else{
+                    [otherArr addObject:curModel];
+                }
+            }
+        
+        [self->_allDataArr addObject:otherArr];
+        [self->_allDataArr addObject:doneArr];
+        [self->_allDataArr addObject:failArr];
+        
+        weakSelf.uploadFileRecordBodyV.allDataArr = self->_allDataArr;
+    }];
+
+}
+
+@end

+ 2 - 2
创维盒子/双子星云手机/Class/Set/uploadFile/uploadImageOrVideoViewController.m

@@ -14,7 +14,7 @@
 #import "uploadFileBottomView.h"
 #import "PhotoPreviewViewController.h"
 #import "TZAssetModel+imageData.h"
-#import "uoloadFileRecordViewController.h"
+#import "uploadFileRecordViewController.h"
 
 @interface uploadImageOrVideoViewController ()<AJPhotoGroupViewProtocol,UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout>
 
@@ -448,7 +448,7 @@
 #pragma mark 跳转上传记录
 - (void)gotoUploadFileRecordFun
 {
-    uoloadFileRecordViewController *vc = [uoloadFileRecordViewController new];
+    uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
     [self.navigationController pushViewController:vc animated:YES];
     
     [vc gotoUploadFile:_indexPathsForSelectedItems];

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

@@ -257,3 +257,4 @@
 "my_set_no_image_upload"   = "上传图片";
 "my_set_no_video_upload"   = "上传视频";
 "my_set_no_File_upload"   = "上传";
+"File_upload_Record_no_data"   = "暂无上传记录~";