Selaa lähdekoodia

1.项目适配完善

time 6 vuotta sitten
vanhempi
commit
d006a7927d
31 muutettua tiedostoa jossa 1493 lisäystä ja 135 poistoa
  1. 5 3
      UU_Ent/Podfile
  2. 78 0
      UU_Ent/UU_Ent.xcodeproj/project.pbxproj
  3. 21 117
      UU_Ent/UU_Ent/Modules/Loading/Main/Controllers/YRLoadingVC.m
  4. 3 0
      UU_Ent/UU_Ent/Modules/Loading/Main/Others/YRLoadImgCacheTool.h
  5. 389 2
      UU_Ent/UU_Ent/Modules/Loading/Main/Others/YRLoadImgCacheTool.m
  6. 24 3
      UU_Ent/UU_Ent/Modules/Loading/Main/Views/YRAdView.m
  7. 6 0
      UU_Ent/UU_Ent/Modules/Loading/Main/Views/YRCountDownView.m
  8. 5 5
      UU_Ent/UU_Ent/Modules/Main/Main/Controllers/YRMainVC.m
  9. 1 3
      UU_Ent/UU_Ent/Modules/Main/Main/Views/YRTabBar.m
  10. 19 0
      UU_Ent/UU_Ent/Modules/Message/Main/Controllers/YRMsgVC.m
  11. 1 1
      UU_Ent/UU_Ent/Modules/Message/Main/Others/msg_route.json
  12. 19 0
      UU_Ent/UU_Ent/Modules/Work/Docu/Controllers/YRDocuVC.h
  13. 182 0
      UU_Ent/UU_Ent/Modules/Work/Docu/Controllers/YRDocuVC.m
  14. 25 0
      UU_Ent/UU_Ent/Modules/Work/Docu/Models/YRDocuModel.h
  15. 24 0
      UU_Ent/UU_Ent/Modules/Work/Docu/Models/YRDocuModel.m
  16. 23 0
      UU_Ent/UU_Ent/Modules/Work/Docu/Views/YRDocuCell.h
  17. 156 0
      UU_Ent/UU_Ent/Modules/Work/Docu/Views/YRDocuCell.m
  18. 2 0
      UU_Ent/UU_Ent/Modules/Work/Main/Controllers/YRWorkVC.m
  19. 6 0
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Empty/Contents.json
  20. 23 0
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Empty/empty_placeholder.imageset/Contents.json
  21. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Empty/empty_placeholder.imageset/empty_placeholder@1x.png
  22. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Empty/empty_placeholder.imageset/empty_placeholder@2x.png
  23. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Empty/empty_placeholder.imageset/empty_placeholder@3x.png
  24. 2 0
      UU_Ent/UU_Ent/Supporting Files/defines/common.h
  25. 3 1
      UU_Ent/UU_Ent/Supporting Files/defines/import.h
  26. 20 0
      UU_Ent/UU_Ent/Utils/NSString/NSString+device.h
  27. 110 0
      UU_Ent/UU_Ent/Utils/NSString/NSString+device.m
  28. 78 0
      UU_Ent/UU_Ent/Utils/Network/YRNetworkManager.h
  29. 168 0
      UU_Ent/UU_Ent/Utils/Network/YRNetworkManager.m
  30. 12 0
      UU_Ent/UU_Ent/Utils/tableView/YRTableView.h
  31. 88 0
      UU_Ent/UU_Ent/Utils/tableView/YRTableView.m

+ 5 - 3
UU_Ent/Podfile

@@ -6,15 +6,17 @@ target 'UU_Ent' do
   # use_frameworks!
   # use_frameworks!
 
 
   # Pods for UU_Ent
   # Pods for UU_Ent
-
+  
     pod 'UU_Ent', :path => '.'
     pod 'UU_Ent', :path => '.'
-    pod 'Masonry'
+    pod 'Masonry' 
     pod 'MJExtension'
     pod 'MJExtension'
     pod 'MJRefresh'
     pod 'MJRefresh'
     pod 'ReactiveObjC'
     pod 'ReactiveObjC'
-    pod 'SDWebImage'
+    pod 'SDWebImage' =>'4.4.6'
     pod 'IQKeyboardManager'
     pod 'IQKeyboardManager'
     pod 'MBProgressHUD'
     pod 'MBProgressHUD'
+    pod 'AFNetworking'
+    pod 'DZNEmptyDataSet'
     
     
   target 'UU_EntTests' do
   target 'UU_EntTests' do
     inherit! :search_paths
     inherit! :search_paths

+ 78 - 0
UU_Ent/UU_Ent.xcodeproj/project.pbxproj

@@ -40,7 +40,11 @@
 		999F6516227E688600329012 /* UIView+selector.m in Sources */ = {isa = PBXBuildFile; fileRef = 999F6515227E688600329012 /* UIView+selector.m */; };
 		999F6516227E688600329012 /* UIView+selector.m in Sources */ = {isa = PBXBuildFile; fileRef = 999F6515227E688600329012 /* UIView+selector.m */; };
 		999F651A227E697D00329012 /* UILabel+vertical.m in Sources */ = {isa = PBXBuildFile; fileRef = 999F6519227E697D00329012 /* UILabel+vertical.m */; };
 		999F651A227E697D00329012 /* UILabel+vertical.m in Sources */ = {isa = PBXBuildFile; fileRef = 999F6519227E697D00329012 /* UILabel+vertical.m */; };
 		999F651E227E6A6000329012 /* NSString+regular.m in Sources */ = {isa = PBXBuildFile; fileRef = 999F651D227E6A6000329012 /* NSString+regular.m */; };
 		999F651E227E6A6000329012 /* NSString+regular.m in Sources */ = {isa = PBXBuildFile; fileRef = 999F651D227E6A6000329012 /* NSString+regular.m */; };
+		99B06C7022CDA18700D21A36 /* YRDocuVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 99B06C6F22CDA18700D21A36 /* YRDocuVC.m */; };
+		99B06C7322CDA1A800D21A36 /* YRDocuModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 99B06C7222CDA1A800D21A36 /* YRDocuModel.m */; };
+		99B06C7622CDA1BE00D21A36 /* YRDocuCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 99B06C7522CDA1BE00D21A36 /* YRDocuCell.m */; };
 		99B4252F22815E2900DAE304 /* YRAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 99B4252E22815E2900DAE304 /* YRAlertView.m */; };
 		99B4252F22815E2900DAE304 /* YRAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 99B4252E22815E2900DAE304 /* YRAlertView.m */; };
+		99C0146522964BEB0057D7B2 /* NSString+device.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C0146422964BEB0057D7B2 /* NSString+device.m */; };
 		99C16340227FD24E002ED79D /* YRWorkConModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C1633F227FD24E002ED79D /* YRWorkConModel.m */; };
 		99C16340227FD24E002ED79D /* YRWorkConModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C1633F227FD24E002ED79D /* YRWorkConModel.m */; };
 		99C16342227FDE64002ED79D /* work_route.json in Resources */ = {isa = PBXBuildFile; fileRef = 99C16341227FDE64002ED79D /* work_route.json */; };
 		99C16342227FDE64002ED79D /* work_route.json in Resources */ = {isa = PBXBuildFile; fileRef = 99C16341227FDE64002ED79D /* work_route.json */; };
 		99C16345228027C8002ED79D /* YRMsgHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C16344228027C8002ED79D /* YRMsgHeader.m */; };
 		99C16345228027C8002ED79D /* YRMsgHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C16344228027C8002ED79D /* YRMsgHeader.m */; };
@@ -62,6 +66,7 @@
 		99C6FF1B2276DD3900C7070A /* YRTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FF1A2276DD3900C7070A /* YRTableView.m */; };
 		99C6FF1B2276DD3900C7070A /* YRTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FF1A2276DD3900C7070A /* YRTableView.m */; };
 		99C6FF232276E4C000C7070A /* YRMsgMainCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FF222276E4C000C7070A /* YRMsgMainCell.m */; };
 		99C6FF232276E4C000C7070A /* YRMsgMainCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FF222276E4C000C7070A /* YRMsgMainCell.m */; };
 		99C6FF262276FAE000C7070A /* YRMsgMainModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FF242276FAE000C7070A /* YRMsgMainModel.m */; };
 		99C6FF262276FAE000C7070A /* YRMsgMainModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FF242276FAE000C7070A /* YRMsgMainModel.m */; };
+		99F3F30822A61F010061CB23 /* YRNetworkManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 99F3F30722A61F010061CB23 /* YRNetworkManager.m */; };
 		99F4A73D2277D1B8009AA6ED /* YRLoadImgCacheTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 99F4A73C2277D1B8009AA6ED /* YRLoadImgCacheTool.m */; };
 		99F4A73D2277D1B8009AA6ED /* YRLoadImgCacheTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 99F4A73C2277D1B8009AA6ED /* YRLoadImgCacheTool.m */; };
 		99F4A7402277D2DF009AA6ED /* YRLoadingVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 99F4A73F2277D2DF009AA6ED /* YRLoadingVC.m */; };
 		99F4A7402277D2DF009AA6ED /* YRLoadingVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 99F4A73F2277D2DF009AA6ED /* YRLoadingVC.m */; };
 		99F4A7432277D332009AA6ED /* YRCountDownView.m in Sources */ = {isa = PBXBuildFile; fileRef = 99F4A7422277D332009AA6ED /* YRCountDownView.m */; };
 		99F4A7432277D332009AA6ED /* YRCountDownView.m in Sources */ = {isa = PBXBuildFile; fileRef = 99F4A7422277D332009AA6ED /* YRCountDownView.m */; };
