Commit 319bfc3b012e4bf5ec35c4a950664a043c055438

Authored by niudaojian
2 parents 786288f5 6a18d430

Merge branch 'master' of bj.gitlab.cnlive.com:ios-team/CNLiveMateCode

# Conflicts:
#	metaCode.xcodeproj/project.pbxproj
... ... @@ -26,7 +26,7 @@ target 'metaCode' do
26 26 #加载框
27 27 pod 'MBProgressHUD'
28 28 #空白占位
29   - pod 'DZNEmptyDataSet'
  29 + pod 'EmptyDataSet-Swift'
30 30 #模型转换工具
31 31 pod 'HandyJSON'
32 32 #图片视频选择器
... ...
metaCode.xcodeproj/project.pbxproj
... ... @@ -10,14 +10,14 @@
10 10 0D39E93D7229931C86EB1161 /* Pods_metaCode_metaCodeUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63D879B49B1E42F1584DD75E /* Pods_metaCode_metaCodeUITests.framework */; };
11 11 1DD2808DF02C120276F99F4D /* Pods_metaCode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F1C55A719CFEE073C06D37CE /* Pods_metaCode.framework */; };
12 12 790B1FB42A4153E90074CF00 /* CNLiveMineBaseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790B1FB32A4153E90074CF00 /* CNLiveMineBaseModel.swift */; };
13   - 790B1FB62A41938F0074CF00 /* UIImage+CNLiveColorImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790B1FB52A41938F0074CF00 /* UIImage+CNLiveColorImage.swift */; };
  13 + 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790B1FB52A41938F0074CF00 /* UIImage+CNLiveExtensions.swift */; };
14 14 790B1FB82A41B6A60074CF00 /* CNLiveMineMessageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790B1FB72A41B6A60074CF00 /* CNLiveMineMessageViewController.swift */; };
15 15 790D01822A2D88FC00C5978D /* CNLiveConfigMacro.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01812A2D88FC00C5978D /* CNLiveConfigMacro.swift */; };
16   - 790D01852A2D89E100C5978D /* UIColor+CNHexColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01842A2D89E100C5978D /* UIColor+CNHexColor.swift */; };
  16 + 790D01852A2D89E100C5978D /* UIColor+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01842A2D89E100C5978D /* UIColor+CNLiveExtensions.swift */; };
17 17 790D018B2A2D8B3300C5978D /* CNLiveLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D018A2A2D8B3300C5978D /* CNLiveLoginViewController.swift */; };
18 18 790D01912A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01902A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift */; };
19 19 790D019A2A2DCAE400C5978D /* CNLiveViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01992A2DCAE400C5978D /* CNLiveViewController.swift */; };
20   - 790D019D2A2DCBD000C5978D /* UIView+CNGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D019C2A2DCBD000C5978D /* UIView+CNGradient.swift */; };
  20 + 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D019C2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift */; };
21 21 790D019F2A2DD66E00C5978D /* CNLiveLoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D019E2A2DD66E00C5978D /* CNLiveLoginViewModel.swift */; };
22 22 790D01A32A2DDBA300C5978D /* CNLiveConfigManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01A22A2DDBA300C5978D /* CNLiveConfigManager.swift */; };
23 23 790D01A52A2DF65E00C5978D /* CNLiveLoginPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01A42A2DF65E00C5978D /* CNLiveLoginPickerView.swift */; };
... ... @@ -28,7 +28,7 @@
28 28 79282A462A2F457D00B5F8CF /* CNLiveMineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A452A2F457D00B5F8CF /* CNLiveMineViewController.swift */; };
29 29 792E57D92A3AA2F2005834DB /* CNLiveCommonBaseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 792E57D82A3AA2F2005834DB /* CNLiveCommonBaseModel.swift */; };
30 30 792E57DB2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 792E57DA2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift */; };
31   - 79396EED2A319F220053E1AF /* UIView+CNLiveCurrentVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79396EEC2A319F220053E1AF /* UIView+CNLiveCurrentVC.swift */; };
  31 + 79396EED2A319F220053E1AF /* NSObject+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79396EEC2A319F220053E1AF /* NSObject+CNLiveExtensions.swift */; };
32 32 79396EF12A31C21B0053E1AF /* CNLiveInfoShowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79396EF02A31C21B0053E1AF /* CNLiveInfoShowViewController.swift */; };
33 33 796398942A260C0100D045EB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7963988D2A260C0100D045EB /* AppDelegate.swift */; };
34 34 7963989D2A260E6200D045EB /* CNLiveBaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */; };
... ... @@ -40,7 +40,7 @@
40 40 798A44EA2A30135D00815935 /* CNLiveMineBodyListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44E92A30135D00815935 /* CNLiveMineBodyListView.swift */; };
41 41 798A44EC2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44EB2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift */; };
42 42 798A44EE2A305AAC00815935 /* CNLiveBaseNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44ED2A305AAC00815935 /* CNLiveBaseNavigationController.swift */; };
43   - 798A44F02A305BC200815935 /* UIButton+CNLiveExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44EF2A305BC200815935 /* UIButton+CNLiveExtension.swift */; };
  43 + 798A44F02A305BC200815935 /* UIButton+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44EF2A305BC200815935 /* UIButton+CNLiveExtensions.swift */; };
