Commit a0d44c80fffd894bb0e40025742d737960312406
1 parent
2330cd7b
对基类添加逻辑
Showing
57 changed files
with
1783 additions
and
126 deletions
Podfile
| @@ -24,6 +24,10 @@ target 'metaCode' do | @@ -24,6 +24,10 @@ target 'metaCode' do | ||
| 24 | pod 'SnapKit' | 24 | pod 'SnapKit' |
| 25 | #加载框 | 25 | #加载框 |
| 26 | pod 'MBProgressHUD' | 26 | pod 'MBProgressHUD' |
| 27 | + #模型转换工具 | ||
| 28 | + pod 'HandyJSON' | ||
| 29 | + #轻量级缓存工具 | ||
| 30 | + pod 'SwiftyUserDefaults' | ||
| 27 | 31 | ||
| 28 | target 'metaCodeTests' do | 32 | target 'metaCodeTests' do |
| 29 | inherit! :search_paths | 33 | inherit! :search_paths |
metaCode.xcodeproj/project.pbxproj
| @@ -13,15 +13,26 @@ | @@ -13,15 +13,26 @@ | ||
| 13 | 790D01852A2D89E100C5978D /* UIColor+CNHexColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01842A2D89E100C5978D /* UIColor+CNHexColor.swift */; }; | 13 | 790D01852A2D89E100C5978D /* UIColor+CNHexColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01842A2D89E100C5978D /* UIColor+CNHexColor.swift */; }; |
| 14 | 790D018B2A2D8B3300C5978D /* CNLiveLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D018A2A2D8B3300C5978D /* CNLiveLoginViewController.swift */; }; | 14 | 790D018B2A2D8B3300C5978D /* CNLiveLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D018A2A2D8B3300C5978D /* CNLiveLoginViewController.swift */; }; |
| 15 | 790D01912A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01902A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift */; }; | 15 | 790D01912A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01902A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift */; }; |
| 16 | - 790D019A2A2DCAE400C5978D /* CNMineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01992A2DCAE400C5978D /* CNMineViewController.swift */; }; | 16 | + 790D019A2A2DCAE400C5978D /* CNLiveViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01992A2DCAE400C5978D /* CNLiveViewController.swift */; }; |
| 17 | 790D019D2A2DCBD000C5978D /* UIView+CNGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D019C2A2DCBD000C5978D /* UIView+CNGradient.swift */; }; | 17 | 790D019D2A2DCBD000C5978D /* UIView+CNGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D019C2A2DCBD000C5978D /* UIView+CNGradient.swift */; }; |
| 18 | 790D019F2A2DD66E00C5978D /* CNLiveLoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D019E2A2DD66E00C5978D /* CNLiveLoginViewModel.swift */; }; | 18 | 790D019F2A2DD66E00C5978D /* CNLiveLoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D019E2A2DD66E00C5978D /* CNLiveLoginViewModel.swift */; }; |
| 19 | 790D01A12A2DD69200C5978D /* CNLiveTips.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01A02A2DD69200C5978D /* CNLiveTips.swift */; }; | 19 | 790D01A12A2DD69200C5978D /* CNLiveTips.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01A02A2DD69200C5978D /* CNLiveTips.swift */; }; |
| 20 | 790D01A32A2DDBA300C5978D /* CNLiveConfigManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01A22A2DDBA300C5978D /* CNLiveConfigManager.swift */; }; | 20 | 790D01A32A2DDBA300C5978D /* CNLiveConfigManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01A22A2DDBA300C5978D /* CNLiveConfigManager.swift */; }; |
| 21 | 790D01A52A2DF65E00C5978D /* CNLiveLoginPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01A42A2DF65E00C5978D /* CNLiveLoginPickerView.swift */; }; | 21 | 790D01A52A2DF65E00C5978D /* CNLiveLoginPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01A42A2DF65E00C5978D /* CNLiveLoginPickerView.swift */; }; |
| 22 | 790D01A72A2DF84C00C5978D /* countries.plist in Resources */ = {isa = PBXBuildFile; fileRef = 790D01A62A2DF84C00C5978D /* countries.plist */; }; | 22 | 790D01A72A2DF84C00C5978D /* countries.plist in Resources */ = {isa = PBXBuildFile; fileRef = 790D01A62A2DF84C00C5978D /* countries.plist */; }; |
| 23 | + 79282A3C2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A3B2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift */; }; | ||
| 24 | + 79282A3E2A2EFDA000B5F8CF /* CNLiveLoginModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A3D2A2EFDA000B5F8CF /* CNLiveLoginModel.swift */; }; | ||
| 25 | + 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A3F2A2F055100B5F8CF /* CNLiveConfigUserInfo.swift */; }; | ||
| 26 | + 79282A422A2F173300B5F8CF /* CNLiveHotButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A412A2F173300B5F8CF /* CNLiveHotButton.swift */; }; | ||
| 27 | + 79282A442A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A432A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift */; }; | ||
| 28 | + 79282A462A2F457D00B5F8CF /* CNLiveMineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A452A2F457D00B5F8CF /* CNLiveMineViewController.swift */; }; | ||
| 23 | 796398942A260C0100D045EB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7963988D2A260C0100D045EB /* AppDelegate.swift */; }; | 29 | 796398942A260C0100D045EB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7963988D2A260C0100D045EB /* AppDelegate.swift */; }; |
| 24 | 7963989D2A260E6200D045EB /* CNLiveBaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */; }; | 30 | 7963989D2A260E6200D045EB /* CNLiveBaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */; }; |
| 31 | + 798A44E82A30134400815935 /* CNLiveMineHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44E72A30134400815935 /* CNLiveMineHeaderView.swift */; }; | ||
| 32 | + 798A44EA2A30135D00815935 /* CNLiveMineBodyListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44E92A30135D00815935 /* CNLiveMineBodyListView.swift */; }; | ||
| 33 | + 798A44EC2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44EB2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift */; }; | ||
| 34 | + 798A44EE2A305AAC00815935 /* CNLiveBaseNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44ED2A305AAC00815935 /* CNLiveBaseNavigationController.swift */; }; | ||
| 35 | + 798A44F02A305BC200815935 /* UIButton+CNLiveExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44EF2A305BC200815935 /* UIButton+CNLiveExtension.swift */; }; | ||
| 25 | 79A68C4A2A26E6CE00DC3B43 /* (null) in Sources */ = {isa = PBXBuildFile; }; | 36 | 79A68C4A2A26E6CE00DC3B43 /* (null) in Sources */ = {isa = PBXBuildFile; }; |
| 26 | 79A68C4C2A26EA6000DC3B43 /* (null) in Sources */ = {isa = PBXBuildFile; }; | 37 | 79A68C4C2A26EA6000DC3B43 /* (null) in Sources */ = {isa = PBXBuildFile; }; |
| 27 | 7C4931292A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C4931282A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift */; }; | 38 | 7C4931292A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C4931282A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift */; }; |
| @@ -74,15 +85,26 @@ | @@ -74,15 +85,26 @@ | ||
| 74 | 790D01842A2D89E100C5978D /* UIColor+CNHexColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+CNHexColor.swift"; sourceTree = "<group>"; }; | 85 | 790D01842A2D89E100C5978D /* UIColor+CNHexColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+CNHexColor.swift"; sourceTree = "<group>"; }; |
| 75 | 790D018A2A2D8B3300C5978D /* CNLiveLoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginViewController.swift; sourceTree = "<group>"; }; | 86 | 790D018A2A2D8B3300C5978D /* CNLiveLoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginViewController.swift; sourceTree = "<group>"; }; |
| 76 | 790D01902A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveConfigFontMacro.swift; sourceTree = "<group>"; }; | 87 | 790D01902A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveConfigFontMacro.swift; sourceTree = "<group>"; }; |
| 77 | - 790D01992A2DCAE400C5978D /* CNMineViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNMineViewController.swift; sourceTree = "<group>"; }; | 88 | + 790D01992A2DCAE400C5978D /* CNLiveViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNLiveViewController.swift; sourceTree = "<group>"; }; |
| 78 | 790D019C2A2DCBD000C5978D /* UIView+CNGradient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+CNGradient.swift"; sourceTree = "<group>"; }; | 89 | 790D019C2A2DCBD000C5978D /* UIView+CNGradient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+CNGradient.swift"; sourceTree = "<group>"; }; |
| 79 | 790D019E2A2DD66E00C5978D /* CNLiveLoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginViewModel.swift; sourceTree = "<group>"; }; | 90 | 790D019E2A2DD66E00C5978D /* CNLiveLoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginViewModel.swift; sourceTree = "<group>"; }; |
| 80 | 790D01A02A2DD69200C5978D /* CNLiveTips.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveTips.swift; sourceTree = "<group>"; }; | 91 | 790D01A02A2DD69200C5978D /* CNLiveTips.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveTips.swift; sourceTree = "<group>"; }; |
| 81 | 790D01A22A2DDBA300C5978D /* CNLiveConfigManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveConfigManager.swift; sourceTree = "<group>"; }; | 92 | 790D01A22A2DDBA300C5978D /* CNLiveConfigManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveConfigManager.swift; sourceTree = "<group>"; }; |
| 82 | 790D01A42A2DF65E00C5978D /* CNLiveLoginPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginPickerView.swift; sourceTree = "<group>"; }; | 93 | 790D01A42A2DF65E00C5978D /* CNLiveLoginPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginPickerView.swift; sourceTree = "<group>"; }; |
| 83 | 790D01A62A2DF84C00C5978D /* countries.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = countries.plist; sourceTree = "<group>"; }; | 94 | 790D01A62A2DF84C00C5978D /* countries.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = countries.plist; sourceTree = "<group>"; }; |
| 95 | + 79282A3B2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSString+CNLiveExtensions.swift"; sourceTree = "<group>"; }; | ||
| 96 | + 79282A3D2A2EFDA000B5F8CF /* CNLiveLoginModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginModel.swift; sourceTree = "<group>"; }; | ||
| 97 | + 79282A3F2A2F055100B5F8CF /* CNLiveConfigUserInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveConfigUserInfo.swift; sourceTree = "<group>"; }; | ||
| 98 | + 79282A412A2F173300B5F8CF /* CNLiveHotButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveHotButton.swift; sourceTree = "<group>"; }; | ||
| 99 | + 79282A432A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginAuthView.swift; sourceTree = "<group>"; }; | ||
| 100 | + 79282A452A2F457D00B5F8CF /* CNLiveMineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineViewController.swift; sourceTree = "<group>"; }; | ||
| 84 | 7963988D2A260C0100D045EB /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; | 101 | 7963988D2A260C0100D045EB /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; |
| 85 | 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNLiveBaseViewController.swift; sourceTree = "<group>"; }; | 102 | 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNLiveBaseViewController.swift; sourceTree = "<group>"; }; |
| 103 | + 798A44E72A30134400815935 /* CNLiveMineHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineHeaderView.swift; sourceTree = "<group>"; }; | ||
| 104 | + 798A44E92A30135D00815935 /* CNLiveMineBodyListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineBodyListView.swift; sourceTree = "<group>"; }; | ||
| 105 | + 798A44EB2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineAddInfoViewController.swift; sourceTree = "<group>"; }; | ||
| 106 | + 798A44ED2A305AAC00815935 /* CNLiveBaseNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveBaseNavigationController.swift; sourceTree = "<group>"; }; | ||
| 107 | + 798A44EF2A305BC200815935 /* UIButton+CNLiveExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+CNLiveExtension.swift"; sourceTree = "<group>"; }; | ||
| 86 | 79A68C512A26F59C00DC3B43 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = metaCode/Info.plist; sourceTree = "<group>"; }; | 108 | 79A68C512A26F59C00DC3B43 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = metaCode/Info.plist; sourceTree = "<group>"; }; |
| 87 | 7C4931282A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveBaseTabBarViewController.swift; sourceTree = "<group>"; }; | 109 | 7C4931282A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveBaseTabBarViewController.swift; sourceTree = "<group>"; }; |
| 88 | 7C49312C2A2DB9FA000E44B4 /* UITabBar+CNBadge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITabBar+CNBadge.swift"; sourceTree = "<group>"; }; | 110 | 7C49312C2A2DB9FA000E44B4 /* UITabBar+CNBadge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITabBar+CNBadge.swift"; sourceTree = "<group>"; }; |
| @@ -163,6 +185,8 @@ | @@ -163,6 +185,8 @@ | ||
| 163 | 7C49312C2A2DB9FA000E44B4 /* UITabBar+CNBadge.swift */, | 185 | 7C49312C2A2DB9FA000E44B4 /* UITabBar+CNBadge.swift */, |
| 164 | 790D019C2A2DCBD000C5978D /* UIView+CNGradient.swift */, | 186 | 790D019C2A2DCBD000C5978D /* UIView+CNGradient.swift */, |
| 165 | 790D01A02A2DD69200C5978D /* CNLiveTips.swift */, | 187 | 790D01A02A2DD69200C5978D /* CNLiveTips.swift */, |
| 188 | + 79282A3B2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift */, | ||
| 189 | + 798A44EF2A305BC200815935 /* UIButton+CNLiveExtension.swift */, | ||
| 166 | ); | 190 | ); |
| 167 | path = Extensions; | 191 | path = Extensions; |
| 168 | sourceTree = "<group>"; | 192 | sourceTree = "<group>"; |
| @@ -182,6 +206,7 @@ | @@ -182,6 +206,7 @@ | ||
| 182 | isa = PBXGroup; | 206 | isa = PBXGroup; |
| 183 | children = ( | 207 | children = ( |
| 184 | 790D019E2A2DD66E00C5978D /* CNLiveLoginViewModel.swift */, | 208 | 790D019E2A2DD66E00C5978D /* CNLiveLoginViewModel.swift */, |
| 209 | + 79282A3D2A2EFDA000B5F8CF /* CNLiveLoginModel.swift */, | ||
| 185 | ); | 210 | ); |
| 186 | path = ViewModel; | 211 | path = ViewModel; |
| 187 | sourceTree = "<group>"; | 212 | sourceTree = "<group>"; |
| @@ -205,6 +230,7 @@ | @@ -205,6 +230,7 @@ | ||
| 205 | isa = PBXGroup; | 230 | isa = PBXGroup; |
| 206 | children = ( | 231 | children = ( |
| 207 | 790D01A42A2DF65E00C5978D /* CNLiveLoginPickerView.swift */, | 232 | 790D01A42A2DF65E00C5978D /* CNLiveLoginPickerView.swift */, |
| 233 | + 79282A432A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift */, | ||
| 208 | ); | 234 | ); |
| 209 | path = View; | 235 | path = View; |
| 210 | sourceTree = "<group>"; | 236 | sourceTree = "<group>"; |
| @@ -212,6 +238,8 @@ | @@ -212,6 +238,8 @@ | ||
| 212 | 790D01972A2DCAE400C5978D /* MinePage */ = { | 238 | 790D01972A2DCAE400C5978D /* MinePage */ = { |
| 213 | isa = PBXGroup; | 239 | isa = PBXGroup; |
| 214 | children = ( | 240 | children = ( |
| 241 | + 798A44E52A30130600815935 /* View */, | ||
| 242 | + 798A44E62A30130600815935 /* ViewModel */, | ||
| 215 | 790D01982A2DCAE400C5978D /* Controller */, | 243 | 790D01982A2DCAE400C5978D /* Controller */, |
| 216 | ); | 244 | ); |
| 217 | path = MinePage; | 245 | path = MinePage; |
| @@ -220,7 +248,8 @@ | @@ -220,7 +248,8 @@ | ||
| 220 | 790D01982A2DCAE400C5978D /* Controller */ = { | 248 | 790D01982A2DCAE400C5978D /* Controller */ = { |
| 221 | isa = PBXGroup; | 249 | isa = PBXGroup; |
| 222 | children = ( | 250 | children = ( |
| 223 | - 790D01992A2DCAE400C5978D /* CNMineViewController.swift */, | 251 | + 79282A452A2F457D00B5F8CF /* CNLiveMineViewController.swift */, |
| 252 | + 798A44EB2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift */, | ||
| 224 | ); | 253 | ); |
| 225 | path = Controller; | 254 | path = Controller; |
| 226 | sourceTree = "<group>"; | 255 | sourceTree = "<group>"; |
| @@ -243,6 +272,7 @@ | @@ -243,6 +272,7 @@ | ||
| 243 | 7963988B2A260C0100D045EB /* Other */ = { | 272 | 7963988B2A260C0100D045EB /* Other */ = { |
| 244 | isa = PBXGroup; | 273 | isa = PBXGroup; |
| 245 | children = ( | 274 | children = ( |
| 275 | + 790D01992A2DCAE400C5978D /* CNLiveViewController.swift */, | ||
| 246 | 7963988D2A260C0100D045EB /* AppDelegate.swift */, | 276 | 7963988D2A260C0100D045EB /* AppDelegate.swift */, |
| 247 | ); | 277 | ); |
| 248 | path = Other; | 278 | path = Other; |
| @@ -294,6 +324,7 @@ | @@ -294,6 +324,7 @@ | ||
| 294 | 790D01812A2D88FC00C5978D /* CNLiveConfigMacro.swift */, | 324 | 790D01812A2D88FC00C5978D /* CNLiveConfigMacro.swift */, |
| 295 | 790D01902A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift */, | 325 | 790D01902A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift */, |
| 296 | 790D01A22A2DDBA300C5978D /* CNLiveConfigManager.swift */, | 326 | 790D01A22A2DDBA300C5978D /* CNLiveConfigManager.swift */, |
| 327 | + 79282A3F2A2F055100B5F8CF /* CNLiveConfigUserInfo.swift */, | ||
| 297 | ); | 328 | ); |
| 298 | path = Config; | 329 | path = Config; |
| 299 | sourceTree = "<group>"; | 330 | sourceTree = "<group>"; |
| @@ -313,10 +344,27 @@ | @@ -313,10 +344,27 @@ | ||
| 313 | children = ( | 344 | children = ( |
| 314 | 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */, | 345 | 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */, |
| 315 | 7C4931282A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift */, | 346 | 7C4931282A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift */, |
| 347 | + 798A44ED2A305AAC00815935 /* CNLiveBaseNavigationController.swift */, | ||
| 316 | ); | 348 | ); |
| 317 | path = Base; | 349 | path = Base; |
| 318 | sourceTree = "<group>"; | 350 | sourceTree = "<group>"; |
| 319 | }; | 351 | }; |
| 352 | + 798A44E52A30130600815935 /* View */ = { | ||
| 353 | + isa = PBXGroup; | ||
| 354 | + children = ( | ||
| 355 | + 798A44E72A30134400815935 /* CNLiveMineHeaderView.swift */, | ||
| 356 | + 798A44E92A30135D00815935 /* CNLiveMineBodyListView.swift */, | ||
| 357 | + ); | ||
| 358 | + path = View; | ||
| 359 | + sourceTree = "<group>"; | ||
| 360 | + }; | ||
| 361 | + 798A44E62A30130600815935 /* ViewModel */ = { | ||
| 362 | + isa = PBXGroup; | ||
| 363 | + children = ( | ||
| 364 | + ); | ||
| 365 | + path = ViewModel; | ||
| 366 | + sourceTree = "<group>"; | ||
| 367 | + }; | ||
| 320 | 7CD675212A26F844008354C1 /* HomePage */ = { | 368 | 7CD675212A26F844008354C1 /* HomePage */ = { |
| 321 | isa = PBXGroup; | 369 | isa = PBXGroup; |
| 322 | children = ( | 370 | children = ( |
| @@ -353,6 +401,7 @@ | @@ -353,6 +401,7 @@ | ||
| 353 | isa = PBXGroup; | 401 | isa = PBXGroup; |
| 354 | children = ( | 402 | children = ( |
| 355 | 7CD675512A29C04B008354C1 /* CNLiveConstant.swift */, | 403 | 7CD675512A29C04B008354C1 /* CNLiveConstant.swift */, |
| 404 | + 79282A412A2F173300B5F8CF /* CNLiveHotButton.swift */, | ||
| 356 | ); | 405 | ); |
| 357 | path = Constant; | 406 | path = Constant; |
| 358 | sourceTree = "<group>"; | 407 | sourceTree = "<group>"; |
| @@ -661,31 +710,42 @@ | @@ -661,31 +710,42 @@ | ||
| 661 | 796398942A260C0100D045EB /* AppDelegate.swift in Sources */, | 710 | 796398942A260C0100D045EB /* AppDelegate.swift in Sources */, |
| 662 | 7963989D2A260E6200D045EB /* CNLiveBaseViewController.swift in Sources */, | 711 | 7963989D2A260E6200D045EB /* CNLiveBaseViewController.swift in Sources */, |
| 663 | 790D01A52A2DF65E00C5978D /* CNLiveLoginPickerView.swift in Sources */, | 712 | 790D01A52A2DF65E00C5978D /* CNLiveLoginPickerView.swift in Sources */, |
| 713 | + 79282A3C2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift in Sources */, | ||
| 664 | 790D01822A2D88FC00C5978D /* CNLiveConfigMacro.swift in Sources */, | 714 | 790D01822A2D88FC00C5978D /* CNLiveConfigMacro.swift in Sources */, |
| 665 | 7CD675482A274167008354C1 /* PGIndexBannerSubiew.m in Sources */, | 715 | 7CD675482A274167008354C1 /* PGIndexBannerSubiew.m in Sources */, |
| 666 | 790D019F2A2DD66E00C5978D /* CNLiveLoginViewModel.swift in Sources */, | 716 | 790D019F2A2DD66E00C5978D /* CNLiveLoginViewModel.swift in Sources */, |
| 667 | 790D019D2A2DCBD000C5978D /* UIView+CNGradient.swift in Sources */, | 717 | 790D019D2A2DCBD000C5978D /* UIView+CNGradient.swift in Sources */, |
| 668 | 7CD6753D2A2740B0008354C1 /* CNMainView.swift in Sources */, | 718 | 7CD6753D2A2740B0008354C1 /* CNMainView.swift in Sources */, |
| 669 | 7CD675522A29C04B008354C1 /* CNLiveConstant.swift in Sources */, | 719 | 7CD675522A29C04B008354C1 /* CNLiveConstant.swift in Sources */, |
| 720 | + 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */, | ||
| 670 | 7CD6753E2A2740B0008354C1 /* CNPayMoneyCodeView.swift in Sources */, | 721 | 7CD6753E2A2740B0008354C1 /* CNPayMoneyCodeView.swift in Sources */, |
| 671 | 790D01A12A2DD69200C5978D /* CNLiveTips.swift in Sources */, | 722 | 790D01A12A2DD69200C5978D /* CNLiveTips.swift in Sources */, |
| 672 | 7CD675402A2740B0008354C1 /* CNCollectMoneyCodeView.swift in Sources */, | 723 | 7CD675402A2740B0008354C1 /* CNCollectMoneyCodeView.swift in Sources */, |
| 673 | 7CD6754F2A2840B9008354C1 /* CNMetaCodeHomePageController.swift in Sources */, | 724 | 7CD6754F2A2840B9008354C1 /* CNMetaCodeHomePageController.swift in Sources */, |
| 674 | 7CD675472A274167008354C1 /* NewPagedFlowView.m in Sources */, | 725 | 7CD675472A274167008354C1 /* NewPagedFlowView.m in Sources */, |
| 726 | + 79282A442A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift in Sources */, | ||
| 675 | 790D01A32A2DDBA300C5978D /* CNLiveConfigManager.swift in Sources */, | 727 | 790D01A32A2DDBA300C5978D /* CNLiveConfigManager.swift in Sources */, |
| 728 | + 798A44EA2A30135D00815935 /* CNLiveMineBodyListView.swift in Sources */, | ||
| 676 | 79A68C4A2A26E6CE00DC3B43 /* (null) in Sources */, | 729 | 79A68C4A2A26E6CE00DC3B43 /* (null) in Sources */, |
| 730 | + 79282A3E2A2EFDA000B5F8CF /* CNLiveLoginModel.swift in Sources */, | ||
| 677 | 790D01852A2D89E100C5978D /* UIColor+CNHexColor.swift in Sources */, | 731 | 790D01852A2D89E100C5978D /* UIColor+CNHexColor.swift in Sources */, |
| 678 | 790D018B2A2D8B3300C5978D /* CNLiveLoginViewController.swift in Sources */, | 732 | 790D018B2A2D8B3300C5978D /* CNLiveLoginViewController.swift in Sources */, |
| 733 | + 798A44EC2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift in Sources */, | ||
| 679 | 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */, | 734 | 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */, |
| 680 | 790D01912A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift in Sources */, | 735 | 790D01912A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift in Sources */, |
| 681 | 790D01852A2D89E100C5978D /* UIColor+CNHexColor.swift in Sources */, | 736 | 790D01852A2D89E100C5978D /* UIColor+CNHexColor.swift in Sources */, |
| 737 | + 798A44EE2A305AAC00815935 /* CNLiveBaseNavigationController.swift in Sources */, | ||
| 682 | 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */, | 738 | 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */, |
| 683 | 7C4931292A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift in Sources */, | 739 | 7C4931292A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift in Sources */, |
| 684 | 7CD6753F2A2740B0008354C1 /* CNTopCollectMoneyRemindView.swift in Sources */, | 740 | 7CD6753F2A2740B0008354C1 /* CNTopCollectMoneyRemindView.swift in Sources */, |
| 741 | + 79282A422A2F173300B5F8CF /* CNLiveHotButton.swift in Sources */, | ||
| 685 | 7CD6753C2A2740B0008354C1 /* CNBottomPayMoneyRemindView.swift in Sources */, | 742 | 7CD6753C2A2740B0008354C1 /* CNBottomPayMoneyRemindView.swift in Sources */, |
| 743 | + 798A44E82A30134400815935 /* CNLiveMineHeaderView.swift in Sources */, | ||
| 686 | 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNBadge.swift in Sources */, | 744 | 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNBadge.swift in Sources */, |
| 687 | - 790D019A2A2DCAE400C5978D /* CNMineViewController.swift in Sources */, | 745 | + 790D019A2A2DCAE400C5978D /* CNLiveViewController.swift in Sources */, |
| 688 | 79A68C4C2A26EA6000DC3B43 /* (null) in Sources */, | 746 | 79A68C4C2A26EA6000DC3B43 /* (null) in Sources */, |
| 747 | + 79282A462A2F457D00B5F8CF /* CNLiveMineViewController.swift in Sources */, | ||
| 748 | + 798A44F02A305BC200815935 /* UIButton+CNLiveExtension.swift in Sources */, | ||
| 689 | ); | 749 | ); |
| 690 | runOnlyForDeploymentPostprocessing = 0; | 750 | runOnlyForDeploymentPostprocessing = 0; |
| 691 | }; | 751 | }; |
metaCode/Classes/Common/Base/CNLiveBaseNavigationController.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveBaseNavigationController.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by open on 2023/6/7. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +class CNLiveBaseNavigationController : UINavigationController, UIGestureRecognizerDelegate { | ||
| 11 | + | ||
| 12 | + override func viewDidLoad() { | ||
| 13 | + super.viewDidLoad() | ||
| 14 | + | ||
| 15 | + guard let targets = interactivePopGestureRecognizer?.value(forKey: "_targets") as? [NSObject] else {return} | ||
| 16 | + let targetObjc = targets[0] | ||
| 17 | + let target = targetObjc.value(forKey: "target") | ||
| 18 | + let action = Selector(("handleNavigationTransition:")) | ||
| 19 | + | ||
| 20 | + let panges = UIPanGestureRecognizer(target: target, action: action) | ||
| 21 | + view.addGestureRecognizer(panges) | ||
| 22 | + | ||
| 23 | + self.interactivePopGestureRecognizer?.delegate = self //侧滑返回 | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + // MARK: - <UIGestureRecognizerDelegate> | ||
| 27 | + // 什么时候调用:每次触发手势之前都会询问下代理,是否触发。 | ||
| 28 | + // 作用:拦截手势触发,手势识别器对象会调用这个代理方法来决定手势是否有效 | ||
| 29 | + func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { | ||
| 30 | + return viewControllers.count > 1 | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + /// 重写push方法的目的 : 拦截所有push进来的子控制器 | ||
| 34 | + override func pushViewController(_ viewController: UIViewController, animated: Bool) { | ||
| 35 | + if (self.children.count > 0 ) { | ||
| 36 | + // 隐藏底部的工具条 | ||
| 37 | + viewController.hidesBottomBarWhenPushed = true | ||
| 38 | + } | ||
| 39 | + // 所有设置搞定后, 再push控制器 | ||
| 40 | + super.pushViewController(viewController, animated: animated) | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + @objc func ClickBackBtn() { | ||
| 44 | + self.popViewController(animated: true) | ||
| 45 | + } | ||
| 46 | +} | ||
| 47 | + | ||
| 48 | + |
metaCode/Classes/Common/Base/CNLiveBaseTabBarViewController.swift
| @@ -20,6 +20,8 @@ class CNLiveBaseTabBarViewController:UITabBarController | @@ -20,6 +20,8 @@ class CNLiveBaseTabBarViewController:UITabBarController | ||
| 20 | self.setUpTabBar() | 20 | self.setUpTabBar() |
| 21 | self.setupBackgroup() | 21 | self.setupBackgroup() |
| 22 | 22 | ||
| 23 | + self.selectedIndex = 1 | ||
| 24 | + | ||
| 23 | } | 25 | } |
| 24 | override func viewDidAppear(_ animated: Bool) { | 26 | override func viewDidAppear(_ animated: Bool) { |
| 25 | super.viewDidAppear(animated) | 27 | super.viewDidAppear(animated) |
| @@ -29,7 +31,7 @@ class CNLiveBaseTabBarViewController:UITabBarController | @@ -29,7 +31,7 @@ class CNLiveBaseTabBarViewController:UITabBarController | ||
| 29 | func setUpTabBar() { | 31 | func setUpTabBar() { |
| 30 | 32 | ||
| 31 | let homeVC = CNMetaCodeHomePageController() | 33 | let homeVC = CNMetaCodeHomePageController() |
| 32 | - let mineVC = CNMineViewController() | 34 | + let mineVC = CNLiveMineViewController() |
| 33 | 35 | ||
| 34 | creatTabbarView(viewController: homeVC, image: "tabbar_hoem_icon_default", selectImage: "tabbar_hoem_icon_selected", title: "首页") | 36 | creatTabbarView(viewController: homeVC, image: "tabbar_hoem_icon_default", selectImage: "tabbar_hoem_icon_selected", title: "首页") |
| 35 | 37 | ||
| @@ -39,8 +41,8 @@ class CNLiveBaseTabBarViewController:UITabBarController | @@ -39,8 +41,8 @@ class CNLiveBaseTabBarViewController:UITabBarController | ||
| 39 | self.tabBar.isTranslucent = false | 41 | self.tabBar.isTranslucent = false |
| 40 | 42 | ||
| 41 | self.viewControllers = [ | 43 | self.viewControllers = [ |
| 42 | - UINavigationController(rootViewController: homeVC), | ||
| 43 | - UINavigationController(rootViewController: mineVC), | 44 | + CNLiveBaseNavigationController(rootViewController: homeVC), |
| 45 | + CNLiveBaseNavigationController(rootViewController: mineVC), | ||
| 44 | ]; | 46 | ]; |
| 45 | 47 | ||
| 46 | 48 |
metaCode/Classes/Common/Base/CNLiveBaseViewController.swift
| @@ -10,24 +10,150 @@ import Foundation | @@ -10,24 +10,150 @@ import Foundation | ||
| 10 | 10 | ||
| 11 | class CNLiveBaseViewController: UIViewController { | 11 | class CNLiveBaseViewController: UIViewController { |
| 12 | 12 | ||
| 13 | + static let kTopNavLeftRightOffset = 6.0 | ||
| 14 | + /// topNavView的高度 默认高度为 get_system_nav_height() | ||
| 15 | + public var _topNavViewHeight: CGFloat = 0.0 | ||
| 16 | + public var topNavViewHeight : CGFloat { | ||
| 17 | + get { | ||
| 18 | + return _topNavViewHeight | ||
| 19 | + } | ||
| 20 | + set { | ||
| 21 | + _topNavViewHeight = newValue | ||
| 22 | + if (view.subviews.contains(topNavView)) { | ||
| 23 | + viewWillLayoutSubviews() | ||
| 24 | + } | ||
| 25 | + } | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + /// 设置标题显示 | ||
| 29 | + public var _titleName: String = "" | ||
| 30 | + public var titleName: String { | ||
| 31 | + get { | ||
| 32 | + return _titleName | ||
| 33 | + } | ||
| 34 | + set { | ||
| 35 | + _titleName = newValue | ||
| 36 | + super.title = _titleName | ||
| 37 | + titleLabel.text = _titleName | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + /// //顶部导航内容(不带topLine)偏移量Y 初始值为0 | ||
| 42 | + public var _topNavViewSubUIContentOffsetY: CGFloat = 0.0 | ||
| 43 | + public var topNavViewSubUIContentOffsetY: CGFloat { | ||
| 44 | + get { | ||
| 45 | + return _topNavViewSubUIContentOffsetY | ||
| 46 | + } | ||
| 47 | + set { | ||
| 48 | + _topNavViewSubUIContentOffsetY = newValue | ||
| 49 | + viewWillLayoutSubviews() | ||
| 50 | + } | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + public var _leftNavBtns: Array<UIButton> = [] | ||
| 54 | + public var leftNavBtns: Array<UIButton> { | ||
| 55 | + get { | ||
| 56 | + return _leftNavBtns | ||
| 57 | + } | ||
| 58 | + set { | ||
| 59 | + _leftNavBtns = newValue | ||
| 60 | + var lastBtn : UIButton? = nil | ||
| 61 | + _leftNavBtns.forEach { btn in | ||
| 62 | + btn.removeFromSuperview() | ||
| 63 | + topNavView.addSubview(btn) | ||
| 64 | + btn.frame = CGRect(x: lastBtn != nil ? CGRectGetMaxX(lastBtn!.frame) : CNLiveBaseViewController.kTopNavLeftRightOffset, y: topNavViewHeight - btn.height, width: btn.width, height: btn.height) | ||
| 65 | + lastBtn = btn | ||
| 66 | + } | ||
| 67 | + leftNavSpace = CGRectGetMaxX(lastBtn!.frame) | ||
| 68 | + viewWillLayoutSubviews() | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + public var _rightNavBtns: Array<UIButton> = [] | ||
| 73 | + public var rightNavBtns: Array<UIButton> { | ||
| 74 | + get { | ||
| 75 | + return _rightNavBtns | ||
| 76 | + } | ||
| 77 | + set { | ||
| 78 | + _rightNavBtns = newValue | ||
| 79 | + var lastBtn : UIButton? = nil | ||
| 80 | + _rightNavBtns.forEach { btn in | ||
| 81 | + btn.removeFromSuperview() | ||
| 82 | + topNavView.addSubview(btn) | ||
| 83 | + btn.frame = CGRect(x: lastBtn != nil ? (lastBtn!.origin.x - btn.width) : (topNavView.width - CNLiveBaseViewController.kTopNavLeftRightOffset - btn.width), y: topNavViewHeight - btn.height, width: btn.width, height: btn.height) | ||
| 84 | + lastBtn = btn | ||
| 85 | + } | ||
| 86 | + rightNavSpace = CGRectGetMaxX(lastBtn!.frame) | ||
| 87 | + viewWillLayoutSubviews() | ||
| 88 | + } | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + private var leftNavSpace: CGFloat = 0.0 | ||
| 92 | + private var rightNavSpace: CGFloat = 0.0 | ||
| 93 | + | ||
| 13 | deinit { | 94 | deinit { |
| 14 | log("主界面已销毁") | 95 | log("主界面已销毁") |
| 15 | } | 96 | } |
| 16 | 97 | ||
| 17 | override func viewDidLoad() { | 98 | override func viewDidLoad() { |
| 18 | - self.view.backgroundColor = .white | 99 | + self.view.backgroundColor = HexColor("#F7F8FA") |
| 100 | + | ||
| 101 | + if #available(iOS 13.0, *) { | ||
| 102 | + self.overrideUserInterfaceStyle = .light | ||
| 103 | + } else { | ||
| 104 | + // Fallback on earlier versions | ||
| 105 | + } | ||
| 19 | 106 | ||
| 20 | configIOS11() | 107 | configIOS11() |
| 21 | configIOS15() | 108 | configIOS15() |
| 22 | 109 | ||
| 23 | - self.navigationController?.isNavigationBarHidden = true | 110 | + initBaseUI() |
| 24 | 111 | ||
| 112 | + self.navigationController?.isNavigationBarHidden = true | ||
| 25 | } | 113 | } |
| 26 | 114 | ||
| 115 | + override func viewWillLayoutSubviews() { | ||
| 116 | + super.viewWillLayoutSubviews() | ||
| 117 | + topNavView.frame = CGRect(x: 0, y: 0, width: view.width, height: topNavViewHeight) | ||
| 118 | + let lrSpace = leftNavSpace > rightNavSpace ? leftNavSpace : rightNavSpace | ||
| 119 | + titleLabel.frame = CGRect(x: CGFloat(Int(lrSpace)) , y: topNavViewHeight - get_system_nav_ui_height() - topNavViewSubUIContentOffsetY, width: topNavView.width - (lrSpace * 2), height: get_system_nav_ui_height()) | ||
| 120 | + leftNavBtns.forEach { currentBtn in | ||
| 121 | + currentBtn.frame = CGRectMake(currentBtn.origin.x, topNavViewHeight - currentBtn.height - topNavViewSubUIContentOffsetY, currentBtn.width, currentBtn.height); | ||
| 122 | + } | ||
| 123 | + rightNavBtns.forEach { currentBtn in | ||
| 124 | + currentBtn.frame = CGRectMake(currentBtn.origin.x, topNavViewHeight - currentBtn.height - topNavViewSubUIContentOffsetY, currentBtn.width, currentBtn.height); | ||
| 125 | + } | ||
| 126 | + topLine.frame = CGRect(x: 0, y: topNavViewHeight - 1, width: topNavView.width, height: 1) | ||
| 127 | + } | ||
| 27 | 128 | ||
| 129 | + public lazy var topNavView: UIView = { | ||
| 130 | + let topNavView = UIView.init(frame: CGRect(x: 0, y: 0, width: view.width, height: topNavViewHeight)) | ||
| 131 | + topNavView.backgroundColor = HexColor("#fafbfd") | ||
| 132 | + topNavView.isUserInteractionEnabled = true | ||
| 133 | + | ||
| 134 | + let tap = UITapGestureRecognizer.init(target: self, action: #selector(topNavViewTap)) | ||
| 135 | + tap.cancelsTouchesInView = false | ||
| 136 | + topNavView.addGestureRecognizer(tap) | ||
| 137 | + topNavView.backgroundColor = HexColor("#F7F8FA") | ||
| 138 | + return topNavView | ||
| 139 | + }() | ||
| 28 | 140 | ||
| 29 | - // MARK: - iOS 适配 | 141 | + public lazy var titleLabel: UILabel = { |
| 142 | + let titleLabel = UILabel.init(frame: CGRectMake(0, topNavView.height - get_system_nav_ui_height(), topNavView.frame.size.width, get_system_nav_ui_height())) | ||
| 143 | + titleLabel.textColor = HexColor("#333333") | ||
| 144 | + titleLabel.font = Font_18_Fit | ||
| 145 | + titleLabel.textAlignment = .center | ||
| 146 | + titleLabel.text = title | ||
| 147 | + return titleLabel | ||
| 148 | + }() | ||
| 30 | 149 | ||
| 150 | + public lazy var topLine: UIImageView = { | ||
| 151 | + let topLine = UIImageView.init(frame: CGRect(x: 0, y: topNavView.height - 1, width: view.width, height: 1)) | ||
| 152 | + topLine.backgroundColor = .clear | ||
| 153 | + return topLine | ||
| 154 | + }() | ||
| 155 | + | ||
| 156 | + // MARK: - iOS 适配 | ||
| 31 | func configIOS11() { | 157 | func configIOS11() { |
| 32 | /// 适配 iOS 11.0 ,iOS11以后,控制器的automaticallyAdjustsScrollViewInsets已经废弃,所以默认就会是YES | 158 | /// 适配 iOS 11.0 ,iOS11以后,控制器的automaticallyAdjustsScrollViewInsets已经废弃,所以默认就会是YES |
| 33 | /// iOS 11新增:adjustContentInset 和 contentInsetAdjustmentBehavior 来处理滚动区域 | 159 | /// iOS 11新增:adjustContentInset 和 contentInsetAdjustmentBehavior 来处理滚动区域 |
| @@ -52,5 +178,25 @@ class CNLiveBaseViewController: UIViewController { | @@ -52,5 +178,25 @@ class CNLiveBaseViewController: UIViewController { | ||
| 52 | UITableView.appearance().sectionHeaderTopPadding = 0 | 178 | UITableView.appearance().sectionHeaderTopPadding = 0 |
| 53 | } | 179 | } |
| 54 | } | 180 | } |
| 181 | + | ||
| 182 | + func initBaseUI() -> Void { | ||
| 183 | + self.topNavViewHeight = get_system_nav_height() | ||
| 184 | + | ||
| 185 | + view.addSubview(topNavView) | ||
| 186 | + topNavView.addSubview(titleLabel) | ||
| 187 | + topNavView.addSubview(topLine) | ||
| 188 | + | ||
| 189 | + //先设置一个默认返回按钮 | ||
| 190 | + let leftBtn_array : Array<UIButton> = [UIButton.backItem(imageName: "main_navi_left_icon_back", target: self, action: #selector(ClickBackBtn))] | ||
| 191 | + leftNavBtns = leftBtn_array | ||
| 192 | + } | ||
| 193 | + | ||
| 194 | + @objc func ClickBackBtn() { | ||
| 195 | + self.navigationController!.popViewController(animated: true) | ||
| 196 | + } | ||
| 197 | + | ||
| 198 | + @objc func topNavViewTap() { | ||
| 199 | + UIApplication.shared.keyWindow?.endEditing(true) | ||
| 200 | + } | ||
| 55 | } | 201 | } |
| 56 | 202 |
metaCode/Classes/Config/CNLiveConfigUserInfo.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveConfigUserInfo.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by open on 2023/6/6. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | +import SwiftyUserDefaults | ||
| 10 | + | ||
| 11 | +extension DefaultsKeys { | ||
| 12 | + | ||
| 13 | + var userInfoKey: DefaultsKey<CNLiveLoginModel?>{ | ||
| 14 | + DefaultsKey.init("userInfo") | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | +} | ||
| 18 | + | ||
| 19 | +class UserInfoManager: NSObject { | ||
| 20 | + | ||
| 21 | + static let shared = UserInfoManager() | ||
| 22 | + | ||
| 23 | + public var is_login: Bool { | ||
| 24 | + get { | ||
| 25 | + return userInfo.uid.lengthOfBytes(using: .utf8) > 0 | ||
| 26 | + } | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + fileprivate var _userInfo : CNLiveLoginModel? | ||
| 30 | + private(set) var userInfo: CNLiveLoginModel { | ||
| 31 | + | ||
| 32 | + set { | ||
| 33 | + _userInfo = newValue | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + get { | ||
| 37 | + if (_userInfo != nil && (_userInfo?.uid.lengthOfBytes(using: .utf8))! > 0) { | ||
| 38 | + return _userInfo! | ||
| 39 | + } | ||
| 40 | + return readUserInfo() | ||
| 41 | + } | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + private override init() {} | ||
| 45 | + | ||
| 46 | + /// 缓存用户数据 | ||
| 47 | + /// - Parameter userInfo: 用户数据 | ||
| 48 | + public func cacheUserInfo(userInfo: CNLiveLoginModel) { | ||
| 49 | + _userInfo = userInfo | ||
| 50 | + Defaults[\.userInfoKey] = userInfo | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + /// 读取用户数据 | ||
| 54 | + /// - Returns: 用户数据 | ||
| 55 | + public func readUserInfo() -> CNLiveLoginModel { | ||
| 56 | + if (Defaults.hasKey(\.userInfoKey)) { | ||
| 57 | + return Defaults[\.userInfoKey]! | ||
| 58 | + }else{ | ||
| 59 | + return CNLiveLoginModel() | ||
| 60 | + } | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + public func clearUserInfo() { | ||
| 64 | + _userInfo = nil | ||
| 65 | + Defaults.remove(\.userInfoKey) | ||
| 66 | + } | ||
| 67 | +} |
metaCode/Classes/Constant/CNLiveConstant.swift
| @@ -23,6 +23,63 @@ let KTabBarHeight = (KStatusBarHeight == 44 ? 83 : 49) | @@ -23,6 +23,63 @@ let KTabBarHeight = (KStatusBarHeight == 44 ? 83 : 49) | ||
| 23 | ///控制器背景色 | 23 | ///控制器背景色 |
| 24 | let KVCBackgroupColor = UIColor("#F9F9F9") | 24 | let KVCBackgroupColor = UIColor("#F9F9F9") |
| 25 | 25 | ||
| 26 | +/** | ||
| 27 | + 判断是否是iPhone X系列 | ||
| 28 | + */ | ||
| 29 | +public func is_iPhoneX_series() -> Bool { | ||
| 30 | + var iPhoneXSeries: Bool = false | ||
| 31 | + if (UIDevice.current.userInterfaceIdiom != .phone) { | ||
| 32 | + return iPhoneXSeries | ||
| 33 | + } | ||
| 34 | + let window = UIApplication.shared.delegate?.window!! | ||
| 35 | + if (window?.safeAreaInsets.bottom ?? 0.0 > 0.0) { | ||
| 36 | + iPhoneXSeries = false; | ||
| 37 | + } | ||
| 38 | + return iPhoneXSeries; | ||
| 39 | +} | ||
| 40 | + | ||
| 41 | +/** | ||
| 42 | + 获取系统状态栏高度 | ||
| 43 | + */ | ||
| 44 | +public func get_system_statusBar_height() -> CGFloat { | ||
| 45 | + return is_iPhoneX_series() ? 44 : 20; | ||
| 46 | +} | ||
| 47 | + | ||
| 48 | +/** | ||
| 49 | + 获取系统导航高度 | ||
| 50 | + */ | ||
| 51 | +public func get_system_nav_height() -> CGFloat { | ||
| 52 | + return is_iPhoneX_series() ? (44.0 + 44.0) : 64; | ||
| 53 | +} | ||
| 54 | + | ||
| 55 | +/** | ||
| 56 | + 获取系统导航UI高度 | ||
| 57 | + */ | ||
| 58 | +public func get_system_nav_ui_height() -> CGFloat { | ||
| 59 | + return get_system_nav_height() - get_system_statusBar_height(); | ||
| 60 | +} | ||
| 61 | + | ||
| 62 | +/** | ||
| 63 | + 获取系统tabbar高度 | ||
| 64 | + */ | ||
| 65 | +public func get_system_tabbar_height() -> CGFloat { | ||
| 66 | + return is_iPhoneX_series() ? 83.0 : 49.0; | ||
| 67 | +} | ||
| 68 | + | ||
| 69 | +/** | ||
| 70 | + 获取系统tabbarUI高度 | ||
| 71 | + */ | ||
| 72 | +public func get_system_tabbar_ui_height() -> CGFloat { | ||
| 73 | + return 49.0; | ||
| 74 | +} | ||
| 75 | + | ||
| 76 | +/** | ||
| 77 | + 获取系统tabbarUI增加的高度 (因iPhoneX系列底部有安全区域增加的高度) | ||
| 78 | + */ | ||
| 79 | +public func get_system_tabbar_ui_offsetHeight() -> CGFloat { | ||
| 80 | + return get_system_tabbar_height() - get_system_tabbar_ui_height(); | ||
| 81 | +} | ||
| 82 | + | ||
| 26 | 83 | ||
| 27 | 84 | ||
| 28 | 85 |
metaCode/Classes/Constant/CNLiveHotButton.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveHotButton.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by open on 2023/6/6. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +class HotButton : UIButton { | ||
| 11 | + | ||
| 12 | + override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { | ||
| 13 | + var bounds = self.bounds | ||
| 14 | + //若原热区小于64x64,则放大热区,否则保持原大小不变 | ||
| 15 | + let width = max(64.0 - bounds.size.width, 0) | ||
| 16 | + let height = max(64.0 - bounds.size.height, 0) | ||
| 17 | + bounds = CGRectInset(bounds, -0.5*width, -0.5*height) | ||
| 18 | + return CGRectContainsPoint(bounds, point) | ||
| 19 | + } | ||
| 20 | +} |
metaCode/Classes/Extensions/NSString+CNLiveExtensions.swift
0 → 100644
| 1 | +// | ||
| 2 | +// NSString+CNLiveExtensions.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by open on 2023/6/6. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +extension NSString { | ||
| 11 | + | ||
| 12 | + /// 判断是不是纯数字 | ||
| 13 | + /// - Parameter string: 字符串 | ||
| 14 | + /// - Returns: 结果 | ||
| 15 | + @discardableResult | ||
| 16 | + func isPurnInt() -> Bool { | ||
| 17 | + let scan: Scanner = Scanner(string: self as String) | ||
| 18 | + var val:Int = 0 | ||
| 19 | + return scan.scanInt(&val) && scan.isAtEnd | ||
| 20 | + } | ||
| 21 | +} |
metaCode/Classes/Extensions/UIButton+CNLiveExtension.swift
0 → 100644
| 1 | +// | ||
| 2 | +// UIButton+CNLiveExtension.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by open on 2023/6/7. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +extension UIButton { | ||
| 11 | + | ||
| 12 | + /// 根据图片生成UIBarButtonItem | ||
| 13 | + static func imageItem(imageName:String,target:AnyObject,action:Selector) -> UIButton { | ||
| 14 | + return customItem(title: "", titleColor: UIColor.white, imageName: imageName, target: target, action: action,contentHorizontalAlignment: .center) | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + /// 根据文字生成UIBarButtonItem | ||
| 18 | + static func textItem(title:String,titleColor:UIColor,target:AnyObject,action:Selector) -> UIButton { | ||
| 19 | + return customItem(title: title, titleColor: titleColor, imageName: "", target: target, action: action,contentHorizontalAlignment: .center) | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + /// 返回按钮 带箭头的 | ||
| 23 | + static func backItem(imageName:String,target:AnyObject,action:Selector) -> UIButton { | ||
| 24 | + return customItem(title: "", titleColor: UIColor.white, imageName: imageName, target: target, action: action,contentHorizontalAlignment: .left,isBack: true) | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + /// 快速初始化一个UIBarButtonItem,内部是按钮 | ||
| 28 | + static func customItem(title:String,titleColor:UIColor,imageName:String,target:AnyObject,action:Selector, | ||
| 29 | + contentHorizontalAlignment:UIControl.ContentHorizontalAlignment,isBack:Bool=false) -> UIButton { | ||
| 30 | + let button = UIButton() | ||
| 31 | + if (title.count>0) { | ||
| 32 | + button.setTitle(title, for: .normal) | ||
| 33 | + button.titleLabel?.font = UIFont.systemFont(ofSize: 16) | ||
| 34 | + } | ||
| 35 | + if (imageName.count>0) { | ||
| 36 | + button.setImage(UIImage(named: imageName), for: .normal) | ||
| 37 | + button.setImage(UIImage(named: imageName), for: .highlighted) | ||
| 38 | + } | ||
| 39 | + button.setTitleColor(titleColor, for: .normal) | ||
| 40 | + button.setTitleColor(titleColor.withAlphaComponent(0.5), for: .highlighted) | ||
| 41 | + button.setTitleColor(titleColor.withAlphaComponent(0.5), for: .disabled) | ||
| 42 | + button.addTarget(target, action: action, for: .touchUpInside) | ||
| 43 | + if (isBack) { | ||
| 44 | + button.frame = CGRect(x: 0, y: 0, width: 44, height: 44) | ||
| 45 | + } else { | ||
| 46 | + button.sizeToFit() | ||
| 47 | + } | ||
| 48 | + button.contentHorizontalAlignment = contentHorizontalAlignment; | ||
| 49 | + return button | ||
| 50 | + } | ||
| 51 | +} |
metaCode/Classes/Main/LoginPage/Controller/CNLiveLoginViewController.swift
| @@ -32,15 +32,49 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | @@ -32,15 +32,49 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | ||
| 32 | return areaButton | 32 | return areaButton |
| 33 | }() | 33 | }() |
| 34 | 34 | ||
| 35 | - | 35 | + lazy var phoneText : UITextField = { |
| 36 | + let phoneText = UITextField.init() | ||
| 37 | + phoneText.backgroundColor = .white | ||
| 38 | + phoneText.placeholder = "输入手机号" | ||
| 39 | + phoneText.font = BoldFont_16_Fit | ||
| 40 | + phoneText.keyboardType = .numberPad | ||
| 41 | + phoneText.clearButtonMode = .whileEditing | ||
| 42 | + return phoneText | ||
| 43 | + }() | ||
| 44 | + | ||
| 45 | + lazy var veriText: UITextField = { | ||
| 46 | + let veriText = UITextField.init() | ||
| 47 | + veriText.backgroundColor = .white | ||
| 48 | + veriText.placeholder = "输入验证码" | ||
| 49 | + veriText.font = BoldFont_16_Fit | ||
| 50 | + veriText.keyboardType = .numberPad | ||
| 51 | + veriText.clearButtonMode = .whileEditing | ||
| 52 | + return veriText | ||
| 53 | + }() | ||
| 36 | 54 | ||
| 37 | - var phoneText = UITextField()//手机号 | ||
| 38 | - var veriText = UITextField()//验证码 | 55 | + lazy var loginButton: UIButton = { |
| 56 | + let loginButton = UIButton(type: .custom) | ||
| 57 | + loginButton.setTitle("登 陆", for: .normal) | ||
| 58 | + loginButton.setTitleColor(.white, for: .normal) | ||
| 59 | + loginButton.titleLabel?.font = BoldFont_16_Fit | ||
| 60 | + loginButton.layer.cornerRadius = 20 | ||
| 61 | + loginButton.layer.masksToBounds = true | ||
| 62 | + loginButton.addTarget(self, action: #selector(sendLoginActionMothod), for: .touchUpInside) | ||
| 63 | + return loginButton | ||
| 64 | + }() | ||
| 39 | 65 | ||
| 66 | + var is_agree : Bool = false //是否同意协议 | ||
| 67 | + var country : String = "86" | ||
| 40 | var timeOut = 30//多少秒计时器 | 68 | var timeOut = 30//多少秒计时器 |
| 41 | 69 | ||
| 70 | + | ||
| 71 | + override func viewDidAppear(_ animated: Bool) { | ||
| 72 | + LoginAuthInfoView.showAuthView() | ||
| 73 | + } | ||
| 74 | + | ||
| 42 | override func viewDidLoad() { | 75 | override func viewDidLoad() { |
| 43 | super.viewDidLoad() | 76 | super.viewDidLoad() |
| 77 | + setNeedsStatusBarAppearanceUpdate() | ||
| 44 | 78 | ||
| 45 | //添加主视图 | 79 | //添加主视图 |
| 46 | self.view.addSubview(self.headerView) | 80 | self.view.addSubview(self.headerView) |
| @@ -59,14 +93,17 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | @@ -59,14 +93,17 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | ||
| 59 | print("已经销毁了") | 93 | print("已经销毁了") |
| 60 | } | 94 | } |
| 61 | 95 | ||
| 96 | + override var preferredStatusBarStyle: UIStatusBarStyle { | ||
| 97 | + return .lightContent | ||
| 98 | + } | ||
| 62 | 99 | ||
| 63 | func setupPhoneView() { | 100 | func setupPhoneView() { |
| 64 | 101 | ||
| 65 | let phoneV = UIView.init() | 102 | let phoneV = UIView.init() |
| 66 | phoneV.backgroundColor = .white | 103 | phoneV.backgroundColor = .white |
| 67 | - self.view.addSubview(phoneV) | 104 | + view.addSubview(phoneV) |
| 68 | phoneV.snp.makeConstraints { make in | 105 | phoneV.snp.makeConstraints { make in |
| 69 | - make.left.right.equalTo(self.view) | 106 | + make.left.right.equalToSuperview() |
| 70 | make.top.equalTo(self.headerView.snp.bottom).offset(10) | 107 | make.top.equalTo(self.headerView.snp.bottom).offset(10) |
| 71 | make.height.equalTo(50) | 108 | make.height.equalTo(50) |
| 72 | } | 109 | } |
| @@ -98,14 +135,8 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | @@ -98,14 +135,8 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | ||
| 98 | make.bottom.equalTo(phoneV.snp.bottom).offset(-1) | 135 | make.bottom.equalTo(phoneV.snp.bottom).offset(-1) |
| 99 | } | 136 | } |
| 100 | 137 | ||
| 101 | - self.phoneText = UITextField.init() | ||
| 102 | - self.phoneText.backgroundColor = .white | ||
| 103 | - self.phoneText.placeholder = "输入手机号" | ||
| 104 | - self.phoneText.font = BoldFont_16_Fit | ||
| 105 | - self.phoneText.keyboardType = .numberPad | ||
| 106 | - self.phoneText.clearButtonMode = .whileEditing | ||
| 107 | - phoneV.addSubview(self.phoneText) | ||
| 108 | - self.phoneText.snp.makeConstraints { make in | 138 | + phoneV.addSubview(phoneText) |
| 139 | + phoneText.snp.makeConstraints { make in | ||
| 109 | make.centerY.equalTo(phoneV) | 140 | make.centerY.equalTo(phoneV) |
| 110 | make.left.equalTo(areaButton.snp.right).offset(21) | 141 | make.left.equalTo(areaButton.snp.right).offset(21) |
| 111 | make.height.equalTo(areaButton.snp.height) | 142 | make.height.equalTo(areaButton.snp.height) |
| @@ -149,14 +180,8 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | @@ -149,14 +180,8 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | ||
| 149 | make.width.lessThanOrEqualTo(100) | 180 | make.width.lessThanOrEqualTo(100) |
| 150 | } | 181 | } |
| 151 | 182 | ||
| 152 | - self.veriText = UITextField.init() | ||
| 153 | - self.veriText.backgroundColor = .white | ||
| 154 | - self.veriText.placeholder = "输入验证码" | ||
| 155 | - self.veriText.font = BoldFont_16_Fit | ||
| 156 | - self.veriText.keyboardType = .numberPad | ||
| 157 | - self.veriText.clearButtonMode = .whileEditing | ||
| 158 | - verView.addSubview(self.veriText) | ||
| 159 | - self.veriText.snp.makeConstraints { make in | 183 | + verView.addSubview(veriText) |
| 184 | + veriText.snp.makeConstraints { make in | ||
| 160 | make.centerY.equalTo(verView) | 185 | make.centerY.equalTo(verView) |
| 161 | make.right.equalTo(codeButton.snp.left).offset(-20) | 186 | make.right.equalTo(codeButton.snp.left).offset(-20) |
| 162 | make.height.equalTo(codeButton.snp.height) | 187 | make.height.equalTo(codeButton.snp.height) |
| @@ -178,7 +203,7 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | @@ -178,7 +203,7 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | ||
| 178 | 203 | ||
| 179 | func setupLoginButtonView() { | 204 | func setupLoginButtonView() { |
| 180 | 205 | ||
| 181 | - let selectButton = UIButton(type: .custom) | 206 | + let selectButton = HotButton(type: .custom) |
| 182 | selectButton.backgroundColor = .white | 207 | selectButton.backgroundColor = .white |
| 183 | selectButton.setImage(UIImage(named: "Login_body_choose_btn_nomal"), for: .normal) | 208 | selectButton.setImage(UIImage(named: "Login_body_choose_btn_nomal"), for: .normal) |
| 184 | selectButton.setImage(UIImage(named: "Login_body_choose_btn_nomal"), for: .highlighted) | 209 | selectButton.setImage(UIImage(named: "Login_body_choose_btn_nomal"), for: .highlighted) |
| @@ -211,12 +236,7 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | @@ -211,12 +236,7 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | ||
| 211 | make.right.equalTo(view.snp.right).offset(-25) | 236 | make.right.equalTo(view.snp.right).offset(-25) |
| 212 | } | 237 | } |
| 213 | 238 | ||
| 214 | - let loginButton = UIButton(type: .custom) | ||
| 215 | - loginButton.setTitle("登 陆", for: .normal) | ||
| 216 | - loginButton.setTitleColor(.white, for: .normal) | ||
| 217 | - loginButton.titleLabel?.font = BoldFont_16_Fit | ||
| 218 | - loginButton.layer.cornerRadius = 20 | ||
| 219 | - loginButton.layer.masksToBounds = true | 239 | + |
| 220 | view.addSubview(loginButton) | 240 | view.addSubview(loginButton) |
| 221 | loginButton.snp.makeConstraints { make in | 241 | loginButton.snp.makeConstraints { make in |
| 222 | make.centerX.equalTo(view) | 242 | make.centerX.equalTo(view) |
| @@ -225,9 +245,7 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | @@ -225,9 +245,7 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { | ||
| 225 | make.right.equalTo(-40) | 245 | make.right.equalTo(-40) |
| 226 | make.height.equalTo(40) | 246 | make.height.equalTo(40) |
| 227 | } | 247 | } |
| 228 | - loginButton.setGradient(colors: [UIColor(red: 103/255.0, green: 197/255.0, blue: 255/255.0, alpha: 1),UIColor(red: 96/255.0, green: 154/255.0, blue: 255/255.0, alpha: 1)], startPoint: CGPoint(x: 0, y: 0.5), endPoint: CGPoint(x: 1, y: 0.5)) | ||
| 229 | - | ||
| 230 | - | 248 | + loginButton.setGradient(colors: [UIColor(red: 103/255.0, green: 197/255.0, blue: 255/255.0, alpha: 0.3),UIColor(red: 96/255.0, green: 154/255.0, blue: 255/255.0, alpha: 0.3)], startPoint: CGPoint(x: 0, y: 0.5), endPoint: CGPoint(x: 1, y: 0.5)) |
| 231 | } | 249 | } |
| 232 | } | 250 | } |
| 233 | 251 | ||
| @@ -235,12 +253,55 @@ extension CNLiveLoginViewController { | @@ -235,12 +253,55 @@ extension CNLiveLoginViewController { | ||
| 235 | 253 | ||
| 236 | @objc func changeCityNumberMothod(sender : UIButton) { | 254 | @objc func changeCityNumberMothod(sender : UIButton) { |
| 237 | CNLiveLoginPickerView.showSelectView { [self] text in | 255 | CNLiveLoginPickerView.showSelectView { [self] text in |
| 256 | + country = text | ||
| 238 | areaButton.setTitle("+\(text)", for: .normal) | 257 | areaButton.setTitle("+\(text)", for: .normal) |
| 239 | areaButton.setTitle("+\(text)", for: .highlighted) | 258 | areaButton.setTitle("+\(text)", for: .highlighted) |
| 240 | } | 259 | } |
| 241 | } | 260 | } |
| 242 | 261 | ||
| 243 | @objc func sendVerifiCodeMothod(sender : UIButton) { | 262 | @objc func sendVerifiCodeMothod(sender : UIButton) { |
| 263 | + view.endEditing(true) | ||
| 264 | + CNLiveLoginViewModel.requestVerCodeAction(phone: phoneText.text ?? "", code: country) { [self] in | ||
| 265 | + setupCountdownAction(sender: sender) | ||
| 266 | + } | ||
| 267 | + } | ||
| 268 | + | ||
| 269 | + @objc func changeSelectBtnMothod(sender : UIButton) { | ||
| 270 | + sender.isSelected = !sender.isSelected | ||
| 271 | + is_agree = sender.isSelected | ||
| 272 | + if is_agree { | ||
| 273 | + loginButton.setGradient(colors: [UIColor(red: 103/255.0, green: 197/255.0, blue: 255/255.0, alpha: 1),UIColor(red: 96/255.0, green: 154/255.0, blue: 255/255.0, alpha: 1)], startPoint: CGPoint(x: 0, y: 0.5), endPoint: CGPoint(x: 1, y: 0.5)) | ||
| 274 | + } else { | ||
| 275 | + loginButton.setGradient(colors: [UIColor(red: 103/255.0, green: 197/255.0, blue: 255/255.0, alpha: 0.3),UIColor(red: 96/255.0, green: 154/255.0, blue: 255/255.0, alpha: 0.3)], startPoint: CGPoint(x: 0, y: 0.5), endPoint: CGPoint(x: 1, y: 0.5)) | ||
| 276 | + } | ||
| 277 | + } | ||
| 278 | + | ||
| 279 | + @objc func sendLoginActionMothod(sender : UIButton) { | ||
| 280 | + if !is_agree { | ||
| 281 | + tip.showMessage(message: "请先阅读并同意协议") | ||
| 282 | + return | ||
| 283 | + } | ||
| 284 | + view.endEditing(true) | ||
| 285 | + CNLiveLoginViewModel.requestLoginAction(userName: phoneText.text ?? "", countryCode: country, verCode: veriText.text ?? "") { | ||
| 286 | + let window = UIApplication.shared.delegate?.window | ||
| 287 | + window??.rootViewController = CNLiveBaseTabBarViewController.init() | ||
| 288 | + } | ||
| 289 | + } | ||
| 290 | + | ||
| 291 | + @objc func pushAgreeActionMothod() { | ||
| 292 | + tip.showMessage(message: "APP用户服务协议") | ||
| 293 | + } | ||
| 294 | + | ||
| 295 | + @objc func pushInfoActionMothod() { | ||
| 296 | + tip.showMessage(message: "个人信息保护政策") | ||
| 297 | + } | ||
| 298 | +} | ||
| 299 | + | ||
| 300 | +extension CNLiveLoginViewController { | ||
| 301 | + | ||
| 302 | + /// 设置发送验证码按钮 | ||
| 303 | + /// - Parameter sender: 按钮 | ||
| 304 | + private func setupCountdownAction(sender : UIButton) { | ||
| 244 | var timeOut = self.timeOut | 305 | var timeOut = self.timeOut |
| 245 | let queue: DispatchQueue = DispatchQueue.global(qos: DispatchQoS.QoSClass.default) | 306 | let queue: DispatchQueue = DispatchQueue.global(qos: DispatchQoS.QoSClass.default) |
| 246 | let _timer: DispatchSource = DispatchSource.makeTimerSource(flags: [], queue: queue) as! DispatchSource | 307 | let _timer: DispatchSource = DispatchSource.makeTimerSource(flags: [], queue: queue) as! DispatchSource |
| @@ -265,22 +326,6 @@ extension CNLiveLoginViewController { | @@ -265,22 +326,6 @@ extension CNLiveLoginViewController { | ||
| 265 | }) | 326 | }) |
| 266 | _timer.resume() | 327 | _timer.resume() |
| 267 | } | 328 | } |
| 268 | - | ||
| 269 | - @objc func changeSelectBtnMothod(sender : UIButton) { | ||
| 270 | - sender.isSelected = !sender.isSelected | ||
| 271 | - } | ||
| 272 | - | ||
| 273 | - @objc func sendLoginActionMothod(sender : UIButton) { | ||
| 274 | - | ||
| 275 | - } | ||
| 276 | - | ||
| 277 | - @objc func pushAgreeActionMothod() { | ||
| 278 | - | ||
| 279 | - } | ||
| 280 | - | ||
| 281 | - @objc func pushInfoActionMothod() { | ||
| 282 | - | ||
| 283 | - } | ||
| 284 | } | 329 | } |
| 285 | 330 | ||
| 286 | extension CNLiveLoginViewController { | 331 | extension CNLiveLoginViewController { |
metaCode/Classes/Main/LoginPage/View/CNLiveLoginAuthView.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveLoginAuthView.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by open on 2023/6/6. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | + | ||
| 11 | +class LoginAuthInfoView : UIView { | ||
| 12 | + | ||
| 13 | + lazy var imageView : UIImageView = { | ||
| 14 | + let imageView = UIImageView.init() | ||
| 15 | + imageView.contentMode = .scaleToFill | ||
| 16 | + imageView.backgroundColor = .clear | ||
| 17 | + imageView.isUserInteractionEnabled = true | ||
| 18 | + imageView.image = UIImage(named: "login_body_show_auth_back") | ||
| 19 | + return imageView | ||
| 20 | + }() | ||
| 21 | + | ||
| 22 | + lazy var appLabel : UILabel = { | ||
| 23 | + let appLabel = UILabel.init() | ||
| 24 | + appLabel.text = "APP" | ||
| 25 | + appLabel.textColor = .white | ||
| 26 | + appLabel.backgroundColor = .black | ||
| 27 | + appLabel.font = BoldFont_16_Fit | ||
| 28 | + appLabel.textAlignment = .center | ||
| 29 | + appLabel.layer.cornerRadius = 10 | ||
| 30 | + appLabel.clipsToBounds = true | ||
| 31 | + return appLabel | ||
| 32 | + }() | ||
| 33 | + | ||
| 34 | + lazy var titleLabel : UILabel = { | ||
| 35 | + let titleLabel = UILabel.init() | ||
| 36 | + titleLabel.text = "个人信息保护政策" | ||
| 37 | + titleLabel.font = BoldFont_17_Fit | ||
| 38 | + titleLabel.textAlignment = .left | ||
| 39 | + titleLabel.textColor = .black | ||
| 40 | + titleLabel.backgroundColor = .clear | ||
| 41 | + return titleLabel | ||
| 42 | + }() | ||
| 43 | + | ||
| 44 | + lazy var contentView : UIImageView = { | ||
| 45 | + let contentView = UIImageView.init() | ||
| 46 | + contentView.backgroundColor = .clear | ||
| 47 | + contentView.image = UIImage(named: "login_body_show_auth_content") | ||
| 48 | + contentView.contentMode = .scaleToFill | ||
| 49 | + return contentView | ||
| 50 | + }() | ||
| 51 | + | ||
| 52 | + lazy var agreeBtn: UIButton = { | ||
| 53 | + let agreeBtn = UIButton.init(type: .custom) | ||
| 54 | + agreeBtn.setTitle("同 意", for: .normal) | ||
| 55 | + agreeBtn.titleLabel?.font = BoldFont_15_Fit | ||
| 56 | + agreeBtn.layer.cornerRadius = 20 | ||
| 57 | + agreeBtn.layer.masksToBounds = true | ||
| 58 | + agreeBtn.setTitleColor(.white, for: .normal) | ||
| 59 | + agreeBtn.addTarget(self, action: #selector(agreeAction), for: .touchUpInside) | ||
| 60 | + return agreeBtn | ||
| 61 | + }() | ||
| 62 | + | ||
| 63 | + lazy var agreeNotBtn: UIButton = { | ||
| 64 | + let agreeNotBtn = UIButton(type: .custom) | ||
| 65 | + agreeNotBtn.setTitle("不同意", for: .normal) | ||
| 66 | + agreeNotBtn.titleLabel?.font = BoldFont_15_Fit | ||
| 67 | + agreeNotBtn.layer.cornerRadius = 20 | ||
| 68 | + agreeNotBtn.layer.masksToBounds = true | ||
| 69 | + agreeNotBtn.layer.borderColor = HexColor("#979797")?.cgColor | ||
| 70 | + agreeNotBtn.layer.borderWidth = 1 | ||
| 71 | + agreeNotBtn.setTitleColor(.black, for: .normal) | ||
| 72 | + agreeNotBtn.addTarget(self, action: #selector(agreeNotAction), for: .touchUpInside) | ||
| 73 | + return agreeNotBtn | ||
| 74 | + }() | ||
| 75 | + | ||
| 76 | + | ||
| 77 | + static func showAuthView() { | ||
| 78 | + let authView = LoginAuthInfoView() | ||
| 79 | + | ||
| 80 | + let window = UIApplication.shared.windows.last | ||
| 81 | + window?.addSubview(authView) | ||
| 82 | + authView.snp.makeConstraints { make in | ||
| 83 | + make.edges.equalToSuperview() | ||
| 84 | + } | ||
| 85 | + window?.layoutIfNeeded() | ||
| 86 | + authView.alpha = 0 | ||
| 87 | + UIView.animate(withDuration: 0.1) { | ||
| 88 | + authView.alpha = 1 | ||
| 89 | + } completion: { _ in | ||
| 90 | + authView.layoutIfNeeded() | ||
| 91 | + } | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + | ||
| 95 | + override init(frame: CGRect) { | ||
| 96 | + super.init(frame: frame) | ||
| 97 | + self.backgroundColor = UIColor.black.withAlphaComponent(0.2) | ||
| 98 | + | ||
| 99 | + addSubview(imageView) | ||
| 100 | + imageView.addSubview(appLabel) | ||
| 101 | + imageView.addSubview(titleLabel) | ||
| 102 | + imageView.addSubview(contentView) | ||
| 103 | + imageView.addSubview(agreeBtn) | ||
| 104 | + imageView.addSubview(agreeNotBtn) | ||
| 105 | + | ||
| 106 | + setupConstraints() | ||
| 107 | + agreeBtn.setGradient(colors: [UIColor(red: 103/255.0, green: 197/255.0, blue: 255/255.0, alpha: 1),UIColor(red: 96/255.0, green: 154/255.0, blue: 255/255.0, alpha: 1)], startPoint: CGPoint(x: 0, y: 0.5), endPoint: CGPoint(x: 1, y: 0.5)) | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + required init?(coder: NSCoder) { | ||
| 111 | + fatalError("init(coder:) has not been implemented") | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + private func setupConstraints() { | ||
| 115 | + imageView.snp.makeConstraints { make in | ||
| 116 | + make.center.equalToSuperview() | ||
| 117 | + make.left.equalToSuperview().offset(30) | ||
| 118 | + make.right.equalToSuperview().offset(-30) | ||
| 119 | + make.height.equalTo(420) | ||
| 120 | + } | ||
| 121 | + appLabel.snp.makeConstraints { make in | ||
| 122 | + make.top.equalToSuperview().offset(20) | ||
| 123 | + make.left.equalToSuperview().offset(20) | ||
| 124 | + make.height.equalTo(20) | ||
| 125 | + make.width.equalTo(45) | ||
| 126 | + } | ||
| 127 | + titleLabel.snp.makeConstraints { make in | ||
| 128 | + make.top.equalTo(appLabel.snp.bottom).offset(10) | ||
| 129 | + make.left.equalToSuperview().offset(20) | ||
| 130 | + } | ||
| 131 | + contentView.snp.makeConstraints { make in | ||
| 132 | + make.centerX.equalToSuperview() | ||
| 133 | + make.top.equalTo(titleLabel.snp.bottom).offset(20) | ||
| 134 | + make.left.equalToSuperview().offset(20) | ||
| 135 | + make.right.equalToSuperview().offset(-20) | ||
| 136 | + } | ||
| 137 | + agreeBtn.snp.makeConstraints { make in | ||
| 138 | + make.right.equalTo(imageView.snp.right).offset(-20) | ||
| 139 | + make.bottom.equalTo(imageView.snp.bottom).offset(-20) | ||
| 140 | + make.width.equalTo((KSreenWidth - 140) * 0.6) | ||
| 141 | + make.height.equalTo(40) | ||
| 142 | + } | ||
| 143 | + agreeNotBtn.snp.makeConstraints { make in | ||
| 144 | + make.centerY.equalTo(agreeBtn) | ||
| 145 | + make.left.equalToSuperview().offset(20) | ||
| 146 | + make.width.equalTo((KSreenWidth - 140) * 0.4) | ||
| 147 | + make.height.equalTo(40) | ||
| 148 | + } | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + deinit { | ||
| 152 | + | ||
| 153 | + } | ||
| 154 | + | ||
| 155 | + @objc func agreeNotAction() { | ||
| 156 | + removeFromSuperview() | ||
| 157 | + LoginAuthPollicyView.showAuthView() | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | + @objc func agreeAction() { | ||
| 161 | + removeFromSuperview() | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | +} | ||
| 165 | + | ||
| 166 | + | ||
| 167 | +class LoginAuthPollicyView : UIView { | ||
| 168 | + | ||
| 169 | + lazy var backView: UIView = { | ||
| 170 | + let backView = UIView.init() | ||
| 171 | + backView.backgroundColor = HexColor("#F4F7FE") | ||
| 172 | + backView.layer.cornerRadius = 8 | ||
| 173 | + backView.isUserInteractionEnabled = true | ||
| 174 | + backView.layer.masksToBounds = true | ||
| 175 | + return backView | ||
| 176 | + }() | ||
| 177 | + | ||
| 178 | + lazy var titleLabel : UILabel = { | ||
| 179 | + let titleLabel = UILabel.init() | ||
| 180 | + titleLabel.text = "需要同意政策才能继续使用" | ||
| 181 | + titleLabel.font = BoldFont_17_Fit | ||
| 182 | + titleLabel.textAlignment = .center | ||
| 183 | + titleLabel.textColor = .black | ||
| 184 | + titleLabel.backgroundColor = .clear | ||
| 185 | + return titleLabel | ||
| 186 | + }() | ||
| 187 | + | ||
| 188 | + lazy var contentView : UIImageView = { | ||
| 189 | + let contentView = UIImageView.init() | ||
| 190 | + contentView.backgroundColor = .clear | ||
| 191 | + contentView.image = UIImage(named: "login_body_show_auth_policy") | ||
| 192 | + contentView.contentMode = .scaleToFill | ||
| 193 | + return contentView | ||
| 194 | + }() | ||
| 195 | + | ||
| 196 | + lazy var agreeBtn: UIButton = { | ||
| 197 | + let agreeBtn = UIButton.init(type: .custom) | ||
| 198 | + agreeBtn.setTitle("再次查看", for: .normal) | ||
| 199 | + agreeBtn.titleLabel?.font = BoldFont_15_Fit | ||
| 200 | + agreeBtn.layer.cornerRadius = 20 | ||
| 201 | + agreeBtn.layer.masksToBounds = true | ||
| 202 | + agreeBtn.setTitleColor(.white, for: .normal) | ||
| 203 | + agreeBtn.addTarget(self, action: #selector(agreeAction), for: .touchUpInside) | ||
| 204 | + return agreeBtn | ||
| 205 | + }() | ||
| 206 | + | ||
| 207 | + lazy var agreeNotBtn: UIButton = { | ||
| 208 | + let agreeNotBtn = UIButton(type: .custom) | ||
| 209 | + agreeNotBtn.setTitle("退出应用", for: .normal) | ||
| 210 | + agreeNotBtn.titleLabel?.font = BoldFont_15_Fit | ||
| 211 | + agreeNotBtn.layer.cornerRadius = 20 | ||
| 212 | + agreeNotBtn.layer.masksToBounds = true | ||
| 213 | + agreeNotBtn.layer.borderColor = HexColor("#979797")?.cgColor | ||
| 214 | + agreeNotBtn.layer.borderWidth = 1 | ||
| 215 | + agreeNotBtn.setTitleColor(.black, for: .normal) | ||
| 216 | + agreeNotBtn.addTarget(self, action: #selector(agreeNotAction), for: .touchUpInside) | ||
| 217 | + return agreeNotBtn | ||
| 218 | + }() | ||
| 219 | + | ||
| 220 | + static func showAuthView() { | ||
| 221 | + let authView = LoginAuthPollicyView.init() | ||
| 222 | + | ||
| 223 | + let window = UIApplication.shared.windows.last | ||
| 224 | + window?.addSubview(authView) | ||
| 225 | + authView.snp.makeConstraints { make in | ||
| 226 | + make.edges.equalToSuperview() | ||
| 227 | + } | ||
| 228 | + window?.layoutIfNeeded() | ||
| 229 | + authView.alpha = 0 | ||
| 230 | + UIView.animate(withDuration: 0.1) { | ||
| 231 | + authView.alpha = 1 | ||
| 232 | + } completion: { _ in | ||
| 233 | + | ||
| 234 | + } | ||
| 235 | + } | ||
| 236 | + | ||
| 237 | + override init(frame: CGRect) { | ||
| 238 | + super.init(frame: frame) | ||
| 239 | + self.backgroundColor = UIColor.black.withAlphaComponent(0.2) | ||
| 240 | + | ||
| 241 | + addSubview(backView) | ||
| 242 | + backView.addSubview(titleLabel) | ||
| 243 | + backView.addSubview(contentView) | ||
| 244 | + backView.addSubview(agreeBtn) | ||
| 245 | + backView.addSubview(agreeNotBtn) | ||
| 246 | + | ||
| 247 | + setupConstraints() | ||
| 248 | + agreeBtn.setGradient(colors: [UIColor(red: 103/255.0, green: 197/255.0, blue: 255/255.0, alpha: 1),UIColor(red: 96/255.0, green: 154/255.0, blue: 255/255.0, alpha: 1)], startPoint: CGPoint(x: 0, y: 0.5), endPoint: CGPoint(x: 1, y: 0.5)) | ||
| 249 | + } | ||
| 250 | + | ||
| 251 | + required init?(coder: NSCoder) { | ||
| 252 | + fatalError("init(coder:) has not been implemented") | ||
| 253 | + } | ||
| 254 | + | ||
| 255 | + private func setupConstraints() { | ||
| 256 | + backView.snp.makeConstraints { make in | ||
| 257 | + make.center.equalToSuperview() | ||
| 258 | + make.left.equalToSuperview().offset(30) | ||
| 259 | + make.right.equalToSuperview().offset(-30) | ||
| 260 | + make.height.equalTo((KSreenWidth - 60) * 0.7) | ||
| 261 | + } | ||
| 262 | + titleLabel.snp.makeConstraints { make in | ||
| 263 | + make.top.equalToSuperview().offset(20) | ||
| 264 | + make.centerX.equalToSuperview() | ||
| 265 | + } | ||
| 266 | + contentView.snp.makeConstraints { make in | ||
| 267 | + make.centerX.equalToSuperview() | ||
| 268 | + make.top.equalTo(titleLabel.snp.bottom).offset(20) | ||
| 269 | + make.left.equalToSuperview().offset(20) | ||
| 270 | + make.right.equalToSuperview().offset(-20) | ||
| 271 | + } | ||
| 272 | + agreeBtn.snp.makeConstraints { make in | ||
| 273 | + make.right.equalTo(backView.snp.right).offset(-20) | ||
| 274 | + make.bottom.equalTo(backView.snp.bottom).offset(-20) | ||
| 275 | + make.width.equalTo((KSreenWidth - 140) * 0.6) | ||
| 276 | + make.height.equalTo(40) | ||
| 277 | + } | ||
| 278 | + agreeNotBtn.snp.makeConstraints { make in | ||
| 279 | + make.centerY.equalTo(agreeBtn) | ||
| 280 | + make.left.equalToSuperview().offset(20) | ||
| 281 | + make.width.equalTo((KSreenWidth - 140) * 0.4) | ||
| 282 | + make.height.equalTo(40) | ||
| 283 | + } | ||
| 284 | + } | ||
| 285 | + | ||
| 286 | + deinit { | ||
| 287 | + | ||
| 288 | + } | ||
| 289 | + | ||
| 290 | + @objc func agreeNotAction() { | ||
| 291 | + //退出应用 | ||
| 292 | + UIControl().sendAction(#selector(NSXPCConnection.suspend), to: UIApplication.shared, for: nil) | ||
| 293 | + } | ||
| 294 | + | ||
| 295 | + @objc func agreeAction() { | ||
| 296 | + removeFromSuperview() | ||
| 297 | + LoginAuthInfoView.showAuthView() | ||
| 298 | + } | ||
| 299 | + | ||
| 300 | +} |
metaCode/Classes/Main/LoginPage/ViewModel/CNLiveLoginModel.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveLoginModel.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by open on 2023/6/6. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | +import HandyJSON | ||
| 10 | +import SwiftyUserDefaults | ||
| 11 | + | ||
| 12 | +class CNLiveLoginModel : HandyJSON, DefaultsSerializable, Codable { | ||
| 13 | + | ||
| 14 | + | ||
| 15 | + required init() {} | ||
| 16 | + | ||
| 17 | + var appId:String = "" | ||
| 18 | + var appleUid:String = "" | ||
| 19 | + var bigFaceUrl:String = "" | ||
| 20 | + var birthday:String = "" | ||
| 21 | + var countryCode:String = "" | ||
| 22 | + var email:String = "" | ||
| 23 | + var extInfo:String = "" | ||
| 24 | + var faceUrl:String = "" | ||
| 25 | + var frmId:String = "" | ||
| 26 | + var gender:String = "" | ||
| 27 | + var hUid:String = "" | ||
| 28 | + var isNewUser:String = "" | ||
| 29 | + var location:String = "" | ||
| 30 | + var mobile:String = "" | ||
| 31 | + var newAccount:String = "" | ||
| 32 | + var nickName:String = "" | ||
| 33 | + var platformId:String = "" | ||
| 34 | + var qqUid:String = "" | ||
| 35 | + var renrenUid:String = "" | ||
| 36 | + var sinaUid:String = "" | ||
| 37 | + var token:String = "" | ||
| 38 | + var uid:String = "" | ||
| 39 | + var wxUid:String = "" | ||
| 40 | + | ||
| 41 | + | ||
| 42 | +} |
metaCode/Classes/Main/LoginPage/ViewModel/CNLiveLoginViewModel.swift
| @@ -6,14 +6,99 @@ | @@ -6,14 +6,99 @@ | ||
| 6 | // | 6 | // |
| 7 | 7 | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | +import YYCategories | ||
| 10 | +import HandyJSON | ||
| 9 | import CNLiveRequestBastKit | 11 | import CNLiveRequestBastKit |
| 12 | +import SwiftyUserDefaults | ||
| 13 | + | ||
| 14 | +//验证码发送成功回调 | ||
| 15 | +typealias resultCodeBlock = () -> Void | ||
| 16 | +//登陆成功回调 | ||
| 17 | +typealias resultLoginBlock = () -> Void | ||
| 10 | 18 | ||
| 11 | class CNLiveLoginViewModel : NSObject { | 19 | class CNLiveLoginViewModel : NSObject { |
| 12 | 20 | ||
| 13 | - static func requestVerCodeAction(phone: String) { | ||
| 14 | - | 21 | + static func requestVerCodeAction(phone: String, code: String, resultBlock: @escaping resultCodeBlock) { |
| 15 | 22 | ||
| 23 | + if !phone.isNotBlank() { | ||
| 24 | + tip.showMessage(message: "请输入手机号") | ||
| 25 | + return | ||
| 26 | + } | ||
| 27 | + if phone.lengthOfBytes(using: .utf8) >= 20 { | ||
| 28 | + tip.showMessage(message: "手机号格式不正确") | ||
| 29 | + return | ||
| 30 | + } | ||
| 31 | + if !phone.isPurnInt() { | ||
| 32 | + tip.showMessage(message: "手机号格式不正确") | ||
| 33 | + return | ||
| 34 | + } | ||
| 35 | + tip.showLoading(message: "") | ||
| 36 | + let param = ["mobile":phone,"countryCode":code] | ||
| 37 | + CNLiveNetworking.setAllowRequestDefaultArgument(true) | ||
| 38 | + CNLiveNetworking.setupShowDataResult(false) | ||
| 39 | + CNLiveNetworking.requestNetwork(with: .POST, urlString: "/open/api2/user/sendVerifyCode", param: param, cacheType: .networkOnly) { task, result, error in | ||
| 40 | + tip.hiddenLoading() | ||
| 41 | + if (error == nil) { | ||
| 42 | + let resp = result as! NSDictionary | ||
| 43 | + let errorCode = resp["errorCode"] | ||
| 44 | + if (errorCode as! String == "0") { | ||
| 45 | + tip.showMessage(message: "验证码已发送") | ||
| 46 | + resultBlock() | ||
| 47 | + } else { | ||
| 48 | + tip.showMessage(message: resp["errorMessage"] as! String) | ||
| 49 | + } | ||
| 50 | + } else{ | ||
| 51 | + tip.showMessage(message: "获取验证码失败") | ||
| 52 | + } | ||
| 53 | + } | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + static func requestLoginAction(userName: String, countryCode: String, verCode: String, resultBlock: @escaping resultLoginBlock) { | ||
| 57 | + if !userName.isNotBlank() { | ||
| 58 | + tip.showMessage(message: "请输入手机号") | ||
| 59 | + return | ||
| 60 | + } | ||
| 61 | + if userName.lengthOfBytes(using: .utf8) >= 20 { | ||
| 62 | + tip.showMessage(message: "手机号格式不正确") | ||
| 63 | + return | ||
| 64 | + } | ||
| 65 | + if !userName.isPurnInt() { | ||
| 66 | + tip.showMessage(message: "手机号格式不正确") | ||
| 67 | + return | ||
| 68 | + } | ||
| 69 | + if !verCode.isNotBlank() { | ||
| 70 | + tip.showMessage(message: "请输入验证码") | ||
| 71 | + return | ||
| 72 | + } | ||
| 73 | + if verCode.lengthOfBytes(using: .utf8) >= 20 { | ||
| 74 | + tip.showMessage(message: "验证码格式不正确") | ||
| 75 | + return | ||
| 76 | + } | ||
| 77 | + if !verCode.isPurnInt() { | ||
| 78 | + tip.showMessage(message: "验证码格式不正确") | ||
| 79 | + return | ||
| 80 | + } | ||
| 16 | 81 | ||
| 17 | -// CNLiveNetworking.requestNetwork(with: .POST, urlString: "/user/sendVerifyCode", param: <#T##[AnyHashable : Any]!#>, cacheType: <#T##CNLiveNetworkCacheType#>, completionBlock: <#T##CNLiveNetworkCompletionBlock!##CNLiveNetworkCompletionBlock!##(URLSessionTask?, Any?, Error?) -> Void#>) | 82 | + tip.showLoading(message: "") |
| 83 | + let param = ["userName":userName,"countryCode":countryCode,"verificationCode":verCode,"inviterId":""] | ||
| 84 | + CNLiveNetworking.setAllowRequestDefaultArgument(true) | ||
| 85 | + CNLiveNetworking.setupShowDataResult(false) | ||
| 86 | + CNLiveNetworking.requestNetwork(with: .POST, urlString: "/open/api2/user/loginInMetaCode", param: param, cacheType: .networkOnly) { task, result, error in | ||
| 87 | + tip.hiddenLoading() | ||
| 88 | + if (error == nil) { | ||
| 89 | + let resp = result as! NSDictionary | ||
| 90 | + let errorCode = resp["errorCode"] | ||
| 91 | + if (errorCode as! String == "0") { | ||
| 92 | + if let res = JSONDeserializer<CNLiveLoginModel>.deserializeFrom(dict: resp, designatedPath: "data") { | ||
| 93 | + Defaults.userInfoKey = res | ||
| 94 | + resultBlock() | ||
| 95 | + } | ||
| 96 | + } else { | ||
| 97 | + tip.showMessage(message: resp["errorMessage"] as! String) | ||
| 98 | + } | ||
| 99 | + } else { | ||
| 100 | + tip.showMessage(message: "登陆失败") | ||
| 101 | + } | ||
| 102 | + } | ||
| 18 | } | 103 | } |
| 19 | } | 104 | } |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineAddInfoViewController.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveMineAddInfoViewController.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by open on 2023/6/7. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | + | ||
| 11 | +class CNLiveMineAddInfoViewController : CNLiveBaseViewController { | ||
| 12 | + | ||
| 13 | + | ||
| 14 | + override func viewDidLoad() { | ||
| 15 | + super.viewDidLoad() | ||
| 16 | + view.backgroundColor = HexColor("#f9f9f9") | ||
| 17 | + | ||
| 18 | + self.titleName = "添加身份" | ||
| 19 | + | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | +} |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineViewController.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveMineViewController.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by open on 2023/6/6. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | + | ||
| 11 | +class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource{ | ||
| 12 | + | ||
| 13 | + let kCNLiveMineOneViewCellIdentifier = "kCNLiveMineOneViewCellIdentifier" | ||
| 14 | + let kCNLiveMineTwoViewCellIdentifier = "kCNLiveMineTwoViewCellIdentifier" | ||
| 15 | + lazy var tableView : UITableView = { | ||
| 16 | + let tableView = UITableView(frame: .zero, style: .grouped) | ||
| 17 | + tableView.dataSource = self | ||
| 18 | + tableView.delegate = self | ||
| 19 | + tableView.backgroundColor = .clear | ||
| 20 | + tableView.tableFooterView = UIView.init() | ||
| 21 | + tableView.separatorStyle = .none | ||
| 22 | + tableView.register(MineBodyOneListViewCell.self, forCellReuseIdentifier: kCNLiveMineOneViewCellIdentifier) | ||
| 23 | + tableView.register(MineBodyTwoListViewCell.self, forCellReuseIdentifier: kCNLiveMineTwoViewCellIdentifier) | ||
| 24 | + return tableView | ||
| 25 | + }() | ||
| 26 | + | ||
| 27 | + lazy var mainView: UIImageView = { | ||
| 28 | + let mainView = UIImageView.init() | ||
| 29 | + mainView.backgroundColor = .clear | ||
| 30 | + mainView.image = UIImage(named: "mine_header_icon_back") | ||
| 31 | + mainView.contentMode = .scaleAspectFill | ||
| 32 | + return mainView | ||
| 33 | + }() | ||
| 34 | + | ||
| 35 | + lazy var dataArray: NSMutableArray = { | ||
| 36 | + let dataArray = NSMutableArray() | ||
| 37 | + let array00 : [Dictionary] = [["name":"我的身份","icon":"mine_header_icon_identity"]] | ||
| 38 | + dataArray.add(array00) | ||
| 39 | + let array01 : [Dictionary] = [["name":"添加身份","icon":"mine_list_icon_add_identity"]] | ||
| 40 | + dataArray.add(array01) | ||
| 41 | + let array02 : [Dictionary] = [["name":"帮助与反馈","icon":"mine_list_icon_help_feedback"], | ||
| 42 | + ["name":"更多设置","icon":"mine_list_icon_set_more"]] | ||
| 43 | + dataArray.add(array02) | ||
| 44 | + return dataArray | ||
| 45 | + }() | ||
| 46 | + | ||
| 47 | + override func viewDidLoad() { | ||
| 48 | + super.viewDidLoad() | ||
| 49 | + view.backgroundColor = HexColor("#f9f9f9") | ||
| 50 | + setNeedsStatusBarAppearanceUpdate() | ||
| 51 | + | ||
| 52 | + view.addSubview(mainView) | ||
| 53 | + mainView.snp.makeConstraints { make in | ||
| 54 | + make.left.top.right.equalToSuperview() | ||
| 55 | + make.height.equalTo(KSreenHeight * 0.4) | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + view.addSubview(tableView) | ||
| 59 | + tableView.snp.makeConstraints { make in | ||
| 60 | + make.edges.equalToSuperview() | ||
| 61 | + } | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + override var preferredStatusBarStyle: UIStatusBarStyle { | ||
| 65 | + return .lightContent | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + deinit { | ||
| 69 | + | ||
| 70 | + } | ||
| 71 | +} | ||
| 72 | + | ||
| 73 | +extension CNLiveMineViewController { | ||
| 74 | + | ||
| 75 | + func numberOfSections(in tableView: UITableView) -> Int { | ||
| 76 | + return dataArray.count | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
| 80 | + return (dataArray[section] as AnyObject).count | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
| 84 | + | ||
| 85 | + if indexPath.section == 0 { | ||
| 86 | + let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveMineOneViewCellIdentifier) as! MineBodyOneListViewCell | ||
| 87 | + return cell | ||
| 88 | + } | ||
| 89 | + let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveMineTwoViewCellIdentifier) as! MineBodyTwoListViewCell | ||
| 90 | + let array = dataArray[indexPath.section] | ||
| 91 | + let sub_dict = (array as! Array<Any>)[indexPath.row] | ||
| 92 | + cell.setupWithDataSource(dict: sub_dict as! Dictionary<String, Any>) | ||
| 93 | + return cell | ||
| 94 | + | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
| 98 | + if indexPath.section == 0 { | ||
| 99 | + return 120 | ||
| 100 | + } | ||
| 101 | + return 60 | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
| 105 | + if indexPath.section == 1 { | ||
| 106 | + let infoVC = CNLiveMineAddInfoViewController.init() | ||
| 107 | + infoVC.hidesBottomBarWhenPushed = true; | ||
| 108 | + self.navigationController?.pushViewController(infoVC, animated: true) | ||
| 109 | + } | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { | ||
| 113 | + if section == 0 { | ||
| 114 | + return 150 | ||
| 115 | + } | ||
| 116 | + return 0.001 | ||
| 117 | + | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { | ||
| 121 | + if section == 0 { | ||
| 122 | + let headerView = MineHeaderView.init(frame: CGRect(x: 0, y: 0, width: KSreenWidth, height: 80)) | ||
| 123 | + return headerView | ||
| 124 | + } | ||
| 125 | + return UIView.init() | ||
| 126 | + | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + func scrollViewDidScroll(_ scrollView: UIScrollView) { | ||
| 130 | + let offsetY = scrollView.contentOffset.y | ||
| 131 | + mainView.height = offsetY < 0 ? (KSreenHeight * 0.4) + abs(offsetY) : KSreenHeight * 0.4; | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + | ||
| 135 | +} | ||
| 136 | + |
metaCode/Classes/Main/MinePage/Controller/CNMineViewController.swift deleted
100644 → 0
| 1 | -// | ||
| 2 | -// CNMineViewController.swift | ||
| 3 | -// metaCode | ||
| 4 | -// | ||
| 5 | -// Created by iOS on 2023/5/30. | ||
| 6 | -// | ||
| 7 | - | ||
| 8 | -import UIKit | ||
| 9 | -import CNLiveRequestBastKit | ||
| 10 | - | ||
| 11 | -class CNMineViewController: CNLiveBaseViewController { | ||
| 12 | - | ||
| 13 | - override func viewDidLoad() { | ||
| 14 | - super.viewDidLoad() | ||
| 15 | - // Do any additional setup after loading the view. | ||
| 16 | - | ||
| 17 | - self.view.backgroundColor = KVCBackgroupColor | ||
| 18 | - | ||
| 19 | - | ||
| 20 | - let button = UIButton() | ||
| 21 | - button.frame = CGRect(x: 100, y: 100, width: 100, height: 40) | ||
| 22 | - button.setTitle("请求吧", for: .normal) | ||
| 23 | - button.setTitle("请求吧", for: .highlighted) | ||
| 24 | - button.backgroundColor = UIColor.red | ||
| 25 | - button.setTitleColor(UIColor.gray, for: .normal) | ||
| 26 | - button.addTarget(self, action: #selector(touchButton), for: .touchUpInside) | ||
| 27 | - button.sizeToFit() | ||
| 28 | - self.view.addSubview(button) | ||
| 29 | - | ||
| 30 | - let button_sha = UIButton() | ||
| 31 | - button_sha.frame = CGRect(x: 100, y: 200, width: 100, height: 40) | ||
| 32 | - button_sha.setTitle("验证码", for: .normal) | ||
| 33 | - button_sha.setTitle("验证码", for: .highlighted) | ||
| 34 | - button_sha.backgroundColor = UIColor.red | ||
| 35 | - button_sha.setTitleColor(UIColor.gray, for: .normal) | ||
| 36 | - button_sha.addTarget(self, action: #selector(shaButton), for: .touchUpInside) | ||
| 37 | - button_sha.sizeToFit() | ||
| 38 | - self.view.addSubview(button_sha) | ||
| 39 | - } | ||
| 40 | - | ||
| 41 | - @objc func shaButton() -> Void { | ||
| 42 | - let param = ["mobile":"18519714533","countryCode":"86"] | ||
| 43 | - CNLiveNetworking.setAllowRequestDefaultArgument(true) | ||
| 44 | - CNLiveNetworking.setupShowDataResult(true) | ||
| 45 | - CNLiveNetworking.requestNetwork(with: .POST, urlString: "https://api.cnlive.com/open/api2/user/sendVerifyCode4server", param: param, cacheType: .networkOnly) { task, result, error in | ||
| 46 | - print("\(String(describing: result))") | ||
| 47 | - } | ||
| 48 | - } | ||
| 49 | - | ||
| 50 | - @objc func touchButton() { | ||
| 51 | - let param = ["userName":"18519714533","countryCode":"86","verificationCode":"599011","inviterId":"","ver":"1"] | ||
| 52 | - CNLiveNetworking.setAllowRequestDefaultArgument(true) | ||
| 53 | - CNLiveNetworking.setupShowDataResult(true) | ||
| 54 | - CNLiveNetworking.requestNetwork(with: .POST, urlString: "https://api.cnlive.com/open/api2/user/loginInMetaCode", param: param, cacheType: .networkOnly) { task, result, error in | ||
| 55 | - print("\(String(describing: result))") | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - | ||
| 59 | - | ||
| 60 | - } | ||
| 61 | - | ||
| 62 | - | ||
| 63 | -} | ||
| 64 | - |
metaCode/Classes/Main/MinePage/View/CNLiveMineBodyListView.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveMineBodyListView.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by open on 2023/6/7. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | + | ||
| 11 | +class MineBodyOneListViewCell : UITableViewCell { | ||
| 12 | + | ||
| 13 | + lazy var nameLabel: UILabel = { | ||
| 14 | + let nameLabel = UILabel.init() | ||
| 15 | + nameLabel.textColor = .black | ||
| 16 | + nameLabel.font = BoldFont_16_Fit | ||
| 17 | + nameLabel.backgroundColor = .clear | ||
| 18 | + nameLabel.text = "我的身份" | ||
| 19 | + return nameLabel | ||
| 20 | + }() | ||
| 21 | + | ||
| 22 | + lazy var headerView: UIImageView = { | ||
| 23 | + let headerView = UIImageView.init() | ||
| 24 | + headerView.image = UIImage(named: "mine_header_icon_identity") | ||
| 25 | + headerView.backgroundColor = .clear | ||
| 26 | + headerView.contentMode = .scaleToFill | ||
| 27 | + return headerView | ||
| 28 | + }() | ||
| 29 | + | ||
| 30 | + lazy var mainView: UIView = { | ||
| 31 | + let mainView = UIView.init() | ||
| 32 | + mainView.backgroundColor = .white | ||
| 33 | + mainView.layer.cornerRadius = 8 | ||
| 34 | + mainView.layer.masksToBounds = true | ||
| 35 | + return mainView | ||
| 36 | + }() | ||
| 37 | + | ||
| 38 | + lazy var lookBtn: UIButton = { | ||
| 39 | + let lookBtn = UIButton.init(type: .custom) | ||
| 40 | + lookBtn.setTitle(" 去看看 ", for: .normal) | ||
| 41 | + lookBtn.setTitleColor(.white, for: .normal) | ||
| 42 | + lookBtn.titleLabel?.font = BoldFont_14 | ||
| 43 | + lookBtn.layer.masksToBounds = true | ||
| 44 | + lookBtn.layer.cornerRadius = 15 | ||
| 45 | + return lookBtn | ||
| 46 | + }() | ||
| 47 | + | ||
| 48 | + lazy var tipLabel: UILabel = { | ||
| 49 | + let tipLabel = UILabel.init() | ||
| 50 | + tipLabel.textColor = HexColor("#999999") | ||
| 51 | + tipLabel.text = "您暂未进行身份认证" | ||
| 52 | + tipLabel.font = Font_13 | ||
| 53 | + return tipLabel | ||
| 54 | + }() | ||
| 55 | + | ||
| 56 | + | ||
| 57 | + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
| 58 | + super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
| 59 | + self.selectionStyle = .none | ||
| 60 | + self.backgroundColor = .clear | ||
| 61 | + | ||
| 62 | + addSubview(mainView) | ||
| 63 | + mainView.addSubview(headerView) | ||
| 64 | + headerView.addSubview(nameLabel) | ||
| 65 | + mainView.addSubview(tipLabel) | ||
| 66 | + mainView.addSubview(lookBtn) | ||
| 67 | + | ||
| 68 | + setupConstraints() | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + required init?(coder: NSCoder) { | ||
| 72 | + fatalError("init(coder:) has not been implemented") | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + private func setupConstraints() { | ||
| 76 | + mainView.snp.makeConstraints { make in | ||
| 77 | + make.centerX.equalToSuperview() | ||
| 78 | + make.left.equalToSuperview().offset(15) | ||
| 79 | + make.right.equalToSuperview().offset(-15) | ||
| 80 | + make.top.bottom.equalToSuperview() | ||
| 81 | + } | ||
| 82 | + headerView.snp.makeConstraints { make in | ||
| 83 | + make.centerX.equalToSuperview() | ||
| 84 | + make.top.left.right.equalToSuperview() | ||
| 85 | + make.height.equalTo(40) | ||
| 86 | + } | ||
| 87 | + nameLabel.snp.makeConstraints { make in | ||
| 88 | + make.centerY.equalToSuperview() | ||
| 89 | + make.left.equalToSuperview().offset(15) | ||
| 90 | + } | ||
| 91 | + tipLabel.snp.makeConstraints { make in | ||
| 92 | + make.centerY.equalToSuperview().offset(20) | ||
| 93 | + make.left.equalToSuperview().offset(15) | ||
| 94 | + } | ||
| 95 | + lookBtn.snp.makeConstraints { make in | ||
| 96 | + make.centerY.equalToSuperview().offset(20) | ||
| 97 | + make.right.equalToSuperview().offset(-15) | ||
| 98 | + make.width.equalTo(80) | ||
| 99 | + make.height.equalTo(30) | ||
| 100 | + } | ||
| 101 | + lookBtn.setGradient(colors: [UIColor(red: 103/255.0, green: 197/255.0, blue: 255/255.0, alpha: 1),UIColor(red: 96/255.0, green: 154/255.0, blue: 255/255.0, alpha: 1)], startPoint: CGPoint(x: 0, y: 0.5), endPoint: CGPoint(x: 1, y: 0.5)) | ||
| 102 | + } | ||
| 103 | +} | ||
| 104 | + | ||
| 105 | +class MineBodyTwoListViewCell : UITableViewCell { | ||
| 106 | + | ||
| 107 | + lazy var mainView: UIView = { | ||
| 108 | + let mainView = UIView.init() | ||
| 109 | + mainView.backgroundColor = .white | ||
| 110 | + mainView.layer.cornerRadius = 8 | ||
| 111 | + mainView.layer.masksToBounds = true | ||
| 112 | + return mainView | ||
| 113 | + }() | ||
| 114 | + lazy var nameLabel: UILabel = { | ||
| 115 | + let nameLabel = UILabel.init() | ||
| 116 | + nameLabel.textColor = .black | ||
| 117 | + nameLabel.font = BoldFont_16_Fit | ||
| 118 | + nameLabel.backgroundColor = .clear | ||
| 119 | + return nameLabel | ||
| 120 | + }() | ||
| 121 | + lazy var headerView: UIImageView = { | ||
| 122 | + let headerView = UIImageView.init() | ||
| 123 | + headerView.backgroundColor = .clear | ||
| 124 | + headerView.contentMode = .scaleToFill | ||
| 125 | + return headerView | ||
| 126 | + }() | ||
| 127 | + lazy var moreBtn: UIButton = { | ||
| 128 | + let moreBtn = UIButton.init(type: .custom) | ||
| 129 | + moreBtn.setImage(UIImage(named: "mine_list_icon_right_more"), for: .normal) | ||
| 130 | + moreBtn.layer.masksToBounds = true | ||
| 131 | + moreBtn.layer.cornerRadius = 15 | ||
| 132 | + return moreBtn | ||
| 133 | + }() | ||
| 134 | + | ||
| 135 | + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
| 136 | + super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
| 137 | + self.selectionStyle = .none | ||
| 138 | + self.backgroundColor = .clear | ||
| 139 | + | ||
| 140 | + addSubview(mainView) | ||
| 141 | + mainView.addSubview(headerView) | ||
| 142 | + headerView.addSubview(nameLabel) | ||
| 143 | + mainView.addSubview(moreBtn) | ||
| 144 | + | ||
| 145 | + setupConstraints() | ||
| 146 | + | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + private func setupConstraints() { | ||
| 150 | + mainView.snp.makeConstraints { make in | ||
| 151 | + make.centerX.equalToSuperview() | ||
| 152 | + make.left.equalToSuperview().offset(15) | ||
| 153 | + make.right.equalToSuperview().offset(-15) | ||
| 154 | + make.top.bottom.equalToSuperview() | ||
| 155 | + } | ||
| 156 | + headerView.snp.makeConstraints { make in | ||
| 157 | + make.centerY.equalToSuperview() | ||
| 158 | + make.left.equalTo(15) | ||
| 159 | + make.size.equalTo(20) | ||
| 160 | + } | ||
| 161 | + nameLabel.snp.makeConstraints { make in | ||
| 162 | + make.centerY.equalToSuperview() | ||
| 163 | + make.left.equalTo(headerView.snp.right).offset(7) | ||
| 164 | + } | ||
| 165 | + moreBtn.snp.makeConstraints { make in | ||
| 166 | + make.centerY.equalToSuperview() | ||
| 167 | + make.right.equalToSuperview().offset(-15) | ||
| 168 | + make.size.equalTo(30) | ||
| 169 | + } | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | + public func setupWithDataSource(dict : Dictionary<String, Any>) { | ||
| 173 | + headerView.image = UIImage(named: dict["icon"] as! String) | ||
| 174 | + nameLabel.text = "\(dict["name"] ?? "")" | ||
| 175 | + } | ||
| 176 | + | ||
| 177 | + required init?(coder: NSCoder) { | ||
| 178 | + fatalError("init(coder:) has not been implemented") | ||
| 179 | + } | ||
| 180 | +} |
metaCode/Classes/Main/MinePage/View/CNLiveMineHeaderView.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveMineHeaderView.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by open on 2023/6/7. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | + | ||
| 11 | +class MineHeaderView : UIView { | ||
| 12 | + | ||
| 13 | + lazy var iconView : UIImageView = { | ||
| 14 | + | ||
| 15 | + let iconView = UIImageView.init() | ||
| 16 | + iconView.image = UIImage(named: "mine_header_icon_defult_ava") | ||
| 17 | + iconView.backgroundColor = .clear | ||
| 18 | + iconView.layer.cornerRadius = 20 | ||
| 19 | + iconView.layer.masksToBounds = true | ||
| 20 | + iconView.contentMode = .scaleToFill | ||
| 21 | + return iconView | ||
| 22 | + }() | ||
| 23 | + | ||
| 24 | + lazy var nameLabel: UILabel = { | ||
| 25 | + let nameLabel = UILabel.init() | ||
| 26 | + nameLabel.text = UserInfoManager.shared.userInfo.nickName | ||
| 27 | + nameLabel.textColor = .white | ||
| 28 | + nameLabel.font = Font_16 | ||
| 29 | + return nameLabel | ||
| 30 | + }() | ||
| 31 | + | ||
| 32 | + lazy var tipBtn: UIButton = { | ||
| 33 | + let tipBtn = UIButton(type: .custom) | ||
| 34 | + tipBtn.backgroundColor = .clear | ||
| 35 | + tipBtn.setImage(UIImage(named: "mine_header_icon_notice"), for: .normal) | ||
| 36 | + tipBtn.imageView?.contentMode = .scaleToFill | ||
| 37 | + tipBtn.addTarget(self, action: #selector(tipBtnAction), for: .touchUpInside) | ||
| 38 | + return tipBtn | ||
| 39 | + }() | ||
| 40 | + | ||
| 41 | + override init(frame: CGRect) { | ||
| 42 | + super.init(frame: frame) | ||
| 43 | + self.backgroundColor = .clear | ||
| 44 | + | ||
| 45 | + addSubview(iconView) | ||
| 46 | + iconView.snp.makeConstraints { make in | ||
| 47 | + make.centerY.equalToSuperview().offset(10) | ||
| 48 | + make.left.equalToSuperview().offset(20) | ||
| 49 | + make.size.equalTo(60) | ||
| 50 | + } | ||
| 51 | + addSubview(nameLabel) | ||
| 52 | + nameLabel.snp.makeConstraints { make in | ||
| 53 | + make.centerY.equalToSuperview().offset(10) | ||
| 54 | + make.left.equalTo(iconView.snp.right).offset(15) | ||
| 55 | + } | ||
| 56 | + addSubview(tipBtn) | ||
| 57 | + tipBtn.snp.makeConstraints { make in | ||
| 58 | + make.centerY.equalToSuperview().offset(10) | ||
| 59 | + make.right.equalToSuperview().offset(-15) | ||
| 60 | + make.size.equalTo(30) | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + required init?(coder: NSCoder) { | ||
| 66 | + fatalError("init(coder:) has not been implemented") | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + @objc func tipBtnAction() { | ||
| 70 | + | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | +} |
metaCode/Classes/Other/AppDelegate.swift
| @@ -8,6 +8,7 @@ | @@ -8,6 +8,7 @@ | ||
| 8 | import UIKit | 8 | import UIKit |
| 9 | import CNLiveRequestBastKit | 9 | import CNLiveRequestBastKit |
| 10 | import IQKeyboardManagerSwift | 10 | import IQKeyboardManagerSwift |
| 11 | +import SwiftyUserDefaults | ||
| 11 | 12 | ||
| 12 | @main | 13 | @main |
| 13 | class AppDelegate: UIResponder, UIApplicationDelegate { | 14 | class AppDelegate: UIResponder, UIApplicationDelegate { |
| @@ -17,9 +18,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { | @@ -17,9 +18,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { | ||
| 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | 18 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { |
| 18 | 19 | ||
| 19 | // Override point for customization after application launch. | 20 | // Override point for customization after application launch. |
| 21 | + | ||
| 20 | window = UIWindow.init(frame: UIScreen.main.bounds) | 22 | window = UIWindow.init(frame: UIScreen.main.bounds) |
| 21 | window?.backgroundColor = KVCBackgroupColor | 23 | window?.backgroundColor = KVCBackgroupColor |
| 22 | - window?.rootViewController = CNLiveLoginViewController.init() | 24 | + window?.rootViewController = UserInfoManager.shared.is_login ? CNLiveBaseTabBarViewController.init() : CNLiveLoginViewController.init() |
| 23 | window?.makeKeyAndVisible() | 25 | window?.makeKeyAndVisible() |
| 24 | 26 | ||
| 25 | 27 | ||
| @@ -52,7 +54,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { | @@ -52,7 +54,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { | ||
| 52 | CNLiveNetworking.setupSignKey("ae3a7ad3e4b9beb7cfe2078db648ebb89aa249ca2e82ac") | 54 | CNLiveNetworking.setupSignKey("ae3a7ad3e4b9beb7cfe2078db648ebb89aa249ca2e82ac") |
| 53 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 55 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 54 | CNLiveNetworking.setResponseSerializerType(.JSON) | 56 | CNLiveNetworking.setResponseSerializerType(.JSON) |
| 55 | - CNLiveNetworking.setupBaseURL("https://api.cnlive.com/open/api2") | 57 | + CNLiveNetworking.setupBaseURL("https://api.cnlive.com") |
| 56 | } | 58 | } |
| 57 | 59 | ||
| 58 | 60 |
metaCode/Classes/Other/CNLiveViewController.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveViewController.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 2023/5/30. | ||
| 6 | +// 此为测试界面 | ||
| 7 | + | ||
| 8 | +import UIKit | ||
| 9 | +import CNLiveRequestBastKit | ||
| 10 | + | ||
| 11 | +class CNLiveViewController: CNLiveBaseViewController { | ||
| 12 | + | ||
| 13 | + override func viewDidLoad() { | ||
| 14 | + super.viewDidLoad() | ||
| 15 | + // Do any additional setup after loading the view. | ||
| 16 | + | ||
| 17 | + self.view.backgroundColor = KVCBackgroupColor | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + let button = UIButton() | ||
| 21 | + button.frame = CGRect(x: 0, y: 100, width: KSreenWidth, height: 40) | ||
| 22 | + button.setTitle("请求吧", for: .normal) | ||
| 23 | + button.setTitle("请求吧", for: .highlighted) | ||
| 24 | + button.backgroundColor = UIColor.red | ||
| 25 | + button.setTitleColor(UIColor.gray, for: .normal) | ||
| 26 | + button.addTarget(self, action: #selector(touchButton), for: .touchUpInside) | ||
| 27 | + self.view.addSubview(button) | ||
| 28 | + | ||
| 29 | + let button_sha = UIButton() | ||
| 30 | + button_sha.frame = CGRect(x: 0, y: 150, width: KSreenWidth, height: 40) | ||
| 31 | + button_sha.setTitle("验证码", for: .normal) | ||
| 32 | + button_sha.setTitle("验证码", for: .highlighted) | ||
| 33 | + button_sha.backgroundColor = UIColor.red | ||
| 34 | + button_sha.setTitleColor(UIColor.gray, for: .normal) | ||
| 35 | + button_sha.addTarget(self, action: #selector(shaButton), for: .touchUpInside) | ||
| 36 | + self.view.addSubview(button_sha) | ||
| 37 | + | ||
| 38 | + let button_q = UIButton() | ||
| 39 | + button_q.frame = CGRect(x: 0, y: 200, width: KSreenWidth, height: 40) | ||
| 40 | + button_q.setTitle("显示弹框", for: .normal) | ||
| 41 | + button_q.setTitle("显示弹框", for: .highlighted) | ||
| 42 | + button_q.backgroundColor = UIColor.red | ||
| 43 | + button_q.setTitleColor(UIColor.gray, for: .normal) | ||
| 44 | + button_q.addTarget(self, action: #selector(qButton), for: .touchUpInside) | ||
| 45 | + self.view.addSubview(button_q) | ||
| 46 | + | ||
| 47 | + let button_i = UIButton() | ||
| 48 | + button_i.frame = CGRect(x: 0, y: 250, width: KSreenWidth, height: 40) | ||
| 49 | + button_i.setTitle("获取用户信息", for: .normal) | ||
| 50 | + button_i.setTitle("获取用户信息", for: .highlighted) | ||
| 51 | + button_i.backgroundColor = UIColor.red | ||
| 52 | + button_i.setTitleColor(UIColor.gray, for: .normal) | ||
| 53 | + button_i.addTarget(self, action: #selector(infoButton), for: .touchUpInside) | ||
| 54 | + self.view.addSubview(button_i) | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + | ||
| 58 | +// override func viewDidAppear(_ animated: Bool) { | ||
| 59 | +// LoginAuthInfoView.showAuthView() | ||
| 60 | +// } | ||
| 61 | + | ||
| 62 | + | ||
| 63 | + @objc func qButton() -> Void { | ||
| 64 | + | ||
| 65 | + LoginAuthInfoView.showAuthView() | ||
| 66 | + | ||
| 67 | + } | ||
| 68 | + @objc func infoButton() -> Void { | ||
| 69 | +// let user = UserInfoManager.shared.userInfo | ||
| 70 | +// print("\(user)") | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + @objc func shaButton() -> Void { | ||
| 74 | +// let param = ["mobile":"18519714533","countryCode":"86"] | ||
| 75 | +// CNLiveNetworking.setAllowRequestDefaultArgument(true) | ||
| 76 | +// CNLiveNetworking.setupShowDataResult(true) | ||
| 77 | +// CNLiveNetworking.requestNetwork(with: .POST, urlString: "https://api.cnlive.com/open/api2/user/sendVerifyCode4server", param: param, cacheType: .networkOnly) { task, result, error in | ||
| 78 | +// print("\(String(describing: result))") | ||
| 79 | +// } | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + @objc func touchButton() { | ||
| 83 | +// let param = ["userName":"18519714533","countryCode":"86","verificationCode":"599011","inviterId":"","ver":"1"] | ||
| 84 | +// CNLiveNetworking.setAllowRequestDefaultArgument(true) | ||
| 85 | +// CNLiveNetworking.setupShowDataResult(true) | ||
| 86 | +// CNLiveNetworking.requestNetwork(with: .POST, urlString: "https://api.cnlive.com/open/api2/user/loginInMetaCode", param: param, cacheType: .networkOnly) { task, result, error in | ||
| 87 | +// print("\(String(describing: result))") | ||
| 88 | +// } | ||
| 89 | + | ||
| 90 | + | ||
| 91 | + | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + | ||
| 95 | +} | ||
| 96 | + |
metaCode/Supporting Files/Assets.xcassets/LoginPage/login_body_show_auth_back.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "login_body_show_auth_back@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "login_body_show_auth_back@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/LoginPage/login_body_show_auth_back.imageset/login_body_show_auth_back@2x.png
0 → 100644
48.5 KB
metaCode/Supporting Files/Assets.xcassets/LoginPage/login_body_show_auth_back.imageset/login_body_show_auth_back@3x.png
0 → 100644
133 KB
metaCode/Supporting Files/Assets.xcassets/LoginPage/login_body_show_auth_content.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "login_body_show_auth_content@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "login_body_show_auth_content@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/LoginPage/login_body_show_auth_content.imageset/login_body_show_auth_content@2x.png
0 → 100644
96.7 KB
metaCode/Supporting Files/Assets.xcassets/LoginPage/login_body_show_auth_content.imageset/login_body_show_auth_content@3x.png
0 → 100644
203 KB
metaCode/Supporting Files/Assets.xcassets/LoginPage/login_body_show_auth_policy.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "login_body_show_auth_policy@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "login_body_show_auth_policy@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/LoginPage/login_body_show_auth_policy.imageset/login_body_show_auth_policy@2x.png
0 → 100644
17.1 KB
metaCode/Supporting Files/Assets.xcassets/LoginPage/login_body_show_auth_policy.imageset/login_body_show_auth_policy@3x.png
0 → 100644
31.5 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_back.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "mine_header_icon_back@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "mine_header_icon_back@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_back.imageset/mine_header_icon_back@2x.png
0 → 100644
77.8 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_back.imageset/mine_header_icon_back@3x.png
0 → 100644
179 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_defult_ava.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "mine_header_icon_defult_ava@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "mine_header_icon_defult_ava@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_defult_ava.imageset/mine_header_icon_defult_ava@2x.png
0 → 100644
6.23 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_defult_ava.imageset/mine_header_icon_defult_ava@3x.png
0 → 100644
12 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_identity.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "mine_header_icon_identity@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "mine_header_icon_identity@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_identity.imageset/mine_header_icon_identity@2x.png
0 → 100644
8.54 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_identity.imageset/mine_header_icon_identity@3x.png
0 → 100644
20.4 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_notice.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "mine_header_icon_notice@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "mine_header_icon_notice@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_notice.imageset/mine_header_icon_notice@2x.png
0 → 100644
1.09 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_notice.imageset/mine_header_icon_notice@3x.png
0 → 100644
1.92 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_icon_add_identity.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "mine_list_icon_add_identity@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "mine_list_icon_add_identity@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_icon_add_identity.imageset/mine_list_icon_add_identity@2x.png
0 → 100644
1.02 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_icon_add_identity.imageset/mine_list_icon_add_identity@3x.png
0 → 100644
1.9 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_icon_help_feedback.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "mine_list_icon_help_feedback@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "mine_list_icon_help_feedback@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_icon_help_feedback.imageset/mine_list_icon_help_feedback@2x.png
0 → 100644
1.34 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_icon_help_feedback.imageset/mine_list_icon_help_feedback@3x.png
0 → 100644
2.39 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_icon_right_more.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "mine_list_icon_right_more@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "mine_list_icon_right_more@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_icon_right_more.imageset/mine_list_icon_right_more@2x.png
0 → 100644
409 Bytes
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_icon_right_more.imageset/mine_list_icon_right_more@3x.png
0 → 100644
777 Bytes
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_icon_set_more.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "mine_list_icon_set_more@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "mine_list_icon_set_more@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_icon_set_more.imageset/mine_list_icon_set_more@2x.png
0 → 100644
1.57 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_icon_set_more.imageset/mine_list_icon_set_more@3x.png
0 → 100644
3 KB
metaCode/Supporting Files/Assets.xcassets/TabBar/main_navi_left_icon_back.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "main_navi_left_icon_back@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "main_navi_left_icon_back@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/TabBar/main_navi_left_icon_back.imageset/main_navi_left_icon_back@2x.png
0 → 100644
413 Bytes
metaCode/Supporting Files/Assets.xcassets/TabBar/main_navi_left_icon_back.imageset/main_navi_left_icon_back@3x.png
0 → 100644
768 Bytes