@@ -220,8 +225,16 @@
 		999F6519227E697D00329012 /* UILabel+vertical.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UILabel+vertical.m"; sourceTree = "<group>"; };
 		999F6519227E697D00329012 /* UILabel+vertical.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UILabel+vertical.m"; sourceTree = "<group>"; };
 		999F651C227E6A6000329012 /* NSString+regular.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+regular.h"; sourceTree = "<group>"; };
 		999F651C227E6A6000329012 /* NSString+regular.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+regular.h"; sourceTree = "<group>"; };
 		999F651D227E6A6000329012 /* NSString+regular.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+regular.m"; sourceTree = "<group>"; };
 		999F651D227E6A6000329012 /* NSString+regular.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+regular.m"; sourceTree = "<group>"; };
+		99B06C6E22CDA18700D21A36 /* YRDocuVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRDocuVC.h; sourceTree = "<group>"; };
+		99B06C6F22CDA18700D21A36 /* YRDocuVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRDocuVC.m; sourceTree = "<group>"; };
+		99B06C7122CDA1A800D21A36 /* YRDocuModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRDocuModel.h; sourceTree = "<group>"; };
+		99B06C7222CDA1A800D21A36 /* YRDocuModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRDocuModel.m; sourceTree = "<group>"; };
+		99B06C7422CDA1BE00D21A36 /* YRDocuCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRDocuCell.h; sourceTree = "<group>"; };
+		99B06C7522CDA1BE00D21A36 /* YRDocuCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRDocuCell.m; sourceTree = "<group>"; };
 		99B4252D22815E2900DAE304 /* YRAlertView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRAlertView.h; sourceTree = "<group>"; };
 		99B4252D22815E2900DAE304 /* YRAlertView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRAlertView.h; sourceTree = "<group>"; };
 		99B4252E22815E2900DAE304 /* YRAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRAlertView.m; sourceTree = "<group>"; };
 		99B4252E22815E2900DAE304 /* YRAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRAlertView.m; sourceTree = "<group>"; };
+		99C0146322964BEB0057D7B2 /* NSString+device.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+device.h"; sourceTree = "<group>"; };
+		99C0146422964BEB0057D7B2 /* NSString+device.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+device.m"; sourceTree = "<group>"; };
 		99C1633E227FD24E002ED79D /* YRWorkConModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRWorkConModel.h; sourceTree = "<group>"; };
 		99C1633E227FD24E002ED79D /* YRWorkConModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRWorkConModel.h; sourceTree = "<group>"; };
 		99C1633F227FD24E002ED79D /* YRWorkConModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRWorkConModel.m; sourceTree = "<group>"; };
 		99C1633F227FD24E002ED79D /* YRWorkConModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRWorkConModel.m; sourceTree = "<group>"; };
 		99C16341227FDE64002ED79D /* work_route.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = work_route.json; sourceTree = "<group>"; };
 		99C16341227FDE64002ED79D /* work_route.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = work_route.json; sourceTree = "<group>"; };
@@ -268,6 +281,8 @@
 		99C6FF222276E4C000C7070A /* YRMsgMainCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRMsgMainCell.m; sourceTree = "<group>"; };
 		99C6FF222276E4C000C7070A /* YRMsgMainCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRMsgMainCell.m; sourceTree = "<group>"; };
 		99C6FF242276FAE000C7070A /* YRMsgMainModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YRMsgMainModel.m; sourceTree = "<group>"; };
 		99C6FF242276FAE000C7070A /* YRMsgMainModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YRMsgMainModel.m; sourceTree = "<group>"; };
 		99C6FF252276FAE000C7070A /* YRMsgMainModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YRMsgMainModel.h; sourceTree = "<group>"; };
 		99C6FF252276FAE000C7070A /* YRMsgMainModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YRMsgMainModel.h; sourceTree = "<group>"; };
+		99F3F30622A61F010061CB23 /* YRNetworkManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRNetworkManager.h; sourceTree = "<group>"; };
+		99F3F30722A61F010061CB23 /* YRNetworkManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRNetworkManager.m; sourceTree = "<group>"; };
 		99F4A73B2277D1B8009AA6ED /* YRLoadImgCacheTool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRLoadImgCacheTool.h; sourceTree = "<group>"; };
 		99F4A73B2277D1B8009AA6ED /* YRLoadImgCacheTool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRLoadImgCacheTool.h; sourceTree = "<group>"; };
 		99F4A73C2277D1B8009AA6ED /* YRLoadImgCacheTool.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRLoadImgCacheTool.m; sourceTree = "<group>"; };
 		99F4A73C2277D1B8009AA6ED /* YRLoadImgCacheTool.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRLoadImgCacheTool.m; sourceTree = "<group>"; };
 		99F4A73E2277D2DF009AA6ED /* YRLoadingVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRLoadingVC.h; sourceTree = "<group>"; };
 		99F4A73E2277D2DF009AA6ED /* YRLoadingVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRLoadingVC.h; sourceTree = "<group>"; };
@@ -597,10 +612,57 @@
 			children = (
 			children = (
 				999F651C227E6A6000329012 /* NSString+regular.h */,
 				999F651C227E6A6000329012 /* NSString+regular.h */,
 				999F651D227E6A6000329012 /* NSString+regular.m */,
 				999F651D227E6A6000329012 /* NSString+regular.m */,
+				99C0146322964BEB0057D7B2 /* NSString+device.h */,
+				99C0146422964BEB0057D7B2 /* NSString+device.m */,
 			);
 			);
 			path = NSString;
 			path = NSString;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
 		};
 		};
+		99B06C6922CDA12900D21A36 /* Docu */ = {
+			isa = PBXGroup;
+			children = (
+				99B06C6D22CDA16000D21A36 /* Others */,
+				99B06C6C22CDA15300D21A36 /* Models */,
+				99B06C6B22CDA14900D21A36 /* Controllers */,
+				99B06C6A22CDA13400D21A36 /* Views */,
+			);
+			path = Docu;
+			sourceTree = "<group>";
+		};
+		99B06C6A22CDA13400D21A36 /* Views */ = {
+			isa = PBXGroup;
+			children = (
+				99B06C7422CDA1BE00D21A36 /* YRDocuCell.h */,
+				99B06C7522CDA1BE00D21A36 /* YRDocuCell.m */,
+			);
+			path = Views;
+			sourceTree = "<group>";
+		};
+		99B06C6B22CDA14900D21A36 /* Controllers */ = {
+			isa = PBXGroup;
+			children = (
+				99B06C6E22CDA18700D21A36 /* YRDocuVC.h */,
+				99B06C6F22CDA18700D21A36 /* YRDocuVC.m */,
+			);
+			path = Controllers;
+			sourceTree = "<group>";
+		};
+		99B06C6C22CDA15300D21A36 /* Models */ = {
+			isa = PBXGroup;
+			children = (
+				99B06C7122CDA1A800D21A36 /* YRDocuModel.h */,
+				99B06C7222CDA1A800D21A36 /* YRDocuModel.m */,
+			);
+			path = Models;
+			sourceTree = "<group>";
+		};
+		99B06C6D22CDA16000D21A36 /* Others */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = Others;
+			sourceTree = "<group>";
+		};
 		99B4252C22815E0700DAE304 /* AlertView */ = {
 		99B4252C22815E0700DAE304 /* AlertView */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
@@ -707,6 +769,7 @@
 		99C6FE8122768EC000C7070A /* Work */ = {
 		99C6FE8122768EC000C7070A /* Work */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				99B06C6922CDA12900D21A36 /* Docu */,
 				99C6FE9A2276933100C7070A /* Main */,
 				99C6FE9A2276933100C7070A /* Main */,
 			);
 			);
 			path = Work;
 			path = Work;
@@ -771,6 +834,7 @@
 		99C6FE8D22768EC000C7070A /* Utils */ = {
 		99C6FE8D22768EC000C7070A /* Utils */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				99F3F30522A61ED40061CB23 /* Network */,
 				991C14652282D8100080B54A /* encode */,
 				991C14652282D8100080B54A /* encode */,
 				2710E66B2281744C0002A4B0 /* UIPopoverListView */,
 				2710E66B2281744C0002A4B0 /* UIPopoverListView */,
 				99B4252C22815E0700DAE304 /* AlertView */,
 				99B4252C22815E0700DAE304 /* AlertView */,
@@ -1063,6 +1127,15 @@
 			path = defines;
 			path = defines;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
 		};
 		};