44 44 798A44F22A30674200815935 /* CNLiveMineSubBodyListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44F12A30674200815935 /* CNLiveMineSubBodyListView.swift */; };
45 45 798A44F72A3077ED00815935 /* CNLiveHotButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44F52A3077ED00815935 /* CNLiveHotButton.swift */; };
46 46 798A44F92A30835400815935 /* CNLiveHelpFeedBackViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44F82A30835400815935 /* CNLiveHelpFeedBackViewController.swift */; };
... ... @@ -49,7 +49,6 @@
49 49 798A44FF2A30A0A800815935 /* CNLiveInputFeedBackViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44FE2A30A0A800815935 /* CNLiveInputFeedBackViewController.swift */; };
50 50 79A68C4A2A26E6CE00DC3B43 /* (null) in Sources */ = {isa = PBXBuildFile; };
51 51 79A68C4C2A26EA6000DC3B43 /* (null) in Sources */ = {isa = PBXBuildFile; };
52   - 79BDDCBE2A3C3FC8008560FC /* NSObject+CNLiveJSONTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79BDDCBD2A3C3FC8008560FC /* NSObject+CNLiveJSONTool.swift */; };
53 52 79F4B1162A32B96B00993C03 /* CNLiveMineInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79F4B1152A32B96B00993C03 /* CNLiveMineInfoViewController.swift */; };
54 53 79F4B11A2A32F21400993C03 /* CNLiveMineNickViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79F4B1192A32F21400993C03 /* CNLiveMineNickViewController.swift */; };
55 54 79F4B11C2A33036E00993C03 /* CNLiveMineInfoAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79F4B11B2A33036E00993C03 /* CNLiveMineInfoAlertView.swift */; };
... ... @@ -57,7 +56,7 @@
57 56 7C2703332A36CC660061EC50 /* CNLiveGlobalBlock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C2703322A36CC660061EC50 /* CNLiveGlobalBlock.swift */; };
58 57 7C2703362A3AFD3A0061EC50 /* CNLiveEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C2703352A3AFD3A0061EC50 /* CNLiveEnvironment.swift */; };
59 58 7C4931292A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C4931282A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift */; };
60   - 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNBadge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C49312C2A2DB9FA000E44B4 /* UITabBar+CNBadge.swift */; };
  59 + 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C49312C2A2DB9FA000E44B4 /* UITabBar+CNLiveExtensions.swift */; };
61 60 7C4931312A2F142F000E44B4 /* CNHomePageBackgroupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C4931302A2F142F000E44B4 /* CNHomePageBackgroupView.swift */; };
62 61 7C4931342A307B58000E44B4 /* slide_down.gif in Resources */ = {isa = PBXBuildFile; fileRef = 7C4931332A307B58000E44B4 /* slide_down.gif */; };
63 62 7C4931362A307B60000E44B4 /* slide_up.gif in Resources */ = {isa = PBXBuildFile; fileRef = 7C4931352A307B60000E44B4 /* slide_up.gif */; };
... ... @@ -75,7 +74,7 @@
75 74 7CD675472A274167008354C1 /* NewPagedFlowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675442A274167008354C1 /* NewPagedFlowView.m */; };
76 75 7CD675482A274167008354C1 /* PGIndexBannerSubiew.m in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675462A274167008354C1 /* PGIndexBannerSubiew.m */; };
77 76 7CD6754F2A2840B9008354C1 /* CNMetaCodeHomePageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD6754E2A2840B9008354C1 /* CNMetaCodeHomePageController.swift */; };
78   - 7CD675522A29C04B008354C1 /* CNLiveConstant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675512A29C04B008354C1 /* CNLiveConstant.swift */; };
  77 + 7CD675522A29C04B008354C1 /* CNLiveConfigstant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675512A29C04B008354C1 /* CNLiveConfigstant.swift */; };