+		99F3F30522A61ED40061CB23 /* Network */ = {
+			isa = PBXGroup;
+			children = (
+				99F3F30622A61F010061CB23 /* YRNetworkManager.h */,
+				99F3F30722A61F010061CB23 /* YRNetworkManager.m */,
+			);
+			path = Network;
+			sourceTree = "<group>";
+		};
 		99F4A7352277CFDD009AA6ED /* Loading */ = {
 		99F4A7352277CFDD009AA6ED /* Loading */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
@@ -1505,6 +1578,7 @@
 				991C14742282D89C0080B54A /* RSA.m in Sources */,
 				991C14742282D89C0080B54A /* RSA.m in Sources */,
 				99C6FECB227696CA00C7070A /* YRMsgVC.m in Sources */,
 				99C6FECB227696CA00C7070A /* YRMsgVC.m in Sources */,
 				99C16340227FD24E002ED79D /* YRWorkConModel.m in Sources */,
 				99C16340227FD24E002ED79D /* YRWorkConModel.m in Sources */,
+				99C0146522964BEB0057D7B2 /* NSString+device.m in Sources */,
 				99C6FF262276FAE000C7070A /* YRMsgMainModel.m in Sources */,
 				99C6FF262276FAE000C7070A /* YRMsgMainModel.m in Sources */,
 				2710E66522815DCF0002A4B0 /* YRMineCell.m in Sources */,
 				2710E66522815DCF0002A4B0 /* YRMineCell.m in Sources */,
 				99F4A7462277D503009AA6ED /* YRAdView.m in Sources */,
 				99F4A7462277D503009AA6ED /* YRAdView.m in Sources */,
@@ -1521,15 +1595,19 @@
 				270E6C9B2282E6D0008B12B9 /* UINavigationController+safe.m in Sources */,
 				270E6C9B2282E6D0008B12B9 /* UINavigationController+safe.m in Sources */,
 				99F4A73D2277D1B8009AA6ED /* YRLoadImgCacheTool.m in Sources */,
 				99F4A73D2277D1B8009AA6ED /* YRLoadImgCacheTool.m in Sources */,
 				99C6FECE227697DA00C7070A /* YRContactVC.m in Sources */,
 				99C6FECE227697DA00C7070A /* YRContactVC.m in Sources */,
+				99B06C7622CDA1BE00D21A36 /* YRDocuCell.m in Sources */,
 				99C6FEC82276966600C7070A /* YRWebVC.m in Sources */,
 				99C6FEC82276966600C7070A /* YRWebVC.m in Sources */,
 				99C6FEC02276957400C7070A /* YRMineVC.m in Sources */,
 				99C6FEC02276957400C7070A /* YRMineVC.m in Sources */,
 				2710E66022801ED10002A4B0 /* YRShowMessageFromNavi.m in Sources */,
 				2710E66022801ED10002A4B0 /* YRShowMessageFromNavi.m in Sources */,
 				2710E66822815E030002A4B0 /* YRMineModel.m in Sources */,
 				2710E66822815E030002A4B0 /* YRMineModel.m in Sources */,
+				99B06C7022CDA18700D21A36 /* YRDocuVC.m in Sources */,
 				99C6FF1B2276DD3900C7070A /* YRTableView.m in Sources */,
 				99C6FF1B2276DD3900C7070A /* YRTableView.m in Sources */,
 				27029BD32277E16300D53A94 /* YRButton.m in Sources */,
 				27029BD32277E16300D53A94 /* YRButton.m in Sources */,
 				27029BCC2277063F00D53A94 /* UIColor+HexColor.m in Sources */,
 				27029BCC2277063F00D53A94 /* UIColor+HexColor.m in Sources */,
 				2710E65822801B930002A4B0 /* YRPwdLevelView.m in Sources */,
 				2710E65822801B930002A4B0 /* YRPwdLevelView.m in Sources */,
+				99B06C7322CDA1A800D21A36 /* YRDocuModel.m in Sources */,
 				99F4A7402277D2DF009AA6ED /* YRLoadingVC.m in Sources */,
 				99F4A7402277D2DF009AA6ED /* YRLoadingVC.m in Sources */,
+				99F3F30822A61F010061CB23 /* YRNetworkManager.m in Sources */,
 				99C6FE8F22768EC000C7070A /* AppDelegate.m in Sources */,
 				99C6FE8F22768EC000C7070A /* AppDelegate.m in Sources */,
 				999F6516227E688600329012 /* UIView+selector.m in Sources */,
 				999F6516227E688600329012 /* UIView+selector.m in Sources */,
 				999F651E227E6A6000329012 /* NSString+regular.m in Sources */,
 				999F651E227E6A6000329012 /* NSString+regular.m in Sources */,

+ 21 - 117
UU_Ent/UU_Ent/Modules/Loading/Main/Controllers/YRLoadingVC.m

@@ -31,23 +31,23 @@
     
     
     NSMutableArray *imageArr = [NSMutableArray array];
     NSMutableArray *imageArr = [NSMutableArray array];
     
     
-    imageArr = [self getCacheAppImages];
+    imageArr = [[YRLoadImgCacheTool shareInstance] getCacheAppImages];
+    
+    if ([[NSString deviceString] containsString:@"4"]) {
+
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+
+
+            if(self.aniCompleted){
+
+                self.aniCompleted();
+
+            }
+        });
+
+
+    }else{
     
     
-//    if ([[NSString deviceString] containsString:@"4"]) {
-//        
-//        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-//            
-//            
-//            if(self.aniCompleted){
-//                
-//                self.aniCompleted();
-//                
-//            }
-//        });
-//        
-//        
-//    }else{
-        
         
         
         if (imageArr.count == 0) {
         if (imageArr.count == 0) {
             
             
@@ -55,10 +55,8 @@
                 
                 
                 NSString *imageStr = nil;
                 NSString *imageStr = nil;
                 
                 
-                
                 imageStr = [NSString stringWithFormat:@"loading%d",i];
                 imageStr = [NSString stringWithFormat:@"loading%d",i];
                 
                 
-                
                 NSString *path = [[NSBundle mainBundle] pathForResource:imageStr ofType:@"png"];
                 NSString *path = [[NSBundle mainBundle] pathForResource:imageStr ofType:@"png"];
                 
                 
                 UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfFile:path]];
                 UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfFile:path]];
@@ -71,6 +69,7 @@
                 
                 
             }
             }
             
             
+            
             imageView.animationImages = imageArr;
             imageView.animationImages = imageArr;
             
             
             imageView.animationDuration = 1.8;
             imageView.animationDuration = 1.8;
@@ -129,9 +128,9 @@
             
             
             imageView.image = (UIImage *)imageArr[index];
             imageView.image = (UIImage *)imageArr[index];
             
             
-//            @weakify(self)
+            @weakify(self)
             YRCountDownView *countView = [[YRCountDownView alloc]initWithFrame:CGRectMake(self.view.frame.size.width-54, 30, 40, 40) interval:5 completed:^{
             YRCountDownView *countView = [[YRCountDownView alloc]initWithFrame:CGRectMake(self.view.frame.size.width-54, 30, 40, 40) interval:5 completed:^{
-//                @strongify(self)
+                @strongify(self)
                 [imageView stopAnimating];
                 [imageView stopAnimating];
                 if (self.aniCompleted) {
                 if (self.aniCompleted) {
                     
                     
@@ -147,107 +146,11 @@
         }
         }
         
         
     
     
-    
-}
-
-
--(NSMutableArray<UIImage *> *)getCacheAppImages{
-    
-    NSMutableArray *imgArr = [NSMutableArray new];
-    
-    NSString *filePath = [self getFilePath];
-    
-    NSFileManager *fileManager = [NSFileManager defaultManager];
-    
-    NSArray<NSString *> *fileAr = [[NSArray alloc] initWithArray:[fileManager contentsOfDirectoryAtPath:filePath error:nil]];
-    
-    NSMutableArray<NSString *> *fileArr = [fileAr mutableCopy];
-    
-    if(fileArr.count== 0){
-        
-        return imgArr;
-        
-    }else if(fileArr.count==1){
-        
-        if([fileArr[0] containsString:@".png"]){
-            
-            NSString *imagePath = [filePath stringByAppendingPathComponent:fileArr[0]];
-            
-            UIImage *image = [UIImage imageWithContentsOfFile:imagePath];
-            
-            if(image && [image isKindOfClass:[UIImage class]]){
-                
-                [imgArr addObject:image];
-                
-            }
-            
-        }
-        
-        return imgArr;
-        
-    }else{
-        
-        
-        
-        for(int i=0;i<fileArr.count;i++){
-            
-            for(int j=0;j<fileArr.count-i-1;j++){
-                
-                NSString *fileNam = fileArr[j];
-                NSString *fileName = fileArr[j+1];
-                
-                fileNam = [fileNam stringByReplacingOccurrencesOfString:@"loadingAd" withString:@""];
-                fileNam = [fileNam stringByReplacingOccurrencesOfString:@".png" withString:@""];
-                NSInteger fileI = [fileNam integerValue];
-                fileName = [fileName stringByReplacingOccurrencesOfString:@"loadingAd" withString:@""];
-                fileName = [fileName stringByReplacingOccurrencesOfString:@".png" withString:@""];
-                NSInteger fileIn = [fileName integerValue];
-                if(fileI > fileIn){
-                    
-                    id temp = fileArr[j];
-                    fileArr[j] = fileArr[j+1];
-                    fileArr[j+1] = temp;
-                    
-                }
-                
-                
-            }
-            
-        }
-        
-        for (int i= 0; i<fileArr.count; i++) {
-            
-            NSString *filePath = [[self getFilePath] stringByAppendingPathComponent:fileArr[i]];
-            
-            UIImage *image = [UIImage imageWithContentsOfFile:filePath];
-            
-            if(image && [image isKindOfClass:[UIImage class]]){
-                
-                [imgArr addObject:image];
-                
-            }
-            
-        }
-        
-        return imgArr;
-        
     }
     }
-    
-    
 }
 }
 
 
 
 
--(NSString *)getFilePath{
-    
-    NSString *filePath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject;
-    
-    filePath = [filePath stringByAppendingPathComponent:@"appLoad"];
-    
-    [[NSFileManager defaultManager] createDirectoryAtPath:filePath withIntermediateDirectories:YES attributes:nil error:nil];
-    
-    return filePath;
-    
-}
+
 
 
 
 
 - (void)didReceiveMemoryWarning {
 - (void)didReceiveMemoryWarning {
@@ -259,6 +162,7 @@
 
 
 -(void)dealloc{
 -(void)dealloc{
     
     
+
     
     
 }
 }
 
 

+ 3 - 0
UU_Ent/UU_Ent/Modules/Loading/Main/Others/YRLoadImgCacheTool.h

@@ -17,6 +17,9 @@ NS_ASSUME_NONNULL_BEGIN
 
 
 -(void)getAppLoadImage;
 -(void)getAppLoadImage;
 
 
+
+-(NSMutableArray<UIImage *> *)getCacheAppImages;
+
 @end
 @end
 
 
 NS_ASSUME_NONNULL_END
 NS_ASSUME_NONNULL_END

+ 389 - 2
UU_Ent/UU_Ent/Modules/Loading/Main/Others/YRLoadImgCacheTool.m

@@ -19,7 +19,6 @@ static YRLoadImgCacheTool *instance = nil;
         dispatch_once(&onceToken, ^{
         dispatch_once(&onceToken, ^{
             
             
             instance = [YRLoadImgCacheTool new];
             instance = [YRLoadImgCacheTool new];
-          
             
             
         });
         });
         
         
@@ -27,8 +26,396 @@ static YRLoadImgCacheTool *instance = nil;
     
     
 }
 }
 
 
--(void)getAppLoadImage{}
 
 
+#pragma mark - app启动图管理
+-(void)getAppLoadImage{
+    
+    
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+
+        [self configSdWebImage];
+
+    });
+
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+
+        //        http://113.105.74.140:8092/user/appStart
+        //        http://192.168.253.36/men.json
+        NSString *urlStr = [NSString stringWithFormat:@"http://113.105.74.140:8092/user/appStart"];
+
+        NSDictionary *dic = @{@"token":@(1)};
+
+        [[YRNetworkManager shareManager] request:urlStr method:GET parameters:dic progress:nil success:^(NSURLSessionDataTask *task, id responseObject) {
+
+            @try{//防止刚启动出现异常
+
+                NSDictionary *resDic = responseObject;
+
+                if ([responseObject isKindOfClass:[NSData class]]) {
+
+                    resDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
+
+                }
+
+                NSArray *arr = resDic[@"result"];
+
+                if (![arr isKindOfClass:[NSArray class]]) {
+
+                    arr = [NSArray new];
+
+                }
+
+                if (arr.count > 0) {
+
+                    NSDictionary *dic = arr[0];
+
+                    NSString *urlStrOne = dic[@"aa_urlc"];
+
+                    if ([urlStrOne isKindOfClass:[NSString class]]) {
+
+                        if ([urlStrOne containsString:@"http:"]) {
+
+                            NSString *theLast = [NSString stringWithFormat:@"%@",[[NSUserDefaults standardUserDefaults] objectForKey:@"theLastAppLoadImagesUrl"]];
+
+                            if(![theLast isEqualToString:urlStrOne]){//如果最后的链接是不一样的,更新本地图片数据
+
+                                dispatch_async(dispatch_get_global_queue(0, 0), ^{
+
+                                    [self clearImageCache];
+
+                                    NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:urlStrOne]];
+
+                                    if(![urlStrOne containsString:@".gif"]){//单张图片
+
+                                        UIImage *image = [UIImage imageWithData:data];
+
+                                        if (image){
+
+                                            NSString *filePath = [self getFilePath];
+
+                                            if ([[NSFileManager defaultManager] createDirectoryAtPath:filePath withIntermediateDirectories:YES attributes:nil error:nil]) {
+
+                                                NSString *str = [NSString stringWithFormat:@"loadingAd.png"];
+
+                                                filePath = [filePath stringByAppendingPathComponent:str];
+
+                                                if([[NSFileManager defaultManager] createFileAtPath:filePath contents:data attributes:nil]){
+
+                                                    [[NSUserDefaults standardUserDefaults] setObject:urlStrOne forKey:@"theLastAppLoadImagesUrl"];
+
+                                                };
+
+                                            }
+
+
+                                        }
+
+                                    }else{//gif图片
+
+                                        [self cacheGifImageWithUrl:urlStrOne];
+
+                                    }
+                                });
+                            }else{//如果链接是一样的并且是gif图片,则查看本地的数据是否是对的
+
+                                if([urlStrOne containsString:@".gif"]){
+
+                                    NSURL *fileUrl = [NSURL URLWithString:[NSString stringWithFormat:@"%@",urlStrOne]];
+                                    CGImageSourceRef gifSource = CGImageSourceCreateWithURL((CFURLRef)fileUrl, NULL);
+                                    size_t gifCount = CGImageSourceGetCount(gifSource);
+                                    NSInteger count = [self getCacheAppImages].count;
+
+                                    if(gifCount != count){//如果数量不一致,则存储可能出错
+
+                                        dispatch_async(dispatch_get_global_queue(0, 0), ^{
 
 
+                                            [self clearImageCache];
+
+                                            [self cacheGifImageWithUrl:urlStrOne];
+
+                                        });
+
+
+
+                                    }
+
+
+                                }
+
+
+                            }
+
+                        }
+
+                    }
+                }else{
+
+
+
+                    [self clearImageCache];
+                    [[NSUserDefaults standardUserDefaults] setObject:@"noImage" forKey:@"theLastAppLoadImagesUrl"];
+
+                }
+
+            } @catch (NSException *exception) {//出现异常,清数据
+
+
+                [self clearImageCache];
+                [[NSUserDefaults standardUserDefaults] setObject:@"noImage" forKey:@"theLastAppLoadImagesUrl"];
+                instance = nil;
+
+            } @finally {
+
+                instance = nil;
+
+            }
+
+        } failure:^(NSURLSessionDataTask *task, NSError *error) {
+
+
+
+        }];
+
+    });
+    
+}
+
+
+-(void)cacheGifImageWithUrl:(NSString *)url{
+    
+    [self clearImageCache];
+    
+    if (url == nil) {
+        
+        url = @"";
+        
+    }
+    
+    NSURL *fileUrl = [NSURL URLWithString:[NSString stringWithFormat:@"%@",url]];
+    CGImageSourceRef gifSource = CGImageSourceCreateWithURL((CFURLRef)fileUrl, NULL);
+    size_t gifCount = CGImageSourceGetCount(gifSource);
+    NSMutableArray *imageArr = [[NSMutableArray alloc]init];
+    
+    BOOL result = YES;
+    
+    for (int i = 0; i< gifCount; i++) {
+        
+        CGImageRef imageRef = CGImageSourceCreateImageAtIndex(gifSource, i, NULL);
+        UIImage *image = [UIImage imageWithCGImage:imageRef];
+        
+        if (image != nil) {
+            
+            [imageArr addObject:image];
+            
+            if(![self cacheImageWithImage:image index:i]){
+                
+                result = NO;
+                break;
+                
+            }
+            
+        }
+        CGImageRelease(imageRef);
+    }
+    
+    
+    if(result){//存储成功
+        
+        [[NSUserDefaults standardUserDefaults] setObject:url forKey:@"theLastAppLoadImagesUrl"];
+        
+    }else{//某张图片存储发生错误,全部清除
+        
+        [self clearImageCache];
+        
+    }
+    
+    
+}
+
+
+-(BOOL)cacheImageWithImage:(UIImage *)image index:(int)index{
+    
+    
+    NSData *data = UIImagePNGRepresentation(image);
+    
+    NSString *str = [NSString stringWithFormat:@"loadingAd%d.png",index];
+    
+    NSString *filePath = [self getFilePath];
+    
+    filePath = [filePath stringByAppendingPathComponent:str];
+    
+    return [[NSFileManager defaultManager] createFileAtPath:filePath contents:data attributes:nil];
+    
+}
+
+-(void)clearImageCache{
+    
+    
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        
+        NSString *filePath = [self getFilePath];
+        
+        NSFileManager *fileManager = [NSFileManager defaultManager];
+        
+        NSArray *fileArr = [[NSArray alloc] initWithArray:[fileManager contentsOfDirectoryAtPath:filePath error:nil]];
+        
+        for (NSString *file in fileArr) {
+            
+            NSString *fileP = [filePath stringByAppendingPathComponent:file];
+            
+            [[NSFileManager defaultManager] removeItemAtPath:fileP error:nil];
+            
+        }
+        
+        
+        
+    });
+    
+    
+}
+
+
+
+-(NSMutableArray<UIImage *> *)getCacheAppImages{
+    
+    NSMutableArray *imgArr = [NSMutableArray new];
+    
+    NSString *filePath = [self getFilePath];
+    
+    NSFileManager *fileManager = [NSFileManager defaultManager];
+    
+    NSArray<NSString *> *fileAr = [[NSArray alloc] initWithArray:[fileManager contentsOfDirectoryAtPath:filePath error:nil]];
+    
+    NSMutableArray<NSString *> *fileArr = [fileAr mutableCopy];
+    
+    if(fileArr.count== 0){
+        
+        return imgArr;
+        
+    }else if(fileArr.count==1){
+        
+        if([fileArr[0] containsString:@".png"]){
+            
+            NSString *imagePath = [filePath stringByAppendingPathComponent:fileArr[0]];
+            
+            UIImage *image = [UIImage imageWithContentsOfFile:imagePath];
+            
+            if(image && [image isKindOfClass:[UIImage class]]){
+                
+                [imgArr addObject:image];
+                
+            }
+            
+        }
+        
+        return imgArr;
+        
+    }else{
+        
+        
+        
+        for(int i=0;i<fileArr.count;i++){
+            
+            for(int j=0;j<fileArr.count-i-1;j++){
+                
+                NSString *fileNam = fileArr[j];
+                NSString *fileName = fileArr[j+1];
+                
+                fileNam = [fileNam stringByReplacingOccurrencesOfString:@"loadingAd" withString:@""];
+                fileNam = [fileNam stringByReplacingOccurrencesOfString:@".png" withString:@""];
+                NSInteger fileI = [fileNam integerValue];
+                fileName = [fileName stringByReplacingOccurrencesOfString:@"loadingAd" withString:@""];
+                fileName = [fileName stringByReplacingOccurrencesOfString:@".png" withString:@""];
+                NSInteger fileIn = [fileName integerValue];
+                if(fileI > fileIn){
+                    
+                    id temp = fileArr[j];
+                    fileArr[j] = fileArr[j+1];
+                    fileArr[j+1] = temp;
+                    
+                }
+                
+                
+            }
+            
+        }
+        
+        for (int i= 0; i<fileArr.count; i++) {
+            
+            NSString *filePath = [[self getFilePath] stringByAppendingPathComponent:fileArr[i]];
+            
+            UIImage *image = [UIImage imageWithContentsOfFile:filePath];
+            
+            if(image && [image isKindOfClass:[UIImage class]]){
+                
+                [imgArr addObject:image];
+                
+            }
+            
+        }
+        
+        return imgArr;
+        
+    }
+    
+    
+}
+
+
+-(NSString *)getFilePath{
+    
+    NSString *filePath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject;
+    
+    filePath = [filePath stringByAppendingPathComponent:@"appLoad"];
+    
+    [[NSFileManager defaultManager] createDirectoryAtPath:filePath withIntermediateDirectories:YES attributes:nil error:nil];
+    
+    return filePath;
+    
+}
+
+-(void)configSdWebImage{
+    
+    
+    SDWebImageDownloader *imgDownloader = SDWebImageManager.sharedManager.imageDownloader;
+
+    imgDownloader.headersFilter  = ^NSDictionary *(NSURL *url, NSDictionary *headers) {
+
+        NSFileManager *fm = [[NSFileManager alloc] init];
+        NSString *imgKey = [SDWebImageManager.sharedManager cacheKeyForURL:url];
+        NSString *imgPath = [SDWebImageManager.sharedManager.imageCache defaultCachePathForKey:imgKey];
+        NSDictionary *fileAttr = [fm attributesOfItemAtPath:imgPath error:nil];
+
+        NSMutableDictionary *mutableHeaders = [headers mutableCopy];
+
+        NSDate *lastModifiedDate = nil;
+
+
+        if (fileAttr.count > 0) {
+
+            lastModifiedDate = (NSDate *)fileAttr[NSFileModificationDate];
+
+        }
+
+        NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
+        formatter.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"GMT"];
+        formatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
+        formatter.dateFormat = @"EEE, dd MMM yyyy HH:mm:ss z";
+
+        NSString *lastModifiedStr = [formatter stringFromDate:lastModifiedDate];
+        lastModifiedStr = lastModifiedStr.length > 0 ? lastModifiedStr : @"";
+        [mutableHeaders setValue:lastModifiedStr forKey:@"If-Modified-Since"];
+
+        return mutableHeaders;
+    };
+    
+    
+}
+
+-(void)dealloc{
+    
+    
+    
+}
 
 
 @end
 @end