79 78 818163C32A25CFCC00579C86 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 818163C12A25CFCC00579C86 /* Main.storyboard */; };
80 79 818163C52A25CFCF00579C86 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 818163C42A25CFCF00579C86 /* Assets.xcassets */; };
81 80 818163C82A25CFCF00579C86 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 818163C62A25CFCF00579C86 /* LaunchScreen.storyboard */; };
... ... @@ -110,14 +109,14 @@
110 109 67F8190701D1AB7F7724E8BA /* Pods-metaCodeTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-metaCodeTests.release.xcconfig"; path = "Target Support Files/Pods-metaCodeTests/Pods-metaCodeTests.release.xcconfig"; sourceTree = "<group>"; };
111 110 721865F548C997EFAE525B6F /* Pods-metaCode-metaCodeUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-metaCode-metaCodeUITests.release.xcconfig"; path = "Target Support Files/Pods-metaCode-metaCodeUITests/Pods-metaCode-metaCodeUITests.release.xcconfig"; sourceTree = "<group>"; };
112 111 790B1FB32A4153E90074CF00 /* CNLiveMineBaseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineBaseModel.swift; sourceTree = "<group>"; };
113   - 790B1FB52A41938F0074CF00 /* UIImage+CNLiveColorImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+CNLiveColorImage.swift"; sourceTree = "<group>"; };
  112 + 790B1FB52A41938F0074CF00 /* UIImage+CNLiveExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+CNLiveExtensions.swift"; sourceTree = "<group>"; };
114 113 790B1FB72A41B6A60074CF00 /* CNLiveMineMessageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineMessageViewController.swift; sourceTree = "<group>"; };
115 114 790D01812A2D88FC00C5978D /* CNLiveConfigMacro.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNLiveConfigMacro.swift; sourceTree = "<group>"; };
116   - 790D01842A2D89E100C5978D /* UIColor+CNHexColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+CNHexColor.swift"; sourceTree = "<group>"; };
  115 + 790D01842A2D89E100C5978D /* UIColor+CNLiveExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+CNLiveExtensions.swift"; sourceTree = "<group>"; };
117 116 790D018A2A2D8B3300C5978D /* CNLiveLoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginViewController.swift; sourceTree = "<group>"; };
118 117 790D01902A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveConfigFontMacro.swift; sourceTree = "<group>"; };
119 118 790D01992A2DCAE400C5978D /* CNLiveViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNLiveViewController.swift; sourceTree = "<group>"; };
120   - 790D019C2A2DCBD000C5978D /* UIView+CNGradient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+CNGradient.swift"; sourceTree = "<group>"; };
  119 + 790D019C2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+CNLiveExtensions.swift"; sourceTree = "<group>"; };
121 120 790D019E2A2DD66E00C5978D /* CNLiveLoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginViewModel.swift; sourceTree = "<group>"; };
122 121 790D01A22A2DDBA300C5978D /* CNLiveConfigManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveConfigManager.swift; sourceTree = "<group>"; };
123 122 790D01A42A2DF65E00C5978D /* CNLiveLoginPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginPickerView.swift; sourceTree = "<group>"; };
... ... @@ -128,7 +127,7 @@
128 127 79282A452A2F457D00B5F8CF /* CNLiveMineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineViewController.swift; sourceTree = "<group>"; };
129 128 792E57D82A3AA2F2005834DB /* CNLiveCommonBaseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCommonBaseModel.swift; sourceTree = "<group>"; };
130 129 792E57DA2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCommonQiniuTool.swift; sourceTree = "<group>"; };
131   - 79396EEC2A319F220053E1AF /* UIView+CNLiveCurrentVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+CNLiveCurrentVC.swift"; sourceTree = "<group>"; };
  130 + 79396EEC2A319F220053E1AF /* NSObject+CNLiveExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSObject+CNLiveExtensions.swift"; sourceTree = "<group>"; };
132 131 79396EF02A31C21B0053E1AF /* CNLiveInfoShowViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveInfoShowViewController.swift; sourceTree = "<group>"; };
133 132 7963988D2A260C0100D045EB /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
134 133 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNLiveBaseViewController.swift; sourceTree = "<group>"; };
... ... @@ -140,7 +139,7 @@
140 139 798A44E92A30135D00815935 /* CNLiveMineBodyListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineBodyListView.swift; sourceTree = "<group>"; };
141 140 798A44EB2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineAddInfoViewController.swift; sourceTree = "<group>"; };
142 141 798A44ED2A305AAC00815935 /* CNLiveBaseNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveBaseNavigationController.swift; sourceTree = "<group>"; };
143   - 798A44EF2A305BC200815935 /* UIButton+CNLiveExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+CNLiveExtension.swift"; sourceTree = "<group>"; };
  142 + 798A44EF2A305BC200815935 /* UIButton+CNLiveExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+CNLiveExtensions.swift"; sourceTree = "<group>"; };
144 143 798A44F12A30674200815935 /* CNLiveMineSubBodyListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineSubBodyListView.swift; sourceTree = "<group>"; };
145 144 798A44F52A3077ED00815935 /* CNLiveHotButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNLiveHotButton.swift; sourceTree = "<group>"; };
146 145 798A44F82A30835400815935 /* CNLiveHelpFeedBackViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveHelpFeedBackViewController.swift; sourceTree = "<group>"; };
... ... @@ -148,7 +147,6 @@
148 147 798A44FC2A309EBA00815935 /* CNLiveTypeFeedBackViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveTypeFeedBackViewController.swift; sourceTree = "<group>"; };
149 148 798A44FE2A30A0A800815935 /* CNLiveInputFeedBackViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveInputFeedBackViewController.swift; sourceTree = "<group>"; };
150 149 79A68C512A26F59C00DC3B43 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = metaCode/Info.plist; sourceTree = "<group>"; };
151   - 79BDDCBD2A3C3FC8008560FC /* NSObject+CNLiveJSONTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSObject+CNLiveJSONTool.swift"; sourceTree = "<group>"; };
152 150 79F4B1152A32B96B00993C03 /* CNLiveMineInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineInfoViewController.swift; sourceTree = "<group>"; };
153 151 79F4B1192A32F21400993C03 /* CNLiveMineNickViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineNickViewController.swift; sourceTree = "<group>"; };
154 152 79F4B11B2A33036E00993C03 /* CNLiveMineInfoAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineInfoAlertView.swift; sourceTree = "<group>"; };
... ... @@ -156,7 +154,7 @@
156 154 7C2703322A36CC660061EC50 /* CNLiveGlobalBlock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveGlobalBlock.swift; sourceTree = "<group>"; };
157 155 7C2703352A3AFD3A0061EC50 /* CNLiveEnvironment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveEnvironment.swift; sourceTree = "<group>"; };
158 156 7C4931282A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveBaseTabBarViewController.swift; sourceTree = "<group>"; };
159   - 7C49312C2A2DB9FA000E44B4 /* UITabBar+CNBadge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITabBar+CNBadge.swift"; sourceTree = "<group>"; };
  157 + 7C49312C2A2DB9FA000E44B4 /* UITabBar+CNLiveExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITabBar+CNLiveExtensions.swift"; sourceTree = "<group>"; };
160 158 7C4931302A2F142F000E44B4 /* CNHomePageBackgroupView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNHomePageBackgroupView.swift; sourceTree = "<group>"; };
161 159 7C4931332A307B58000E44B4 /* slide_down.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = slide_down.gif; sourceTree = "<group>"; };
162 160 7C4931352A307B60000E44B4 /* slide_up.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = slide_up.gif; sourceTree = "<group>"; };
... ... @@ -178,7 +176,7 @@
178 176 7CD675452A274167008354C1 /* NewPagedFlowView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewPagedFlowView.h; sourceTree = "<group>"; };
179 177 7CD675462A274167008354C1 /* PGIndexBannerSubiew.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PGIndexBannerSubiew.m; sourceTree = "<group>"; };
180 178 7CD6754E2A2840B9008354C1 /* CNMetaCodeHomePageController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNMetaCodeHomePageController.swift; sourceTree = "<group>"; };
181   - 7CD675512A29C04B008354C1 /* CNLiveConstant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveConstant.swift; sourceTree = "<group>"; };
  179 + 7CD675512A29C04B008354C1 /* CNLiveConfigstant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveConfigstant.swift; sourceTree = "<group>"; };
182 180 818163B82A25CFCC00579C86 /* metaCode.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = metaCode.app; sourceTree = BUILT_PRODUCTS_DIR; };
183 181 818163C22A25CFCC00579C86 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
184 182 818163C42A25CFCF00579C86 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
... ... @@ -237,14 +235,13 @@
237 235 790D01832A2D89E100C5978D /* Extensions */ = {
238 236 isa = PBXGroup;
239 237 children = (
240   - 790D01842A2D89E100C5978D /* UIColor+CNHexColor.swift */,
241   - 7C49312C2A2DB9FA000E44B4 /* UITabBar+CNBadge.swift */,
242   - 790D019C2A2DCBD000C5978D /* UIView+CNGradient.swift */,
  238 + 790D01842A2D89E100C5978D /* UIColor+CNLiveExtensions.swift */,
  239 + 7C49312C2A2DB9FA000E44B4 /* UITabBar+CNLiveExtensions.swift */,
  240 + 790D019C2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift */,
243 241 79282A3B2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift */,
244   - 798A44EF2A305BC200815935 /* UIButton+CNLiveExtension.swift */,
245   - 79396EEC2A319F220053E1AF /* UIView+CNLiveCurrentVC.swift */,
246   - 79BDDCBD2A3C3FC8008560FC /* NSObject+CNLiveJSONTool.swift */,
247   - 790B1FB52A41938F0074CF00 /* UIImage+CNLiveColorImage.swift */,
  242 + 798A44EF2A305BC200815935 /* UIButton+CNLiveExtensions.swift */,
  243 + 79396EEC2A319F220053E1AF /* NSObject+CNLiveExtensions.swift */,
  244 + 790B1FB52A41938F0074CF00 /* UIImage+CNLiveExtensions.swift */,
248 245 );
249 246 path = Extensions;
250 247 sourceTree = "<group>";
... ... @@ -337,7 +334,6 @@
337 334 7C2703312A36CC430061EC50 /* Global */,
338 335 798A44F32A3077ED00815935 /* CustomView */,
339 336 790D01832A2D89E100C5978D /* Extensions */,
340   - 7CD675502A29C036008354C1 /* Constant */,
341 337 796398912A260C0100D045EB /* Common */,
342 338 796398922A260C0100D045EB /* Config */,
343 339 796398902A260C0100D045EB /* Main */,
... ... @@ -403,6 +399,7 @@
403 399 796398922A260C0100D045EB /* Config */ = {
404 400 isa = PBXGroup;
405 401 children = (
  402 + 7CD675512A29C04B008354C1 /* CNLiveConfigstant.swift */,
406 403 790D01812A2D88FC00C5978D /* CNLiveConfigMacro.swift */,
407 404 790D01902A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift */,
408 405 790D01A22A2DDBA300C5978D /* CNLiveConfigManager.swift */,
... ... @@ -531,14 +528,6 @@
531 528 path = HomePage/Controller;
532 529 sourceTree = "<group>";
533 530 };
534   - 7CD675502A29C036008354C1 /* Constant */ = {
535   - isa = PBXGroup;
536   - children = (
537   - 7CD675512A29C04B008354C1 /* CNLiveConstant.swift */,
538   - );
539   - path = Constant;
540   - sourceTree = "<group>";
541   - };
542 531 818163AF2A25CFCC00579C86 = {
543 532 isa = PBXGroup;
544 533 children = (
... ... @@ -857,11 +846,13 @@
857 846 7CD675482A274167008354C1 /* PGIndexBannerSubiew.m in Sources */,
858 847 790D019F2A2DD66E00C5978D /* CNLiveLoginViewModel.swift in Sources */,
859 848 7C7C62F62A4D72E9007A912E /* CNIdentityDB.swift in Sources */,
  849 + 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */,
  850 + 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */,
860 851 790B1FB62A41938F0074CF00 /* UIImage+CNLiveColorImage.swift in Sources */,
861 852 790D019D2A2DCBD000C5978D /* UIView+CNGradient.swift in Sources */,
862 853 798A44F72A3077ED00815935 /* CNLiveHotButton.swift in Sources */,
863 854 7CD6753D2A2740B0008354C1 /* CNMainView.swift in Sources */,
864   - 7CD675522A29C04B008354C1 /* CNLiveConstant.swift in Sources */,
  855 + 7CD675522A29C04B008354C1 /* CNLiveConfigstant.swift in Sources */,
865 856 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */,
866 857 7C83B43E2A52B8BA004BF4A4 /* CNHomePageViewModel.swift in Sources */,
867 858 7C4931382A307BDB000E44B4 /* CNHomePageGuideView.swift in Sources */,
... ... @@ -880,21 +871,20 @@
880 871 798A44FF2A30A0A800815935 /* CNLiveInputFeedBackViewController.swift in Sources */,
881 872 79282A442A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift in Sources */,
882 873 7C2703302A36CBE30061EC50 /* CNCertificationView.swift in Sources */,
883   - 79BDDCBE2A3C3FC8008560FC /* NSObject+CNLiveJSONTool.swift in Sources */,
884 874 790D01A32A2DDBA300C5978D /* CNLiveConfigManager.swift in Sources */,
885 875 7C2703332A36CC660061EC50 /* CNLiveGlobalBlock.swift in Sources */,
886 876 7987BF3D2A497644000A1ABC /* CNLiveMineQuestViewController.swift in Sources */,
887 877 798A44EA2A30135D00815935 /* CNLiveMineBodyListView.swift in Sources */,
888 878 798A44F92A30835400815935 /* CNLiveHelpFeedBackViewController.swift in Sources */,
889 879 79A68C4A2A26E6CE00DC3B43 /* (null) in Sources */,
890   - 790D01852A2D89E100C5978D /* UIColor+CNHexColor.swift in Sources */,
891   - 79396EED2A319F220053E1AF /* UIView+CNLiveCurrentVC.swift in Sources */,
  880 + 790D01852A2D89E100C5978D /* UIColor+CNLiveExtensions.swift in Sources */,
  881 + 79396EED2A319F220053E1AF /* NSObject+CNLiveExtensions.swift in Sources */,
892 882 7C4931312A2F142F000E44B4 /* CNHomePageBackgroupView.swift in Sources */,
893 883 790D018B2A2D8B3300C5978D /* CNLiveLoginViewController.swift in Sources */,
894 884 798A44EC2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift in Sources */,
895 885 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */,
896 886 790D01912A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift in Sources */,
897   - 790D01852A2D89E100C5978D /* UIColor+CNHexColor.swift in Sources */,
  887 + 790D01852A2D89E100C5978D /* UIColor+CNLiveExtensions.swift in Sources */,
898 888 790B1FB42A4153E90074CF00 /* CNLiveMineBaseModel.swift in Sources */,
899 889 7978A8432A396632007C86B8 /* CNLiveMineViewModel.swift in Sources */,
900 890 798A44EE2A305AAC00815935 /* CNLiveBaseNavigationController.swift in Sources */,
... ... @@ -904,11 +894,11 @@
904 894 7CD6753F2A2740B0008354C1 /* CNDownSlideViewRemindView.swift in Sources */,
905 895 7CD6753C2A2740B0008354C1 /* CNUpSlideViewRemindView.swift in Sources */,
906 896 798A44E82A30134400815935 /* CNLiveMineHeaderView.swift in Sources */,
907   - 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNBadge.swift in Sources */,
  897 + 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNLiveExtensions.swift in Sources */,
908 898 790D019A2A2DCAE400C5978D /* CNLiveViewController.swift in Sources */,
909 899 79A68C4C2A26EA6000DC3B43 /* (null) in Sources */,
910 900 79282A462A2F457D00B5F8CF /* CNLiveMineViewController.swift in Sources */,
911   - 798A44F02A305BC200815935 /* UIButton+CNLiveExtension.swift in Sources */,
  901 + 798A44F02A305BC200815935 /* UIButton+CNLiveExtensions.swift in Sources */,
912 902 );
913 903 runOnlyForDeploymentPostprocessing = 0;
914 904 };
... ...
metaCode/Classes/Common/Util/CNLiveCommonQiniuTool.swift
... ... @@ -55,6 +55,7 @@ class UploadManager: NSObject {
55 55 param.setValue("2", forKey: "storageType")
56 56 param.setValue(kBucketName_QN, forKey: "bucket")
57 57 showLoading(message: "上传处理中...")
  58 + CNLiveNetworking.setupShowResult(true)
58 59 CNLiveNetworking.setAllowRequestDefaultArgument(true)
59 60 CNLiveNetworking.setupShowDataResult(false)
60 61 CNLiveNetworking.requestNetwork(with: .POST, urlString: "\(CNLiveEnvironmentManager.shared.img_token_url)/vod_epg/getUploadAuthForApp", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
... ... @@ -98,7 +99,7 @@ class UploadManager: NSObject {
98 99 }, option: uploadOption)
99 100 }
100 101 } else {
101   - showMessage(message: resp["message"] as! String)
  102 + showMessage(message: resp["errorMessage"] as! String)
102 103 }
103 104 } else {
104 105 showMessage(message: error!.localizedDescription)
... ... @@ -109,7 +110,7 @@ class UploadManager: NSObject {
109 110 /// 设置图片名称
110 111 /// - Returns: 图片名
111 112 static private func createImageFileName() -> String {
112   - let imageName = "802/mateCode/img/\(NSDate().string(withFormat: "yyyyMMdd") ?? "0000")/\(arc4random()).jpg"
  113 + let imageName = "802/mateCode/img/\(NSDate().string(withFormat: "yyyy/MM/dd") ?? "0000")/\(arc4random()).jpg"
113 114 return imageName
114 115 }
115 116 }
... ...
metaCode/Classes/Constant/CNLiveConstant.swift renamed to metaCode/Classes/Config/CNLiveConfigstant.swift
metaCode/Classes/Extensions/UIView+CNLiveCurrentVC.swift renamed to metaCode/Classes/Extensions/NSObject+CNLiveExtensions.swift
... ... @@ -7,6 +7,7 @@
7 7  
8 8 import Foundation
9 9 import MBProgressHUD
  10 +import HandyJSON
10 11  
11 12 func currentViewController() -> (UIViewController?) {
12 13 var window = UIApplication.shared.keyWindow
... ... @@ -118,3 +119,76 @@ func hiddenLoading() {
118 119 let delegate = UIApplication.shared.delegate as! AppDelegate
119 120 MBProgressHUD.hide(for: delegate.window!, animated: true)
120 121 }
  122 +
  123 +
  124 +///####模型转换#########
  125 +/**
  126 + * Json转对象
  127 + */
  128 +func jsonToModel(_ jsonStr:String,_ modelType:HandyJSON.Type) -> BaseModel {
  129 + if jsonStr == "" || jsonStr.count == 0 {
  130 + #if DEBUG
  131 + print("jsonoModel:字符串为空")
  132 + #endif
  133 + return BaseModel()
  134 + }
  135 + return modelType.deserialize(from: jsonStr) as! BaseModel
  136 +}
  137 +
  138 +/**
  139 + * Json转数组对象
  140 + */
  141 +func jsonArrayToModel(_ jsonArrayStr:String, _ modelType:HandyJSON.Type) ->[BaseModel] {
  142 + if jsonArrayStr == "" || jsonArrayStr.count == 0 {
  143 + #if DEBUG
  144 + print("jsonToModelArray:字符串为空")
  145 + #endif
  146 + return []
  147 + }
  148 + var modelArray:[BaseModel] = []
  149 + let data = jsonArrayStr.data(using: String.Encoding.utf8)
  150 + let peoplesArray = try! JSONSerialization.jsonObject(with:data!, options: JSONSerialization.ReadingOptions()) as? [AnyObject]
  151 + for people in peoplesArray! {
  152 + modelArray.append(dictionaryToModel(people as! [String : Any], modelType,""))
  153 + }
  154 + return modelArray
  155 +
  156 +}
  157 +/**
  158 + * 字典转对象
  159 + */
  160 +func dictionaryToModel(_ dictionStr:[String:Any],_ modelType:HandyJSON.Type,_ path: String) -> BaseModel {
  161 + if dictionStr.count == 0 {
  162 + #if DEBUG
  163 + print("dictionaryToModel:字符串为空")
  164 + #endif
  165 + return BaseModel()
  166 + }
  167 + return modelType.deserialize(from: dictionStr, designatedPath: path) as! BaseModel
  168 +}
  169 +
  170 +/**
  171 + * 对象转JSON
  172 + */
  173 +func modelToJson(_ model:BaseModel?) -> String {
  174 + if model == nil {
  175 + #if DEBUG
  176 + print("modelToJson:model为空")
  177 + #endif
  178 + return ""
  179 + }
  180 + return (model?.toJSONString())!
  181 +}
  182 +
  183 +/**
  184 + * 对象转字典
  185 + */
  186 +func modelToDictionary(_ model:BaseModel?) -> [String:Any] {
  187 + if model == nil {
  188 + #if DEBUG
  189 + print("modelToJson:model为空")
  190 + #endif
  191 + return [:]
  192 + }
  193 + return (model?.toJSON())!
  194 +}
... ...
metaCode/Classes/Extensions/NSObject+CNLiveJSONTool.swift deleted 100644 → 0
1   -//
2   -// NSObject+CNLiveJSONTool.swift
3   -// metaCode
4   -//
5   -// Created by open on 2023/6/16.
6   -//
7   -
8   -import Foundation
9   -import HandyJSON
10   -
11   -/**
12   - * Json转对象
13   - */
14   -func jsonToModel(_ jsonStr:String,_ modelType:HandyJSON.Type) -> BaseModel {
15   - if jsonStr == "" || jsonStr.count == 0 {
16   - #if DEBUG
17   - print("jsonoModel:字符串为空")
18   - #endif
19   - return BaseModel()
20   - }
21   - return modelType.deserialize(from: jsonStr) as! BaseModel
22   -}
23   -
24   -/**
25   - * Json转数组对象
26   - */
27   -func jsonArrayToModel(_ jsonArrayStr:String, _ modelType:HandyJSON.Type) ->[BaseModel] {
28   - if jsonArrayStr == "" || jsonArrayStr.count == 0 {
29   - #if DEBUG
30   - print("jsonToModelArray:字符串为空")
31   - #endif
32   - return []
33   - }
34   - var modelArray:[BaseModel] = []
35   - let data = jsonArrayStr.data(using: String.Encoding.utf8)
36   - let peoplesArray = try! JSONSerialization.jsonObject(with:data!, options: JSONSerialization.ReadingOptions()) as? [AnyObject]
37   - for people in peoplesArray! {
38   - modelArray.append(dictionaryToModel(people as! [String : Any], modelType,""))
39   - }
40   - return modelArray
41   -
42   -}
43   -/**
44   - * 字典转对象
45   - */
46   -func dictionaryToModel(_ dictionStr:[String:Any],_ modelType:HandyJSON.Type,_ path: String) -> BaseModel {
47   - if dictionStr.count == 0 {
48   - #if DEBUG
49   - print("dictionaryToModel:字符串为空")
50   - #endif
51   - return BaseModel()
52   - }
53   - return modelType.deserialize(from: dictionStr, designatedPath: path) as! BaseModel
54   -}
55   -
56   -/**
57   - * 对象转JSON
58   - */
59   -func modelToJson(_ model:BaseModel?) -> String {
60   - if model == nil {
61   - #if DEBUG
62   - print("modelToJson:model为空")
63   - #endif
64   - return ""
65   - }
66   - return (model?.toJSONString())!
67   -}
68   -
69   -/**
70   - * 对象转字典
71   - */
72   -func modelToDictionary(_ model:BaseModel?) -> [String:Any] {
73   - if model == nil {
74   - #if DEBUG
75   - print("modelToJson:model为空")
76   - #endif
77   - return [:]
78   - }
79   - return (model?.toJSON())!
80   -}
metaCode/Classes/Extensions/UIButton+CNLiveExtension.swift renamed to metaCode/Classes/Extensions/UIButton+CNLiveExtensions.swift
metaCode/Classes/Extensions/UIColor+CNHexColor.swift renamed to metaCode/Classes/Extensions/UIColor+CNLiveExtensions.swift
metaCode/Classes/Extensions/UIImage+CNLiveColorImage.swift renamed to metaCode/Classes/Extensions/UIImage+CNLiveExtensions.swift
metaCode/Classes/Extensions/UITabBar+CNBadge.swift renamed to metaCode/Classes/Extensions/UITabBar+CNLiveExtensions.swift
metaCode/Classes/Extensions/UIView+CNGradient.swift renamed to metaCode/Classes/Extensions/UIView+CNLiveExtensions.swift
metaCode/Classes/Main/MinePage/Controller/CNLiveMineAddInfoViewController.swift
... ... @@ -6,7 +6,7 @@
6 6 //
7 7  
8 8 import Foundation
9   -import DZNEmptyDataSet
  9 +import EmptyDataSet_Swift
10 10  
11 11 enum CNLiveMineInfoShowType {
12 12 case add//添加身份
... ... @@ -15,7 +15,7 @@ enum CNLiveMineInfoShowType {
15 15 }
16 16  
17 17  
18   -class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource, UITableViewDragDelegate, UITableViewDropDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate{
  18 +class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource, UITableViewDragDelegate, UITableViewDropDelegate, EmptyDataSetSource, EmptyDataSetDelegate{
19 19  
20 20 let kCNLiveMineInfoLListTableViewIdentifier = "kCNLiveMineInfoLListTableViewIdentifier"
21 21 let kCNLiveMineStandInfoTableViewIdentifier = "kCNLiveMineStandInfoTableViewIdentifier"
... ... @@ -125,16 +125,13 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel
125 125 }
126 126  
127 127  
128   - @objc func noteSetAction() {
129   -
130   - }
131   - @objc func backCopyAction() {
132   -
133   - }
  128 + @objc func noteSetAction() {}
  129 + @objc func backCopyAction() {}
134 130 }
135 131  
136 132 extension CNLiveMineAddInfoViewController {
137   - func image(forEmptyDataSet scrollView: UIScrollView!) -> UIImage! {
  133 +
  134 + func image(forEmptyDataSet scrollView: UIScrollView) -> UIImage? {
138 135 if network_type == .failed || network_type == .unkonw {
139 136 return UIImage(named: "mine_list_source_unusual_failed")
140 137 }
... ... @@ -147,7 +144,7 @@ extension CNLiveMineAddInfoViewController {
147 144 return UIImage(named: "mine_list_source_unusual_empty")
148 145 }
149 146  
150   - func title(forEmptyDataSet scrollView: UIScrollView!) -> NSAttributedString! {
  147 + func title(forEmptyDataSet scrollView: UIScrollView) -> NSAttributedString? {
151 148 var defult_string = ""
152 149 if network_type == .failed || network_type == .unkonw {
153 150 defult_string = "接口请求错误,刷新试试~"
... ... @@ -169,7 +166,8 @@ extension CNLiveMineAddInfoViewController {
169 166 }
170 167 return NSAttributedString(string: defult_string, attributes: [.font: Font_17,.foregroundColor: HexColor("#666666")!])
171 168 }
172   - func buttonTitle(forEmptyDataSet scrollView: UIScrollView!, for state: UIControl.State) -> NSAttributedString! {
  169 +
  170 + func buttonTitle(forEmptyDataSet scrollView: UIScrollView, for state: UIControl.State) -> NSAttributedString? {
173 171 if _show_type == .message && (network_type == .failed || network_type == .noNetwork) {
174 172 let attributes = [NSAttributedString.Key.font:Font_16_Fit,
175 173 NSAttributedString.Key.foregroundColor: HexColor("#609BFF")]
... ... @@ -178,7 +176,7 @@ extension CNLiveMineAddInfoViewController {
178 176 return nil
179 177 }
180 178  
181   - func emptyDataSet(_ scrollView: UIScrollView!, didTap button: UIButton!) {
  179 + func emptyDataSet(_ scrollView: UIScrollView, didTapView view: UIView) {
182 180 loadData()
183 181 }
184 182  
... ...
metaCode/Classes/Main/MinePage/Controller/CNLiveMineEarnViewController.swift
... ... @@ -14,7 +14,6 @@ let kCNLiveSectionHeaderHeight = 200//头视图高度
14 14  
15 15 extension JXPagingListContainerView: JXSegmentedViewListContainer {}
16 16  
17   -
18 17 class CNLiveMineEarnViewController: CNLiveBaseViewController, JXPagingViewDelegate {
19 18  
20 19 func tableHeaderViewHeight(in pagingView: JXPagingView) -> Int {
... ...
metaCode/Classes/Main/MinePage/View/CNLiveMineHeaderView.swift
... ... @@ -429,6 +429,8 @@ class MineEarnHeaderView: UIView {
429 429  
430 430  
431 431  
  432 +
  433 +
432 434 override init(frame: CGRect) {
433 435 super.init(frame: frame)
434 436  
... ...
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineBaseModel.swift
... ... @@ -23,6 +23,14 @@ class UpdateInfoModel: BaseModel {
23 23 var upgradePoint:String = ""
24 24 var status:String = ""
25 25 var createTime:String = ""
  26 +
  27 + /**
  28 + /api/identityApi/list
  29 + 接口的数据 id createTime为公共参数
  30 + */
  31 + var name:String = ""
  32 + var icon:String = ""
  33 + var enable:String = ""
26 34 }
27 35  
28 36 class NewsModel: BaseModel {
... ...
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineViewModel.swift
... ... @@ -134,38 +134,34 @@ class CNLiveMineViewModel: NSObject {
134 134 /// - Parameter resultBlock: 结果返回
135 135 static func requestAccessTokenAction(resultBlock: @escaping resultBlock) {
136 136 //当前时间大于最大允许时间则表明当前access_token已经过期需要重新请求
137   -// if CNLiveMineViewModel.timeStamp > NSNumber(string: UserInfoManager.shared.userInfo.expires_in)?.intValue ?? 0 {
138   - let param = NSMutableDictionary.init()
139   - param.setValue(APPId, forKey: "appId")
140   - param.setValue(APPSecret, forKey: "secret")
141   - showLoading(message: "")
142   - CNLiveNetworking.setAllowRequestDefaultArgument(false)
143   - CNLiveNetworking.setupShowDataResult(false)
144   - CNLiveNetworking.requestNetwork(with: .POST, urlString: "/open/api2/token", param: (param as! [AnyHashable : Any]), cacheType: .networkOnly) { task, result, error in
145   - hiddenLoading()
146   - if (error == nil) {
147   - let resp = result as! NSDictionary
148   - let errorCode = "\(resp["errorCode"] ?? 0)"
149   - if (errorCode == "0") {
150   - let data = resp["data"] as! Dictionary<String, Any>
151   - let userInfo = UserInfoManager.shared.userInfo
152   - userInfo.access_token = data["access_token"] as! String
153   - let expires_in = data["expires_in"] as! NSNumber
154   - userInfo.expires_in = "\(expires_in.intValue+CNLiveMineViewModel.timeStamp)"
155   - UserInfoManager.cacheUserInfo(userInfo: userInfo)
156   - resultBlock(.other,true)
157   - } else {
158   - showMessage(message: resp["errorMessage"] as! String)
159   - resultBlock(.other,false)
160   - }
  137 + let param = NSMutableDictionary.init()
  138 + param.setValue(APPId, forKey: "appId")
  139 + param.setValue(APPSecret, forKey: "secret")
  140 + showLoading(message: "")
  141 + CNLiveNetworking.setAllowRequestDefaultArgument(false)
  142 + CNLiveNetworking.setupShowDataResult(false)
  143 + CNLiveNetworking.requestNetwork(with: .POST, urlString: "/open/api2/token", param: (param as! [AnyHashable : Any]), cacheType: .networkOnly) { task, result, error in
  144 + hiddenLoading()
  145 + if (error == nil) {
  146 + let resp = result as! NSDictionary
  147 + let errorCode = "\(resp["errorCode"] ?? 0)"
  148 + if (errorCode == "0") {
  149 + let data = resp["data"] as! Dictionary<String, Any>
  150 + let userInfo = UserInfoManager.shared.userInfo
  151 + userInfo.access_token = data["access_token"] as! String
  152 + let expires_in = data["expires_in"] as! NSNumber
  153 + userInfo.expires_in = "\(expires_in.intValue+CNLiveMineViewModel.timeStamp)"
  154 + UserInfoManager.cacheUserInfo(userInfo: userInfo)
  155 + resultBlock(.other,true)
161 156 } else {
162   - showMessage(message: "修改头像失败")
  157 + showMessage(message: resp["errorMessage"] as! String)
163 158 resultBlock(.other,false)
164 159 }
  160 + } else {
  161 + showMessage(message: "修改头像失败")
  162 + resultBlock(.other,false)
165 163 }
166   -// } else {
167   -// resultBlock(.other,true)
168   -// }
  164 + }
169 165 }
170 166  
171 167 /// 上传反馈意见接口
... ... @@ -279,6 +275,40 @@ class CNLiveMineViewModel: NSObject {
279 275 }
280 276 }
281 277  
  278 + /// 获取身份列表
  279 + /// - Parameters:
  280 + /// - page: 页数
  281 + /// - resultBlock: 返回
  282 + static func requestIdenList(page: Int,resultBlock: @escaping resultNewsBlock) {
  283 + showLoading(message: "")
  284 + let param = NSMutableDictionary()
  285 + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")
  286 + param.setValue("\(page)", forKey: "page")
  287 + param.setValue("10", forKey: "pageSize")
  288 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  289 + CNLiveNetworking.setupShowDataResult(false)
  290 + CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseMCUrl+"/identityApi/list", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  291 + hiddenLoading()
  292 + if (error == nil) {
  293 + let resp = result as! NSDictionary
  294 + let errorCode = "\(resp["errorCode"] ?? "0")"
  295 + if (errorCode == "0") {
  296 + let userInfoModel = dictionaryToModel(resp as! [String : Any], UpdateInfoModel.self,"data") as! UpdateInfoModel
  297 + resultBlock(userInfoModel,.success)
  298 +
  299 + } else {
  300 + resultBlock(NSNull(),.failed)
  301 + }
  302 + } else {
  303 + if CNLiveNetworking.isNetworking() {
  304 + resultBlock(NSNull(),.failed)
  305 + } else {
  306 + resultBlock(NSNull(),.noNetwork)
  307 + }
  308 + }
  309 + }
  310 + }
  311 +
282 312 /// 获取十位时间戳
283 313 static var timeStamp: Int {
284 314 let timeInterval: TimeInterval = NSDate().timeIntervalSince1970
... ...