+ 24 - 3
UU_Ent/UU_Ent/Modules/Loading/Main/Views/YRAdView.m

@@ -21,7 +21,7 @@ static YRAdView *adView = nil;
     
     
     loadVC.aniCompleted = ^{
     loadVC.aniCompleted = ^{
         
         
-        [adView loadComplete];
+        [adView loadCompleteAnimate:YES];
         
         
     };
     };
     
     
@@ -33,11 +33,20 @@ static YRAdView *adView = nil;
     
     
 }
 }
 
 
--(void)loadComplete{
+
+-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
     
     
+    [adView loadCompleteAnimate:NO];
     
     
-    [UIView animateKeyframesWithDuration:0.6f delay:0.0f options:0 animations:^{
+    [[NSNotificationCenter defaultCenter] postNotificationName:@"YRLoadAdViewHadBeenClicked" object:nil];
+    
+}
+
+-(void)loadCompleteAnimate:(BOOL)animate{
+    
+    if (animate) {
         
         
+    [UIView animateKeyframesWithDuration:0.6f delay:0.0f options:0 animations:^{
         
         
         self.transform = CGAffineTransformMakeScale(1.2f, 1.2f);
         self.transform = CGAffineTransformMakeScale(1.2f, 1.2f);
         self.alpha = 0;
         self.alpha = 0;
@@ -56,9 +65,21 @@ static YRAdView *adView = nil;
         
         
     }];
     }];
     
     
+}else{
     
     
+    if(self.loadCompleted) {
+        
+        self.loadCompleted();
+        
+    }
+    
+    [self resignKeyWindow];
+    adView = nil;
     
     
 }
 }
+    
+}
+
 
 
 -(void)dealloc{
 -(void)dealloc{
     
     

+ 6 - 0
UU_Ent/UU_Ent/Modules/Loading/Main/Views/YRCountDownView.m

@@ -71,6 +71,12 @@
         
         
         self.remainCount = self.remainCount - 2;
         self.remainCount = self.remainCount - 2;
         
         
+        if (self.remainCount%100 == 0) {
+            
+            self.secLabel.text = [NSString stringWithFormat:@"跳过"];
+            
+        }
+        
         [self setNeedsDisplay];
         [self setNeedsDisplay];
         
         
     }else{
     }else{

+ 5 - 5
UU_Ent/UU_Ent/Modules/Main/Main/Controllers/YRMainVC.m

@@ -49,12 +49,12 @@
 -(void)addChildControllers{
 -(void)addChildControllers{
     
     
     YRMsgVC *msgVc = [YRMsgVC new];
     YRMsgVC *msgVc = [YRMsgVC new];
-//    YRContactVC *conVc = [YRContactVC new];
+    YRContactVC *conVc = [YRContactVC new];
     YRWorkVC *workVc = [YRWorkVC new];
     YRWorkVC *workVc = [YRWorkVC new];
     YRMineVC *mineVc = [YRMineVC new];
     YRMineVC *mineVc = [YRMineVC new];
     
     
     [self subVcWith:msgVc title:@"消息" normalImgTitle:@"UU_TabMes_nor" selImgTitle:@"UU_TabMes_select"];
     [self subVcWith:msgVc title:@"消息" normalImgTitle:@"UU_TabMes_nor" selImgTitle:@"UU_TabMes_select"];
-//    [self subVcWith:conVc title:@"联系人" normalImgTitle:@"UU_TabContact_nor" selImgTitle:@"UU_TabContact_select"];
+    [self subVcWith:conVc title:@"联系人" normalImgTitle:@"UU_TabContact_nor" selImgTitle:@"UU_TabContact_select"];
     [self subVcWith:workVc title:@"工作" normalImgTitle:@"UU_TabWork_nor" selImgTitle:@"UU_TabWork_select"];
     [self subVcWith:workVc title:@"工作" normalImgTitle:@"UU_TabWork_nor" selImgTitle:@"UU_TabWork_select"];
     [self subVcWith:mineVc title:@"我" normalImgTitle:@"UU_TabMe_nor" selImgTitle:@"UU_TabMe_select"];
     [self subVcWith:mineVc title:@"我" normalImgTitle:@"UU_TabMe_nor" selImgTitle:@"UU_TabMe_select"];
    
    
@@ -65,8 +65,8 @@
     
     
     UIImage *norImg = [UIImage imageNamed:normalTitle];
     UIImage *norImg = [UIImage imageNamed:normalTitle];
     UIImage *selImg = [UIImage imageNamed:selTitle];
     UIImage *selImg = [UIImage imageNamed:selTitle];
-    norImg = [norImg imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
-    selImg = [selImg imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
+    norImg = [norImg imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
+    selImg = [selImg imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
     vc.tabBarItem.title = title;
     vc.tabBarItem.title = title;
     vc.tabBarItem.image = norImg;
     vc.tabBarItem.image = norImg;
     vc.tabBarItem.selectedImage = selImg;
     vc.tabBarItem.selectedImage = selImg;
@@ -79,6 +79,7 @@
 
 
 -(void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item{
 -(void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item{
     
     
+   
     
     
     if (self.tarArr == nil || self.tarArr.count != self.tabBar.items.count) {
     if (self.tarArr == nil || self.tarArr.count != self.tabBar.items.count) {
         
         
@@ -118,7 +119,6 @@
     anima.repeatCount = 1;
     anima.repeatCount = 1;
     [self.tarArr[index].layer addAnimation:anima forKey:@"scaleAnimation"];
     [self.tarArr[index].layer addAnimation:anima forKey:@"scaleAnimation"];
     
     
-   
     
     
 }
 }
 
 

+ 1 - 3
UU_Ent/UU_Ent/Modules/Main/Main/Views/YRTabBar.m

@@ -19,7 +19,6 @@
 
 
 @implementation YRTabBar
 @implementation YRTabBar
 
 
-
 -(void)layoutSubviews{
 -(void)layoutSubviews{
     
     
     [super layoutSubviews];
     [super layoutSubviews];
@@ -46,7 +45,6 @@
                     label.backgroundColor = [UIColor redColor];
                     label.backgroundColor = [UIColor redColor];
                     if (index == 0) {
                     if (index == 0) {
                         
                         
-                        
                         label.layer.cornerRadius = 8;
                         label.layer.cornerRadius = 8;
                         label.layer.masksToBounds = YES;
                         label.layer.masksToBounds = YES;
                         
                         
@@ -119,7 +117,7 @@
     
     
     if (remindCount > 0) {
     if (remindCount > 0) {
         
         
-         self.labArr[0].hidden = NO;
+        self.labArr[0].hidden = NO;
         
         
         if (remindCount > 99) {
         if (remindCount > 99) {
             
             

+ 19 - 0
UU_Ent/UU_Ent/Modules/Message/Main/Controllers/YRMsgVC.m

@@ -62,6 +62,8 @@
     
     
     [self setNavigationBar];
     [self setNavigationBar];
     
     
+    [self regesterNotification];
+    
     [self.view addSubview:self.tableView];
     [self.view addSubview:self.tableView];
     [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
     [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        
@@ -71,6 +73,7 @@
     
     
     
     
     [self setUpHeaderView];
     [self setUpHeaderView];
+
 }
 }
 
 
 -(void)setUpHeaderView{
 -(void)setUpHeaderView{
@@ -181,6 +184,22 @@
     
     
     
     
     
     
+}
+#pragma mark - 通知
+-(void)regesterNotification{
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(shouldShowAdview) name:@"YRLoadAdViewHadBeenClicked" object:nil];
+    
+}
+
+-(void)shouldShowAdview{
+    
+    YRWebVC *webVC = [YRWebVC new];
+    
+    webVC.url = @"https://sso.ubtob.com/register/enterpriseRegistration?inviteUserUU=1000001353&inviteSpaceUU=10050002&invitationTime=20190426";
+    
+    [self.navigationController pushViewController:webVC animated:YES];
+    
 }
 }
 
 
 #pragma mark - 网络请求
 #pragma mark - 网络请求

+ 1 - 1
UU_Ent/UU_Ent/Modules/Message/Main/Others/msg_route.json

@@ -3,7 +3,7 @@
     "data":[
     "data":[
             {"title":"通知公告",
             {"title":"通知公告",
             "id":"300004",
             "id":"300004",
-            "desVc": "YRBaseVC",
+            "desVc": "YRDocuVC",
             "code":"uas.notice",
             "code":"uas.notice",
             "desc":"通知公告",
             "desc":"通知公告",
             },
             },

+ 19 - 0
UU_Ent/UU_Ent/Modules/Work/Docu/Controllers/YRDocuVC.h

@@ -0,0 +1,19 @@
+//
+//  YRDocuVC.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/7/4.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "YRBaseVC.h"
+NS_ASSUME_NONNULL_BEGIN
+
+@interface YRDocuVC : YRBaseVC
+
+@property(copy,nonatomic)NSString *caller;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 182 - 0
UU_Ent/UU_Ent/Modules/Work/Docu/Controllers/YRDocuVC.m

@@ -0,0 +1,182 @@
+//
+//  YRDocuVC.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/7/4.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "YRDocuVC.h"
+#import "YRDocuCell.h"
+@interface YRDocuVC()<UITableViewDelegate,UITableViewDataSource>
+
+@property(strong,nonatomic)YRTableView *tableView;
+
+@property(strong,nonatomic)NSMutableArray<NSMutableArray<YRDocuModel *> *> *dataArr;
+
+@end
+
+@implementation YRDocuVC
+
+-(void)viewDidLoad{
+    [super viewDidLoad];
+
+    
+}
+
+-(void)setUpUI{
+    
+    [self.view addSubview:self.tableView];
+    
+    
+    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+       
+        make.edges.equalTo(self.view);
+        
+    }];
+    
+    [self loadDataFromServerWith:self.caller];
+    
+    [self.tableView reloadData];
+    @weakify(self)
+    self.tableView.emptyDidClicked = ^{
+        @strongify(self)
+        [self.tableView reloadData];
+        
+    };
+    
+}
+
+-(void)loadDataFromServerWith:(NSString *)caller{
+    
+    NSString *url = [NSString stringWithFormat:@"http://erp.yitoa.com:8888/ERP/mobile/common/getformandgriddetail.action?caller=FeePlease!CCSQ!new&condition=1=1&sessionId=4AA6E9E6F286E19211C32E1B8D5FC7A9&id=0"];
+    
+   
+    url = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+    
+    YRNetworkManager *manager = [YRNetworkManager shareManager];
+    
+    [manager request:url method:POST parameters:nil progress:nil success:^(NSURLSessionDataTask *task, NSDictionary *responseObject) {
+      
+        
+    } failure:^(NSURLSessionDataTask *task, NSError *error) {
+       
+        
+        
+    }];
+
+    
+}
+
+#pragma mark - delegate && dataSource
+
+-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
+    
+    return self.dataArr.count;
+    
+}
+
+-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
+    
+    return self.dataArr[section].count;
+    
+}
+
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    YRDocuCell *cell = [tableView dequeueReusableCellWithIdentifier:@"YRDocuCellReid"];
+    
+    if (!cell) {
+        
+        cell = [[YRDocuCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"YRDocuCellReid"];
+        
+    }
+    
+    cell.indexPath = indexPath;
+    
+    @weakify(self)
+    cell.didClicked = ^(YRDocuModel * _Nonnull model,NSIndexPath *indexPath) {
+      
+        model.value = [NSString stringWithFormat:@"%d",arc4random()];
+        
+        [tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
+        
+    };
+    
+        
+    cell.model = self.dataArr[indexPath.section][indexPath.row];
+    
+    
+    return cell;
+}
+
+
+-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    return self.dataArr[indexPath.section][indexPath.row].height;
+    
+}
+
+-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    [self.dataArr removeAllObjects];
+    
+    [tableView reloadData];
+    
+    self.dataArr = nil;
+    
+}
+
+-(void)viewWillDisappear:(BOOL)animated{
+    
+    [super viewWillDisappear:animated];
+    
+    
+    
+}
+
+
+-(YRTableView *)tableView{
+    
+    if (!_tableView) {
+        
+        _tableView = [[YRTableView alloc]initWithFrame:self.view.frame];
+        _tableView.delegate = self;
+        _tableView.dataSource = self;
+        _tableView.tableHeaderView = [UIView new];
+        _tableView.tableFooterView = [UIView new];
+        
+    }
+    
+    return _tableView;
+}
+
+-(NSMutableArray *)dataArr{
+    
+    if (!_dataArr) {
+        
+        _dataArr = [[NSMutableArray alloc]init];
+        
+        NSMutableArray *arrOne = [[NSMutableArray alloc]init];
+        
+        for (int i=0; i<30; i++) {
+            
+            YRDocuModel *model = [YRDocuModel new];
+            model.key = @"单据";
+            model.value = @"";
+            if (i%3==0) {
+                
+                model.value = @"这里是";
+                model.type = @"FF";
+                
+            }
+            [arrOne addObject:model];
+        }
+        
+        [_dataArr addObject:arrOne];
+    }
+    
+    return _dataArr;
+}
+
+@end

+ 25 - 0
UU_Ent/UU_Ent/Modules/Work/Docu/Models/YRDocuModel.h

@@ -0,0 +1,25 @@
+//
+//  YRDocuModel.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/7/4.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface YRDocuModel : NSObject
+
+@property(copy,nonatomic)NSString *key;
+
+@property(copy,nonatomic)NSString *value;
+
+@property(assign,nonatomic)CGFloat height;
+
+@property(assign,nonatomic)NSString *type;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 24 - 0
UU_Ent/UU_Ent/Modules/Work/Docu/Models/YRDocuModel.m

@@ -0,0 +1,24 @@
+//
+//  YRDocuModel.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/7/4.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "YRDocuModel.h"
+
+@implementation YRDocuModel
+
+- (instancetype)init
+{
+    self = [super init];
+    if (self) {
+        
+        self.height = 40;
+        
+    }
+    return self;
+}
+
+@end

+ 23 - 0
UU_Ent/UU_Ent/Modules/Work/Docu/Views/YRDocuCell.h

@@ -0,0 +1,23 @@
+//
+//  YRDocuCell.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/7/4.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "YRDocuModel.h"
+NS_ASSUME_NONNULL_BEGIN
+
+@interface YRDocuCell : UITableViewCell
+
+@property(strong,nonatomic)YRDocuModel *model;
+
+@property(strong,nonatomic)NSIndexPath *indexPath;
+
+@property(copy,nonatomic)void(^didClicked)(YRDocuModel *model,NSIndexPath *indexPath);
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 156 - 0
UU_Ent/UU_Ent/Modules/Work/Docu/Views/YRDocuCell.m

@@ -0,0 +1,156 @@
+//
+//  YRDocuCell.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/7/4.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "YRDocuCell.h"
+
+@interface YRDocuCell()<UITextFieldDelegate>
+
+@property(strong,nonatomic)UILabel *titleLabel;
+
+@property(strong,nonatomic)UITextField *valueText;
+
+@property(strong,nonatomic)UIButton *touchBtn;
+
+@end
+
+@implementation YRDocuCell
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(nullable NSString *)reuseIdentifier{
+    
+    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
+        
+        [self setUpUI];
+        
+    }
+    
+    return self;
+}
+
+
+-(void)setUpUI{
+    
+    
+    self.selectionStyle = UITableViewCellSelectionStyleNone;
+    [self.contentView addSubview:self.titleLabel];
+    [self.contentView addSubview:self.valueText];
+    [self.contentView addSubview:self.touchBtn];
+    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+       
+        make.left.equalTo(self.contentView).offset(20);
+        make.centerY.equalTo(self.contentView);
+        make.width.mas_equalTo(80);
+        make.top.equalTo(self.contentView).offset(4);
+        make.bottom.equalTo(self.contentView).offset(-4);
+        
+    }];
+    
+    [self.valueText mas_makeConstraints:^(MASConstraintMaker *make) {
+       
+        make.left.equalTo(self.titleLabel.mas_right).offset(20);
+        make.right.equalTo(self.contentView).offset(-16);
+        make.top.equalTo(self.contentView).offset(4);
+        make.bottom.equalTo(self.contentView).offset(-4);
+        
+        
+    }];
+    [self.touchBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        
+        make.edges.equalTo(self.valueText);
+        
+    }];
+    
+    
+}
+
+-(void)setModel:(YRDocuModel *)model{
+    
+    _model = model;
+    
+    self.titleLabel.text = model.key;
+    self.valueText.text = model.value;
+    
+    if (model.type.length > 0) {
+        
+        self.valueText.userInteractionEnabled = NO;
+        self.touchBtn.userInteractionEnabled = YES;
+        self.touchBtn.hidden = NO;
+        
+    }else{
+        
+        self.valueText.userInteractionEnabled = YES;
+        self.touchBtn.userInteractionEnabled = NO;
+        self.touchBtn.hidden = YES;
+        
+    }
+    
+    
+}
+
+-(void)textFieldDidEndEditing:(UITextField *)textField{
+    
+    _model.value = [NSString stringWithFormat:@"%@",textField.text.length > 0?textField.text:@""];
+    
+}
+
+
+-(void)touchBtnClicked:(UIButton *)sender{
+    
+    if (self.didClicked) {
+        
+        self.didClicked(self.model,self.indexPath);
+        
+    }
+    
+}
+
+
+-(UILabel *)titleLabel{
+    
+    if (!_titleLabel) {
+        
+        _titleLabel = [UILabel new];
+        _titleLabel.text = @"标题";
+        _titleLabel.font = [UIFont systemFontOfSize:14];
+        
+    }
+    
+    return _titleLabel;
+    
+}
+
+-(UITextField *)valueText{
+    
+    if (!_valueText) {
+        
+        _valueText = [UITextField new];
+        _valueText.textAlignment = NSTextAlignmentRight;
+        _valueText.placeholder = @"请输入内容";
+        _valueText.delegate = self;
+        
+    }
+    
+    return _valueText;
+}
+
+-(UIButton *)touchBtn{
+    
+    if (!_touchBtn) {
+        
+        _touchBtn = [[UIButton alloc]init];
+        _touchBtn.userInteractionEnabled = NO;
+        _touchBtn.hidden = YES;
+        _touchBtn.backgroundColor = [UIColor clearColor];
+        [_touchBtn addTarget:self action:@selector(touchBtnClicked:) forControlEvents:UIControlEventTouchUpInside];
+        
+    }
+    
+    return _touchBtn;
+    
+}
+
+@end

+ 2 - 0
UU_Ent/UU_Ent/Modules/Work/Main/Controllers/YRWorkVC.m

@@ -332,6 +332,8 @@
         
         
         YRBaseVC *VC = (YRBaseVC *)[[NSClassFromString(model.desVC) alloc]init];
         YRBaseVC *VC = (YRBaseVC *)[[NSClassFromString(model.desVC) alloc]init];
         
         
+        VC.paramDic = @{@"caller":@"caller"};
+        
         if (!VC) {//出现异常
         if (!VC) {//出现异常
             
             
             VC = [YRBaseVC new];
             VC = [YRBaseVC new];

+ 6 - 0
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Empty/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 23 - 0
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Empty/empty_placeholder.imageset/Contents.json

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

BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Empty/empty_placeholder.imageset/empty_placeholder@1x.png


BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Empty/empty_placeholder.imageset/empty_placeholder@2x.png


BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Empty/empty_placeholder.imageset/empty_placeholder@3x.png


+ 2 - 0
UU_Ent/UU_Ent/Supporting Files/defines/common.h

@@ -13,4 +13,6 @@
 //GRPC服务器
 //GRPC服务器
 static NSString * const kHostAddress = @"uu-api-test.usoftchina.com:9620";
 static NSString * const kHostAddress = @"uu-api-test.usoftchina.com:9620";
 
 
+static NSString *const kAFReachabilityChangedNotification = @"AFNetworkReachabilityChangedNotification";
+
 #endif /* common_h */
 #endif /* common_h */

+ 3 - 1
UU_Ent/UU_Ent/Supporting Files/defines/import.h

@@ -16,6 +16,8 @@
 #import <UU_Ent/Message.pbrpc.h>
 #import <UU_Ent/Message.pbrpc.h>
 
 
 //自定义
 //自定义
+#import "YRNetworkManager.h"
+#import "NSString+device.h"
 #import "YRUserInfo.h"
 #import "YRUserInfo.h"
 #import "YRTableView.h"
 #import "YRTableView.h"
 #import "UIColor+HexColor.h"
 #import "UIColor+HexColor.h"
@@ -45,5 +47,5 @@
 #import <MBProgressHUD/MBProgressHUD.h>
 #import <MBProgressHUD/MBProgressHUD.h>
 #import <MJRefresh/MJRefresh.h>
 #import <MJRefresh/MJRefresh.h>
 #import <ReactiveObjC/ReactiveObjC.h>
 #import <ReactiveObjC/ReactiveObjC.h>
-
+#import <AFNetworking/AFNetworking.h>
 #endif /* import_h */
 #endif /* import_h */

+ 20 - 0
UU_Ent/UU_Ent/Utils/NSString/NSString+device.h

@@ -0,0 +1,20 @@
+//
+//  NSString+device.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/23.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NSString (device)
+
++ (NSString*)deviceString;
+
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 110 - 0
UU_Ent/UU_Ent/Utils/NSString/NSString+device.m

@@ -0,0 +1,110 @@
+//
+//  NSString+device.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/23.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "NSString+device.h"
+#import "sys/utsname.h"
+@implementation NSString (device)
+
+
++ (NSString*)deviceString
+{
+    
+    // 需要#import "sys/utsname.h"
+    struct utsname systemInfo;
+    uname(&systemInfo);
+    NSString *platform = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
+    
+    if ([platform isEqualToString:@"iPhone1,1"]) return @"iPhone 2G";
+    if ([platform isEqualToString:@"iPhone1,2"]) return @"iPhone 3G";
+    if ([platform isEqualToString:@"iPhone2,1"]) return @"iPhone 3GS";
+    if ([platform isEqualToString:@"iPhone3,1"]) return @"iPhone 4";
+    if ([platform isEqualToString:@"iPhone3,2"]) return @"iPhone 4";
+    if ([platform isEqualToString:@"iPhone3,3"]) return @"iPhone 4";
+    if ([platform isEqualToString:@"iPhone4,1"]) return @"iPhone 4S";
+    if ([platform isEqualToString:@"iPhone5,1"]) return @"iPhone 5";
+    if ([platform isEqualToString:@"iPhone5,2"]) return @"iPhone 5";
+    if ([platform isEqualToString:@"iPhone5,3"]) return @"iPhone 5c";
+    if ([platform isEqualToString:@"iPhone5,4"]) return @"iPhone 5c";
+    if ([platform isEqualToString:@"iPhone6,1"]) return @"iPhone 5s";
+    if ([platform isEqualToString:@"iPhone6,2"]) return @"iPhone 5s";
+    if ([platform isEqualToString:@"iPhone7,1"]) return @"iPhone 6 Plus";
+    if ([platform isEqualToString:@"iPhone7,2"]) return @"iPhone 6";
+    if ([platform isEqualToString:@"iPhone8,1"]) return @"iPhone 6s";
+    if ([platform isEqualToString:@"iPhone8,2"]) return @"iPhone 6s Plus";
+    if ([platform isEqualToString:@"iPhone9,1"]) return @"iPhone 7";
+    if ([platform isEqualToString:@"iPhone9,2"]) return @"iPhone 7 Plus";
+    if ([platform isEqualToString:@"iPhone10,3"])   return @"iPhone X";
+    
+    if ([platform isEqualToString:@"iPod1,1"])   return @"iPod Touch 1G";
+    if ([platform isEqualToString:@"iPod2,1"])   return @"iPod Touch 2G";
+    if ([platform isEqualToString:@"iPod3,1"])   return @"iPod Touch 3G";
+    if ([platform isEqualToString:@"iPod4,1"])   return @"iPod Touch 4G";
+    if ([platform isEqualToString:@"iPod5,1"])   return @"iPod Touch 5G";
+    
+    if ([platform isEqualToString:@"iPad1,1"])   return @"iPad 1G";
+    
+    if ([platform isEqualToString:@"iPad2,1"])   return @"iPad 2 (A1395)";
+    if ([platform isEqualToString:@"iPad2,2"])   return @"iPad 2 (A1396)";
+    if ([platform isEqualToString:@"iPad2,3"])   return @"iPad 2 (A1397)";
+    if ([platform isEqualToString:@"iPad2,4"])   return @"iPad 2 (A1395+New Chip)";
+    if ([platform isEqualToString:@"iPad2,5"])   return @"iPad Mini 1G";
+    if ([platform isEqualToString:@"iPad2,6"])   return @"iPad Mini 1G";
+    if ([platform isEqualToString:@"iPad2,7"])   return @"iPad Mini 1G";
+    
+    if ([platform isEqualToString:@"iPad3,1"])   return @"iPad 3 (A1416)";
+    if ([platform isEqualToString:@"iPad3,2"])   return @"iPad 3 (A1403)";
+    if ([platform isEqualToString:@"iPad3,3"])   return @"iPad 3 (A1430)";
+    if ([platform isEqualToString:@"iPad3,4"])   return @"iPad 4 (A1458)";
+    if ([platform isEqualToString:@"iPad3,5"])   return @"iPad 4 (A1459)";
+    if ([platform isEqualToString:@"iPad3,6"])   return @"iPad 4 (A1460)";
+    
+    if ([platform isEqualToString:@"iPad4,1"])   return @"iPad Air (A1474)";
+    if ([platform isEqualToString:@"iPad4,2"])   return @"iPad Air (A1475)";
+    if ([platform isEqualToString:@"iPad4,3"])   return @"iPad Air (A1476)";
+    if ([platform isEqualToString:@"iPad4,4"])   return @"iPad Mini 2G (A1489)";
+    if ([platform isEqualToString:@"iPad4,5"])   return @"iPad Mini 2G (A1490)";
+    if ([platform isEqualToString:@"iPad4,6"])   return @"iPad Mini 2G (A1491)";
+    
+    if ([platform isEqualToString:@"i386"])      return @"iPhone X";
+    if ([platform isEqualToString:@"x86_64"])    return @"iPhone X";
+    if ([platform isEqualToString:@"i386"])      return @"iPhone Simulator";
+    if ([platform isEqualToString:@"x86_64"])    return @"iPhone Simulator";
+    
+    //    //手机别名: 用户定义的名称
+    //    NSString* userPhoneName = [[UIDevice currentDevice] name];
+    //    DLog(@"手机别名: %@", userPhoneName);
+    //    //设备名称
+    //    NSString* deviceName = [[UIDevice currentDevice] systemName];
+    //    DLog(@"设备名称: %@",deviceName );
+    //    //手机系统版本
+    //    NSString* phoneVersion = [[UIDevice currentDevice] systemVersion];
+    //    DLog(@"手机系统版本: %@", phoneVersion);
+    //    //手机型号
+    //    NSString* phoneModel = [[UIDevice currentDevice] model];
+    //    DLog(@"手机型号: %@",phoneModel );
+    //    //地方型号  (国际化区域名称)
+    //    NSString* localPhoneModel = [[UIDevice currentDevice] localizedModel];
+    //    DLog(@"国际化区域名称: %@",localPhoneModel );
+    //
+    //    NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
+    //    // 当前应用名称
+    //    NSString *appCurName = [infoDictionary objectForKey:@"CFBundleDisplayName"];
+    //    DLog(@"当前应用名称:%@",appCurName);
+    //    // 当前应用软件版本  比如:1.0.1
+    //    NSString *appCurVersion = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
+    //    DLog(@"当前应用软件版本:%@",appCurVersion);
+    //    // 当前应用版本号码   int类型
+    //    NSString *appCurVersionNum = [infoDictionary objectForKey:@"CFBundleVersion"];
+    //    DLog(@"当前应用版本号码:%@",appCurVersionNum);
+    
+    
+    
+    return platform;
+}
+
+@end

+ 78 - 0
UU_Ent/UU_Ent/Utils/Network/YRNetworkManager.h

@@ -0,0 +1,78 @@
+//
+//  YRNetworkManager.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/6/4.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef NS_ENUM(NSInteger,requestType) {
+    POST,
+    GET,
+};
+
+
+@interface YRNetworkManager : NSObject
+
++(instancetype)shareManager;
+
++(instancetype)b2bShareManager;
+//
++(void)checkNetWork;
+
+/**
+ 发起请求
+ 
+ @param url url
+ @param type 发起请求的方式
+ @param parameters 参数
+ @param uploadProgress 进度
+ @param success 成功回调
+ @param failure 失败回调
+ */
+
+-(NSURLSessionDataTask *)request:(NSString *)url method:(requestType)type parameters:(id)parameters progress:(void(^)(NSProgress *uploadProgress))uploadProgress success:(void(^)(NSURLSessionDataTask *task,id responseObject))success failure:(void(^)(NSURLSessionDataTask *task,NSError *error))failure;
+
+/**
+ 文件上传
+ @param url url
+ @param type 请求方式
+ @param parameters 参数
+ @param conBlock 上传文件的设置
+ @param uploadProgress 上传进度
+ @param success 成功
+ @param failure 失败
+ */
+
+-(NSURLSessionDataTask *)request:(NSString *)url method:(requestType)type parameters:(id)parameters constructingBodyWithBlock:(void(^)(id formData))conBlock progress:(void(^)(NSProgress *uploadProgress))uploadProgress success:(void(^)(NSURLSessionDataTask *task,id responseObject))success failure:(void(^)(NSURLSessionDataTask *task,NSError *error))failure;
+
+/**
+ 文件上传
+ 
+ @param url 链接
+ @param parameters 参数
+ @param data 二进制数据
+ @param dataKey 上传文件的key值
+ @param fileName 上传成功后,需要保存到服务器的文件的名字
+ @param uploadProgress 上传进度
+ @param success 成功回调
+ @param failure 失败回调
+ */
+
+-(NSURLSessionDataTask *)upload:(NSString *)url parameters:(id)parameters data:(NSData *)data dataKey:(NSString *)dataKey fileName:(NSString *)fileName progress:(void(^)(NSProgress *uploadProgress))uploadProgress success:(void(^)(NSURLSessionDataTask *task,id responseObject))success failure:(void(^)(NSURLSessionDataTask *task,NSError *error))failure;
+
+@end
+
+
+@interface NSObject (tasktag)
+
+@property(assign,nonatomic)NSInteger objTag;
+
+@end
+
+
+NS_ASSUME_NONNULL_END

+ 168 - 0
UU_Ent/UU_Ent/Utils/Network/YRNetworkManager.m

@@ -0,0 +1,168 @@
+//
+//  YRNetworkManager.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/6/4.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "YRNetworkManager.h"
+
+@interface YRNetworkManager()
+
+@property(strong,nonatomic)AFHTTPSessionManager *manager;
+
+@end
+
+@implementation YRNetworkManager
+
++(instancetype)shareManager{
+    
+    static YRNetworkManager *instance = nil;
+    
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        
+        instance = [[YRNetworkManager alloc]init];
+        
+    });
+    
+    instance.manager = [AFHTTPSessionManager manager];
+    
+    instance.manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript",@"text/html",@"text/plain",@"charset=UTF-8", nil];
+    
+    /*由于有三种接口:B2B,ERP,IM,所以这两句需要的在外面自定义*/
+    //    manager.requestSerializer = [AFJSONRequestSerializer serializer];
+    //    manager.responseSerializer = [AFJSONResponseSerializer serializer];
+    
+    [instance.manager.securityPolicy setAllowInvalidCertificates:YES];
+    [instance.manager.requestSerializer setValue:@"application/x-www-form-urlencoded;charset=utf8" forHTTPHeaderField:@"Content-Type"];
+    
+//    [instance.manager.requestSerializer setValue:FORMAT(@"%@",g_sessionUser) forHTTPHeaderField:@"sessionUser"];
+    
+    [instance.manager.requestSerializer setValue:[NSString stringWithFormat:@"JSESSIONID=%@",[[NSUserDefaults standardUserDefaults] objectForKey:@"sessionId"]] forHTTPHeaderField:@"Cookie"];
+    
+    [instance.manager.requestSerializer willChangeValueForKey:@"timeoutInterval"];
+    instance.manager.requestSerializer.timeoutInterval = 15.0f;
+    [instance.manager.requestSerializer didChangeValueForKey:@"timeoutInterval"];
+    
+    return instance;
+    
+}
+
++(instancetype)b2bShareManager{
+    
+    return [self new];
+    
+}
+
++(void)checkNetWork{
+    
+    AFNetworkReachabilityManager *manage = [AFNetworkReachabilityManager sharedManager];
+    
+    [manage setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
+        if (status ==  AFNetworkReachabilityStatusNotReachable) {//没有网络的情况
+            
+            
+            [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"netWorkStatus"];
+            
+            
+        }else{
+            
+            [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"netWorkStatus"];
+            
+            
+        }
+        
+        [[NSNotificationCenter defaultCenter] postNotificationName:kAFReachabilityChangedNotification object:nil userInfo:@{@"status":@(status)}];
+        
+    }];
+    
+    
+    [manage startMonitoring];
+    
+}
+
+
+/**
+ 发起请求
+ 
+ @param url url
+ @param type 发起请求的方式
+ @param parameters 参数
+ @param uploadProgress 进度
+ @param success 成功回调
+ @param failure 失败回调
+ */
+
+-(NSURLSessionDataTask *)request:(NSString *)url method:(requestType)type parameters:(id)parameters progress:(void(^)(NSProgress *uploadProgress))uploadProgress success:(void(^)(NSURLSessionDataTask *task,id responseObject))success failure:(void(^)(NSURLSessionDataTask *task,NSError *error))failure{
+    
+    if (type == POST) {
+        
+        return [self.manager POST:url parameters:parameters progress:uploadProgress success:success failure:failure];
+        
+    }else if(type == GET){
+        
+        
+        return [self.manager GET:url parameters:parameters progress:uploadProgress success:success failure:failure];
+        
+    }else{
+        
+        NSAssert(type == GET || type == POST, @"请传入正确的网络请求方式");
+        return [NSURLSessionDataTask new];
+        
+    }
+    
+}
+
+/**
+ 文件上传
+ @param url url
+ @param type 请求方式
+ @param parameters 参数
+ @param conBlock 上传文件的设置
+ @param uploadProgress 上传进度
+ @param success 成功
+ @param failure 失败
+ */
+
+-(NSURLSessionDataTask *)request:(NSString *)url method:(requestType)type parameters:(id)parameters constructingBodyWithBlock:(void(^)(id formData))conBlock progress:(void(^)(NSProgress *uploadProgress))uploadProgress success:(void(^)(NSURLSessionDataTask *task,id responseObject))success failure:(void(^)(NSURLSessionDataTask *task,NSError *error))failure{
+    
+    
+    if (type == POST) {
+        
+        return [self.manager POST:url parameters:parameters constructingBodyWithBlock:conBlock progress:uploadProgress success:success failure:failure];
+        
+    }else{
+        
+        NSAssert(type == POST, @"请传入正确的网络请求方式");
+        
+        return [NSURLSessionDataTask new];
+        
+    }
+    
+}
+
+/**
+ 文件上传
+ 
+ @param url 链接
+ @param parameters 参数
+ @param data 二进制数据
+ @param dataKey 上传文件的key值
+ @param fileName 上传成功后,需要保存到服务器的文件的名字
+ @param uploadProgress 上传进度
+ @param success 成功回调
+ @param failure 失败回调
+ */
+
+-(NSURLSessionDataTask *)upload:(NSString *)url parameters:(id)parameters data:(NSData *)data dataKey:(NSString *)dataKey fileName:(NSString *)fileName progress:(void(^)(NSProgress *uploadProgress))uploadProgress success:(void(^)(NSURLSessionDataTask *task,id responseObject))success failure:(void(^)(NSURLSessionDataTask *task,NSError *error))failure{
+    
+    return [self.manager POST:url parameters:parameters constructingBodyWithBlock:^(id<AFMultipartFormData>  _Nonnull formData) {
+        [formData appendPartWithFileData:data name:dataKey fileName:fileName mimeType:@"application/octet-stream"];
+    } progress:uploadProgress success:success failure:failure];
+    
+    
+}
+
+@end

+ 12 - 0
UU_Ent/UU_Ent/Utils/tableView/YRTableView.h

@@ -12,6 +12,18 @@ NS_ASSUME_NONNULL_BEGIN
 
 
 @interface YRTableView : UITableView
 @interface YRTableView : UITableView
 
 
+/**
+ 是否自动显示无数据情况下的提示,默认显示
+ */
+@property(assign,nonatomic)BOOL autoNoDataSet;
+
+/**
+ 无数据显示图偏移量,默认导航加状态栏高度
+ */
+@property(assign,nonatomic)CGFloat verticalOffset;
+
+@property(copy,nonatomic)void(^emptyDidClicked)(void);
+
 @end
 @end
 
 
 NS_ASSUME_NONNULL_END
 NS_ASSUME_NONNULL_END

+ 88 - 0
UU_Ent/UU_Ent/Utils/tableView/YRTableView.m

@@ -7,9 +7,97 @@
 //
 //
 
 
 #import "YRTableView.h"
 #import "YRTableView.h"
+#import <DZNEmptyDataSet/UIScrollView+EmptyDataSet.h>
+
+@interface YRTableView()<DZNEmptyDataSetDelegate,DZNEmptyDataSetSource>
+
+@end
 
 
 @implementation YRTableView
 @implementation YRTableView
 
 
+- (instancetype)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self) {
+        
+        [self defaultSets];
+        
+    }
+    return self;
+}
+
+/**
+ 默认设置
+ */
+-(void)defaultSets{
+    
+    self.tableFooterView = [UIView new];
+    self.autoNoDataSet = YES;
+    
+    self.verticalOffset = -([UIApplication sharedApplication].statusBarFrame.size.height + 44);
+    
+}
+
+-(void)setAutoNoDataSet:(BOOL)autoNoDataSet{
+    
+    _autoNoDataSet = autoNoDataSet;
+    
+    if (autoNoDataSet) {
+        
+        self.emptyDataSetDelegate = self;
+        self.emptyDataSetSource = self;
+        
+    }else{
+        
+        self.emptyDataSetDelegate = nil;
+        self.emptyDataSetSource = nil;
+        
+    }
+    
+}
+
+#pragma mark - DZNEmptyDataSetDelegate,DZNEmptyDataSetSource
+
+- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
+{
+    
+    return [UIImage imageNamed:@"empty_placeholder"];
+    
+}
+
+- (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView{
+    
+    return self.verticalOffset;
+    
+}
+
+
+- (BOOL)emptyDataSetShouldFadeIn:(UIScrollView *)scrollView{
+    
+    return YES;
+    
+}
+
+-(BOOL)emptyDataSetShouldAllowTouch:(UIScrollView *)scrollView{
+    
+    return YES;
+    
+}
+
+- (BOOL)emptyDataSetShouldAnimateImageView:(UIScrollView *)scrollView{
+    
+    return YES;
+    
+}
 
 
+- (void)emptyDataSet:(UIScrollView *)scrollView didTapView:(UIView *)view{
+    
+    if (self.emptyDidClicked) {
+        
+        self.emptyDidClicked();
+        
+    }
+    
+}
 
 
 @end
 @end