Commit f44bbd4b00a90381185a7ee601f28cf64c1c2c87
Merge branch 'master' of http://bj.gitlab.cnlive.com/ios-team/CNLiveMateCode
# Conflicts: # metaCode.xcodeproj/project.pbxproj # metaCode/Classes/Other/AppDelegate.swift
Showing
69 changed files
with
3031 additions
and
95 deletions
Podfile
| ... | ... | @@ -42,10 +42,10 @@ target 'metaCode' do |
| 42 | 42 | #分类滚动切换视图 |
| 43 | 43 | pod 'JXSegmentedView', :git => 'https://gitee.com/mirrors/JXSegmentedView.git' |
| 44 | 44 | pod 'JXPagingView/Paging' |
| 45 | - | |
| 46 | - | |
| 45 | + #轮播图 | |
| 46 | + pod 'FSPagerView', '~> 0.8.3' | |
| 47 | 47 | #应用调试工具 |
| 48 | - pod 'FWDebug', :configurations => ['Debug'] | |
| 48 | +# pod 'FWDebug', :configurations => ['Debug'] | |
| 49 | 49 | |
| 50 | 50 | target 'metaCodeTests' do |
| 51 | 51 | inherit! :search_paths | ... | ... |
metaCode.xcodeproj/project.pbxproj
| ... | ... | @@ -9,7 +9,32 @@ |
| 9 | 9 | /* Begin PBXBuildFile section */ |
| 10 | 10 | 0D39E93D7229931C86EB1161 /* Pods_metaCode_metaCodeUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63D879B49B1E42F1584DD75E /* Pods_metaCode_metaCodeUITests.framework */; }; |
| 11 | 11 | 19123FC12ABC11170075C883 /* CNWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19123FC02ABC11170075C883 /* CNWebViewController.swift */; }; |
| 12 | + 192336EB2AD9224300D47CD4 /* CNUpSlideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192336EA2AD9224300D47CD4 /* CNUpSlideViewController.swift */; }; | |
| 13 | + 1926C28F2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1926C28E2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift */; }; | |
| 14 | + 1926C2912AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1926C2902AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift */; }; | |
| 15 | + 19BB1FDF2AEA3A450094D962 /* CNSlideBaseNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FDE2AEA3A450094D962 /* CNSlideBaseNavigationController.swift */; }; | |
| 16 | + 19BB1FE12AEB5C220094D962 /* CNLiveShopConsoleController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FE02AEB5C220094D962 /* CNLiveShopConsoleController.swift */; }; | |
| 17 | + 19BB1FE32AEB8B7C0094D962 /* CNLiveShopConsoleViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FE22AEB8B7C0094D962 /* CNLiveShopConsoleViewModel.swift */; }; | |
| 18 | + 19BB1FE62AEB93B80094D962 /* CNLiveShopUserInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FE52AEB93B80094D962 /* CNLiveShopUserInfoModel.swift */; }; | |
| 19 | + 19BB1FE82AECAD060094D962 /* CNLiveShopConsoleModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FE72AECAD060094D962 /* CNLiveShopConsoleModel.swift */; }; | |
| 20 | + 19BB1FEA2AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FE92AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift */; }; | |
| 21 | + 19BB1FEC2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FEB2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift */; }; | |
| 22 | + 19BB1FEE2AF0E1EC0094D962 /* CNLiveShopDetailViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FED2AF0E1EC0094D962 /* CNLiveShopDetailViewModel.swift */; }; | |
| 23 | + 19BB1FF02AF0E5B30094D962 /* CNLiveShopDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FEF2AF0E5B30094D962 /* CNLiveShopDetailModel.swift */; }; | |
| 24 | + 19BB1FF22AF21A950094D962 /* CNLliveShopDetailBannerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FF12AF21A950094D962 /* CNLliveShopDetailBannerCell.swift */; }; | |
| 25 | + 19BB202B2AF382150094D962 /* CNLiveAdaptTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB202A2AF382150094D962 /* CNLiveAdaptTool.swift */; }; | |
| 26 | + 19CC4D472ADD006600308E2A /* CNDownSlideSingleCourseCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D462ADD006600308E2A /* CNDownSlideSingleCourseCell.swift */; }; | |
| 27 | + 19CC4D492ADD06C500308E2A /* UITableView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D482ADD06C500308E2A /* UITableView+Extension.swift */; }; | |
| 28 | + 19CC4D4B2ADD086F00308E2A /* CNUpSlideDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D4A2ADD086F00308E2A /* CNUpSlideDetailViewController.swift */; }; | |
| 29 | + 19CC4D4F2ADD0FC200308E2A /* CNUpSlideDetailScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D4E2ADD0FC200308E2A /* CNUpSlideDetailScrollView.swift */; }; | |
| 30 | + 19CC4D522ADD129800308E2A /* CNUpSlideAnimationTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D512ADD129800308E2A /* CNUpSlideAnimationTransition.swift */; }; | |
| 31 | + 19CC4D542ADD163D00308E2A /* CNUpSlideCardPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */; }; | |
| 32 | + 19CC4D562ADD19C200308E2A /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D552ADD19C200308E2A /* String+Extension.swift */; }; | |
| 33 | + 19D2CE632AE8B65D00691757 /* CNLiveDownSlideTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19D2CE622AE8B65D00691757 /* CNLiveDownSlideTool.swift */; }; | |
| 12 | 34 | 19F1C2332AB5728B0083D06C /* CNIDCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19F1C2322AB5728B0083D06C /* CNIDCardView.swift */; }; |
| 35 | + 19FA20172AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19FA20162AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift */; }; | |
| 36 | + 19FA20192AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19FA20182AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift */; }; | |
| 37 | + 19FA201B2AE60423001F7186 /* CNLiveDownSlideModelLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19FA201A2AE60423001F7186 /* CNLiveDownSlideModelLayout.swift */; }; | |
| 13 | 38 | 1DD2808DF02C120276F99F4D /* Pods_metaCode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F1C55A719CFEE073C06D37CE /* Pods_metaCode.framework */; }; |
| 14 | 39 | 7905BB492AB0588B0089BC50 /* CNLiveMineAuthResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7905BB482AB0588B0089BC50 /* CNLiveMineAuthResultViewController.swift */; }; |
| 15 | 40 | 790B1FB42A4153E90074CF00 /* CNLiveMineBaseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790B1FB32A4153E90074CF00 /* CNLiveMineBaseModel.swift */; }; |
| ... | ... | @@ -127,7 +152,32 @@ |
| 127 | 152 | 0EC910AB9EBD717B04432BC4 /* Pods-metaCode-metaCodeUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-metaCode-metaCodeUITests.debug.xcconfig"; path = "Target Support Files/Pods-metaCode-metaCodeUITests/Pods-metaCode-metaCodeUITests.debug.xcconfig"; sourceTree = "<group>"; }; |
| 128 | 153 | 170BC5D0622EA2969D110A3B /* Pods-metaCode.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-metaCode.release.xcconfig"; path = "Target Support Files/Pods-metaCode/Pods-metaCode.release.xcconfig"; sourceTree = "<group>"; }; |
| 129 | 154 | 19123FC02ABC11170075C883 /* CNWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNWebViewController.swift; sourceTree = "<group>"; }; |
| 155 | + 192336EA2AD9224300D47CD4 /* CNUpSlideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNUpSlideViewController.swift; sourceTree = "<group>"; }; | |
| 156 | + 1926C28E2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideViewModel.swift; sourceTree = "<group>"; }; | |
| 157 | + 1926C2902AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideModel.swift; sourceTree = "<group>"; }; | |
| 158 | + 19BB1FDE2AEA3A450094D962 /* CNSlideBaseNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNSlideBaseNavigationController.swift; sourceTree = "<group>"; }; | |
| 159 | + 19BB1FE02AEB5C220094D962 /* CNLiveShopConsoleController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopConsoleController.swift; sourceTree = "<group>"; }; | |
| 160 | + 19BB1FE22AEB8B7C0094D962 /* CNLiveShopConsoleViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopConsoleViewModel.swift; sourceTree = "<group>"; }; | |
| 161 | + 19BB1FE52AEB93B80094D962 /* CNLiveShopUserInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopUserInfoModel.swift; sourceTree = "<group>"; }; | |
| 162 | + 19BB1FE72AECAD060094D962 /* CNLiveShopConsoleModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopConsoleModel.swift; sourceTree = "<group>"; }; | |
| 163 | + 19BB1FE92AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopConsoleCell.swift; sourceTree = "<group>"; }; | |
| 164 | + 19BB1FEB2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownShopDetailController.swift; sourceTree = "<group>"; }; | |
| 165 | + 19BB1FED2AF0E1EC0094D962 /* CNLiveShopDetailViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailViewModel.swift; sourceTree = "<group>"; }; | |
| 166 | + 19BB1FEF2AF0E5B30094D962 /* CNLiveShopDetailModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailModel.swift; sourceTree = "<group>"; }; | |
| 167 | + 19BB1FF12AF21A950094D962 /* CNLliveShopDetailBannerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLliveShopDetailBannerCell.swift; sourceTree = "<group>"; }; | |
| 168 | + 19BB202A2AF382150094D962 /* CNLiveAdaptTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAdaptTool.swift; sourceTree = "<group>"; }; | |
| 169 | + 19CC4D462ADD006600308E2A /* CNDownSlideSingleCourseCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNDownSlideSingleCourseCell.swift; sourceTree = "<group>"; }; | |
| 170 | + 19CC4D482ADD06C500308E2A /* UITableView+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITableView+Extension.swift"; sourceTree = "<group>"; }; | |
| 171 | + 19CC4D4A2ADD086F00308E2A /* CNUpSlideDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNUpSlideDetailViewController.swift; sourceTree = "<group>"; }; | |
| 172 | + 19CC4D4E2ADD0FC200308E2A /* CNUpSlideDetailScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNUpSlideDetailScrollView.swift; sourceTree = "<group>"; }; | |
| 173 | + 19CC4D512ADD129800308E2A /* CNUpSlideAnimationTransition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNUpSlideAnimationTransition.swift; sourceTree = "<group>"; }; | |
| 174 | + 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNUpSlideCardPresentationController.swift; sourceTree = "<group>"; }; | |
| 175 | + 19CC4D552ADD19C200308E2A /* String+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = "<group>"; }; | |
| 176 | + 19D2CE622AE8B65D00691757 /* CNLiveDownSlideTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideTool.swift; sourceTree = "<group>"; }; | |
| 130 | 177 | 19F1C2322AB5728B0083D06C /* CNIDCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNIDCardView.swift; sourceTree = "<group>"; }; |
| 178 | + 19FA20162AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideRecommendCell.swift; sourceTree = "<group>"; }; | |
| 179 | + 19FA20182AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideTodayRecommendCell.swift; sourceTree = "<group>"; }; | |
| 180 | + 19FA201A2AE60423001F7186 /* CNLiveDownSlideModelLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideModelLayout.swift; sourceTree = "<group>"; }; | |
| 131 | 181 | 54E09C540E13D78166D71395 /* Pods_metaCodeTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_metaCodeTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; |
| 132 | 182 | 63D879B49B1E42F1584DD75E /* Pods_metaCode_metaCodeUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_metaCode_metaCodeUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; |
| 133 | 183 | 67F8190701D1AB7F7724E8BA /* Pods-metaCodeTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-metaCodeTests.release.xcconfig"; path = "Target Support Files/Pods-metaCodeTests/Pods-metaCodeTests.release.xcconfig"; sourceTree = "<group>"; }; |
| ... | ... | @@ -263,6 +313,28 @@ |
| 263 | 313 | /* End PBXFrameworksBuildPhase section */ |
| 264 | 314 | |
| 265 | 315 | /* Begin PBXGroup section */ |
| 316 | + 19BB1FE42AEB93850094D962 /* Model */ = { | |
| 317 | + isa = PBXGroup; | |
| 318 | + children = ( | |
| 319 | + 1926C2902AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift */, | |
| 320 | + 19BB1FE52AEB93B80094D962 /* CNLiveShopUserInfoModel.swift */, | |
| 321 | + 19BB1FE72AECAD060094D962 /* CNLiveShopConsoleModel.swift */, | |
| 322 | + 19BB1FEF2AF0E5B30094D962 /* CNLiveShopDetailModel.swift */, | |
| 323 | + ); | |
| 324 | + path = Model; | |
| 325 | + sourceTree = "<group>"; | |
| 326 | + }; | |
| 327 | + 19CC4D502ADD126D00308E2A /* Util */ = { | |
| 328 | + isa = PBXGroup; | |
| 329 | + children = ( | |
| 330 | + 19CC4D512ADD129800308E2A /* CNUpSlideAnimationTransition.swift */, | |
| 331 | + 19FA201A2AE60423001F7186 /* CNLiveDownSlideModelLayout.swift */, | |
| 332 | + 19D2CE622AE8B65D00691757 /* CNLiveDownSlideTool.swift */, | |
| 333 | + 19BB202A2AF382150094D962 /* CNLiveAdaptTool.swift */, | |
| 334 | + ); | |
| 335 | + path = Util; | |
| 336 | + sourceTree = "<group>"; | |
| 337 | + }; | |
| 266 | 338 | 20238A324E444EF8C813D9FA /* Pods */ = { |
| 267 | 339 | isa = PBXGroup; |
| 268 | 340 | children = ( |
| ... | ... | @@ -290,6 +362,8 @@ |
| 290 | 362 | 7C83B4432A541F36004BF4A4 /* NSDate+CNLiveExtensions.swift */, |
| 291 | 363 | 79E496E22AB9357000127BF8 /* UITableViewCell+CNLiveExtension.swift */, |
| 292 | 364 | 79E496E72AB9674300127BF8 /* NSMutableAttributedString+CNLiveExtensions.swift */, |
| 365 | + 19CC4D482ADD06C500308E2A /* UITableView+Extension.swift */, | |
| 366 | + 19CC4D552ADD19C200308E2A /* String+Extension.swift */, | |
| 293 | 367 | ); |
| 294 | 368 | path = Extensions; |
| 295 | 369 | sourceTree = "<group>"; |
| ... | ... | @@ -599,6 +673,9 @@ |
| 599 | 673 | isa = PBXGroup; |
| 600 | 674 | children = ( |
| 601 | 675 | 7C83B43D2A52B8BA004BF4A4 /* CNHomePageViewModel.swift */, |
| 676 | + 1926C28E2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift */, | |
| 677 | + 19BB1FE22AEB8B7C0094D962 /* CNLiveShopConsoleViewModel.swift */, | |
| 678 | + 19BB1FED2AF0E1EC0094D962 /* CNLiveShopDetailViewModel.swift */, | |
| 602 | 679 | ); |
| 603 | 680 | name = ViewModel; |
| 604 | 681 | path = HomePage/ViewModel; |
| ... | ... | @@ -607,6 +684,8 @@ |
| 607 | 684 | 7CD675212A26F844008354C1 /* HomePage */ = { |
| 608 | 685 | isa = PBXGroup; |
| 609 | 686 | children = ( |
| 687 | + 19CC4D502ADD126D00308E2A /* Util */, | |
| 688 | + 19BB1FE42AEB93850094D962 /* Model */, | |
| 610 | 689 | 7C83B43C2A52B899004BF4A4 /* ViewModel */, |
| 611 | 690 | 7CD6754D2A2840B9008354C1 /* Controller */, |
| 612 | 691 | 7CD675232A26F8F8008354C1 /* View */, |
| ... | ... | @@ -627,6 +706,12 @@ |
| 627 | 706 | 7C4931372A307BDB000E44B4 /* CNHomePageGuideView.swift */, |
| 628 | 707 | 7C27032F2A36CBE30061EC50 /* CNCertificationView.swift */, |
| 629 | 708 | 19F1C2322AB5728B0083D06C /* CNIDCardView.swift */, |
| 709 | + 19FA20162AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift */, | |
| 710 | + 19FA20182AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift */, | |
| 711 | + 19CC4D462ADD006600308E2A /* CNDownSlideSingleCourseCell.swift */, | |
| 712 | + 19CC4D4E2ADD0FC200308E2A /* CNUpSlideDetailScrollView.swift */, | |
| 713 | + 19BB1FE92AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift */, | |
| 714 | + 19BB1FF12AF21A950094D962 /* CNLliveShopDetailBannerCell.swift */, | |
| 630 | 715 | ); |
| 631 | 716 | name = View; |
| 632 | 717 | path = HomePage/View; |
| ... | ... | @@ -635,8 +720,14 @@ |
| 635 | 720 | 7CD6754D2A2840B9008354C1 /* Controller */ = { |
| 636 | 721 | isa = PBXGroup; |
| 637 | 722 | children = ( |
| 723 | + 19BB1FDE2AEA3A450094D962 /* CNSlideBaseNavigationController.swift */, | |
| 638 | 724 | 7CD6754E2A2840B9008354C1 /* CNMetaCodeHomePageController.swift */, |
| 639 | 725 | 19123FC02ABC11170075C883 /* CNWebViewController.swift */, |
| 726 | + 192336EA2AD9224300D47CD4 /* CNUpSlideViewController.swift */, | |
| 727 | + 19CC4D4A2ADD086F00308E2A /* CNUpSlideDetailViewController.swift */, | |
| 728 | + 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */, | |
| 729 | + 19BB1FE02AEB5C220094D962 /* CNLiveShopConsoleController.swift */, | |
| 730 | + 19BB1FEB2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift */, | |
| 640 | 731 | ); |
| 641 | 732 | name = Controller; |
| 642 | 733 | path = HomePage/Controller; |
| ... | ... | @@ -944,32 +1035,44 @@ |
| 944 | 1035 | isa = PBXSourcesBuildPhase; |
| 945 | 1036 | buildActionMask = 2147483647; |
| 946 | 1037 | files = ( |
| 1038 | + 19BB1FE82AECAD060094D962 /* CNLiveShopConsoleModel.swift in Sources */, | |
| 1039 | + 19BB1FEE2AF0E1EC0094D962 /* CNLiveShopDetailViewModel.swift in Sources */, | |
| 947 | 1040 | 19F1C2332AB5728B0083D06C /* CNIDCardView.swift in Sources */, |
| 948 | 1041 | 7CD675292A270F6A008354C1 /* WJColorChange.m in Sources */, |
| 949 | 1042 | 79F4B11C2A33036E00993C03 /* CNLiveMineInfoAlertView.swift in Sources */, |
| 950 | 1043 | 79BB96A82AF223FB00AEA4AC /* CNLiveConfigAlertManager.swift in Sources */, |
| 1044 | + 19BB1FF02AF0E5B30094D962 /* CNLiveShopDetailModel.swift in Sources */, | |
| 951 | 1045 | 796398942A260C0100D045EB /* AppDelegate.swift in Sources */, |
| 952 | 1046 | 7989B5C72A4BDC7200A19B10 /* CNLiveMineEarnListViewController.swift in Sources */, |
| 953 | 1047 | 79396EF12A31C21B0053E1AF /* CNLiveInfoShowViewController.swift in Sources */, |
| 1048 | + 192336EB2AD9224300D47CD4 /* CNUpSlideViewController.swift in Sources */, | |
| 954 | 1049 | 7963989D2A260E6200D045EB /* CNLiveBaseViewController.swift in Sources */, |
| 955 | 1050 | 798A44FB2A30999900815935 /* CNLiveAlertTool.swift in Sources */, |
| 956 | 1051 | 790D01A52A2DF65E00C5978D /* CNLiveLoginPickerView.swift in Sources */, |
| 957 | 1052 | 79BA085D2AB18E8300D01875 /* CNLiveSaveAuthDB.swift in Sources */, |
| 958 | 1053 | 79282A3C2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift in Sources */, |
| 1054 | + 19D2CE632AE8B65D00691757 /* CNLiveDownSlideTool.swift in Sources */, | |
| 959 | 1055 | 790B1FB82A41B6A60074CF00 /* CNLiveMineMessageViewController.swift in Sources */, |
| 1056 | + 19BB202B2AF382150094D962 /* CNLiveAdaptTool.swift in Sources */, | |
| 960 | 1057 | 798A44F22A30674200815935 /* CNLiveMineSubBodyListView.swift in Sources */, |
| 961 | 1058 | 799172382AF090CD00DC01A8 /* CNLiveShopBodyListView.swift in Sources */, |
| 962 | 1059 | 790D01822A2D88FC00C5978D /* CNLiveConfigMacro.swift in Sources */, |
| 1060 | + 19CC4D4B2ADD086F00308E2A /* CNUpSlideDetailViewController.swift in Sources */, | |
| 963 | 1061 | 7C83B4402A52BB2B004BF4A4 /* CNGlobalEnum.swift in Sources */, |
| 964 | 1062 | 7C83B4442A541F36004BF4A4 /* NSDate+CNLiveExtensions.swift in Sources */, |
| 965 | 1063 | 7CD675482A274167008354C1 /* PGIndexBannerSubiew.m in Sources */, |
| 966 | 1064 | 790D019F2A2DD66E00C5978D /* CNLiveLoginViewModel.swift in Sources */, |
| 1065 | + 1926C2912AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift in Sources */, | |
| 967 | 1066 | 7C7C62F62A4D72E9007A912E /* CNLiveIdentityDB.swift in Sources */, |
| 1067 | + 19CC4D4F2ADD0FC200308E2A /* CNUpSlideDetailScrollView.swift in Sources */, | |
| 968 | 1068 | 79EABB892AB4497700F3A4E2 /* CNLiveSaveStandDB.swift in Sources */, |
| 969 | 1069 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, |
| 1070 | + 19BB1FEA2AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift in Sources */, | |
| 970 | 1071 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, |
| 971 | 1072 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, |
| 1073 | + 19FA20172AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift in Sources */, | |
| 972 | 1074 | 19123FC12ABC11170075C883 /* CNWebViewController.swift in Sources */, |
| 1075 | + 1926C28F2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift in Sources */, | |
| 973 | 1076 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, |
| 974 | 1077 | 7C7C62F62A4D72E9007A912E /* CNLiveIdentityDB.swift in Sources */, |
| 975 | 1078 | 799172342AF08D3200DC01A8 /* CNLiveShopViewModel.swift in Sources */, |
| ... | ... | @@ -977,6 +1080,7 @@ |
| 977 | 1080 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, |
| 978 | 1081 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, |
| 979 | 1082 | 79E496E82AB9674300127BF8 /* NSMutableAttributedString+CNLiveExtensions.swift in Sources */, |
| 1083 | + 19CC4D472ADD006600308E2A /* CNDownSlideSingleCourseCell.swift in Sources */, | |
| 980 | 1084 | 79E496E32AB9357000127BF8 /* UITableViewCell+CNLiveExtension.swift in Sources */, |
| 981 | 1085 | 7C83B4422A541EBF004BF4A4 /* CALayer+CNLiveExtensions.swift in Sources */, |
| 982 | 1086 | 798A44F72A3077ED00815935 /* CNLiveHotButton.swift in Sources */, |
| ... | ... | @@ -985,9 +1089,12 @@ |
| 985 | 1089 | 7CD675522A29C04B008354C1 /* CNLiveConfigstant.swift in Sources */, |
| 986 | 1090 | 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */, |
| 987 | 1091 | 7C83B43E2A52B8BA004BF4A4 /* CNHomePageViewModel.swift in Sources */, |
| 1092 | + 19BB1FDF2AEA3A450094D962 /* CNSlideBaseNavigationController.swift in Sources */, | |
| 1093 | + 19BB1FE12AEB5C220094D962 /* CNLiveShopConsoleController.swift in Sources */, | |
| 988 | 1094 | 7C4931382A307BDB000E44B4 /* CNHomePageGuideView.swift in Sources */, |
| 989 | 1095 | 7CD6753E2A2740B0008354C1 /* CNUpSlideView.swift in Sources */, |
| 990 | 1096 | 7CD675402A2740B0008354C1 /* CNDownSlideView.swift in Sources */, |
| 1097 | + 19BB1FE32AEB8B7C0094D962 /* CNLiveShopConsoleViewModel.swift in Sources */, | |
| 991 | 1098 | 792E57D92A3AA2F2005834DB /* CNLiveCommonBaseModel.swift in Sources */, |
| 992 | 1099 | 7CD6753E2A2740B0008354C1 /* CNUpSlideView.swift in Sources */, |
| 993 | 1100 | 7CD675402A2740B0008354C1 /* CNDownSlideView.swift in Sources */, |
| ... | ... | @@ -995,16 +1102,20 @@ |
| 995 | 1102 | 7C2703362A3AFD3A0061EC50 /* CNLiveEnvironment.swift in Sources */, |
| 996 | 1103 | 798A44FD2A309EBA00815935 /* CNLiveTypeFeedBackViewController.swift in Sources */, |
| 997 | 1104 | 79656E382AAEBA8E00119A61 /* CNLiveMineInputViewController.swift in Sources */, |
| 1105 | + 19CC4D522ADD129800308E2A /* CNUpSlideAnimationTransition.swift in Sources */, | |
| 998 | 1106 | 7CD6754F2A2840B9008354C1 /* CNMetaCodeHomePageController.swift in Sources */, |
| 999 | 1107 | 7989B5C52A4BDC6000A19B10 /* CNLiveMineEarnViewController.swift in Sources */, |
| 1000 | 1108 | 792E57DB2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift in Sources */, |
| 1109 | + 19BB1FE62AEB93B80094D962 /* CNLiveShopUserInfoModel.swift in Sources */, | |
| 1001 | 1110 | 7CD675472A274167008354C1 /* NewPagedFlowView.m in Sources */, |
| 1002 | 1111 | 79F4B11A2A32F21400993C03 /* CNLiveMineNickViewController.swift in Sources */, |
| 1003 | 1112 | 798A44FF2A30A0A800815935 /* CNLiveInputFeedBackViewController.swift in Sources */, |
| 1004 | 1113 | 79282A442A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift in Sources */, |
| 1005 | 1114 | 79BB96A62AF21E2800AEA4AC /* CNLiveShopOrderDetailViewController.swift in Sources */, |
| 1006 | 1115 | 7C2703302A36CBE30061EC50 /* CNCertificationView.swift in Sources */, |
| 1116 | + 19CC4D542ADD163D00308E2A /* CNUpSlideCardPresentationController.swift in Sources */, | |
| 1007 | 1117 | 790D01A32A2DDBA300C5978D /* CNLiveConfigManager.swift in Sources */, |
| 1118 | + 19CC4D492ADD06C500308E2A /* UITableView+Extension.swift in Sources */, | |
| 1008 | 1119 | 7C2703332A36CC660061EC50 /* CNLiveGlobalBlock.swift in Sources */, |
| 1009 | 1120 | 7987BF3D2A497644000A1ABC /* CNLiveMineQuestViewController.swift in Sources */, |
| 1010 | 1121 | 798A44EA2A30135D00815935 /* CNLiveMineBodyListView.swift in Sources */, |
| ... | ... | @@ -1013,14 +1124,18 @@ |
| 1013 | 1124 | 79A68C4A2A26E6CE00DC3B43 /* (null) in Sources */, |
| 1014 | 1125 | 790D01852A2D89E100C5978D /* UIColor+CNLiveExtensions.swift in Sources */, |
| 1015 | 1126 | 79396EED2A319F220053E1AF /* NSObject+CNLiveExtensions.swift in Sources */, |
| 1127 | + 19FA201B2AE60423001F7186 /* CNLiveDownSlideModelLayout.swift in Sources */, | |
| 1016 | 1128 | 7C4931312A2F142F000E44B4 /* CNHomePageBackgroupView.swift in Sources */, |
| 1129 | + 19BB1FF22AF21A950094D962 /* CNLliveShopDetailBannerCell.swift in Sources */, | |
| 1017 | 1130 | 790D018B2A2D8B3300C5978D /* CNLiveLoginViewController.swift in Sources */, |
| 1131 | + 19CC4D562ADD19C200308E2A /* String+Extension.swift in Sources */, | |
| 1018 | 1132 | 7905BB492AB0588B0089BC50 /* CNLiveMineAuthResultViewController.swift in Sources */, |
| 1019 | 1133 | 798A44EC2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift in Sources */, |
| 1020 | 1134 | 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */, |
| 1021 | 1135 | 79BB96AA2AF2330900AEA4AC /* CNLiveShopBodyDetailView.swift in Sources */, |
| 1022 | 1136 | 790D01912A2DAC5E00C5978D /* CNLiveConfigFontMacro.swift in Sources */, |
| 1023 | 1137 | 790D01852A2D89E100C5978D /* UIColor+CNLiveExtensions.swift in Sources */, |
| 1138 | + 19FA20192AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift in Sources */, | |
| 1024 | 1139 | 790B1FB42A4153E90074CF00 /* CNLiveMineBaseModel.swift in Sources */, |
| 1025 | 1140 | 7978A8432A396632007C86B8 /* CNLiveMineViewModel.swift in Sources */, |
| 1026 | 1141 | 798A44EE2A305AAC00815935 /* CNLiveBaseNavigationController.swift in Sources */, |
| ... | ... | @@ -1029,6 +1144,7 @@ |
| 1029 | 1144 | 79F4B1162A32B96B00993C03 /* CNLiveMineInfoViewController.swift in Sources */, |
| 1030 | 1145 | 7CD6753F2A2740B0008354C1 /* CNDownSlideViewRemindView.swift in Sources */, |
| 1031 | 1146 | 7CD6753C2A2740B0008354C1 /* CNUpSlideViewRemindView.swift in Sources */, |
| 1147 | + 19BB1FEC2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift in Sources */, | |
| 1032 | 1148 | 798A44E82A30134400815935 /* CNLiveMineHeaderView.swift in Sources */, |
| 1033 | 1149 | 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNLiveExtensions.swift in Sources */, |
| 1034 | 1150 | 790D019A2A2DCAE400C5978D /* CNLiveViewController.swift in Sources */, | ... | ... |
metaCode/Classes/Common/Base/CNLiveBaseNavigationController.swift
| ... | ... | @@ -11,7 +11,6 @@ class CNLiveBaseNavigationController : UINavigationController, UIGestureRecogniz |
| 11 | 11 | |
| 12 | 12 | override func viewDidLoad() { |
| 13 | 13 | super.viewDidLoad() |
| 14 | - | |
| 15 | 14 | guard let targets = interactivePopGestureRecognizer?.value(forKey: "_targets") as? [NSObject] else {return} |
| 16 | 15 | let targetObjc = targets[0] |
| 17 | 16 | let target = targetObjc.value(forKey: "target") | ... | ... |
metaCode/Classes/Common/Base/CNLiveBaseTabBarViewController.swift
| ... | ... | @@ -36,12 +36,12 @@ class CNLiveBaseTabBarViewController: UITabBarController |
| 36 | 36 | self.setupBackgroup() |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - override func viewWillAppear(_ animated: Bool) { | |
| 40 | - super.viewWillAppear(animated) | |
| 41 | - | |
| 42 | - self.selectedIndex = 1 | |
| 43 | - | |
| 44 | - } | |
| 39 | +// override func viewWillAppear(_ animated: Bool) { | |
| 40 | +// super.viewWillAppear(animated) | |
| 41 | +// | |
| 42 | +// self.selectedIndex = 1 | |
| 43 | +// | |
| 44 | +// } | |
| 45 | 45 | override func viewDidAppear(_ animated: Bool) { |
| 46 | 46 | super.viewDidAppear(animated) |
| 47 | 47 | print("获取用户用户数据=====>\(UserInfoManager.shared.userInfo.uid)") | ... | ... |
metaCode/Classes/Common/Base/CNLiveBaseViewController.swift
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | import UIKit |
| 9 | 9 | import Foundation |
| 10 | 10 | |
| 11 | -class CNLiveBaseViewController: UIViewController { | |
| 11 | +class CNLiveBaseViewController: UIViewController { | |
| 12 | 12 | |
| 13 | 13 | static let kTopNavLeftRightOffset = 6.0 |
| 14 | 14 | /// topNavView的高度 默认高度为 get_system_nav_height() |
| ... | ... | @@ -215,12 +215,23 @@ class CNLiveBaseViewController: UIViewController { |
| 215 | 215 | leftBtnWhite = false |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | + | |
| 218 | 219 | @objc func ClickBackBtn() { |
| 219 | - if (self.presentingViewController != nil) { | |
| 220 | - self.dismiss(animated: true) | |
| 220 | + let viewControllers = self.navigationController?.viewControllers | |
| 221 | + if viewControllers!.count > 1 { | |
| 222 | + if viewControllers?.last == self { | |
| 223 | + self.navigationController!.popViewController(animated: true) | |
| 224 | + } | |
| 221 | 225 | }else{ |
| 222 | - self.navigationController!.popViewController(animated: true) | |
| 226 | + if (self.presentingViewController != nil) { | |
| 227 | + self.dismiss(animated: true) | |
| 228 | + } | |
| 223 | 229 | } |
| 230 | +// if (self.presentingViewController != nil) { | |
| 231 | +// self.dismiss(animated: true) | |
| 232 | +// }else{ | |
| 233 | +// self.navigationController!.popViewController(animated: true) | |
| 234 | +// } | |
| 224 | 235 | } |
| 225 | 236 | |
| 226 | 237 | @objc func topNavViewTap() { | ... | ... |
metaCode/Classes/Config/CNLiveConfigFontMacro.swift
| ... | ... | @@ -61,6 +61,7 @@ let Font_17 = Font(17) |
| 61 | 61 | let Font_18 = Font(18) |
| 62 | 62 | let Font_19 = Font(19) |
| 63 | 63 | let Font_20 = Font(20) |
| 64 | +let Font_21 = Font(21) | |
| 64 | 65 | let Font_25 = Font(25) |
| 65 | 66 | let Font_30 = Font(30) |
| 66 | 67 | |
| ... | ... | @@ -77,6 +78,7 @@ let Font_17_Fit = Font(17 * FontFit) |
| 77 | 78 | let Font_18_Fit = Font(18 * FontFit) |
| 78 | 79 | let Font_19_Fit = Font(19 * FontFit) |
| 79 | 80 | let Font_20_Fit = Font(20 * FontFit) |
| 81 | +let Font_21_Fit = Font(21 * FontFit) | |
| 80 | 82 | let Font_25_Fit = Font(25 * FontFit) |
| 81 | 83 | let Font_30_Fit = Font(30 * FontFit) |
| 82 | 84 | |
| ... | ... | @@ -93,6 +95,8 @@ let BoldFont_17 = BoldFont(17) |
| 93 | 95 | let BoldFont_18 = BoldFont(18) |
| 94 | 96 | let BoldFont_19 = BoldFont(19) |
| 95 | 97 | let BoldFont_20 = BoldFont(20) |
| 98 | +let BoldFont_21 = BoldFont(21) | |
| 99 | +let BoldFont_24 = BoldFont(24) | |
| 96 | 100 | let BoldFont_25 = BoldFont(25) |
| 97 | 101 | let BoldFont_30 = BoldFont(30) |
| 98 | 102 | ... | ... |
metaCode/Classes/Environment/CNLiveEnvironment.swift
| ... | ... | @@ -31,8 +31,10 @@ let APPBaseWjjUrl: String = CNLiveEnvironmentManager.shared.base_wjj_url |
| 31 | 31 | let APPBaseWjjBUrl: String = CNLiveEnvironmentManager.shared.base_wjj_b_url |
| 32 | 32 | /// 网家家内电商接口 |
| 33 | 33 | let APPBaseWjjShopUrl: String = CNLiveEnvironmentManager.shared.base_mjj_shop_url |
| 34 | - | |
| 35 | - | |
| 34 | +/// 商家版电商接口 | |
| 35 | +let APPBaseShopUrl: String = CNLiveEnvironmentManager.shared.base_shop_url | |
| 36 | +/// cms接口 | |
| 37 | +let APPBaseCMSUrl: String = CNLiveEnvironmentManager.shared.base_cms_url | |
| 36 | 38 | ///当前APP的环境 |
| 37 | 39 | let APPCurrentEnvironment: CNLiveEnvironment = CNLiveEnvironmentManager.shared.currentEnvironment |
| 38 | 40 | |
| ... | ... | @@ -78,8 +80,12 @@ class CNLiveEnvironmentManager: NSObject{ |
| 78 | 80 | var img_token_url: String |
| 79 | 81 | /// 网家家电商域名请求 |
| 80 | 82 | var base_mjj_shop_url: String |
| 83 | + /// 电商域名请求 | |
| 84 | + var base_shop_url: String | |
| 81 | 85 | /// 元码webViewUA设置 |
| 82 | 86 | var base_web_UA: String = "yuanma" |
| 87 | + /// cms域名请求 | |
| 88 | + var base_cms_url: String | |
| 83 | 89 | |
| 84 | 90 | ///当前环境 |
| 85 | 91 | var currentEnvironment: CNLiveEnvironment |
| ... | ... | @@ -99,6 +105,8 @@ class CNLiveEnvironmentManager: NSObject{ |
| 99 | 105 | self.base_wjj_url = "" |
| 100 | 106 | self.base_wjj_b_url = "" |
| 101 | 107 | self.base_mjj_shop_url = "" |
| 108 | + self.base_shop_url = "" | |
| 109 | + self.base_cms_url = "" | |
| 102 | 110 | self.currentEnvironment = .development |
| 103 | 111 | } |
| 104 | 112 | //重新copy 和 mutableCopy 方法 |
| ... | ... | @@ -140,6 +148,8 @@ class CNLiveEnvironmentManager: NSObject{ |
| 140 | 148 | self.base_wjj_b_url = "https://managemall.cnlive.com:8080" |
| 141 | 149 | self.base_wjj_url = "https://apiwjj.cnlive.com" |
| 142 | 150 | self.base_mjj_shop_url = "https://manageshop.cnlive.com" |
| 151 | + self.base_shop_url = "https://managemall.cnlive.com:8080" | |
| 152 | + self.base_cms_url = "https://cmsapi.cnlive.com" | |
| 143 | 153 | } |
| 144 | 154 | //testFlight 环境配置 |
| 145 | 155 | func testFlightEnvironment(){ |
| ... | ... | @@ -156,6 +166,8 @@ class CNLiveEnvironmentManager: NSObject{ |
| 156 | 166 | self.base_wjj_b_url = "https://managemall.cnlive.com:8080" |
| 157 | 167 | self.base_wjj_url = "https://apiwjj.cnlive.com" |
| 158 | 168 | self.base_mjj_shop_url = "https://manageshop.cnlive.com" |
| 169 | + self.base_shop_url = "https://managemall.cnlive.com:8080" | |
| 170 | + self.base_cms_url = "https://cmsapi.cnlive.com" | |
| 159 | 171 | } |
| 160 | 172 | //production 生产环境配置 |
| 161 | 173 | func productionEnvironment(){ |
| ... | ... | @@ -172,6 +184,8 @@ class CNLiveEnvironmentManager: NSObject{ |
| 172 | 184 | self.base_wjj_b_url = "https://managemall.cnlive.com:8080" |
| 173 | 185 | self.base_wjj_url = "https://apiwjj.cnlive.com" |
| 174 | 186 | self.base_mjj_shop_url = "https://manageshop.cnlive.com" |
| 187 | + self.base_shop_url = "https://managemall.cnlive.com:8080" | |
| 188 | + self.base_cms_url = "https://cmsapi.cnlive.com" | |
| 175 | 189 | } |
| 176 | 190 | |
| 177 | 191 | } | ... | ... |
metaCode/Classes/Extensions/NSObject+CNLiveExtensions.swift
| ... | ... | @@ -45,7 +45,6 @@ private func currentVC(_ vc :UIViewController?) -> UIViewController? { |
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - | |
| 49 | 48 | /// 弹框提示 |
| 50 | 49 | /// - Parameter message: 内容提示 |
| 51 | 50 | func showMessage(message: String) { |
| ... | ... | @@ -138,7 +137,7 @@ func jsonToModel(_ jsonStr:String,_ modelType:HandyJSON.Type) -> BaseModel { |
| 138 | 137 | /** |
| 139 | 138 | * Json转数组对象 |
| 140 | 139 | */ |
| 141 | -func jsonArrayToModel(_ jsonArrayStr:String, _ modelType:HandyJSON.Type,_ path: String) ->[BaseModel] { | |
| 140 | +func jsonArrayToModel(_ jsonArrayStr:String, _ modelType:HandyJSON.Type) ->[BaseModel] { | |
| 142 | 141 | if jsonArrayStr == "" || jsonArrayStr.count == 0 { |
| 143 | 142 | #if DEBUG |
| 144 | 143 | print("jsonToModelArray:字符串为空") |
| ... | ... | @@ -149,12 +148,24 @@ func jsonArrayToModel(_ jsonArrayStr:String, _ modelType:HandyJSON.Type,_ path: |
| 149 | 148 | let data = jsonArrayStr.data(using: String.Encoding.utf8) |
| 150 | 149 | let peoplesArray = try! JSONSerialization.jsonObject(with:data!, options: JSONSerialization.ReadingOptions()) as? [AnyObject] |
| 151 | 150 | for people in peoplesArray! { |
| 152 | - modelArray.append(dictionaryToModel(people as! [String : Any], modelType,path)) | |
| 151 | + modelArray.append(newDictionaryToModel(people as! [String : Any], modelType)) | |
| 153 | 152 | } |
| 154 | 153 | return modelArray |
| 155 | 154 | |
| 156 | 155 | } |
| 157 | 156 | /** |
| 157 | + * (新)字典转对象 | |
| 158 | + */ | |
| 159 | +func newDictionaryToModel(_ dictionStr:[String:Any],_ modelType:HandyJSON.Type) -> BaseModel { | |
| 160 | + if dictionStr.count == 0 { | |
| 161 | + #if DEBUG | |
| 162 | + print("dictionaryToModel:字符串为空") | |
| 163 | + #endif | |
| 164 | + return BaseModel() | |
| 165 | + } | |
| 166 | + return modelType.deserialize(from: dictionStr) as! BaseModel | |
| 167 | +} | |
| 168 | +/** | |
| 158 | 169 | * 字典转对象 |
| 159 | 170 | */ |
| 160 | 171 | func dictionaryToModel(_ dictionStr:[String:Any],_ modelType:HandyJSON.Type,_ path: String) -> BaseModel { | ... | ... |
metaCode/Classes/Extensions/String+Extension.swift
0 → 100644
| 1 | +// | |
| 2 | +// String+Extension.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/16. | |
| 6 | +// | |
| 7 | + | |
| 8 | + | |
| 9 | +import UIKit | |
| 10 | + | |
| 11 | + | |
| 12 | +extension String { | |
| 13 | + /// Calculate text's height from `width` and `front`. | |
| 14 | + func calculateHeightWith(width: CGFloat, font: UIFont)-> CGFloat { | |
| 15 | + let attr = [NSAttributedString.Key.font: font] | |
| 16 | + let maxSize: CGSize = CGSize(width: width, height: CGFloat(MAXFLOAT)) | |
| 17 | + let option = NSStringDrawingOptions.usesLineFragmentOrigin | |
| 18 | + return self.boundingRect(with: (maxSize), options: option, attributes: attr, context: nil).size.height | |
| 19 | + } | |
| 20 | +} | ... | ... |
metaCode/Classes/Extensions/UITableView+Extension.swift
0 → 100644
| 1 | +// | |
| 2 | +// UITableView+Extension.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/16. | |
| 6 | +// | |
| 7 | + | |
| 8 | + | |
| 9 | +import UIKit | |
| 10 | + | |
| 11 | +extension UITableView { | |
| 12 | + // 注册有nib的cell | |
| 13 | + func ut_registerNibCell<T>(_ cellType: T.Type) where T: UITableViewCell { | |
| 14 | + let nib = UINib(nibName: "\(cellType)", bundle: nil) | |
| 15 | + let identifier = "\(cellType)" | |
| 16 | + register(nib, forCellReuseIdentifier: identifier) | |
| 17 | + } | |
| 18 | + // 注册无nib的cell | |
| 19 | + func ut_registerClassCell<T>(_ cellType: T.Type) where T: UITableViewCell { | |
| 20 | + let identifier = "\(cellType)" | |
| 21 | + register(cellType, forCellReuseIdentifier: identifier) | |
| 22 | + } | |
| 23 | + // 从缓存池池出队已经存在的 cell | |
| 24 | + func ut_dequeueReusable<T: UITableViewCell>(_ cell: T.Type, for indexPath: IndexPath) -> T { | |
| 25 | + let cell = dequeueReusableCell(withIdentifier: "\(T.self)", for: indexPath) as! T | |
| 26 | + return cell | |
| 27 | + } | |
| 28 | + | |
| 29 | + // 注册有nib的headerFooterView | |
| 30 | + func ut_registerNibHeaderFooterView<T>(_ viewType: T.Type) where T: UITableViewHeaderFooterView { | |
| 31 | + let nib = UINib(nibName: "\(viewType)", bundle: nil) | |
| 32 | + let identifier = "\(viewType)" | |
| 33 | + register(nib, forHeaderFooterViewReuseIdentifier: identifier) | |
| 34 | + } | |
| 35 | + | |
| 36 | + // 注册无nib的headerFooterView | |
| 37 | + func ut_registerClassHeaderFooterView<T>(_ viewType: T.Type) where T: UITableViewHeaderFooterView { | |
| 38 | + let identifier = "\(viewType)" | |
| 39 | + register(viewType, forHeaderFooterViewReuseIdentifier: identifier) | |
| 40 | + } | |
| 41 | + | |
| 42 | + // 从缓存池里取出已注册的headerFooterView | |
| 43 | + func ut_dequeueReusableHeaderFooterView<T: UITableViewHeaderFooterView>(_ view: T.Type) -> T { | |
| 44 | + let headerFooterView = dequeueReusableHeaderFooterView(withIdentifier: "\(T.self)") as! T | |
| 45 | + return headerFooterView | |
| 46 | + } | |
| 47 | +} | |
| 48 | + | |
| 49 | +extension UICollectionView { | |
| 50 | + // 注册有nib的cell | |
| 51 | + func ut_registerNibCell<T>(_ cellType: T.Type) where T: UICollectionViewCell { | |
| 52 | + let nib = UINib(nibName: "\(cellType)", bundle: nil) | |
| 53 | + let identifier = "\(cellType)" | |
| 54 | + register(nib, forCellWithReuseIdentifier: identifier) | |
| 55 | + } | |
| 56 | + // 注册无nib的cell | |
| 57 | + func ut_registerClassCell<T>(_ cellType: T.Type) where T: UICollectionViewCell { | |
| 58 | + let identifier = "\(cellType)" | |
| 59 | + register(cellType, forCellWithReuseIdentifier: identifier) | |
| 60 | + } | |
| 61 | + // 从缓存池池出队已经存在的 cell | |
| 62 | + func ut_dequeueReusable<T: UICollectionViewCell>(_ cell: T.Type, for indexPath: IndexPath) -> T { | |
| 63 | + let cell = dequeueReusableCell(withReuseIdentifier: "\(T.self)", for: indexPath) as! T | |
| 64 | + return cell | |
| 65 | + } | |
| 66 | +} | ... | ... |
metaCode/Classes/Extensions/UIView+CNLiveExtensions.swift
| ... | ... | @@ -237,4 +237,14 @@ extension UIView { |
| 237 | 237 | return self.frame.size |
| 238 | 238 | } |
| 239 | 239 | } |
| 240 | + | |
| 241 | + // Constrain 4 edges of `self` to specified `view`. | |
| 242 | + func edges(to view: UIView, top: CGFloat=0, left: CGFloat=0, bottom: CGFloat=0, right: CGFloat=0) { | |
| 243 | + NSLayoutConstraint.activate([ | |
| 244 | + self.leftAnchor.constraint(equalTo: view.leftAnchor, constant: left), | |
| 245 | + self.rightAnchor.constraint(equalTo: view.rightAnchor, constant: right), | |
| 246 | + self.topAnchor.constraint(equalTo: view.topAnchor, constant: top), | |
| 247 | + self.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: bottom) | |
| 248 | + ]) | |
| 249 | + } | |
| 240 | 250 | } | ... | ... |
metaCode/Classes/Main/HomePage/Controller/CNLiveDownShopDetailController.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveDownShopDetailController.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/31. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | + | |
| 10 | +class CNLiveDownShopDetailController:CNLiveBaseViewController, UICollectionViewDelegate, UICollectionViewDataSource,UICollectionViewDelegateFlowLayout{ | |
| 11 | + | |
| 12 | + let kCNLiveShopDetailDefaultCellID = "kCNLiveShopDetailDefaultCellID" | |
| 13 | + let kCNLiveShopDetailHeaderViewID = "kCNLiveShopDetailHeaderViewID" | |
| 14 | + | |
| 15 | + let kCNLiveShopDetailBannerCellID = "kCNLiveShopDetailBannerCellID" | |
| 16 | + | |
| 17 | + | |
| 18 | + lazy var shopDetailModel: CNLiveShopDetailModel = { | |
| 19 | + let shopDetailModel = CNLiveShopDetailModel() | |
| 20 | + return shopDetailModel | |
| 21 | + }() | |
| 22 | + | |
| 23 | + lazy var collectionView: UICollectionView = { | |
| 24 | + let layout = UICollectionViewFlowLayout.init() | |
| 25 | + let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout) | |
| 26 | + collectionView.delegate = self | |
| 27 | + collectionView.dataSource = self | |
| 28 | + collectionView.backgroundColor = .white | |
| 29 | +// collectionView.register(CNLiveShopConsoleHeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: kCNLiveShopConsoleCollectionReusableHeaderViewID) | |
| 30 | + collectionView.register(CNLliveShopDetailBannerCell.self, forCellWithReuseIdentifier: kCNLiveShopDetailBannerCellID) | |
| 31 | + collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: kCNLiveShopDetailDefaultCellID) | |
| 32 | + | |
| 33 | + return collectionView | |
| 34 | + }() | |
| 35 | + | |
| 36 | + override func viewDidLoad() { | |
| 37 | + super.viewDidLoad() | |
| 38 | + self.getShopDetailApi() | |
| 39 | + | |
| 40 | + self.view.addSubview(collectionView) | |
| 41 | + collectionView.snp.makeConstraints { make in | |
| 42 | + make.top.equalToSuperview().offset(KNavigationHeight) | |
| 43 | + make.left.bottom.right.equalToSuperview() | |
| 44 | + } | |
| 45 | + } | |
| 46 | + | |
| 47 | + // MARK: - UICollectionViewDelegate | |
| 48 | + func numberOfSections(in collectionView: UICollectionView) -> Int { | |
| 49 | + if self.shopDetailModel.is_seller != nil{ | |
| 50 | + if self.shopDetailModel.is_seller == true{ | |
| 51 | + return 5 | |
| 52 | + }else{//非商家,不处理 | |
| 53 | + return 3 | |
| 54 | + } | |
| 55 | + }else{ | |
| 56 | + return 1 | |
| 57 | + } | |
| 58 | + } | |
| 59 | + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | |
| 60 | + if self.shopDetailModel.is_seller != nil { | |
| 61 | + if (self.shopDetailModel.is_seller == true) { | |
| 62 | + if (section == 4) { | |
| 63 | + let count = self.shopDetailModel.dynamic.count | |
| 64 | + return count == 0 ? 1 : count | |
| 65 | + }else { | |
| 66 | + return 1 | |
| 67 | + } | |
| 68 | + }else { | |
| 69 | + return 1 | |
| 70 | + } | |
| 71 | + }else{ | |
| 72 | + return 1 | |
| 73 | + } | |
| 74 | + } | |
| 75 | +// func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { | |
| 76 | +// if (kind == UICollectionView.elementKindSectionHeader){ | |
| 77 | +// let headerView:CNLiveShopConsoleHeaderView = collectionView .dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: kCNLiveShopDetailHeaderViewID, for: indexPath) as! CNLiveShopConsoleHeaderView | |
| 78 | +// | |
| 79 | +// return headerView | |
| 80 | +// }else{ | |
| 81 | +// return | |
| 82 | +// } | |
| 83 | + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | |
| 84 | + switch indexPath.section { | |
| 85 | + case 0: | |
| 86 | + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: kCNLiveShopDetailBannerCellID, for: indexPath) as! CNLliveShopDetailBannerCell | |
| 87 | + | |
| 88 | + cell.shopDetailModel = self.shopDetailModel | |
| 89 | + return cell | |
| 90 | +// case 1: | |
| 91 | +// | |
| 92 | +// case 2: | |
| 93 | +// case 3: | |
| 94 | +// case 4: | |
| 95 | + default: | |
| 96 | + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: kCNLiveShopDetailDefaultCellID, for: indexPath) | |
| 97 | + return cell | |
| 98 | + } | |
| 99 | + | |
| 100 | + } | |
| 101 | + | |
| 102 | + // MARK: - UICollectionViewDelegateFlowLayout | |
| 103 | + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { | |
| 104 | + if (self.shopDetailModel.is_seller != nil && self.shopDetailModel.is_seller == true) { | |
| 105 | + switch (indexPath.section) { | |
| 106 | + case 0: | |
| 107 | + return CGSize(width: KSreenWidth, height: CNLiveAdaptTool.adaptLength(length: 210)) | |
| 108 | + case 1: | |
| 109 | + return CGSize(width: KSreenWidth, height: 50) | |
| 110 | + case 2: | |
| 111 | + return CGSize(width: KSreenWidth, height: 50) | |
| 112 | + case 3: | |
| 113 | + return CGSize(width: KSreenWidth, height: 50) | |
| 114 | + case 4: | |
| 115 | + return CGSize(width: KSreenWidth, height: 50) | |
| 116 | + default: | |
| 117 | + return CGSizeZero | |
| 118 | + } | |
| 119 | + }else { | |
| 120 | + return CGSizeZero | |
| 121 | +// switch (indexPath.section) { | |
| 122 | +// case 0: | |
| 123 | +// { | |
| 124 | +// if (self.mainHPModel.is_show_btn) { | |
| 125 | +// return CGSizeMake(self.view.width, DS_adapt_length(262)); | |
| 126 | +// }else { | |
| 127 | +// return CGSizeMake(self.view.width, DS_adapt_length(262) - DS_adapt_length(50)); | |
| 128 | +// } | |
| 129 | +// } | |
| 130 | +// break; | |
| 131 | +// case 1: | |
| 132 | +// { | |
| 133 | +// if (self.mainHPModel.is_show_btn) { | |
| 134 | +// return CGSizeMake(self.view.width, DS_adapt_length(145)); | |
| 135 | +// }else { | |
| 136 | +// return CGSizeMake(self.view.width, 0.000001); | |
| 137 | +// } | |
| 138 | +// } | |
| 139 | +// break; | |
| 140 | +// case 2: | |
| 141 | +// { | |
| 142 | +// if (self.mainHPModel.is_show_user) { | |
| 143 | +// return CGSizeMake(self.view.width, DS_adapt_length(191)); | |
| 144 | +// }else { | |
| 145 | +// return CGSizeMake(self.view.width, 0.000001); | |
| 146 | +// } | |
| 147 | +// } | |
| 148 | +// break; | |
| 149 | +// default: | |
| 150 | +// { | |
| 151 | +// return CGSizeZero; | |
| 152 | +// } | |
| 153 | +// break; | |
| 154 | +// } | |
| 155 | + } | |
| 156 | + } | |
| 157 | + | |
| 158 | + //MARK: - 网络请求获取店铺详情 | |
| 159 | + func getShopDetailApi() | |
| 160 | + { | |
| 161 | + showLoading(message: "") | |
| 162 | + CNLiveShopDetailViewModel.requestShopDetailInfo(storeId: "") { result, status in | |
| 163 | + hiddenLoading() | |
| 164 | + if status == .success{ | |
| 165 | + let model = result as! CNLiveShopDetailModel | |
| 166 | + self.shopDetailModel = model | |
| 167 | + self.collectionView.reloadData() | |
| 168 | + }else if (status == .failed){ | |
| 169 | +// self.NetApiStatus = .apiError | |
| 170 | + }else if (status == .noNetwork){ | |
| 171 | + | |
| 172 | +// self.NetApiStatus = .notNetwork | |
| 173 | + } | |
| 174 | + } | |
| 175 | + } | |
| 176 | +} | ... | ... |
metaCode/Classes/Main/HomePage/Controller/CNLiveShopConsoleController.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveShopConsoleController.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/27. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | + | |
| 10 | +class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDelegate, UICollectionViewDataSource { | |
| 11 | + | |
| 12 | + let kCNLiveShopConsoleCellKey = "kCNLiveShopConsoleCellKey" | |
| 13 | + | |
| 14 | + let kCNLiveShopConsoleCollectionReusableHeaderViewID = "kCNLiveShopConsoleCollectionReusableHeaderViewID" | |
| 15 | + let kCNLiveShopConsoleCollectionReusableFooterViewID = "kCNLiveShopConsoleCollectionReusableFooterViewID" | |
| 16 | + | |
| 17 | + lazy var collectionView: UICollectionView = { | |
| 18 | + let gap = CGFloat(15) | |
| 19 | + let layout = UICollectionViewFlowLayout.init() | |
| 20 | + layout.itemSize = CGSize(width: (KSreenWidth - gap*2-10)/2, height: 72) | |
| 21 | + layout.sectionInset = .init(top: gap, left: gap, bottom: gap, right: gap) | |
| 22 | + layout.headerReferenceSize = CGSize(width: KSreenWidth, height: 20) | |
| 23 | + let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout) | |
| 24 | + collectionView.delegate = self | |
| 25 | + collectionView.dataSource = self | |
| 26 | + collectionView.backgroundColor = .clear | |
| 27 | + collectionView.register(CNLiveShopConsoleHeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: kCNLiveShopConsoleCollectionReusableHeaderViewID) | |
| 28 | + collectionView.register(CNLiveShopConsoleCell.self, forCellWithReuseIdentifier: kCNLiveShopConsoleCellKey) | |
| 29 | + return collectionView | |
| 30 | + }() | |
| 31 | + | |
| 32 | + lazy var dataModel: CNLiveShopConsoleModel = { | |
| 33 | + let dataModel = CNLiveShopConsoleModel() | |
| 34 | + return dataModel | |
| 35 | + }() | |
| 36 | + | |
| 37 | + override func viewDidLoad() { | |
| 38 | + super.viewDidLoad() | |
| 39 | + self.view.backgroundColor = .clear | |
| 40 | + self.getPageApi() | |
| 41 | + | |
| 42 | + view.addSubview(collectionView) | |
| 43 | + collectionView.snp.makeConstraints { make in | |
| 44 | + make.top.equalToSuperview().offset(KNavigationHeight) | |
| 45 | + make.left.bottom.right.equalToSuperview() | |
| 46 | + } | |
| 47 | + } | |
| 48 | + | |
| 49 | + // MARK: - UICollectionViewDelegate | |
| 50 | + func numberOfSections(in collectionView: UICollectionView) -> Int { | |
| 51 | + return self.dataModel.list.count | |
| 52 | + } | |
| 53 | + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | |
| 54 | + let listMdl = self.dataModel.list[section] | |
| 55 | + return listMdl.list.count | |
| 56 | + } | |
| 57 | + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | |
| 58 | + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: kCNLiveShopConsoleCellKey, for: indexPath) as! CNLiveShopConsoleCell | |
| 59 | + let listMdl = self.dataModel.list[indexPath.section] | |
| 60 | + let model = listMdl.list[indexPath.item] | |
| 61 | + cell.shopListContentModel = model | |
| 62 | + return cell | |
| 63 | + } | |
| 64 | +// func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize { | |
| 65 | +// if (section == 0) { | |
| 66 | +// return CGSizeMake(self.view.width, 33); | |
| 67 | +// }else { | |
| 68 | +// return CGSizeMake(self.view.width, 33); | |
| 69 | +// } | |
| 70 | +// } | |
| 71 | + | |
| 72 | + func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { | |
| 73 | + if (kind == UICollectionView.elementKindSectionHeader){ | |
| 74 | + let sectionMdl = self.dataModel.list[indexPath.section] | |
| 75 | + let headerView:CNLiveShopConsoleHeaderView = collectionView .dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: kCNLiveShopConsoleCollectionReusableHeaderViewID, for: indexPath) as! CNLiveShopConsoleHeaderView | |
| 76 | + headerView.height = 24 | |
| 77 | + headerView.title = sectionMdl.title | |
| 78 | + return headerView | |
| 79 | + }else { | |
| 80 | + let footer = collectionView .dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionFooter, withReuseIdentifier: kCNLiveShopConsoleCollectionReusableFooterViewID, for: indexPath) | |
| 81 | + return footer | |
| 82 | + } | |
| 83 | + } | |
| 84 | + | |
| 85 | + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | |
| 86 | + let listMdl = self.dataModel.list[indexPath.section] | |
| 87 | + let itemModel = listMdl.list[indexPath.item] | |
| 88 | + if itemModel.type == CNLiveShopConsoleType.XZSP.rawValue{ | |
| 89 | + //商城新增商品 | |
| 90 | + | |
| 91 | + }else if itemModel.type == CNLiveShopConsoleType.SPGL.rawValue{ | |
| 92 | + //商城商品管理 | |
| 93 | + | |
| 94 | + }else if itemModel.type == CNLiveShopConsoleType.XZYHQ.rawValue{ | |
| 95 | + //新增优惠券 | |
| 96 | + | |
| 97 | + }else if itemModel.type == CNLiveShopConsoleType.GLYHQ.rawValue{ | |
| 98 | + //优惠券管理 | |
| 99 | + | |
| 100 | + }else if itemModel.type == CNLiveShopConsoleType.CreateShopClassify.rawValue{ | |
| 101 | + //创建店铺分类 | |
| 102 | + | |
| 103 | + }else if itemModel.type == CNLiveShopConsoleType.ShopClassifyManager.rawValue{ | |
| 104 | + //店铺分类管理 | |
| 105 | + | |
| 106 | + }else if itemModel.type == CNLiveShopConsoleType.FBDT.rawValue{ | |
| 107 | + //发布动态 | |
| 108 | + | |
| 109 | + }else if itemModel.type == CNLiveShopConsoleType.DTGL.rawValue{ | |
| 110 | + //动态管理 | |
| 111 | + | |
| 112 | + }else if itemModel.type == CNLiveShopConsoleType.DDGL.rawValue{ | |
| 113 | + //订单管理 | |
| 114 | + | |
| 115 | + } | |
| 116 | +// else if itemModel.type == CNLiveShopConsoleType.SH.rawValue{ | |
| 117 | +// //退款/售后 | |
| 118 | +// | |
| 119 | +// } | |
| 120 | + else if itemModel.type == CNLiveShopConsoleType.JYJL.rawValue{ | |
| 121 | + //交易记录 | |
| 122 | + | |
| 123 | + }else if itemModel.type == CNLiveShopConsoleType.OnManagerment.rawValue{ | |
| 124 | + //直播管理 | |
| 125 | + | |
| 126 | + } | |
| 127 | + } | |
| 128 | + | |
| 129 | + //MARK: - 网络请求获取详情页 | |
| 130 | + func getPageApi() | |
| 131 | + { | |
| 132 | + showLoading(message: "") | |
| 133 | + CNLiveShopConsoleViewModel.requestUserInfo() { result, status in | |
| 134 | + hiddenLoading() | |
| 135 | + | |
| 136 | + if status == .success{ | |
| 137 | + let shopUserModel = result as! CNLiveShopUserInfoModel | |
| 138 | + if shopUserModel.type != "3"{ | |
| 139 | + //type 1商家或者8达人 | |
| 140 | + let shopConsoleModel = CNLiveShopConsoleModel() | |
| 141 | + shopConsoleModel.initDataSource() | |
| 142 | + self.dataModel = shopConsoleModel | |
| 143 | + self.collectionView.reloadData() | |
| 144 | + } | |
| 145 | + }else if (status == .failed){ | |
| 146 | +// self.NetApiStatus = .apiError | |
| 147 | + }else if (status == .noNetwork){ | |
| 148 | + | |
| 149 | +// self.NetApiStatus = .notNetwork | |
| 150 | + } | |
| 151 | + } | |
| 152 | +// | |
| 153 | + } | |
| 154 | +} | ... | ... |
metaCode/Classes/Main/HomePage/Controller/CNMetaCodeHomePageController.swift
| ... | ... | @@ -18,6 +18,8 @@ let LeftGap: CGFloat = UIScreen.main.bounds.size.width <= 375 ? 23 : 40 |
| 18 | 18 | |
| 19 | 19 | ///主窗口宽度 |
| 20 | 20 | let MainViewW: CGFloat = Width-LeftGap*2//Width-50 |
| 21 | +///下滑页底部工具条高度 | |
| 22 | +let DownSlideBottomViewHeight: CGFloat = 74 | |
| 21 | 23 | |
| 22 | 24 | ///存储是否第一次显示首页上滑引导 |
| 23 | 25 | let CNKeyIsFirstAppearUpSlideHomeGuide: String = "isFirstAppearUpSlideHomeGuideKey" |
| ... | ... | @@ -383,13 +385,24 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 383 | 385 | bannerView?.layer.cornerRadius = 4 |
| 384 | 386 | bannerView?.layer.masksToBounds = false |
| 385 | 387 | } |
| 388 | + let identityModel = dataArray[index] as! StandListModel | |
| 389 | + bannerView?.idModel = identityModel | |
| 390 | + if (identityModel.auth == true){ | |
| 391 | + bannerView?.baseScrollView.isScrollEnabled = true | |
| 392 | + }else{ | |
| 393 | + if (identityModel.downType == 3 || identityModel.downType == 4 || identityModel.upType == 3 || identityModel.upType == 4) | |
| 394 | + { | |
| 395 | +// bannerView?.baseScrollView.isScrollEnabled = false | |
| 396 | + }else{ | |
| 397 | + bannerView?.baseScrollView.isScrollEnabled = true | |
| 398 | + } | |
| 399 | + } | |
| 400 | + | |
| 386 | 401 | bannerView?.superScrollView = flowView.scrollView |
| 387 | 402 | bannerView?.associatedVCView = self.view |
| 388 | 403 | bannerView?.delegate = self |
| 389 | 404 | bannerView?.upSlideView.webView.navigationDelegate = self |
| 390 | 405 | bannerView?.downSlideView.webView.navigationDelegate = self |
| 391 | - let identityModel = dataArray[index] as! StandListModel | |
| 392 | - bannerView?.idModel = identityModel | |
| 393 | 406 | return bannerView |
| 394 | 407 | } |
| 395 | 408 | |
| ... | ... | @@ -557,7 +570,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 557 | 570 | print(url) |
| 558 | 571 | if(navigationAction.navigationType == .linkActivated){ |
| 559 | 572 | let webVC = CNWebViewController() |
| 560 | - webVC.url = url | |
| 573 | + webVC.url = URL(string: url) | |
| 561 | 574 | currentViewController()?.navigationController?.pushViewController(webVC, animated: true) |
| 562 | 575 | decisionHandler(.cancel, preferences) |
| 563 | 576 | return | ... | ... |
metaCode/Classes/Main/HomePage/Controller/CNSlideBaseNavigationController.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNSlideBaseNavigationController.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/26. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | + | |
| 10 | +class CNSlideBaseNavigationController: UINavigationController | |
| 11 | + ,UIViewControllerTransitioningDelegate { | |
| 12 | + var dismissClosure: (()->())? | |
| 13 | + override func viewDidLoad() { | |
| 14 | + super.viewDidLoad() | |
| 15 | + modalPresentationStyle = .custom | |
| 16 | + transitioningDelegate = self | |
| 17 | + } | |
| 18 | + | |
| 19 | + func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? { | |
| 20 | + return CNUpSlideAnimationTransition(animationType: .present) | |
| 21 | + } | |
| 22 | + | |
| 23 | + func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { | |
| 24 | + return CNUpSlideAnimationTransition(animationType: .dismiss) | |
| 25 | + } | |
| 26 | + | |
| 27 | + func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? { | |
| 28 | + return CNUpSlideCardPresentationController(presentedViewController: presented, presenting: presenting) | |
| 29 | + } | |
| 30 | +} | ... | ... |
metaCode/Classes/Main/HomePage/Controller/CNUpSlideCardPresentationController.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNUpSlideCardPresentationController.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/16. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import UIKit | |
| 9 | + | |
| 10 | +class CNUpSlideCardPresentationController: UIPresentationController { | |
| 11 | + | |
| 12 | + private lazy var blurView = UIVisualEffectView(effect: nil) | |
| 13 | + | |
| 14 | + override var shouldRemovePresentersView: Bool { | |
| 15 | + return false | |
| 16 | + } | |
| 17 | + | |
| 18 | + override func presentationTransitionWillBegin() { | |
| 19 | + let container = containerView! | |
| 20 | + blurView.translatesAutoresizingMaskIntoConstraints = false | |
| 21 | + container.addSubview(blurView) | |
| 22 | + blurView.edges(to: container) | |
| 23 | + blurView.alpha = 0.0 | |
| 24 | + | |
| 25 | + presentingViewController.beginAppearanceTransition(false, animated: false) | |
| 26 | + presentedViewController.transitionCoordinator!.animate(alongsideTransition: { (ctx) in | |
| 27 | + self.blurView.effect = UIBlurEffect(style: .light) | |
| 28 | + self.blurView.alpha = 1 | |
| 29 | + }) { (ctx) in } | |
| 30 | + } | |
| 31 | + | |
| 32 | + override func presentationTransitionDidEnd(_ completed: Bool) { | |
| 33 | + presentingViewController.endAppearanceTransition() | |
| 34 | + } | |
| 35 | + | |
| 36 | + override func dismissalTransitionWillBegin() { | |
| 37 | + presentingViewController.beginAppearanceTransition(true, animated: true) | |
| 38 | + presentedViewController.transitionCoordinator!.animate(alongsideTransition: { (ctx) in | |
| 39 | + self.blurView.alpha = 0.0 | |
| 40 | + }, completion: nil) | |
| 41 | + } | |
| 42 | + | |
| 43 | + override func dismissalTransitionDidEnd(_ completed: Bool) { | |
| 44 | + presentingViewController.endAppearanceTransition() | |
| 45 | + if completed { | |
| 46 | + blurView.removeFromSuperview() | |
| 47 | + } | |
| 48 | + } | |
| 49 | +} | ... | ... |
metaCode/Classes/Main/HomePage/Controller/CNUpSlideDetailViewController.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNUpSlideDetailViewController.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/16. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | + | |
| 10 | +class CNUpSlideDetailViewController: CNLiveBaseViewController { | |
| 11 | + | |
| 12 | + //slideModel | |
| 13 | + var _slideModel : CNLiveDownSlideModel? | |
| 14 | + var slideModel : CNLiveDownSlideModel? { | |
| 15 | + get{ | |
| 16 | + _slideModel | |
| 17 | + } | |
| 18 | + set{ | |
| 19 | + _slideModel = newValue! | |
| 20 | + } | |
| 21 | + } | |
| 22 | + | |
| 23 | + var dismissClosure: (()->())? | |
| 24 | + //the point when start to interactive | |
| 25 | + var interactiveStartingPoint: CGPoint? = nil | |
| 26 | + | |
| 27 | + var draggingDownToDismiss = false | |
| 28 | + | |
| 29 | + let cell: CNDownSlideSingleCourseCell! | |
| 30 | + | |
| 31 | + private lazy var dismissPanGesture: UIPanGestureRecognizer = { | |
| 32 | + let ges = UIPanGestureRecognizer() | |
| 33 | + ges.maximumNumberOfTouches = 1 | |
| 34 | + ges.addTarget(self, action: #selector(handleDismissPan(gesture:))) | |
| 35 | + ges.delegate = self | |
| 36 | + return ges | |
| 37 | + }() | |
| 38 | + | |
| 39 | + lazy var scrollView: CNUpSlideDetailScrollView = { | |
| 40 | + let frame = self.view.bounds | |
| 41 | + let view = CNUpSlideDetailScrollView(frame: frame) | |
| 42 | + view.callBack = {(contentMdl:CNLiveDownSlideContentsModel)->Void in | |
| 43 | + CNLiveDownSlideTool.detailPushWebVCWithContentsMdl(contentMdl: contentMdl, viewController: self) | |
| 44 | + } | |
| 45 | + view.delegate = self | |
| 46 | + return view | |
| 47 | + }() | |
| 48 | + | |
| 49 | + lazy var closeBtn: UIButton = { | |
| 50 | + let btn = UIButton() | |
| 51 | + btn.frame = CGRect(x: KSreenWidth - 20 - 30, y: 20, width: 30, height: 30) | |
| 52 | + btn.setImage(#imageLiteral(resourceName: "close_button"), for: .normal) | |
| 53 | + btn.addTarget(self, action: #selector(closeAction), for: .touchUpInside) | |
| 54 | + return btn | |
| 55 | + }() | |
| 56 | + | |
| 57 | + init(cell: CNDownSlideSingleCourseCell,slideModel:CNLiveDownSlideModel) { | |
| 58 | + self.cell = cell | |
| 59 | + super.init(nibName: nil, bundle: nil) | |
| 60 | + self.slideModel = slideModel | |
| 61 | + self.setupTranstion() | |
| 62 | + setNeedsStatusBarAppearanceUpdate() | |
| 63 | + } | |
| 64 | + | |
| 65 | + private func setupTranstion() { | |
| 66 | + modalPresentationStyle = .custom | |
| 67 | + transitioningDelegate = self | |
| 68 | + } | |
| 69 | + | |
| 70 | + required init?(coder aDecoder: NSCoder) { | |
| 71 | + fatalError("init(coder:) has not been implemented") | |
| 72 | + } | |
| 73 | + | |
| 74 | + override func viewDidLoad() { | |
| 75 | + super.viewDidLoad() | |
| 76 | + setupUI() | |
| 77 | + getImageFromCell() | |
| 78 | + } | |
| 79 | + | |
| 80 | + private func setupUI() { | |
| 81 | + self.view.layer.masksToBounds = true | |
| 82 | + view.addSubview(scrollView) | |
| 83 | + scrollView.slideModel = _slideModel | |
| 84 | + view.addSubview(closeBtn) | |
| 85 | + view.addGestureRecognizer(dismissPanGesture) | |
| 86 | + | |
| 87 | + if #available(iOS 11.0, *) { | |
| 88 | + scrollView.contentInsetAdjustmentBehavior = .never | |
| 89 | + } else { | |
| 90 | + automaticallyAdjustsScrollViewInsets = false | |
| 91 | + } | |
| 92 | + } | |
| 93 | + | |
| 94 | + private func getImageFromCell() { | |
| 95 | + scrollView.imageView.image = cell.bgImageView.image | |
| 96 | + } | |
| 97 | + | |
| 98 | + @objc private func closeAction() { | |
| 99 | + dismiss(animated: true, completion: nil) | |
| 100 | + let nav = self.navigationController as! CNSlideBaseNavigationController | |
| 101 | + nav.dismissClosure?() | |
| 102 | + } | |
| 103 | + | |
| 104 | + @objc private func handleDismissPan(gesture: UIPanGestureRecognizer) { | |
| 105 | + if !draggingDownToDismiss { | |
| 106 | + return | |
| 107 | + } | |
| 108 | + | |
| 109 | + let startingPoint: CGPoint | |
| 110 | + | |
| 111 | + if let p = interactiveStartingPoint { | |
| 112 | + startingPoint = p | |
| 113 | + } else { | |
| 114 | + startingPoint = gesture.location(in: nil) | |
| 115 | + interactiveStartingPoint = startingPoint | |
| 116 | + } | |
| 117 | + | |
| 118 | + let currentLocation = gesture.location(in: nil) | |
| 119 | + | |
| 120 | + var progress = (currentLocation.y - startingPoint.y) / 100 | |
| 121 | + | |
| 122 | + //prevent viewController bigger when scrolling up | |
| 123 | + if currentLocation.y <= startingPoint.y { | |
| 124 | + progress = 0 | |
| 125 | + } | |
| 126 | + | |
| 127 | + if progress >= 1.0 { | |
| 128 | + dismiss(animated: true, completion: nil) | |
| 129 | + let nav = self.navigationController as! CNSlideBaseNavigationController | |
| 130 | + nav.dismissClosure?() | |
| 131 | +// dismissClosure?() | |
| 132 | + stopDismissPanGesture(gesture) | |
| 133 | + return | |
| 134 | + } | |
| 135 | + | |
| 136 | + let targetShrinkScale: CGFloat = 0.86 | |
| 137 | + let currentScale: CGFloat = 1 - (1 - targetShrinkScale) * progress | |
| 138 | + | |
| 139 | + switch gesture.state { | |
| 140 | + case .began,.changed: | |
| 141 | + scrollView.isScrollEnabled = false | |
| 142 | + gesture.view?.transform = CGAffineTransform(scaleX: currentScale, y: currentScale) | |
| 143 | + gesture.view?.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius * (progress) | |
| 144 | + scrollView.showsVerticalScrollIndicator = false | |
| 145 | + case .cancelled,.ended: | |
| 146 | + scrollView.isScrollEnabled = true | |
| 147 | + stopDismissPanGesture(gesture) | |
| 148 | + default: | |
| 149 | + break | |
| 150 | + } | |
| 151 | + } | |
| 152 | + | |
| 153 | + //当下拉Offset超过100或取消下拉手势时,执行此方法 | |
| 154 | + private func stopDismissPanGesture(_ gesture: UIPanGestureRecognizer) { | |
| 155 | + draggingDownToDismiss = false | |
| 156 | + interactiveStartingPoint = nil | |
| 157 | + scrollView.showsVerticalScrollIndicator = true | |
| 158 | + | |
| 159 | + UIView.animate(withDuration: 0.2) { | |
| 160 | + gesture.view?.transform = CGAffineTransform.identity | |
| 161 | + } | |
| 162 | + } | |
| 163 | + | |
| 164 | +} | |
| 165 | + | |
| 166 | +extension CNUpSlideDetailViewController: UIViewControllerTransitioningDelegate { | |
| 167 | + | |
| 168 | + func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? { | |
| 169 | + return CNUpSlideAnimationTransition(animationType: .present) | |
| 170 | + } | |
| 171 | + | |
| 172 | + func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { | |
| 173 | + return CNUpSlideAnimationTransition(animationType: .dismiss) | |
| 174 | + } | |
| 175 | + | |
| 176 | + func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? { | |
| 177 | + return CNUpSlideCardPresentationController(presentedViewController: presented, presenting: presenting) | |
| 178 | + } | |
| 179 | +} | |
| 180 | + | |
| 181 | +extension CNUpSlideDetailViewController: UIScrollViewDelegate { | |
| 182 | + func scrollViewDidScroll(_ scrollView: UIScrollView) { | |
| 183 | + | |
| 184 | + if scrollView.contentOffset.y < 0 { | |
| 185 | + scrollView.contentOffset = .zero | |
| 186 | + draggingDownToDismiss = true | |
| 187 | + } | |
| 188 | + } | |
| 189 | +} | |
| 190 | + | |
| 191 | +extension CNUpSlideDetailViewController: UIGestureRecognizerDelegate { | |
| 192 | + func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { | |
| 193 | + return true | |
| 194 | + } | |
| 195 | +} | ... | ... |
metaCode/Classes/Main/HomePage/Controller/CNUpSlideViewController.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNUpSlideViewController.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/13. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | +import UIKit | |
| 10 | + | |
| 11 | +//下滑tableview背景颜色 | |
| 12 | +let kCNDownSlideBackgroundColorHex: String = "#F7F8FA" | |
| 13 | + | |
| 14 | +///CNliveDownSlideModel Type | |
| 15 | +let SlideModelTypeRecommend4: String = "4"//4一排两个 推荐课程&推荐活动 | |
| 16 | +let SlideModelTypeTodayRecommend74: String = "74"//74今日推荐 | |
| 17 | +let SlideModelTypeAllCourse12: String = "12"//12列表全部课程 | |
| 18 | +let SlideModelTypeOneCourse75: String = "75"//75单课程大图 | |
| 19 | + | |
| 20 | +class CNUpSlideViewController: CNLiveBaseViewController,UITableViewDelegate,UITableViewDataSource{ | |
| 21 | + | |
| 22 | + let kCNLiveDownSlideCellIdentifier = "kCNLiveDownSlideCellIdentifier" | |
| 23 | + let kCNLiveDownSlideRecommendCellIdentifier = "kCNLiveDownSlideRecommendCellIdentifier" | |
| 24 | + let kCNLiveDownSlideTodayRecommendCellIdentifier = "kCNLiveDownSlideTodayRecommendCellIdentifier" | |
| 25 | + | |
| 26 | + var totolNum = 0//一共显示多少行cell | |
| 27 | + | |
| 28 | + var selectedCell: CNDownSlideSingleCourseCell? | |
| 29 | + | |
| 30 | + var statusBarShouldBeHidden = false | |
| 31 | + //we need to set `View controller-based status bar appearance = YES` in info.plist. | |
| 32 | + //so we can be able to hide statusBar. | |
| 33 | + override var prefersStatusBarHidden: Bool { | |
| 34 | + return statusBarShouldBeHidden | |
| 35 | + } | |
| 36 | + | |
| 37 | + override var preferredStatusBarUpdateAnimation: UIStatusBarAnimation { | |
| 38 | + return .slide | |
| 39 | + } | |
| 40 | + | |
| 41 | + var _downPath:String? | |
| 42 | + var downPath:String? { | |
| 43 | + get{ | |
| 44 | + return _downPath | |
| 45 | + } | |
| 46 | + set{ | |
| 47 | + _downPath = newValue! | |
| 48 | + self.getPageApi() | |
| 49 | + } | |
| 50 | + } | |
| 51 | + | |
| 52 | + // MARK: - 懒加载 | |
| 53 | + ///数据源 | |
| 54 | + lazy var dataArray: NSMutableArray = { | |
| 55 | + var dataArray = NSMutableArray() | |
| 56 | + return dataArray | |
| 57 | + }() | |
| 58 | + | |
| 59 | + override func viewWillAppear(_ animated: Bool) { | |
| 60 | + super.viewWillAppear(animated) | |
| 61 | + self.updateStatusBarAndTabbarFrame(visible: true) | |
| 62 | + } | |
| 63 | + | |
| 64 | + override func viewDidLoad() { | |
| 65 | + super.viewDidLoad() | |
| 66 | + self.view.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) | |
| 67 | + view.addSubview(tableView) | |
| 68 | + tableView.frame = CGRect(x: 0, y: KStatusBarHeight, width: KSreenWidth, height: KSreenHeight-DownSlideBottomViewHeight-KStatusBarHeight) | |
| 69 | + } | |
| 70 | + | |
| 71 | + lazy var tableView : UITableView = { | |
| 72 | + let tableView = UITableView(frame: .zero, style: .plain) | |
| 73 | + tableView.dataSource = self | |
| 74 | + tableView.delegate = self | |
| 75 | + tableView.separatorStyle = .none | |
| 76 | + tableView.register(CNDownSlideSingleCourseCell.self, forCellReuseIdentifier: kCNLiveDownSlideCellIdentifier) | |
| 77 | + tableView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) | |
| 78 | + return tableView | |
| 79 | + }() | |
| 80 | + | |
| 81 | + private func updateStatusBarAndTabbarFrame(visible: Bool) { | |
| 82 | + statusBarShouldBeHidden = !visible | |
| 83 | + UIView.animate(withDuration: 0.25) { | |
| 84 | + self.setNeedsStatusBarAppearanceUpdate() | |
| 85 | + } | |
| 86 | + } | |
| 87 | + | |
| 88 | + // MARK: - UITableViewDelegate | |
| 89 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
| 90 | + | |
| 91 | + self.dataArray.count | |
| 92 | + } | |
| 93 | + | |
| 94 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
| 95 | + | |
| 96 | + let slideModel = self.dataArray[indexPath.row] as! CNLiveDownSlideModel | |
| 97 | + | |
| 98 | + //type=4一排两个 推荐课程&推荐活动; 74今日推荐; 12列表全部课程; 75单课程大图 | |
| 99 | + if slideModel.type == SlideModelTypeRecommend4{ | |
| 100 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideRecommendCellIdentifier) as? CNLiveDownSlideRecommendCell | |
| 101 | + else { | |
| 102 | + let cell = CNLiveDownSlideRecommendCell() | |
| 103 | + cell.slideModel = slideModel | |
| 104 | + return cell | |
| 105 | + } | |
| 106 | + cell.slideModel = slideModel | |
| 107 | + return cell | |
| 108 | + }else if slideModel.type == SlideModelTypeTodayRecommend74{ | |
| 109 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideTodayRecommendCellIdentifier) as? CNLiveDownSlideTodayRecommendCell | |
| 110 | + else { | |
| 111 | + let cell = CNLiveDownSlideTodayRecommendCell() | |
| 112 | + cell.slideModel = slideModel | |
| 113 | + return cell | |
| 114 | + } | |
| 115 | + cell.slideModel = slideModel | |
| 116 | + return cell | |
| 117 | + }else if slideModel.type == SlideModelTypeAllCourse12{ | |
| 118 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideCellIdentifier) as? CNDownSlideSingleCourseCell | |
| 119 | + else { | |
| 120 | + let cell = CNDownSlideSingleCourseCell() | |
| 121 | + cell.slideModel = slideModel | |
| 122 | + return cell | |
| 123 | + } | |
| 124 | + cell.slideModel = slideModel | |
| 125 | + return cell | |
| 126 | + }else if slideModel.type == SlideModelTypeOneCourse75{ | |
| 127 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideCellIdentifier) as? CNDownSlideSingleCourseCell | |
| 128 | + else { | |
| 129 | + let cell = CNDownSlideSingleCourseCell() | |
| 130 | + cell.slideModel = slideModel | |
| 131 | + return cell | |
| 132 | + } | |
| 133 | + cell.slideModel = slideModel | |
| 134 | + return cell | |
| 135 | + }else{ | |
| 136 | + return UITableViewCell() | |
| 137 | + } | |
| 138 | + } | |
| 139 | + | |
| 140 | + | |
| 141 | + func tableView(_ tableView: UITableView, didHighlightRowAt indexPath: IndexPath) { | |
| 142 | + guard let row = tableView.cellForRow(at: indexPath) as? CNDownSlideSingleCourseCell else { return } | |
| 143 | + UIView.animate(withDuration: 0.1) { | |
| 144 | + row.bgBackView.transform = CGAffineTransform(scaleX: 0.95, y: 0.95) | |
| 145 | + } | |
| 146 | + } | |
| 147 | + | |
| 148 | + func tableView(_ tableView: UITableView, didUnhighlightRowAt indexPath: IndexPath) { | |
| 149 | + guard let row = tableView.cellForRow(at: indexPath) as? CNDownSlideSingleCourseCell else { return } | |
| 150 | + UIView.animate(withDuration: 0.3) { | |
| 151 | + row.bgBackView.transform = CGAffineTransform(scaleX: 1.0, y: 1.0) | |
| 152 | + } | |
| 153 | + } | |
| 154 | + | |
| 155 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | |
| 156 | + | |
| 157 | + let slideModel = self.dataArray[indexPath.row] as! CNLiveDownSlideModel | |
| 158 | + //type=4一排两个 推荐课程&推荐活动; 74今日推荐; 12列表全部课程; 75单课程大图 | |
| 159 | + if slideModel.type == SlideModelTypeRecommend4{ | |
| 160 | + | |
| 161 | + }else if slideModel.type == SlideModelTypeTodayRecommend74{ | |
| 162 | + | |
| 163 | + }else if slideModel.type == SlideModelTypeAllCourse12{ | |
| 164 | + guard let cell = tableView.cellForRow(at: indexPath) as? CNDownSlideSingleCourseCell else { return } | |
| 165 | + selectedCell = cell | |
| 166 | + let detailVC = CNSlideBaseNavigationController(rootViewController: CNUpSlideDetailViewController(cell: cell,slideModel: slideModel)) | |
| 167 | + detailVC.dismissClosure = { [weak self] in | |
| 168 | + guard let StrongSelf = self else { return } | |
| 169 | + StrongSelf.updateStatusBarAndTabbarFrame(visible: true) | |
| 170 | + } | |
| 171 | + updateStatusBarAndTabbarFrame(visible: false) | |
| 172 | + | |
| 173 | + present(detailVC, animated: true, completion: nil) | |
| 174 | + }else if slideModel.type == SlideModelTypeOneCourse75{ | |
| 175 | + guard let cell = tableView.cellForRow(at: indexPath) as? CNDownSlideSingleCourseCell else { return } | |
| 176 | + selectedCell = cell | |
| 177 | + | |
| 178 | + let detailVC = CNSlideBaseNavigationController(rootViewController: CNUpSlideDetailViewController(cell: cell,slideModel: slideModel)) | |
| 179 | + | |
| 180 | + detailVC.dismissClosure = { [weak self] in | |
| 181 | + guard let StrongSelf = self else { return } | |
| 182 | + StrongSelf.updateStatusBarAndTabbarFrame(visible: true) | |
| 183 | + } | |
| 184 | + updateStatusBarAndTabbarFrame(visible: false) | |
| 185 | + present(detailVC, animated: true, completion: nil) | |
| 186 | + } | |
| 187 | + } | |
| 188 | + | |
| 189 | + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | |
| 190 | + let slideModel = self.dataArray[indexPath.row] as! CNLiveDownSlideModel | |
| 191 | + return CGFloat(slideModel.cellH) | |
| 192 | + } | |
| 193 | + | |
| 194 | + func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { | |
| 195 | + return 0 | |
| 196 | + } | |
| 197 | + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { | |
| 198 | + return 0 | |
| 199 | + } | |
| 200 | + //MARK: - 网络请求获取详情页 | |
| 201 | + func getPageApi() | |
| 202 | + { | |
| 203 | + showLoading(message: "") | |
| 204 | + CNLiveDownSlideViewModel.requestGetPage(pageId: _downPath! as NSString) { result, status in | |
| 205 | + hiddenLoading() | |
| 206 | + | |
| 207 | + if status == .success{ | |
| 208 | + self.dataArray.addObjects(from: result as! [Any]) | |
| 209 | + let newDataArray = NSMutableArray() | |
| 210 | + for slideModel in self.dataArray { | |
| 211 | + if let model = slideModel as? CNLiveDownSlideModel{ | |
| 212 | + | |
| 213 | + let layout = CNLiveDownSlideModelLayout.init(model: model) | |
| 214 | + newDataArray.addObjects(from: [layout.getCellHModel()]) | |
| 215 | + } | |
| 216 | + } | |
| 217 | + self.dataArray.removeAllObjects() | |
| 218 | + self.dataArray.addObjects(from: newDataArray as! [Any]) | |
| 219 | + | |
| 220 | + self.tableView.reloadData() | |
| 221 | + }else if (status == .failed){ | |
| 222 | +// self.NetApiStatus = .apiError | |
| 223 | + }else if (status == .noNetwork){ | |
| 224 | + | |
| 225 | +// self.NetApiStatus = .notNetwork | |
| 226 | + } | |
| 227 | + } | |
| 228 | +// | |
| 229 | + } | |
| 230 | +} | ... | ... |
metaCode/Classes/Main/HomePage/Controller/CNWebViewController.swift
| ... | ... | @@ -18,15 +18,15 @@ class CNWebViewController:CNLiveBaseViewController ,WKNavigationDelegate{ |
| 18 | 18 | return webView |
| 19 | 19 | }() |
| 20 | 20 | |
| 21 | - var _url:String? | |
| 22 | - var url:String? { | |
| 21 | + var _url:URL? | |
| 22 | + var url:URL? { | |
| 23 | 23 | get{ |
| 24 | 24 | return _url |
| 25 | 25 | } |
| 26 | 26 | set{ |
| 27 | 27 | _url = newValue! |
| 28 | - if (_url != ""){ | |
| 29 | - let webUrl: URL! = URL.init(string: _url!) | |
| 28 | + if (_url != nil){ | |
| 29 | + let webUrl: URL! = _url! | |
| 30 | 30 | webView.evaluateJavaScript("navigator.userAgent") { [self] result, error in |
| 31 | 31 | let userAgent = result as! String |
| 32 | 32 | if error == nil && userAgent.count > 0 { | ... | ... |
metaCode/Classes/Main/HomePage/View/CNCustomIndexView.swift
| ... | ... | @@ -13,15 +13,14 @@ class CNCustomIndexTopView : UIView{ |
| 13 | 13 | ///关闭按钮事件回调 |
| 14 | 14 | var closeAction: closeBlock? |
| 15 | 15 | |
| 16 | - | |
| 17 | 16 | //MARK: - 懒加载 |
| 18 | 17 | ///标题 |
| 19 | 18 | lazy var titleLabel: UILabel = { |
| 20 | - let titleLabel = UILabel.init(frame: CGRectMake(10, 0, 75, 35)) | |
| 19 | + let titleLabel = UILabel.init(frame: CGRectMake(0, 0, 75, 35)) | |
| 21 | 20 | titleLabel.bottom = self.bottom - 5 |
| 22 | 21 | titleLabel.textColor = .white |
| 23 | 22 | titleLabel.textAlignment = .left |
| 24 | - titleLabel.font = UIFont.systemFont(ofSize: 24, weight: .semibold) | |
| 23 | + titleLabel.font = BoldFont_24 | |
| 25 | 24 | titleLabel.adjustsFontSizeToFitWidth=true |
| 26 | 25 | return titleLabel |
| 27 | 26 | }() |
| ... | ... | @@ -118,9 +117,15 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange |
| 118 | 117 | set{ |
| 119 | 118 | self.mainView.idModel = newValue! |
| 120 | 119 | _idModel = newValue |
| 121 | - self.upSlideView.url = _idModel?.downPath | |
| 122 | - self.downSlideView.url = _idModel?.upPath | |
| 120 | + self.upSlideView.type = _idModel?.downType | |
| 121 | + self.upSlideView.downPath = _idModel?.downPath | |
| 122 | + | |
| 123 | + self.downSlideView.type = _idModel?.upType | |
| 124 | + self.downSlideView.downPath = _idModel?.upPath | |
| 125 | + | |
| 123 | 126 | self.topNavView.setTitleString(title:(_idModel?.name)!) |
| 127 | + | |
| 128 | + self.colorDataArr = NSMutableArray(array: NSArray(objects: UIColor.white,KVCBackgroupColor!,HexColor(_idModel!.backgroundColor)!)) | |
| 124 | 129 | } |
| 125 | 130 | |
| 126 | 131 | } |
| ... | ... | @@ -143,7 +148,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange |
| 143 | 148 | |
| 144 | 149 | ///颜色数据 |
| 145 | 150 | lazy var colorDataArr: NSMutableArray = { |
| 146 | - let colorDataArr = NSMutableArray(array: NSArray(objects: UIColor.white,KVCBackgroupColor!,UIColor("#004FE0")!)) | |
| 151 | + let colorDataArr = NSMutableArray(array: NSArray(objects: UIColor.white,KVCBackgroupColor!,UIColor.yellow))//UIColor("#004FE0")! | |
| 147 | 152 | |
| 148 | 153 | return colorDataArr |
| 149 | 154 | }() |
| ... | ... | @@ -180,7 +185,8 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange |
| 180 | 185 | |
| 181 | 186 | ///下滑显示的VIew |
| 182 | 187 | lazy var downSlideView: CNDownSlideView = { |
| 183 | - let collectionView = CNDownSlideView.init(frame: CGRectMake(-25, 0, self.frame.size.width + 50, self.frame.size.height)) | |
| 188 | + | |
| 189 | + let collectionView = CNDownSlideView.init(frame: CGRectMake(-LeftGap, 0, self.frame.size.width+LeftGap*2, self.frame.size.height)) | |
| 184 | 190 | collectionView.backgroundColor = .clear |
| 185 | 191 | collectionView.backAction = {[weak self] in |
| 186 | 192 | self?.baseScrollView.setContentOffset(CGPoint(x: 0, y: (self!.baseScrollView.height)), animated: true) |
| ... | ... | @@ -199,8 +205,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange |
| 199 | 205 | |
| 200 | 206 | ///上滑显示的View |
| 201 | 207 | lazy var upSlideView : CNUpSlideView = { |
| 202 | - let upSlideView = CNUpSlideView(frame: CGRectMake(-25, self.frame.size.height*2 + 120,self.frame.size.width+50, self.frame.size.height - 120)) | |
| 203 | - | |
| 208 | + let upSlideView = CNUpSlideView(frame: CGRectMake(-LeftGap, self.frame.size.height*2,self.frame.size.width+LeftGap*2, self.frame.size.height)) | |
| 204 | 209 | return upSlideView |
| 205 | 210 | }() |
| 206 | 211 | |
| ... | ... | @@ -224,7 +229,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange |
| 224 | 229 | |
| 225 | 230 | /// 顶部自定义导航 |
| 226 | 231 | lazy var topNavView: CNCustomIndexTopView = { |
| 227 | - let topNavView = CNCustomIndexTopView.init(frame: CGRect(x: 0, y: 30, width: self.width, height: KNavigationHeight)) | |
| 232 | + let topNavView = CNCustomIndexTopView.init(frame: CGRect(x: 0, y: KStatusBarHeight, width: self.width, height: KNavigationHeight)) | |
| 228 | 233 | topNavView.alpha = 0 |
| 229 | 234 | topNavView.closeAction = { [weak self ] in |
| 230 | 235 | self!.baseScrollView.setContentOffset(CGPoint(x: 0, y: self!.baseScrollView.height), animated: true) |
| ... | ... | @@ -250,13 +255,10 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange |
| 250 | 255 | self.addSubview(self.downSlideViewRemindView) |
| 251 | 256 | |
| 252 | 257 | self.addSubview(self.baseScrollView) |
| 253 | - self.addSubview(self.topNavView) | |
| 254 | -// self.topNavView.setTitleString(title: "志愿者") | |
| 255 | - | |
| 256 | 258 | self.baseScrollView.addSubview(self.downSlideView) |
| 257 | 259 | self.baseScrollView.addSubview(self.mainView) |
| 258 | 260 | self.baseScrollView.addSubview(self.upSlideView) |
| 259 | - | |
| 261 | + self.addSubview(self.topNavView) | |
| 260 | 262 | //默认偏移到中间 |
| 261 | 263 | self.baseScrollView.setContentOffset(CGPointMake(0, self.frame.size.height), animated: false) |
| 262 | 264 | } |
| ... | ... | @@ -380,12 +382,16 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange |
| 380 | 382 | else{ |
| 381 | 383 | self.topNavView.alpha = 0 |
| 382 | 384 | } |
| 383 | - | |
| 384 | 385 | //隐藏downSlideView的bottomView |
| 385 | 386 | if scrollView.contentOffset.y > 10{ |
| 386 | 387 | self.downSlideView.bottomView.isHidden = true |
| 387 | 388 | self.downSlideView.contentView.backgroundColor = .clear |
| 388 | 389 | } |
| 390 | + if scrollView.contentOffset.y == 0{ | |
| 391 | + //滚动到第一页,显示downSlideView的底部view | |
| 392 | + self.downSlideView.bottomView.isHidden = false | |
| 393 | + self.downSlideView.contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) //KVCBackgroupColor | |
| 394 | + } | |
| 389 | 395 | |
| 390 | 396 | delegate?.customIndexViewDidScroll(scrollView: self.baseScrollView) |
| 391 | 397 | |
| ... | ... | @@ -408,16 +414,29 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange |
| 408 | 414 | self.superScrollView?.isScrollEnabled = false |
| 409 | 415 | } |
| 410 | 416 | |
| 411 | - | |
| 412 | 417 | if scrollView.contentOffset.y == 0{ |
| 413 | 418 | //滚动到第一页,显示downSlideView的底部view |
| 414 | 419 | self.downSlideView.bottomView.isHidden = false |
| 415 | - self.downSlideView.contentView.backgroundColor = KVCBackgroupColor | |
| 420 | + self.downSlideView.contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex)//KVCBackgroupColor | |
| 416 | 421 | } |
| 417 | 422 | |
| 418 | - | |
| 419 | - //滑动结束 把topNavView 放到scrollView的上层 | |
| 420 | - self.bringSubviewToFront(self.topNavView) | |
| 423 | + //滑动结束 网页类型downType=1时把topNavView 放到scrollView的上层 | |
| 424 | + if scrollView.contentOffset.y == ceil(defaultOffset*2) { | |
| 425 | + if self.idModel?.downType == 1 { | |
| 426 | + self.bringSubviewToFront(self.topNavView) | |
| 427 | + self.topNavView.isHidden = false | |
| 428 | + }else if self.idModel?.downType == 0{ | |
| 429 | + self.topNavView.isHidden = false | |
| 430 | + self.bringSubviewToFront(self.topNavView) | |
| 431 | + }else{ | |
| 432 | + self.topNavView.isHidden = true | |
| 433 | + } | |
| 434 | + }else{ | |
| 435 | + self.topNavView.isHidden = true | |
| 436 | + } | |
| 437 | + if scrollView.contentOffset.y == ceil(defaultOffset*2){ | |
| 438 | + | |
| 439 | + } | |
| 421 | 440 | |
| 422 | 441 | //下滑提醒View回到初始位置 |
| 423 | 442 | self.downSlideViewRemindView.top = -(self.downSlideViewRemindView.height + 50) | ... | ... |
metaCode/Classes/Main/HomePage/View/CNDownSlideSingleCourseCell.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNDownSlideSingleCourseCell.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/16. | |
| 6 | +// 单课程大图专辑 | |
| 7 | + | |
| 8 | + | |
| 9 | +import Foundation | |
| 10 | +import UIKit | |
| 11 | + | |
| 12 | +enum GlobalConstants { | |
| 13 | + static let leftMargin: CGFloat = 20 | |
| 14 | + | |
| 15 | + static let toDayCardRowH: CGFloat = 440 | |
| 16 | + static let toDayCardCornerRadius: CGFloat = 12.0 | |
| 17 | + static let todayCardSize: CGSize = CGSize(width: KSreenWidth - 2 * 15, height: DownSlideSingleCourseImgH) | |
| 18 | + static let cardDetailTopImageH: CGFloat = 500 | |
| 19 | + | |
| 20 | + static let iconBorderColor: CGColor = UIColor(red: 239/255.0, green: 240/255.0, blue: 241/255.0, alpha: 1).cgColor | |
| 21 | + static let iconBorderWidth: CGFloat = 0.8 | |
| 22 | + static let iconCornerRadius: CGFloat = 17.5 | |
| 23 | + | |
| 24 | + static let textBlueColor = UIColor(red: 0/255.0, green: 122/255.0, blue: 255/255.0, alpha: 1.0) //007AFF | |
| 25 | + static let speratorLineColor = UIColor(red: 224/255.0, green: 224/255.0, blue: 224/255.0, alpha: 1) | |
| 26 | + | |
| 27 | +} | |
| 28 | + | |
| 29 | +///全部课程 标题高度 | |
| 30 | +let DownSlideAllCourseTitleH: CGFloat = 55 | |
| 31 | +//全部课程 每row_topY间距 | |
| 32 | +let DownSlideAllCourseRowTopYGap: CGFloat = 10 | |
| 33 | +//全部课程 每row_topY间距 | |
| 34 | +let DownSlideAllCourseRowBottomYGap: CGFloat = 20 | |
| 35 | +//全部课程 每row_img宽高 | |
| 36 | +let DownSlideAllCourseRowImageWH: CGFloat = 45 | |
| 37 | + | |
| 38 | +///全部课程 每row高度 | |
| 39 | +let DownSlideAllCourseRowH: CGFloat = DownSlideAllCourseRowTopYGap+DownSlideAllCourseRowBottomYGap + DownSlideAllCourseRowImageWH | |
| 40 | +///全部课程 宽度 | |
| 41 | +let DownSlideAllCourseW: CGFloat = KSreenWidth - DownSlideRecommendLeftGap*2 | |
| 42 | + | |
| 43 | +///单节课程 大图高度 | |
| 44 | +let DownSlideSingleCourseImgH: CGFloat = 345 | |
| 45 | +///单节课程 更多课程高度 | |
| 46 | +let DownSlideSingleCourseMoreH: CGFloat = 60 | |
| 47 | +///单节课程 宽度 | |
| 48 | +let DownSlideSingleCourseW: CGFloat = KSreenWidth - DownSlideRecommendLeftGap*2 | |
| 49 | + | |
| 50 | +class CNDownSlideSingleCourseCell: UITableViewCell { | |
| 51 | + | |
| 52 | + let bgBackView = UIView() | |
| 53 | + let bgImageView = UIImageView() | |
| 54 | + | |
| 55 | + //slideModel | |
| 56 | + var _slideModel : CNLiveDownSlideModel? | |
| 57 | + var slideModel : CNLiveDownSlideModel? { | |
| 58 | + get{ | |
| 59 | + _slideModel | |
| 60 | + } | |
| 61 | + set{ | |
| 62 | + _slideModel = newValue! | |
| 63 | + self.setupNewUI(model: _slideModel!) | |
| 64 | + } | |
| 65 | + } | |
| 66 | + | |
| 67 | + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | |
| 68 | + super.init(style: style, reuseIdentifier: reuseIdentifier) | |
| 69 | + self.selectionStyle = .none | |
| 70 | + setupUI() | |
| 71 | + } | |
| 72 | + | |
| 73 | + required init?(coder aDecoder: NSCoder) { | |
| 74 | + fatalError("init(coder:) has not been implemented") | |
| 75 | + } | |
| 76 | + | |
| 77 | + private func setupUI() { | |
| 78 | + contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) | |
| 79 | + } | |
| 80 | + | |
| 81 | + func setupNewUI(model:CNLiveDownSlideModel){ | |
| 82 | + if model.type == SlideModelTypeAllCourse12 { | |
| 83 | + //全部课程列表 | |
| 84 | + contentView.addSubview(bgBackView) | |
| 85 | + | |
| 86 | + bgBackView.frame = CGRect(x: DownSlideRecommendLeftGap, y: 0,width:DownSlideSingleCourseW , height:model.cellH-DownSlideRecommendLeftGap) | |
| 87 | + bgBackView.layer.shadowColor = HexColor("#000000")?.cgColor | |
| 88 | + bgBackView.layer.shadowRadius = 12 | |
| 89 | + bgBackView.layer.shadowOpacity = 1 | |
| 90 | + bgBackView.layer.shadowOffset = CGSize(width: 0, height: 0) | |
| 91 | + bgBackView.layer.cornerRadius = 12 | |
| 92 | + bgBackView.clipsToBounds = true | |
| 93 | + bgBackView.backgroundColor = HexColor("#FFFFFF") | |
| 94 | + | |
| 95 | + let titleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: DownSlideRecommendLeftGap, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) | |
| 96 | + titleLbl.text = model.blockName ?? "全部课程" | |
| 97 | + titleLbl.font = BoldFont_21 | |
| 98 | + titleLbl.textColor = HexColor("#333333") | |
| 99 | + bgBackView.addSubview(titleLbl) | |
| 100 | + | |
| 101 | + //总块数 | |
| 102 | + let contentsNum = model.contents.count | |
| 103 | + //model行数 | |
| 104 | + let row = model.rowNum | |
| 105 | + //总显示块数 | |
| 106 | + var totalNum = (contentsNum >= row) ? row : contentsNum | |
| 107 | + if row == 0{//row为0 , contents全部显示 | |
| 108 | + totalNum = contentsNum | |
| 109 | + } | |
| 110 | + for i in 0..<totalNum{//i是第几行 | |
| 111 | + let contentMdl = model.contents[i] | |
| 112 | + | |
| 113 | + //小icon | |
| 114 | + let imageView = UIImageView(frame: CGRectMake(DownSlideRecommendLeftGap, titleLbl.bottom+DownSlideRecommendLeftGap+CGFloat(i)*(DownSlideAllCourseRowTopYGap+DownSlideAllCourseRowImageWH+DownSlideAllCourseRowBottomYGap), CGFloat(DownSlideAllCourseRowImageWH), CGFloat(DownSlideAllCourseRowImageWH))) | |
| 115 | + imageView.kf.setImage(with: URL(string:contentMdl.poster!)) | |
| 116 | + bgBackView.addSubview(imageView) | |
| 117 | + | |
| 118 | + let titleLbl = UILabel(frame: CGRect(x: imageView.right+DownSlideRecommendLeftGap, y: imageView.top, width: DownSlideSingleCourseW-90-imageView.right, height: 21)) | |
| 119 | + titleLbl.text = contentMdl.title ?? "婴儿课程" | |
| 120 | + titleLbl.font = Font_15 | |
| 121 | + titleLbl.textColor = HexColor("#333333") | |
| 122 | + bgBackView.addSubview(titleLbl) | |
| 123 | + | |
| 124 | + let subTitleLbl = UILabel(frame: CGRect(x: titleLbl.left, y:titleLbl.bottom+3 , width: titleLbl.width, height: 17)) | |
| 125 | + subTitleLbl.text = contentMdl.subTitle ?? "适应3-6岁" | |
| 126 | + subTitleLbl.font = Font_12 | |
| 127 | + subTitleLbl.textColor = HexColor("#999999") | |
| 128 | + bgBackView.addSubview(subTitleLbl) | |
| 129 | + | |
| 130 | + let enterBtn = UIButton(type: .custom) | |
| 131 | + enterBtn.frame = CGRect(x: bgBackView.right-25-65, y: 0, width: 65, height: 30) | |
| 132 | + enterBtn.centerY = imageView.centerY | |
| 133 | + enterBtn.setBackgroundImage(UIImage(named: "homepage_down_enter"), for: .normal) | |
| 134 | + enterBtn.setTitle("进入", for: .normal) | |
| 135 | + enterBtn.titleLabel?.font = BoldFont_13 | |
| 136 | + enterBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal) | |
| 137 | + enterBtn.addTarget(self, action: #selector(enterBtnAction(_:)), for: .touchUpInside) | |
| 138 | + enterBtn.tag = i | |
| 139 | + bgBackView.addSubview(enterBtn) | |
| 140 | + } | |
| 141 | + }else if model.type == SlideModelTypeOneCourse75 { | |
| 142 | + //单图课程 | |
| 143 | + contentView.addSubview(bgBackView) | |
| 144 | + bgBackView.addSubview(bgImageView) | |
| 145 | + | |
| 146 | + bgBackView.frame = CGRect(x: DownSlideRecommendLeftGap, y: 0,width:DownSlideSingleCourseW , height:DownSlideSingleCourseMoreH+DownSlideSingleCourseImgH) | |
| 147 | + bgBackView.layer.shadowColor = UIColor.black.cgColor | |
| 148 | + bgBackView.layer.shadowOpacity = 0.4 | |
| 149 | + bgBackView.layer.shadowOffset = CGSize(width: 0, height: 1) | |
| 150 | + | |
| 151 | + bgImageView.frame = CGRect(x: 0, y: 0,width:DownSlideSingleCourseW , height:DownSlideSingleCourseImgH) | |
| 152 | + bgImageView.contentMode = .scaleAspectFill | |
| 153 | + bgImageView.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius | |
| 154 | + bgImageView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] | |
| 155 | + bgImageView.layer.masksToBounds = true | |
| 156 | + bgImageView.kf.setImage(with: URL(string: model.contents[0].poster ?? "")) | |
| 157 | + | |
| 158 | + let titleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: DownSlideRecommendLeftGap, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) | |
| 159 | + titleLbl.text = model.contents[0].title ?? "婴儿课程" | |
| 160 | + titleLbl.font = BoldFont_21 | |
| 161 | + titleLbl.textColor = HexColor("#FFFFFF") | |
| 162 | + bgImageView.addSubview(titleLbl) | |
| 163 | + | |
| 164 | + let subTitleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y:titleLbl.bottom , width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) | |
| 165 | + subTitleLbl.text = model.contents[0].subTitle ?? "适应3-6岁" | |
| 166 | + subTitleLbl.font = Font_12 | |
| 167 | + subTitleLbl.textColor = HexColor("#FFFFFF") | |
| 168 | + bgImageView.addSubview(subTitleLbl) | |
| 169 | + | |
| 170 | + //单节底部视图 | |
| 171 | + let singleCourseBottomView = UIView(frame: CGRect(x: 0, y: DownSlideSingleCourseImgH, width: DownSlideSingleCourseW, height: DownSlideSingleCourseMoreH)) | |
| 172 | + singleCourseBottomView.layer.cornerRadius = 12 | |
| 173 | + singleCourseBottomView.layer.maskedCorners = [.layerMinXMaxYCorner, .layerMaxXMaxYCorner] | |
| 174 | + singleCourseBottomView.backgroundColor = .white | |
| 175 | + singleCourseBottomView.isUserInteractionEnabled = true | |
| 176 | + bgBackView.addSubview(singleCourseBottomView) | |
| 177 | + | |
| 178 | + let moreLabel = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: 15, width: DownSlideSingleCourseW - 50 - DownSlideRecommendLeftGap , height: 30)) | |
| 179 | + moreLabel.text = model.blockName ?? "更多" | |
| 180 | + moreLabel.font = Font_15 | |
| 181 | + moreLabel.textColor = HexColor("#333333") | |
| 182 | + singleCourseBottomView.addSubview(moreLabel) | |
| 183 | + | |
| 184 | + let moreImgView = UIImageView(image: UIImage(named: "homepage_down_more")) | |
| 185 | + moreImgView.left = moreLabel.right | |
| 186 | + moreImgView.centerY = moreLabel.centerY | |
| 187 | + singleCourseBottomView.addSubview(moreImgView) | |
| 188 | + } | |
| 189 | + } | |
| 190 | + | |
| 191 | + //MARK: - 事件 | |
| 192 | + @objc func enterBtnAction(_ sender: UIButton){ | |
| 193 | + let tag = sender.tag | |
| 194 | + let contentMdl = self.slideModel?.contents[tag] | |
| 195 | + CNLiveDownSlideTool.pushWebVCWithContentsMdl(contentMdl: contentMdl!) | |
| 196 | + } | |
| 197 | +} | ... | ... |
metaCode/Classes/Main/HomePage/View/CNDownSlideView.swift
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | // metaCode |
| 4 | 4 | // |
| 5 | 5 | // Created by daojian on 2023/5/30. |
| 6 | -// | |
| 6 | +// 下滑后的上面页面 | |
| 7 | 7 | |
| 8 | 8 | import Foundation |
| 9 | 9 | import UIKit |
| ... | ... | @@ -16,10 +16,11 @@ class CNDownSlideView:UIView{ |
| 16 | 16 | //返回首页 |
| 17 | 17 | var backAction:backBlock? |
| 18 | 18 | |
| 19 | + | |
| 19 | 20 | //MARK: - 懒加载 |
| 20 | 21 | lazy var contentView:UIView = { |
| 21 | 22 | |
| 22 | - let contentView = UIView.init(frame: CGRect(x: 0, y: 0, width: self.width, height: self.height-KTabBarHeight)) | |
| 23 | + let contentView = UIView.init(frame: CGRect(x: 0, y: 0, width: self.width, height: self.height)) | |
| 23 | 24 | contentView.backgroundColor = UIColor.clear |
| 24 | 25 | |
| 25 | 26 | // let path:UIBezierPath = UIBezierPath.init(roundedRect: contentView.bounds, byRoundingCorners: [.bottomLeft, .bottomRight], cornerRadii: CGSize.init(width: 20, height: 20)) |
| ... | ... | @@ -47,42 +48,65 @@ class CNDownSlideView:UIView{ |
| 47 | 48 | return webView |
| 48 | 49 | }() |
| 49 | 50 | |
| 50 | - var _url:String? | |
| 51 | - var url:String? { | |
| 51 | + var upSlideVC:CNUpSlideViewController = { | |
| 52 | + let upSlideVC = CNUpSlideViewController.init() | |
| 53 | + upSlideVC.view.width = KSreenWidth | |
| 54 | + upSlideVC.view.height = KSreenHeight-DownSlideBottomViewHeight | |
| 55 | + return upSlideVC | |
| 56 | + }() | |
| 57 | + | |
| 58 | + var shopConsoleVC:CNLiveShopConsoleController = { | |
| 59 | + let shopConsoleVC = CNLiveShopConsoleController.init() | |
| 60 | + shopConsoleVC.view.width = KSreenWidth | |
| 61 | + shopConsoleVC.view.height = KSreenHeight-DownSlideBottomViewHeight | |
| 62 | + return shopConsoleVC | |
| 63 | + }() | |
| 64 | + | |
| 65 | + var type:Int? | |
| 66 | + | |
| 67 | + var _downPath:String? | |
| 68 | + var downPath:String? { | |
| 52 | 69 | get{ |
| 53 | - return _url | |
| 70 | + return _downPath | |
| 54 | 71 | } |
| 55 | 72 | set{ |
| 56 | - _url = newValue! | |
| 57 | - if (_url != ""){ | |
| 58 | - let webUrl: URL! = URL.init(string: _url!) | |
| 59 | - webView.load(URLRequest.init(url:webUrl)) | |
| 73 | + _downPath = newValue! | |
| 74 | + | |
| 75 | + if(type == UpDownTypeH5){ | |
| 76 | + self.contentView.addSubview(self.webView) | |
| 77 | + if (_downPath != ""){ | |
| 78 | + let webUrl: URL! = URL.init(string: _downPath!) | |
| 79 | + webView.load(URLRequest.init(url:webUrl)) | |
| 80 | + } | |
| 81 | + }else if(type == UpDownTypePage){ | |
| 82 | + self.addSubview(self.upSlideVC.view) | |
| 83 | + self.upSlideVC.downPath = _downPath | |
| 84 | + | |
| 85 | + }else if(type == UpDownTypeShopDetail){ | |
| 86 | + | |
| 87 | + }else if(type == UpDownTypeShopControlConsole){ | |
| 88 | + self.addSubview(self.shopConsoleVC.view) | |
| 60 | 89 | } |
| 61 | 90 | } |
| 62 | 91 | } |
| 63 | 92 | |
| 64 | - lazy var topView:UIView = { | |
| 65 | - | |
| 66 | - let tempTopView = UIView(frame: CGRect(x:0, y:20, width: self.width - 50, height: 70)) | |
| 67 | - | |
| 68 | - return tempTopView | |
| 69 | - }() | |
| 70 | - | |
| 71 | 93 | lazy var bottomView:UIView = { |
| 72 | 94 | |
| 73 | - let bottomView = UIView(frame: CGRect(x:0, y:self.height - KTabBarHeight, width: self.width, height: KTabBarHeight)) | |
| 74 | - bottomView.backgroundColor = .white | |
| 95 | + let bottomView = UIView(frame: CGRect(x:0, y:self.height - DownSlideBottomViewHeight, width: self.width, height: DownSlideBottomViewHeight)) | |
| 96 | + bottomView.backgroundColor = HexColor("#FFFFFF") | |
| 75 | 97 | bottomView.isHidden = true |
| 76 | 98 | |
| 77 | - let path:UIBezierPath = UIBezierPath.init(roundedRect: bottomView.bounds, byRoundingCorners: [.topLeft, .topRight], cornerRadii: CGSize.init(width: 20, height: 20)) | |
| 78 | - | |
| 99 | + let path:UIBezierPath = UIBezierPath.init(roundedRect: bottomView.bounds, byRoundingCorners: [.topLeft, .topRight], cornerRadii: CGSize.init(width: 50, height: 50)) | |
| 79 | 100 | let maskLayer:CAShapeLayer = CAShapeLayer() |
| 80 | 101 | maskLayer.frame = bottomView.bounds |
| 81 | 102 | maskLayer.path = path.cgPath |
| 82 | 103 | bottomView.layer.mask = maskLayer |
| 104 | + bottomView.clipsToBounds = true | |
| 105 | +// bottomView.layer.cornerRadius = 50 | |
| 106 | +// bottomView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] | |
| 83 | 107 | |
| 84 | 108 | let backBtn: UIButton = UIButton(type: .custom) |
| 85 | - backBtn.frame = CGRectMake(0, 0, 100, 30) | |
| 109 | + backBtn.frame = CGRectMake(0, 0, 100, DownSlideBottomViewHeight) | |
| 86 | 110 | backBtn.centerX = bottomView.width/2 |
| 87 | 111 | backBtn.centerY = bottomView.height/2 |
| 88 | 112 | backBtn.setImage(UIImage(named: "homePage_backhome_icon"), for: .normal) |
| ... | ... | @@ -98,9 +122,15 @@ class CNDownSlideView:UIView{ |
| 98 | 122 | |
| 99 | 123 | override init(frame: CGRect) { |
| 100 | 124 | super.init(frame: frame) |
| 125 | + | |
| 126 | + let tap = UITapGestureRecognizer.init(target: self, action: #selector(slideViewTap)) | |
| 127 | + tap.cancelsTouchesInView = false | |
| 128 | + self.addGestureRecognizer(tap) | |
| 101 | 129 | self.initUI() |
| 102 | 130 | } |
| 103 | - | |
| 131 | + @objc func slideViewTap() { | |
| 132 | + print("slideViewTap") | |
| 133 | + } | |
| 104 | 134 | required init?(coder: NSCoder) { |
| 105 | 135 | fatalError("init(coder:) has not been implemented") |
| 106 | 136 | } |
| ... | ... | @@ -108,11 +138,10 @@ class CNDownSlideView:UIView{ |
| 108 | 138 | |
| 109 | 139 | ///初始化UI |
| 110 | 140 | func initUI(){ |
| 141 | + self.isUserInteractionEnabled = true | |
| 111 | 142 | self.addSubview(self.contentView) |
| 112 | - self.contentView.addSubview(self.webView) | |
| 113 | -// self.addSubview(self.topView) | |
| 143 | + | |
| 114 | 144 | self.addSubview(self.bottomView) |
| 115 | - | |
| 116 | 145 | } |
| 117 | 146 | |
| 118 | 147 | @objc func backBtnAction(){ | ... | ... |
metaCode/Classes/Main/HomePage/View/CNLiveDownSlideRecommendCell.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveDownSlideRecommendCell.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/20. | |
| 6 | +// type:4 推荐课程 推荐活动 | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | + | |
| 10 | +///推荐课程左间距 | |
| 11 | +let DownSlideRecommendLeftGap: CGFloat = 15 | |
| 12 | +///推荐课程宽高 | |
| 13 | +let DownSlideRecommendWH: CGFloat = (KSreenWidth-DownSlideRecommendLeftGap*3)*0.5 | |
| 14 | + | |
| 15 | + | |
| 16 | +class CNLiveDownSlideRecommendCell: UITableViewCell { | |
| 17 | + | |
| 18 | + //slideModel | |
| 19 | + var _slideModel : CNLiveDownSlideModel? | |
| 20 | + var slideModel : CNLiveDownSlideModel? { | |
| 21 | + get{ | |
| 22 | + _slideModel | |
| 23 | + } | |
| 24 | + set{ | |
| 25 | + _slideModel = newValue! | |
| 26 | + setupNewUI(model: _slideModel!) | |
| 27 | + } | |
| 28 | + } | |
| 29 | + | |
| 30 | + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | |
| 31 | + super.init(style: style, reuseIdentifier: reuseIdentifier) | |
| 32 | + self.selectionStyle = .none | |
| 33 | + contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) | |
| 34 | + } | |
| 35 | + | |
| 36 | + required init?(coder: NSCoder) { | |
| 37 | + fatalError("init(coder:) has not been implemented") | |
| 38 | + } | |
| 39 | + | |
| 40 | + | |
| 41 | + func setupNewUI(model:CNLiveDownSlideModel){ | |
| 42 | + //总块数 | |
| 43 | + let contentsNum = model.contents.count | |
| 44 | + //model行数 | |
| 45 | + let row = model.rowNum | |
| 46 | + //总显示块数/循环数 | |
| 47 | + var totalNum = (contentsNum >= row*2) ? row*2 : contentsNum | |
| 48 | + if row == 0{//row为0 , contents全部显示 | |
| 49 | + totalNum = contentsNum | |
| 50 | + } | |
| 51 | + //lieIndex 当前是contents的第0列还是第1列 | |
| 52 | + var lieIndex = 0 | |
| 53 | + //hangIndex 当前是第几行,1...n | |
| 54 | + var hangIndex = 1 | |
| 55 | + for i in 0..<totalNum{//i是第几行 | |
| 56 | + if lieIndex == 0{ | |
| 57 | + //显示左边的块 | |
| 58 | + let contentMdl = model.contents[(hangIndex-1)*2+(lieIndex)] | |
| 59 | + let imageView = UIImageView(frame: CGRectMake(DownSlideRecommendLeftGap, CGFloat(hangIndex-1)*DownSlideRecommendWH+DownSlideRecommendLeftGap*CGFloat(hangIndex-1), CGFloat(DownSlideRecommendWH), CGFloat(DownSlideRecommendWH))) | |
| 60 | + imageView.kf.setImage(with: URL(string:contentMdl.poster!)) | |
| 61 | + imageView.tag = i | |
| 62 | + imageView.isUserInteractionEnabled = true | |
| 63 | + imageView.addGestureRecognizer(UITapGestureRecognizer.init(target: self, action: #selector(pushWebAction))) | |
| 64 | + contentView.addSubview(imageView) | |
| 65 | + lieIndex = 1 | |
| 66 | + }else{ | |
| 67 | + //lieIndex==1显示右边的块 | |
| 68 | + let contentMdl = model.contents[(hangIndex-1)*2+(lieIndex)] | |
| 69 | + let imageView = UIImageView(frame: CGRectMake(CGFloat(DownSlideRecommendLeftGap*2)+CGFloat(DownSlideRecommendWH), CGFloat(hangIndex-1)*DownSlideRecommendWH+DownSlideRecommendLeftGap*CGFloat(hangIndex-1), CGFloat(DownSlideRecommendWH), CGFloat(DownSlideRecommendWH))) | |
| 70 | + imageView.kf.setImage(with: URL(string:contentMdl.poster!)) | |
| 71 | + imageView.tag = i | |
| 72 | + imageView.isUserInteractionEnabled = true | |
| 73 | + imageView.addGestureRecognizer(UITapGestureRecognizer.init(target: self, action: #selector(pushWebAction))) | |
| 74 | + contentView.addSubview(imageView) | |
| 75 | + lieIndex = 0 | |
| 76 | + hangIndex += 1 | |
| 77 | + } | |
| 78 | + } | |
| 79 | + } | |
| 80 | + | |
| 81 | + @objc func pushWebAction(ges: UITapGestureRecognizer){ | |
| 82 | + let imageView = ges.view as! UIImageView | |
| 83 | + let i = imageView.tag | |
| 84 | + let contentMdl = (self.slideModel?.contents[i])! | |
| 85 | + CNLiveDownSlideTool.pushWebVCWithContentsMdl(contentMdl: contentMdl) | |
| 86 | + } | |
| 87 | + | |
| 88 | +} | ... | ... |
metaCode/Classes/Main/HomePage/View/CNLiveDownSlideTodayRecommendCell.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveDownSlideTodayRecommendCell.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/20. | |
| 6 | +// type:74 今日推荐 | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | + | |
| 10 | +///今日推荐高度 | |
| 11 | +let DownSlideTodayRecommendH: CGFloat = 105 | |
| 12 | +///今日推荐宽度 | |
| 13 | +let DownSlideTodayRecommendW: CGFloat = KSreenWidth-DownSlideRecommendLeftGap*2 | |
| 14 | + | |
| 15 | +class CNLiveDownSlideTodayRecommendCell: UITableViewCell { | |
| 16 | + //slideModel | |
| 17 | + var _slideModel : CNLiveDownSlideModel? | |
| 18 | + var slideModel : CNLiveDownSlideModel? { | |
| 19 | + get{ | |
| 20 | + _slideModel | |
| 21 | + } | |
| 22 | + set{ | |
| 23 | + _slideModel = newValue! | |
| 24 | + self.setupNewUI(model: _slideModel!) | |
| 25 | + } | |
| 26 | + } | |
| 27 | + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | |
| 28 | + super.init(style: style, reuseIdentifier: reuseIdentifier) | |
| 29 | + self.selectionStyle = .none | |
| 30 | + contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) | |
| 31 | + } | |
| 32 | + | |
| 33 | + required init?(coder: NSCoder) { | |
| 34 | + fatalError("init(coder:) has not been implemented") | |
| 35 | + } | |
| 36 | + | |
| 37 | + func setupNewUI(model:CNLiveDownSlideModel){ | |
| 38 | + //总块数 | |
| 39 | + let contentsNum = model.contents.count | |
| 40 | + //model行数 | |
| 41 | + let row = model.rowNum | |
| 42 | + //总显示块数 | |
| 43 | + var totalNum = (contentsNum >= row) ? row : contentsNum | |
| 44 | + if row == 0{//row为0 , contents全部显示 | |
| 45 | + totalNum = contentsNum | |
| 46 | + } | |
| 47 | + for i in 0..<totalNum{//i是第几行 | |
| 48 | + let contentMdl = model.contents[i] | |
| 49 | + let imageView = UIImageView(frame: CGRectMake(DownSlideRecommendLeftGap, CGFloat(i)*(DownSlideTodayRecommendH+DownSlideRecommendLeftGap), CGFloat(DownSlideTodayRecommendW), CGFloat(DownSlideTodayRecommendH))) | |
| 50 | + imageView.kf.setImage(with: URL(string:contentMdl.poster!)) | |
| 51 | + imageView.tag = i | |
| 52 | + imageView.layer.cornerRadius = 12 | |
| 53 | + imageView.clipsToBounds = true | |
| 54 | + imageView.isUserInteractionEnabled = true | |
| 55 | + imageView.addGestureRecognizer(UITapGestureRecognizer.init(target: self, action: #selector(pushWebAction))) | |
| 56 | + contentView.addSubview(imageView) | |
| 57 | + } | |
| 58 | + } | |
| 59 | + | |
| 60 | + @objc func pushWebAction(ges: UITapGestureRecognizer){ | |
| 61 | + let imageView = ges.view as! UIImageView | |
| 62 | + let i = imageView.tag | |
| 63 | + let contentMdl = self.slideModel?.contents[i] | |
| 64 | + CNLiveDownSlideTool.pushWebVCWithContentsMdl(contentMdl: contentMdl!) | |
| 65 | + } | |
| 66 | +} | ... | ... |
metaCode/Classes/Main/HomePage/View/CNLiveShopConsoleCell.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveShopConsoleCell.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/30. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | + | |
| 10 | +class CNLiveShopConsoleCell: UICollectionViewCell { | |
| 11 | + | |
| 12 | + var bgView = UIView() | |
| 13 | + var iconImageView = UIImageView() | |
| 14 | + var titleLbl = UILabel() | |
| 15 | + var subTitleLbl = UILabel() | |
| 16 | + | |
| 17 | + //slideModel | |
| 18 | + var _shopListContentModel : CNLiveShopConsoleListContentModel? | |
| 19 | + var shopListContentModel : CNLiveShopConsoleListContentModel? { | |
| 20 | + get{ | |
| 21 | + _shopListContentModel | |
| 22 | + } | |
| 23 | + set{ | |
| 24 | + _shopListContentModel = newValue! | |
| 25 | + self.iconImageView.image = UIImage(named: _shopListContentModel!.simg!) | |
| 26 | + self.titleLbl.text = _shopListContentModel?.title | |
| 27 | + self.subTitleLbl.text = _shopListContentModel?.subtitle | |
| 28 | + } | |
| 29 | + } | |
| 30 | + | |
| 31 | + override init(frame: CGRect) { | |
| 32 | + super.init(frame: frame) | |
| 33 | + self.backgroundColor = .clear | |
| 34 | + self.setUI() | |
| 35 | + } | |
| 36 | + | |
| 37 | + required init?(coder: NSCoder) { | |
| 38 | + fatalError("init(coder:) has not been implemented") | |
| 39 | + } | |
| 40 | + | |
| 41 | + func setUI(){ | |
| 42 | + self.bgView = UIView(frame: contentView.bounds) | |
| 43 | + self.bgView.backgroundColor = .white | |
| 44 | + self.bgView.layer.cornerRadius = 7 | |
| 45 | + contentView.addSubview(self.bgView) | |
| 46 | + | |
| 47 | + self.iconImageView = UIImageView(frame: CGRectMake(15, 0, 35, 35)) | |
| 48 | + self.iconImageView.centerY = contentView.centerY | |
| 49 | + self.iconImageView.clipsToBounds = true | |
| 50 | + self.iconImageView.contentMode = .scaleAspectFit | |
| 51 | + self.bgView.addSubview(self.iconImageView) | |
| 52 | + | |
| 53 | + self.titleLbl = UILabel(frame: CGRect(x: self.iconImageView.right+10, y: (contentView.height-20-15)*0.5, width: contentView.width-self.iconImageView.right-10-20, height: 20)) | |
| 54 | + self.titleLbl.text = "创建店铺分类" | |
| 55 | + self.titleLbl.font = Font_14 | |
| 56 | + self.titleLbl.textColor = HexColor("#4A4A4A") | |
| 57 | + self.bgView.addSubview(self.titleLbl) | |
| 58 | + | |
| 59 | + self.subTitleLbl = UILabel(frame: CGRect(x: self.titleLbl.left, y: self.titleLbl.bottom, width: self.titleLbl.width, height: 15)) | |
| 60 | + self.subTitleLbl.text = "创建店铺分类" | |
| 61 | + self.subTitleLbl.font = Font_11 | |
| 62 | + self.subTitleLbl.textColor = HexColor("#999999") | |
| 63 | + self.bgView.addSubview(self.subTitleLbl) | |
| 64 | + } | |
| 65 | +} | |
| 66 | + | |
| 67 | +class CNLiveShopConsoleHeaderView:UICollectionReusableView{ | |
| 68 | + | |
| 69 | + var _title:String? | |
| 70 | + var title:String? { | |
| 71 | + get{ | |
| 72 | + return _title | |
| 73 | + } | |
| 74 | + set{ | |
| 75 | + _title = newValue! | |
| 76 | + self.titleLbl.text = _title | |
| 77 | + } | |
| 78 | + } | |
| 79 | + | |
| 80 | + var titleLbl:UILabel = { | |
| 81 | + let titleLbl = UILabel(frame: CGRect(x: 15, y: 0, width: 100, height:23 )) | |
| 82 | + titleLbl.text = "商品管理" | |
| 83 | + titleLbl.font = Font_16 | |
| 84 | + titleLbl.textColor = HexColor("#B4B4B4") | |
| 85 | + return titleLbl | |
| 86 | + }() | |
| 87 | + | |
| 88 | + override init(frame: CGRect) { | |
| 89 | + super.init(frame: frame) | |
| 90 | + self.setUI() | |
| 91 | + } | |
| 92 | + | |
| 93 | + required init?(coder: NSCoder) { | |
| 94 | + fatalError("init(coder:) has not been implemented") | |
| 95 | + } | |
| 96 | + | |
| 97 | + func setUI(){ | |
| 98 | + self.addSubview(self.titleLbl) | |
| 99 | + | |
| 100 | + } | |
| 101 | +} | ... | ... |
metaCode/Classes/Main/HomePage/View/CNLliveShopDetailBannerCell.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLliveShopDetailBannerCell.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/11/1. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | +import FSPagerView | |
| 10 | + | |
| 11 | +class CNLliveShopDetailBannerCell:UICollectionViewCell,FSPagerViewDataSource,FSPagerViewDelegate{ | |
| 12 | + | |
| 13 | + let kCNLliveShopDetailBannerCellID = "kCNLliveShopDetailBannerCellID" | |
| 14 | + | |
| 15 | + lazy var viewPager: FSPagerView = { | |
| 16 | + let viewPager = FSPagerView() | |
| 17 | + viewPager.frame = CGRect(x: 10, y: 10, width: self.contentView.width-20, height: self.contentView.height-20) | |
| 18 | + viewPager.dataSource = self | |
| 19 | + viewPager.delegate = self | |
| 20 | + viewPager.register(FSPagerViewCell.self, forCellWithReuseIdentifier: kCNLliveShopDetailBannerCellID) | |
| 21 | + //设置自动翻页事件间隔,默认值为0 (不自动翻页) | |
| 22 | + viewPager.automaticSlidingInterval = 1.0 | |
| 23 | + //设置页面之间的间隔距离 | |
| 24 | + viewPager.interitemSpacing = 8.0 | |
| 25 | + //设置可以无限翻页,默认值为false,false时从尾部向前滚动到头部再继续循环滚动,true时可以无限滚动 | |
| 26 | + viewPager.isInfinite = true | |
| 27 | + //设置转场的模式 | |
| 28 | + viewPager.transformer = FSPagerViewTransformer(type: FSPagerViewTransformerType.depth) | |
| 29 | + return viewPager | |
| 30 | + }() | |
| 31 | + | |
| 32 | + //shopDetailModel | |
| 33 | + var _shopDetailModel : CNLiveShopDetailModel? | |
| 34 | + var shopDetailModel : CNLiveShopDetailModel? { | |
| 35 | + get{ | |
| 36 | + _shopDetailModel | |
| 37 | + } | |
| 38 | + set{ | |
| 39 | + _shopDetailModel = newValue! | |
| 40 | + | |
| 41 | + } | |
| 42 | + } | |
| 43 | + | |
| 44 | + override init(frame: CGRect) { | |
| 45 | + super.init(frame: frame) | |
| 46 | + self.backgroundColor = .clear | |
| 47 | + self.setUI() | |
| 48 | + } | |
| 49 | + | |
| 50 | + required init?(coder: NSCoder) { | |
| 51 | + fatalError("init(coder:) has not been implemented") | |
| 52 | + } | |
| 53 | + | |
| 54 | + func setUI(){ | |
| 55 | + self.backgroundColor = .red | |
| 56 | + self.contentView.addSubview(self.viewPager) | |
| 57 | + } | |
| 58 | + | |
| 59 | + // MARK: - FSPagerViewDataSource | |
| 60 | + func numberOfItems(in pagerView: FSPagerView) -> Int { | |
| 61 | + return (self.shopDetailModel?.banner.count)! | |
| 62 | + } | |
| 63 | + func pagerView(_ pagerView: FSPagerView, cellForItemAt index: Int) -> FSPagerViewCell { | |
| 64 | + let cell = pagerView.dequeueReusableCell(withReuseIdentifier: kCNLliveShopDetailBannerCellID, at: index) | |
| 65 | + let imgUrl = self.shopDetailModel?.banner[index].simg! | |
| 66 | + cell.imageView?.kf.setImage(with: URL(string: imgUrl!)) | |
| 67 | + return cell | |
| 68 | + } | |
| 69 | +} | ... | ... |
metaCode/Classes/Main/HomePage/View/CNUpSlideDetailScrollView.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNUpSlideDetailScrollView.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/16. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import UIKit | |
| 9 | + | |
| 10 | +typealias enterBlock = (_ contentsMdl:CNLiveDownSlideContentsModel)->Void | |
| 11 | + | |
| 12 | +class CNUpSlideDetailScrollView: UIScrollView { | |
| 13 | + //返回首页 | |
| 14 | + var callBack : enterBlock? | |
| 15 | + | |
| 16 | + let bgBackView = UIView() | |
| 17 | + let imageView = UIImageView() | |
| 18 | + | |
| 19 | + //slideModel | |
| 20 | + var _slideModel : CNLiveDownSlideModel? | |
| 21 | + var slideModel : CNLiveDownSlideModel? { | |
| 22 | + get{ | |
| 23 | + _slideModel | |
| 24 | + } | |
| 25 | + set{ | |
| 26 | + _slideModel = newValue! | |
| 27 | + self.setupNewUI(model: _slideModel!) | |
| 28 | + } | |
| 29 | + } | |
| 30 | + | |
| 31 | + override init(frame: CGRect) { | |
| 32 | + super.init(frame: frame) | |
| 33 | + | |
| 34 | + setupUI() | |
| 35 | + } | |
| 36 | + | |
| 37 | + required init?(coder aDecoder: NSCoder) { | |
| 38 | + fatalError("init(coder:) has not been implemented") | |
| 39 | + } | |
| 40 | + | |
| 41 | + private func setupUI() { | |
| 42 | + bgBackView.frame = CGRect(x: DownSlideRecommendLeftGap, y: 0,width:KSreenWidth , height:KSreenHeight) | |
| 43 | + imageView.frame = CGRect(x: 0,y: 0,width:KSreenWidth , height: KSreenWidth*DownSlideSingleCourseImgH/DownSlideSingleCourseW) | |
| 44 | + imageView.contentMode = .scaleAspectFill | |
| 45 | + | |
| 46 | + bgBackView.addSubview(imageView) | |
| 47 | + addSubview(bgBackView) | |
| 48 | + | |
| 49 | + contentSize = CGSize(width: KSreenWidth, height: bgBackView.height) | |
| 50 | + } | |
| 51 | + | |
| 52 | + func setupNewUI(model:CNLiveDownSlideModel){ | |
| 53 | + if model.type == SlideModelTypeAllCourse12 { | |
| 54 | + //全部课程列表 | |
| 55 | + let topTitleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: KStatusBarHeight+DownSlideRecommendLeftGap, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) | |
| 56 | + topTitleLbl.text = model.blockName ?? "全部课程" | |
| 57 | + topTitleLbl.font = BoldFont_21 | |
| 58 | + topTitleLbl.textColor = HexColor("#333333") | |
| 59 | + bgBackView.addSubview(topTitleLbl) | |
| 60 | + | |
| 61 | + //总块数 | |
| 62 | + let contentsNum = model.contents.count | |
| 63 | + //model行数 | |
| 64 | + let row = model.rowNum | |
| 65 | + //总显示块数 | |
| 66 | + var totalNum = (contentsNum >= row) ? row : contentsNum | |
| 67 | + if row == 0{//row为0 , contents全部显示 | |
| 68 | + totalNum = contentsNum | |
| 69 | + } | |
| 70 | + for i in 0..<totalNum{//i是第几行 | |
| 71 | + let contentMdl = model.contents[i] | |
| 72 | + | |
| 73 | + //小icon | |
| 74 | + let imageView = UIImageView(frame: CGRectMake(DownSlideRecommendLeftGap, topTitleLbl.bottom+DownSlideRecommendLeftGap+CGFloat(i)*(DownSlideAllCourseRowTopYGap+DownSlideAllCourseRowImageWH+DownSlideAllCourseRowBottomYGap), CGFloat(DownSlideAllCourseRowImageWH), CGFloat(DownSlideAllCourseRowImageWH))) | |
| 75 | + imageView.kf.setImage(with: URL(string:contentMdl.poster ?? "")) | |
| 76 | + bgBackView.addSubview(imageView) | |
| 77 | + | |
| 78 | + let titleLbl = UILabel(frame: CGRect(x: imageView.right+DownSlideRecommendLeftGap, y: imageView.top, width: DownSlideSingleCourseW-90-imageView.right, height: 21)) | |
| 79 | + titleLbl.text = contentMdl.title ?? "婴儿课程" | |
| 80 | + titleLbl.font = Font_15 | |
| 81 | + titleLbl.textColor = HexColor("#333333") | |
| 82 | + bgBackView.addSubview(titleLbl) | |
| 83 | + | |
| 84 | + let subTitleLbl = UILabel(frame: CGRect(x: titleLbl.left, y:titleLbl.bottom+3 , width: titleLbl.width, height: 17)) | |
| 85 | + subTitleLbl.text = contentMdl.subTitle ?? "适应3-6岁" | |
| 86 | + subTitleLbl.font = Font_12 | |
| 87 | + subTitleLbl.textColor = HexColor("#999999") | |
| 88 | + bgBackView.addSubview(subTitleLbl) | |
| 89 | + | |
| 90 | + let enterBtn = UIButton(type: .custom) | |
| 91 | + enterBtn.frame = CGRect(x: subTitleLbl.right+10, y: 0, width: 65, height: 30) | |
| 92 | + enterBtn.centerY = imageView.centerY | |
| 93 | + enterBtn.setBackgroundImage(UIImage(named: "homepage_down_enter"), for: .normal) | |
| 94 | + enterBtn.setTitle("进入", for: .normal) | |
| 95 | + enterBtn.titleLabel?.font = BoldFont_13 | |
| 96 | + enterBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal) | |
| 97 | + enterBtn.addTarget(self, action: #selector(enterBtnAction(_:)), for: .touchUpInside) | |
| 98 | + enterBtn.tag = i | |
| 99 | + bgBackView.addSubview(enterBtn) | |
| 100 | + } | |
| 101 | + }else if model.type == SlideModelTypeOneCourse75 { | |
| 102 | + //单图课程 | |
| 103 | + | |
| 104 | + let topTitleLbl = UILabel(frame: CGRect(x: 0, y: KStatusBarHeight+DownSlideRecommendLeftGap, width:bgBackView.width - 50 , height: 30)) | |
| 105 | + topTitleLbl.text = model.contents[0].title ?? "婴儿课程" | |
| 106 | + topTitleLbl.font = BoldFont_21 | |
| 107 | + topTitleLbl.textColor = HexColor("#FFFFFF") | |
| 108 | + imageView.addSubview(topTitleLbl) | |
| 109 | + | |
| 110 | + let topSubTitleLbl = UILabel(frame: CGRect(x: topTitleLbl.left, y:topTitleLbl.bottom , width: topTitleLbl.width, height: 30)) | |
| 111 | + topSubTitleLbl.text = model.contents[0].subTitle ?? "适应3-6岁" | |
| 112 | + topSubTitleLbl.font = Font_12 | |
| 113 | + topSubTitleLbl.textColor = HexColor("#FFFFFF") | |
| 114 | + imageView.addSubview(topSubTitleLbl) | |
| 115 | + | |
| 116 | + //总块数 | |
| 117 | + let contentsNum = model.contents.count | |
| 118 | + //model行数 | |
| 119 | + let row = model.rowNum | |
| 120 | + //总显示块数 | |
| 121 | + var totalNum = (contentsNum >= row) ? row : contentsNum | |
| 122 | + if row == 0{//row为0 , contents全部显示 | |
| 123 | + totalNum = contentsNum | |
| 124 | + } | |
| 125 | + for i in 0..<totalNum{//i是第几行 | |
| 126 | + let contentMdl = model.contents[i] | |
| 127 | + | |
| 128 | + //小icon | |
| 129 | + let imgView = UIImageView(frame: CGRectMake(0, imageView.height+DownSlideRecommendLeftGap+CGFloat(i)*(DownSlideAllCourseRowTopYGap+DownSlideAllCourseRowImageWH+DownSlideAllCourseRowBottomYGap), CGFloat(DownSlideAllCourseRowImageWH), CGFloat(DownSlideAllCourseRowImageWH))) | |
| 130 | + imgView.kf.setImage(with: URL(string:contentMdl.poster ?? "")) | |
| 131 | + bgBackView.addSubview(imgView) | |
| 132 | + | |
| 133 | + let titleLbl = UILabel(frame: CGRect(x: imgView.right+DownSlideRecommendLeftGap, y: imgView.top, width: DownSlideSingleCourseW-90-imgView.right, height: 21)) | |
| 134 | + titleLbl.text = contentMdl.title ?? "婴儿课程" | |
| 135 | + titleLbl.font = Font_15 | |
| 136 | + titleLbl.textColor = HexColor("#333333") | |
| 137 | + bgBackView.addSubview(titleLbl) | |
| 138 | + | |
| 139 | + let subTitleLbl = UILabel(frame: CGRect(x: titleLbl.left, y:titleLbl.bottom+3 , width: titleLbl.width, height: 17)) | |
| 140 | + subTitleLbl.text = contentMdl.subTitle ?? "适应3-6岁" | |
| 141 | + subTitleLbl.font = Font_12 | |
| 142 | + subTitleLbl.textColor = HexColor("#999999") | |
| 143 | + bgBackView.addSubview(subTitleLbl) | |
| 144 | + | |
| 145 | + let enterBtn = UIButton(type: .custom) | |
| 146 | + enterBtn.frame = CGRect(x: subTitleLbl.right+10, y: 0, width: 65, height: 30) | |
| 147 | + enterBtn.centerY = imgView.centerY-5 | |
| 148 | + enterBtn.setBackgroundImage(UIImage(named: "homepage_down_enter"), for: .normal) | |
| 149 | + enterBtn.setTitle("进入", for: .normal) | |
| 150 | + enterBtn.titleLabel?.font = BoldFont_13 | |
| 151 | + enterBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal) | |
| 152 | + enterBtn.addTarget(self, action: #selector(enterBtnAction(_:)), for: .touchUpInside) | |
| 153 | + enterBtn.tag = i | |
| 154 | + bgBackView.addSubview(enterBtn) | |
| 155 | + } | |
| 156 | + } | |
| 157 | + } | |
| 158 | + | |
| 159 | + //闭包:函数参数 | |
| 160 | +// func callBackBlock(_ block: @escaping enterBlock) { | |
| 161 | +// block(_:) | |
| 162 | +// } | |
| 163 | +// func useBlock(){ | |
| 164 | +// if callBack != nil { | |
| 165 | +// callBack!("闭包传值2") | |
| 166 | +// } | |
| 167 | +// } | |
| 168 | + //MARK: - 事件 | |
| 169 | + @objc func enterBtnAction(_ sender: UIButton){ | |
| 170 | + let tag = sender.tag | |
| 171 | + let contentMdl = (self.slideModel?.contents[tag])! | |
| 172 | + if callBack != nil { | |
| 173 | + let contentMdl1 = contentMdl | |
| 174 | + callBack!(contentMdl1) | |
| 175 | + } | |
| 176 | + } | |
| 177 | +} | ... | ... |
metaCode/Classes/Main/HomePage/View/CNUpSlideView.swift
| ... | ... | @@ -3,32 +3,60 @@ |
| 3 | 3 | // metaCode |
| 4 | 4 | // |
| 5 | 5 | // Created by daojian on 2023/5/31. |
| 6 | -// | |
| 6 | +// 上滑后的下面页面 | |
| 7 | 7 | |
| 8 | 8 | import Foundation |
| 9 | 9 | import WebKit |
| 10 | 10 | |
| 11 | +let UpDownTypeH5 = 1///h5 | |
| 12 | +let UpDownTypePage = 2///原生page页面 | |
| 13 | +let UpDownTypeShopDetail = 3///店铺详情 | |
| 14 | +let UpDownTypeShopControlConsole = 4///店铺控制台 | |
| 15 | + | |
| 11 | 16 | ///上滑显示的VIew |
| 12 | 17 | class CNUpSlideView:UIView{ |
| 13 | 18 | |
| 14 | 19 | lazy var webView: WKWebView = { |
| 15 | - let webView = WKWebView.init(frame: CGRectMake(10, 20, self.width - 20, self.height - 20)) | |
| 20 | + let webView = WKWebView.init(frame: CGRectMake(10, KNavigationHeight+KStatusBarHeight+10, self.width - 20, self.height-KNavigationHeight-KStatusBarHeight-10)) | |
| 16 | 21 | webView.scrollView.showsVerticalScrollIndicator = false |
| 17 | 22 | webView.scrollView.showsHorizontalScrollIndicator = false |
| 18 | 23 | webView.backgroundColor = .clear |
| 24 | + webView.layer.cornerRadius = 29 | |
| 25 | + webView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] | |
| 26 | + webView.clipsToBounds = true | |
| 19 | 27 | return webView |
| 20 | 28 | }() |
| 21 | 29 | |
| 22 | - var _url:String? | |
| 23 | - var url:String? { | |
| 30 | + lazy var upSlideVC: CNLiveDownShopDetailController = { | |
| 31 | + let upSlideVC = CNLiveDownShopDetailController.init() | |
| 32 | + upSlideVC.view.width = KSreenWidth | |
| 33 | + upSlideVC.view.height = KSreenHeight | |
| 34 | + upSlideVC.view.backgroundColor = .white | |
| 35 | + return upSlideVC | |
| 36 | + }() | |
| 37 | + | |
| 38 | + var type:Int? | |
| 39 | + | |
| 40 | + var _downPath:String? | |
| 41 | + var downPath:String? { | |
| 24 | 42 | get{ |
| 25 | - return _url | |
| 43 | + return _downPath | |
| 26 | 44 | } |
| 27 | 45 | set{ |
| 28 | - _url = newValue! | |
| 29 | - if (_url != ""){ | |
| 30 | - let webUrl: URL! = URL.init(string: _url!) | |
| 31 | - webView.load(URLRequest.init(url:webUrl)) | |
| 46 | + _downPath = newValue! | |
| 47 | + if(type == UpDownTypeH5){ | |
| 48 | + self.addSubview(self.webView) | |
| 49 | + if (_downPath != ""){ | |
| 50 | + let webUrl: URL! = URL.init(string: _downPath!) | |
| 51 | + webView.load(URLRequest.init(url:webUrl)) | |
| 52 | + } | |
| 53 | + } | |
| 54 | + else if(type == UpDownTypePage){ | |
| 55 | + | |
| 56 | + }else if(type == UpDownTypeShopDetail){ | |
| 57 | + self.addSubview(self.upSlideVC.view) | |
| 58 | + }else if(type == UpDownTypeShopControlConsole){ | |
| 59 | + | |
| 32 | 60 | } |
| 33 | 61 | } |
| 34 | 62 | } |
| ... | ... | @@ -45,17 +73,8 @@ class CNUpSlideView:UIView{ |
| 45 | 73 | |
| 46 | 74 | func initUI() |
| 47 | 75 | { |
| 48 | - self.backgroundColor = UIColor.white; | |
| 49 | - self.clipsToBounds = true; | |
| 50 | - self.layer.cornerRadius = 20; | |
| 51 | - self.addSubview(self.webView) | |
| 52 | - | |
| 53 | - | |
| 54 | -// let imageview : UIImageView = UIImageView.init(frame: CGRect(x: 20, y: 10, width: self.width - 40, height: self.height - 20)) | |
| 55 | -// imageview.image = UIImage(named: "homePage_payMoneyImage") | |
| 56 | -// | |
| 57 | -// self.addSubview(imageview) | |
| 58 | - | |
| 76 | + self.backgroundColor = UIColor.clear | |
| 77 | + self.layer.cornerRadius = 20 | |
| 59 | 78 | } |
| 60 | 79 | |
| 61 | 80 | } | ... | ... |
metaCode/Classes/Main/HomePage/ViewModel/CNLiveDownSlideViewModel.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveDownSlideViewModel.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/19. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | +import CNLiveRequestBastKit | |
| 10 | + | |
| 11 | +enum CNLiveDownSlideResponseType { | |
| 12 | + case success | |
| 13 | + case failed | |
| 14 | + case noNetwork | |
| 15 | + case unkonw | |
| 16 | +} | |
| 17 | +typealias downSlideResultBlock = (_ result: Any,_ status:CNLiveDownSlideResponseType) -> Void | |
| 18 | + | |
| 19 | +class CNLiveDownSlideViewModel:NSObject{ | |
| 20 | + | |
| 21 | + /// 获取下滑页原生页面数据 | |
| 22 | + /// - Parameters: | |
| 23 | + /// - userId: 用户ID | |
| 24 | + /// - pageId: 页面ID | |
| 25 | + static func requestGetPage(pageId:NSString, resultBlock: @escaping downSlideResultBlock) { | |
| 26 | + let param = NSMutableDictionary() | |
| 27 | + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "userId") | |
| 28 | + param.setValue(pageId, forKey: "pageId") | |
| 29 | + CNLiveNetworking.setAllowRequestDefaultArgument(true) | |
| 30 | + CNLiveNetworking.setupShowDataResult(false) | |
| 31 | + CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/getPage", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | |
| 32 | + hiddenLoading() | |
| 33 | + if (error == nil) { | |
| 34 | + let resp = result as! NSDictionary | |
| 35 | + let errorCode = "\(resp["errorCode"] ?? "0")" | |
| 36 | + if (errorCode == "0") { | |
| 37 | + let downSlideModelArr = resp["data"] as! NSArray | |
| 38 | + var modelArray:[BaseModel] = [] | |
| 39 | + for downSlideDic in downSlideModelArr { | |
| 40 | + let downSlideModel = newDictionaryToModel(downSlideDic as! [String : Any], CNLiveDownSlideModel.self) | |
| 41 | + modelArray.append(downSlideModel) | |
| 42 | + } | |
| 43 | + resultBlock(modelArray,.success) | |
| 44 | + } | |
| 45 | + else{ | |
| 46 | + resultBlock(NSNull(),.failed) | |
| 47 | + } | |
| 48 | + } | |
| 49 | + } | |
| 50 | + } | |
| 51 | + | |
| 52 | +} | ... | ... |
metaCode/Classes/Main/HomePage/ViewModel/CNLiveShopConsoleViewModel.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveShopConsoleViewModel.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/27. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | +import CNLiveRequestBastKit | |
| 10 | + | |
| 11 | +class CNLiveShopConsoleViewModel: NSObject { | |
| 12 | + /// 用户信息获取 | |
| 13 | + /// - Parameters: | |
| 14 | + /// - userId: 用户ID | |
| 15 | + static func requestUserInfo(resultBlock: @escaping downSlideResultBlock) { | |
| 16 | + let param = NSMutableDictionary() | |
| 17 | + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") | |
| 18 | + CNLiveNetworking.setAllowRequestDefaultArgument(true) | |
| 19 | + CNLiveNetworking.setupShowDataResult(false) | |
| 20 | + CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseShopUrl+"/api/v1/isSellerNew", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | |
| 21 | + hiddenLoading() | |
| 22 | + if (error == nil) { | |
| 23 | + let resp = result as! NSDictionary | |
| 24 | + let dataDic = resp["data"] as! NSDictionary | |
| 25 | + let shopUserInfoModel = newDictionaryToModel(dataDic as! [String : Any], CNLiveShopUserInfoModel.self) | |
| 26 | + resultBlock(shopUserInfoModel,.success) | |
| 27 | + }else{ | |
| 28 | + resultBlock(NSNull(),.failed) | |
| 29 | + } | |
| 30 | + } | |
| 31 | + } | |
| 32 | +} | ... | ... |
metaCode/Classes/Main/HomePage/ViewModel/CNLiveShopDetailViewModel.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveShopDetailViewModel.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/31. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | +import CNLiveRequestBastKit | |
| 10 | + | |
| 11 | +class CNLiveShopDetailViewModel:NSObject{ | |
| 12 | + /// 店铺详情信息获取 | |
| 13 | + /// - Parameters: | |
| 14 | + /// - userId: 用户ID | |
| 15 | + /// - storeId:餐厅店铺id 不是餐厅达人不需要传 | |
| 16 | + static func requestShopDetailInfo(storeId:String?,resultBlock: @escaping downSlideResultBlock) { | |
| 17 | + let param = NSMutableDictionary() | |
| 18 | + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") | |
| 19 | + param.setValue(storeId ?? "", forKey: "store_id") | |
| 20 | + | |
| 21 | + CNLiveNetworking.setAllowRequestDefaultArgument(true) | |
| 22 | + CNLiveNetworking.setupShowDataResult(false) | |
| 23 | + CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseShopUrl+"/api/v1/index", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | |
| 24 | + hiddenLoading() | |
| 25 | + if (error == nil) { | |
| 26 | + let resp = result as! NSDictionary | |
| 27 | + let dataDic = resp["data"] as! NSDictionary | |
| 28 | + let shopDetailModel = newDictionaryToModel(dataDic as! [String : Any], CNLiveShopDetailModel.self) | |
| 29 | + resultBlock(shopDetailModel,.success) | |
| 30 | + }else{ | |
| 31 | + resultBlock(NSNull(),.failed) | |
| 32 | + } | |
| 33 | + } | |
| 34 | + } | |
| 35 | +} | ... | ... |
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineBaseModel.swift
| ... | ... | @@ -148,13 +148,15 @@ final class StandListModel: BaseModel, TableCodable { |
| 148 | 148 | var descBackgroundImg: String = ""//首页文字背景图 |
| 149 | 149 | var cardImg: String = ""//卡片背景图 |
| 150 | 150 | var cardBackgroundImg: String = ""//首页卡片背景图 |
| 151 | - var upPath: String = ""//顶部h5 | |
| 152 | - var downPath: String = ""//底部h5 | |
| 151 | + var upPath: String = ""//顶部h5 或原生页面pageId | |
| 152 | + var upType: Int = 0//下滑类型1:h5 2:原生页面 3店铺详情 4 店铺控制台 | |
| 153 | + var downType: Int = 0//上滑类型1:h5 2:原生页面 3店铺详情 4 店铺控制台 | |
| 154 | + var downPath: String = ""//底部h5url 或原生页面pageId | |
| 153 | 155 | var auth: Bool = false//身份是否验证 |
| 154 | 156 | |
| 155 | 157 | var createTimeString: String = "" |
| 156 | 158 | var timeString: String = "" |
| 157 | - | |
| 159 | + | |
| 158 | 160 | override func mapping(mapper: HelpingMapper) { |
| 159 | 161 | mapper <<< |
| 160 | 162 | self.createTime <-- TransformOf(fromJSON: { [weak self] (raw) -> Int in | ... | ... |
metaCode/Classes/Main/Model/CNLiveDownSlideModel.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveDownSlideModel.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/19. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | + | |
| 10 | +// !!!: /contentApi/getPage 接口数据 | |
| 11 | +class CNLiveDownSlideModel: BaseModel { | |
| 12 | + ///大块标题id | |
| 13 | + var blockId: String? | |
| 14 | + ///大块标题 | |
| 15 | + var blockName: String? | |
| 16 | + ///类型 type=4一排两个 74今日推荐 12列表全部课程 75单课程大图/ | |
| 17 | + var type: String? | |
| 18 | + ///显示几行 | |
| 19 | + var rowNum: Int = 0 | |
| 20 | + ///具体内容 title subTitle poster thirdUrl或者shareUrl | |
| 21 | + var contents = [CNLiveDownSlideContentsModel]() | |
| 22 | + ///cell高度 | |
| 23 | + var cellH: CGFloat = 0 | |
| 24 | +} | |
| 25 | + | |
| 26 | +//下滑tableview背景颜色 | |
| 27 | +let kCNDownSlideContentsModelModel1: String = "1" | |
| 28 | +let kCNDownSlideContentsModelModel2: String = "2" | |
| 29 | +let kCNDownSlideContentsModelModel3: String = "3" | |
| 30 | +let kCNDownSlideContentsModelModel4: String = "4" | |
| 31 | +let kCNDownSlideContentsModelModelAlbum: String = "album" | |
| 32 | +let kCNDownSlideContentsModelModelAlbum_video: String = "album_video" | |
| 33 | +let kCNDownSlideContentsModelModelAlbum_ugc: String = "album_ugc" | |
| 34 | + | |
| 35 | +class CNLiveDownSlideContentsModel: BaseModel { | |
| 36 | + ///内容id | |
| 37 | + var contentId: String? | |
| 38 | + ///主标题 | |
| 39 | + var title: String? | |
| 40 | + ///副标题 | |
| 41 | + var subTitle: String? | |
| 42 | + ///头像/ | |
| 43 | + var poster: String? | |
| 44 | + ///videoId | |
| 45 | + var pid: String? | |
| 46 | + ///model | |
| 47 | + ///1,2时跳转:sharelUrl后面拼接 ?contentId=contentId&videoId=pid | |
| 48 | + ///3,4时跳转:thirdUrl | |
| 49 | + ///“album”,“album_video”,“album_ugc” -> http://wjjh5.cnlive.com/cnYmAlbumVideoList.html?aid=contentId&title=titlle | |
| 50 | + /// aid:专辑id,title:专辑名称(需要encode) | |
| 51 | + var model: String? | |
| 52 | + ///model为1,2时 | |
| 53 | + var shareUrl: String? | |
| 54 | + ///model为3,4时跳转url | |
| 55 | + var thirdUrl: String? | |
| 56 | +} | ... | ... |
metaCode/Classes/Main/Model/CNLiveShopConsoleModel.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveShopConsoleModel.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/28. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | +///商城item类型 | |
| 10 | +enum CNLiveShopConsoleType:Int { | |
| 11 | + ///商城新增商品 | |
| 12 | + case XZSP, | |
| 13 | + ///商城商品管理 | |
| 14 | + SPGL, | |
| 15 | + ///新增优惠券 | |
| 16 | + XZYHQ, | |
| 17 | + ///管理优惠券 | |
| 18 | + GLYHQ, | |
| 19 | + ///创建店铺分类 | |
| 20 | + CreateShopClassify, | |
| 21 | + ///店铺分类管理 | |
| 22 | + ShopClassifyManager, | |
| 23 | + ///发布动态 | |
| 24 | + FBDT, | |
| 25 | + ///动态管理 | |
| 26 | + DTGL, | |
| 27 | + ///商城订单管理 | |
| 28 | + DDGL, | |
| 29 | + ///商城交易记录 | |
| 30 | + JYJL, | |
| 31 | + ///直播管理 | |
| 32 | + OnManagerment | |
| 33 | + | |
| 34 | + | |
| 35 | +// ///商城退款/售后 | |
| 36 | +// SH, | |
| 37 | +// ///动态草稿箱 | |
| 38 | +// CGX, | |
| 39 | +// ///餐品管理 | |
| 40 | +// CPGL_REPAST, | |
| 41 | +// ///餐厅订单 | |
| 42 | +// CTDD_REPAST, | |
| 43 | +// ///餐厅管理投诉/售后 | |
| 44 | +// TSSH_REPAST, | |
| 45 | +// ///餐厅满减券 | |
| 46 | +// MJQ_REPAST, | |
| 47 | +// ///餐厅管理 | |
| 48 | +// CTGL_REPAST, | |
| 49 | +// ///餐厅商家配置 | |
| 50 | +// SJPZ_REPAST, | |
| 51 | +// | |
| 52 | +} | |
| 53 | + | |
| 54 | +class CNLiveShopConsoleModel:BaseModel { | |
| 55 | + ///大分组 | |
| 56 | + var list = [CNLiveShopConsoleListModel]() | |
| 57 | + | |
| 58 | + func initDataSource(){ | |
| 59 | + var dataSource = | |
| 60 | + [["title":"商品管理", | |
| 61 | + "list":[ | |
| 62 | + ["title":"新增商品", "subtitle":"创建新的商品", "simg":"DS_WB_XZSP", "type":0], | |
| 63 | + ["title":"商品管理", "subtitle":"管理现有的商品", "simg":"DS_WB_SPGL", "type":1]]], | |
| 64 | + ["title":"订单管理", | |
| 65 | + "list":[ | |
| 66 | + ["title":"订单管理", "subtitle":"管理用户订单", "simg":"DS_WB_DDGL", "type":8]]], | |
| 67 | + ["title":"直播管理", | |
| 68 | + "list":[["title":"直播管理","subtitle":"申请创建直播","simg":"DS_WB_NO_Management","type":10]]]] | |
| 69 | + /** | |
| 70 | + var dataSource = | |
| 71 | + [["title":"商品管理", | |
| 72 | + "list":[ | |
| 73 | + ["title":"新增商品", "subtitle":"创建新的商品", "simg":"DS_WB_XZSP", "type":0], | |
| 74 | + ["title":"商品管理", "subtitle":"管理现有的商品", "simg":"DS_WB_SPGL", "type":1], | |
| 75 | + ["title":"新增优惠券", "subtitle":"创建新增优惠券", "simg":"DS_WB_XZYHQ", "type":2], | |
| 76 | + ["title":"优惠券管理", "subtitle":"管理现有的优惠券", "simg":"DS_WB_GLYHQ", "type":3]]], | |
| 77 | + ["title":"分类管理", | |
| 78 | + "list":[ | |
| 79 | + ["title":"创建店铺分类", "subtitle":"创建店铺分类", "simg":"DS_WB_SJPZ_REPAST", "type":4], | |
| 80 | + ["title":"店铺分类管理", "subtitle":"店铺分类管理", "simg":"DS_WB_DPFL", "type":5]]], | |
| 81 | + ["title":"动态管理", | |
| 82 | + "list":[ | |
| 83 | + ["title":"发布动态", "subtitle":"发布新鲜动态", "simg":"DS_WB_FBDT", "type":6], | |
| 84 | + ["title":"动态管理", "subtitle":"管理现有动态", "simg":"DS_WB_DTGL", "type":7]]], | |
| 85 | + ["title":"订单管理", | |
| 86 | + "list":[ | |
| 87 | + ["title":"订单管理", "subtitle":"管理用户订单", "simg":"DS_WB_DDGL", "type":8]]], | |
| 88 | + ["title":"交易管理", | |
| 89 | + "list":[ | |
| 90 | + ["title":"交易记录", "subtitle":"查看交易记录", "simg":"DS_WB_JYJL", "type":9]]], | |
| 91 | + ["title":"直播管理", | |
| 92 | + "list":[["title":"直播管理","subtitle":"申请创建直播","simg":"DS_WB_NO_Management","type":10]]]] | |
| 93 | + */ | |
| 94 | + for dic in dataSource{ | |
| 95 | + let mdl = newDictionaryToModel(dic, CNLiveShopConsoleListModel.self) | |
| 96 | + list.append(mdl as! CNLiveShopConsoleListModel) | |
| 97 | + | |
| 98 | + } | |
| 99 | + } | |
| 100 | + | |
| 101 | +} | |
| 102 | + | |
| 103 | +class CNLiveShopConsoleListModel: BaseModel { | |
| 104 | + /// section标题 | |
| 105 | + var title: String? | |
| 106 | + /// item list内容 | |
| 107 | + var list = [CNLiveShopConsoleListContentModel]() | |
| 108 | +} | |
| 109 | + | |
| 110 | +class CNLiveShopConsoleListContentModel: BaseModel { | |
| 111 | + /// 图片 | |
| 112 | + var simg: String? | |
| 113 | + /// 标题 | |
| 114 | + var title: String? | |
| 115 | + /// 子标题 | |
| 116 | + var subtitle: String? | |
| 117 | + /// 类型 | |
| 118 | + var type:Int = 0//CNLiveShopConsoleType | |
| 119 | +} | ... | ... |
metaCode/Classes/Main/Model/CNLiveShopDetailModel.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveShopDetailModel.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/31. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | + | |
| 10 | +class CNLiveShopDetailModel:BaseModel{ | |
| 11 | + ///banner | |
| 12 | + var banner = [CNLiveShopDetailBannerModel]() | |
| 13 | + ///是否显示申请入驻按钮组view | |
| 14 | + var is_show_btn: Bool? | |
| 15 | + ///是否显示用户信息view | |
| 16 | + var is_show_user: Bool? | |
| 17 | + ///是否显示退款订单推送提示红点 | |
| 18 | + var is_show_tip: Bool? | |
| 19 | + ///快捷申请标题 | |
| 20 | + var quick_title: String? | |
| 21 | + ///快捷申请url | |
| 22 | + var quick_url: String? | |
| 23 | + ///退款订单数 | |
| 24 | + var order_return_num: String? | |
| 25 | + ///申请入驻按钮组 | |
| 26 | + var btn = [CNLiveShopDetailBtnModel]() | |
| 27 | + ///用户信息 | |
| 28 | + var user: CNLiveShopDetailUserModel? | |
| 29 | + ///空的话 跳转注册登录 有值的话 跳url | |
| 30 | + var user_btn: String? | |
| 31 | + ///是否为商家 | |
| 32 | + var is_seller: Bool? | |
| 33 | + ///0老达人 1普通商家 2文创精品 3健康餐桌 8达人 | |
| 34 | + var seller_type: Int = 0 | |
| 35 | + ///商家数据 | |
| 36 | + var seller_data: CNLiveShopDetailSellerDataModel? | |
| 37 | + ///达人动态 | |
| 38 | + var dynamic = [CNLiveShopDetailDynamicModel]() | |
| 39 | + ///餐厅店铺信息 | |
| 40 | + var foods_shop: CNLiveShopDetailFoodsShopModel? | |
| 41 | +} | |
| 42 | + | |
| 43 | +class CNLiveShopDetailBannerModel:BaseModel{ | |
| 44 | + ///id | |
| 45 | + var id: String? | |
| 46 | + ///标题 | |
| 47 | + var title: String? | |
| 48 | + ///图片 | |
| 49 | + var simg: String? | |
| 50 | + ///1跳全屏url 其他不跳 | |
| 51 | + var type: String? | |
| 52 | + ///url | |
| 53 | + var url: String? | |
| 54 | +} | |
| 55 | + | |
| 56 | +class CNLiveShopDetailBtnModel:BaseModel{ | |
| 57 | + ///标题 | |
| 58 | + var title: String? | |
| 59 | + ///图片 | |
| 60 | + var image: String? | |
| 61 | + ///url | |
| 62 | + var url: String? | |
| 63 | +} | |
| 64 | + | |
| 65 | +class CNLiveShopDetailUserModel:BaseModel{ | |
| 66 | + ///0 未申请过 1 未提交 2 审核中 3 审核拒绝 4 审核通过 | |
| 67 | + var state: Int = 0 | |
| 68 | + ///头像 | |
| 69 | + var user_img: String? | |
| 70 | + ///名称 | |
| 71 | + var username: String? | |
| 72 | +} | |
| 73 | + | |
| 74 | +class CNLiveShopDetailSellerDataModel:BaseModel{ | |
| 75 | + ///每日订单数 | |
| 76 | + var day_order: Int = 0 | |
| 77 | + ///每日订单金额 | |
| 78 | + var day_order_money: String? | |
| 79 | + ///电商剩余金额 | |
| 80 | + var shop_money: String? | |
| 81 | + ///老达人余额 | |
| 82 | + var daren_money: String? | |
| 83 | + ///总余额 | |
| 84 | + var total_money: String? | |
| 85 | + | |
| 86 | +} | |
| 87 | + | |
| 88 | +class CNLiveShopDetailDynamicModel:BaseModel{ | |
| 89 | + ///动态id | |
| 90 | + var id: String? | |
| 91 | + ///动态内容 | |
| 92 | + var title: String? | |
| 93 | + ///用户id | |
| 94 | + var uid: String? | |
| 95 | + ///发布时间 | |
| 96 | + var addtime: Double? | |
| 97 | + ///经度 | |
| 98 | + var longitude: String? | |
| 99 | + ///纬度 | |
| 100 | + var latitude: String? | |
| 101 | + ///浏览数 | |
| 102 | + var pv: Int = 0 | |
| 103 | + ///点赞数 | |
| 104 | + var upper: Int = 0 | |
| 105 | + ///评论数 | |
| 106 | + var comment: Int = 0 | |
| 107 | + ///定位 | |
| 108 | + var location: String? | |
| 109 | + ///视频 | |
| 110 | + var video: String? | |
| 111 | + ///是否点赞 1点赞 0没点 | |
| 112 | + var is_upper: Bool? | |
| 113 | + ///是否显示 1显示 0隐藏 | |
| 114 | + var state: Bool? | |
| 115 | + ///商品id | |
| 116 | + var goods_id: String? | |
| 117 | + ///视频封面图 | |
| 118 | + var video_img: String? | |
| 119 | + ///封面图数组 | |
| 120 | + var img = [Array<String>]() | |
| 121 | + ///达人信息 | |
| 122 | + var shop_user: CNLiveShopDetailDynamicShopUserModel? | |
| 123 | + ///热门评论 | |
| 124 | + var comment_content: CNLiveShopDetailDynamicCommentModel? | |
| 125 | + ///商品 | |
| 126 | + var goods: CNLiveShopDetailDynamicGoodsModel? | |
| 127 | +} | |
| 128 | + | |
| 129 | +// MARK: - 达人数据 | |
| 130 | +class CNLiveShopDetailDynamicShopUserModel:BaseModel{ | |
| 131 | + ///店铺id | |
| 132 | + var id: String? | |
| 133 | + ///达人名称 | |
| 134 | + var title: String? | |
| 135 | + ///达人头像 | |
| 136 | + var logo: String? | |
| 137 | + ///达人id | |
| 138 | + var uid: String? | |
| 139 | +} | |
| 140 | + | |
| 141 | +// MARK: - 热门评论 | |
| 142 | +class CNLiveShopDetailDynamicCommentModel:BaseModel{ | |
| 143 | + ///评论id | |
| 144 | + var id: String? | |
| 145 | + ///用户id | |
| 146 | + var uid: String? | |
| 147 | + ///评论内容 | |
| 148 | + var content: String? | |
| 149 | + ///评论时间 | |
| 150 | + var addtime: Double? | |
| 151 | + ///点赞数 | |
| 152 | + var upper: Int = 0 | |
| 153 | +} | |
| 154 | + | |
| 155 | +// MARK: - 商品 | |
| 156 | +class CNLiveShopDetailDynamicGoodsModel:BaseModel{ | |
| 157 | + ///商品id | |
| 158 | + var id: String? | |
| 159 | + ///商品标题 | |
| 160 | + var title: String? | |
| 161 | + ///1普通商品 2文创商品 | |
| 162 | + var shop_type: String? | |
| 163 | + /// | |
| 164 | + var type: String? | |
| 165 | + /// | |
| 166 | + var to: String? | |
| 167 | + ///现价 | |
| 168 | + var price: String? | |
| 169 | + ///原价 | |
| 170 | + var prices: String? | |
| 171 | + ///广告语 | |
| 172 | + var ads: String? | |
| 173 | + ///商品封面 | |
| 174 | + var simg: String? | |
| 175 | +} | |
| 176 | + | |
| 177 | +// MARK: - 餐厅店铺信息 | |
| 178 | +class CNLiveShopDetailFoodsShopModel:BaseModel{ | |
| 179 | + ///店铺名称 | |
| 180 | + var title: String? | |
| 181 | + ///店铺id | |
| 182 | + var id: String? | |
| 183 | +} | |
| 184 | + | |
| 185 | + | |
| 186 | + | ... | ... |
metaCode/Classes/Main/Model/CNLiveShopUserInfoModel.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveShopUserInfoModel.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/27. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | + | |
| 10 | +//获取用户信息 | |
| 11 | +class CNLiveShopUserInfoModel:BaseModel{ | |
| 12 | + ///darenid生成付款码时用到 | |
| 13 | + var daren_id: String? | |
| 14 | + ///uid 用于请求老达人信息接口 | |
| 15 | + var daren_uid: String? | |
| 16 | + ///id | |
| 17 | + var id: String? | |
| 18 | + ///链接im的id daren_XXXXX | |
| 19 | + var im_id: String? | |
| 20 | + ///0 未申请过 1 未提交 2 审核中 3 审核拒绝 4 审核通过(type==0踢出) | |
| 21 | + var state: String? | |
| 22 | + ///0 老达人 1 普通商家 2 文创精品 3 健康餐桌 8 达人 | |
| 23 | + var type: String? | |
| 24 | + ///达人申请地址 | |
| 25 | + var url: String? | |
| 26 | + ///链接im的token | |
| 27 | + var token: String? | |
| 28 | + ///商家是否可用 1可用 0禁用(禁用踢出) | |
| 29 | + var is_able: String? | |
| 30 | + ///商家昵称 | |
| 31 | + var title: String? | |
| 32 | + ///商家logo | |
| 33 | + var logo: String? | |
| 34 | +} | |
| 35 | +/** | |
| 36 | + Printing description of ((__NSDictionaryI *)0x000000010884eca0): | |
| 37 | + { | |
| 38 | + "daren_id" = "daren_10505455"; | |
| 39 | + "daren_uid" = 10505455; | |
| 40 | + id = 219; | |
| 41 | + "im_id" = "daren_10505455"; | |
| 42 | + "is_able" = 0; | |
| 43 | + logo = "https://wjj.ys2.cnliveimg.com/769/shop/img/2021/01/06/5ff567b950c9a"; | |
| 44 | + qqUid = ""; | |
| 45 | + sinaUid = ""; | |
| 46 | + state = 4; | |
| 47 | + title = "\U4e1c\U5317\U5473\U9053"; | |
| 48 | + token = "eJxNjl1PgzAYhf9LbzXaFkqKiRcEyAZjZvNjmYlJU9dOOzJo2so6jP9dRrbo7fOc9z3nGzxXTzd8s2m-GsfcUUtwByC4HrESsnFqq6QZoOBGNgxBAklIyDnBtVaCcccCI-4dWlGzUQ0MhRBCgiJ6kdJrZSTjWzf*xSTGQ*IsO2msapsTh4ggHED4J53an*ahKKYBpRGNLnXqY8Dz-CUtct7b-atHWPr34uqQpCV9zPtliKu67H2c6WCxK99uU*jmNlF54goVrq3Pp369yFzX0VDvspmnq3oSZ*3xUE3l54wuVw8Teg9*fgGu0Fnz"; | |
| 49 | + type = 8; | |
| 50 | + uid = 10505455; | |
| 51 | + url = "https://managemall.cnlive.com/html/preferred-library-b/1/#/pages/checkIt/checkIt?redirect=daren"; | |
| 52 | + wxUid = "oBAMNt5Phwrb_kWID0EyxYsZU3d0"; | |
| 53 | + } | |
| 54 | + */ | ... | ... |
metaCode/Classes/Main/Util/CNLiveAdaptTool.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveAdaptTool.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/11/2. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | + | |
| 10 | +class CNLiveAdaptTool:NSObject{ | |
| 11 | + class func adaptLength(length:CGFloat) -> CGFloat{ | |
| 12 | + | |
| 13 | + let multiple = KSreenWidth / 375.0 | |
| 14 | + let f_adapt_length = floor(length * multiple) | |
| 15 | + return f_adapt_length | |
| 16 | + } | |
| 17 | +} | ... | ... |
metaCode/Classes/Main/Util/CNLiveDownSlideModelLayout.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveDownSlideModelLayout.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/23. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | + | |
| 10 | + | |
| 11 | +class CNLiveDownSlideModelLayout:NSObject{ | |
| 12 | + | |
| 13 | + ///cell高度 | |
| 14 | + var cellH:CGFloat = 0.0 | |
| 15 | + | |
| 16 | + //slideModel | |
| 17 | + var _slideModel : CNLiveDownSlideModel? | |
| 18 | + var slideModel : CNLiveDownSlideModel? { | |
| 19 | + get{ | |
| 20 | + _slideModel | |
| 21 | + } | |
| 22 | + set{ | |
| 23 | + _slideModel = newValue | |
| 24 | + } | |
| 25 | + } | |
| 26 | + | |
| 27 | + init(model:CNLiveDownSlideModel){ | |
| 28 | + super.init() | |
| 29 | + self.slideModel = model | |
| 30 | + //总块数 | |
| 31 | + let contentsNum = model.contents.count | |
| 32 | + //model行数 | |
| 33 | + let row = model.rowNum | |
| 34 | + if(_slideModel?.type == SlideModelTypeRecommend4){//推荐活动,推荐课程 | |
| 35 | + | |
| 36 | + //总显示块数/循环数 | |
| 37 | + var totalNum = (contentsNum >= row*2) ? row*2 : contentsNum | |
| 38 | + if row == 0{//row为0 , contents全部显示 | |
| 39 | + totalNum = contentsNum | |
| 40 | + } | |
| 41 | + _slideModel?.cellH = ceil(CGFloat(totalNum)*0.5)*(DownSlideRecommendWH + DownSlideRecommendLeftGap) | |
| 42 | + }else if(_slideModel?.type == SlideModelTypeTodayRecommend74){//今日推荐 | |
| 43 | + //总显示块数/循环数 | |
| 44 | + var totalNum = (contentsNum >= row) ? row : contentsNum | |
| 45 | + if row == 0{//row为0 , contents全部显示 | |
| 46 | + totalNum = contentsNum | |
| 47 | + } | |
| 48 | + _slideModel?.cellH = CGFloat(totalNum)*(DownSlideTodayRecommendH + DownSlideRecommendLeftGap) | |
| 49 | + }else if(_slideModel?.type == SlideModelTypeAllCourse12){//全部课程 | |
| 50 | + | |
| 51 | + _slideModel?.cellH = DownSlideAllCourseTitleH + DownSlideAllCourseRowH * CGFloat(_slideModel!.rowNum)+DownSlideRecommendLeftGap | |
| 52 | + | |
| 53 | + }else if(_slideModel?.type == SlideModelTypeOneCourse75){//单节课程 | |
| 54 | + | |
| 55 | + _slideModel?.cellH = DownSlideSingleCourseImgH + DownSlideSingleCourseMoreH+DownSlideRecommendLeftGap | |
| 56 | + }else{ | |
| 57 | + _slideModel?.cellH = 0 | |
| 58 | + } | |
| 59 | + } | |
| 60 | + func getCellHModel()->CNLiveDownSlideModel{ | |
| 61 | + return _slideModel! | |
| 62 | + } | |
| 63 | + | |
| 64 | +} | ... | ... |
metaCode/Classes/Main/Util/CNLiveDownSlideTool.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveDownSlideTool.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/25. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | + | |
| 10 | +class CNLiveDownSlideTool:NSObject{ | |
| 11 | + class func pushWebVCWithContentsMdl(contentMdl:CNLiveDownSlideContentsModel){ | |
| 12 | + | |
| 13 | + if (contentMdl.model == kCNDownSlideContentsModelModel1) || (contentMdl.model == kCNDownSlideContentsModelModel2){ | |
| 14 | + | |
| 15 | + let queryItem = URLQueryItem(name: "contentId", value: contentMdl.contentId) | |
| 16 | + let queryItem1 = URLQueryItem(name: "videoId", value: contentMdl.pid) | |
| 17 | + let urlComponents = NSURLComponents(string: (contentMdl.shareUrl)!)! | |
| 18 | + urlComponents.queryItems = [queryItem, queryItem1] | |
| 19 | + let regURL = urlComponents.url | |
| 20 | + let webVC = CNWebViewController() | |
| 21 | + webVC.url = regURL | |
| 22 | + currentViewController()?.navigationController?.pushViewController(webVC, animated: true) | |
| 23 | + | |
| 24 | + }else if (contentMdl.model == kCNDownSlideContentsModelModel3) || (contentMdl.model == kCNDownSlideContentsModelModel4){ | |
| 25 | + let webVC = CNWebViewController() | |
| 26 | + webVC.url = URL(string: (contentMdl.thirdUrl)!) | |
| 27 | + currentViewController()?.navigationController?.pushViewController(webVC, animated: true) | |
| 28 | + }else if (contentMdl.model == kCNDownSlideContentsModelModelAlbum) || (contentMdl.model == kCNDownSlideContentsModelModelAlbum_ugc) || (contentMdl.model == kCNDownSlideContentsModelModelAlbum_video){ | |
| 29 | + | |
| 30 | + let urlString = "http://wjjh5.cnlive.com/cnYmAlbumVideoList.html" | |
| 31 | + let queryItem = URLQueryItem(name: "aid", value: contentMdl.contentId) | |
| 32 | + let queryItem1 = URLQueryItem(name: "title", value: contentMdl.title) | |
| 33 | + let urlComponents = NSURLComponents(string: urlString) | |
| 34 | + urlComponents!.queryItems = [queryItem, queryItem1] | |
| 35 | + let regURL = urlComponents?.url | |
| 36 | + let webVC = CNWebViewController() | |
| 37 | + webVC.url = regURL | |
| 38 | + currentViewController()?.navigationController?.pushViewController(webVC, animated: true) | |
| 39 | + }else{ | |
| 40 | + return | |
| 41 | + } | |
| 42 | + } | |
| 43 | + | |
| 44 | + class func detailPushWebVCWithContentsMdl(contentMdl:CNLiveDownSlideContentsModel,viewController:UIViewController){ | |
| 45 | + | |
| 46 | + if (contentMdl.model == kCNDownSlideContentsModelModel1) || (contentMdl.model == kCNDownSlideContentsModelModel2){ | |
| 47 | + | |
| 48 | + let queryItem = URLQueryItem(name: "contentId", value: contentMdl.contentId) | |
| 49 | + let queryItem1 = URLQueryItem(name: "videoId", value: contentMdl.pid) | |
| 50 | + let urlComponents = NSURLComponents(string: (contentMdl.shareUrl)!)! | |
| 51 | + urlComponents.queryItems = [queryItem, queryItem1] | |
| 52 | + let regURL = urlComponents.url | |
| 53 | + let webVC = CNWebViewController() | |
| 54 | + webVC.url = regURL | |
| 55 | + viewController.navigationController?.pushViewController(webVC, animated: true) | |
| 56 | + | |
| 57 | + }else if (contentMdl.model == kCNDownSlideContentsModelModel3) || (contentMdl.model == kCNDownSlideContentsModelModel4){ | |
| 58 | + let webVC = CNWebViewController() | |
| 59 | + webVC.url = URL(string: (contentMdl.thirdUrl)!) | |
| 60 | + viewController.navigationController?.pushViewController(webVC, animated: true) | |
| 61 | + }else if (contentMdl.model == kCNDownSlideContentsModelModelAlbum) || (contentMdl.model == kCNDownSlideContentsModelModelAlbum_ugc) || (contentMdl.model == kCNDownSlideContentsModelModelAlbum_video){ | |
| 62 | + | |
| 63 | + let urlString = "http://wjjh5.cnlive.com/cnYmAlbumVideoList.html" | |
| 64 | + let queryItem = URLQueryItem(name: "aid", value: contentMdl.contentId) | |
| 65 | + let queryItem1 = URLQueryItem(name: "title", value: contentMdl.title) | |
| 66 | + let urlComponents = NSURLComponents(string: urlString) | |
| 67 | + urlComponents!.queryItems = [queryItem, queryItem1] | |
| 68 | + let regURL = urlComponents?.url | |
| 69 | + let webVC = CNWebViewController() | |
| 70 | + webVC.url = regURL | |
| 71 | + viewController.navigationController?.pushViewController(webVC, animated: true) | |
| 72 | + }else{ | |
| 73 | + return | |
| 74 | + } | |
| 75 | + } | |
| 76 | +} | ... | ... |
metaCode/Classes/Main/Util/CNUpSlideAnimationTransition.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNUpSlideAnimationTransition.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2023/10/16. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import UIKit | |
| 9 | + | |
| 10 | +fileprivate let transitonDuration: TimeInterval = 1.0 | |
| 11 | + | |
| 12 | + | |
| 13 | +enum AnimationType { | |
| 14 | + case present | |
| 15 | + case dismiss | |
| 16 | +} | |
| 17 | + | |
| 18 | +class CNUpSlideAnimationTransition: NSObject { | |
| 19 | + let animationType: AnimationType! | |
| 20 | + | |
| 21 | + init(animationType: AnimationType) { | |
| 22 | + self.animationType = animationType | |
| 23 | + super.init() | |
| 24 | + } | |
| 25 | +} | |
| 26 | + | |
| 27 | +extension CNUpSlideAnimationTransition: UIViewControllerAnimatedTransitioning { | |
| 28 | + func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { | |
| 29 | + return transitonDuration | |
| 30 | + } | |
| 31 | + | |
| 32 | + func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { | |
| 33 | + if animationType == .present { | |
| 34 | + animationForPresent(using: transitionContext) | |
| 35 | + } else { | |
| 36 | + animationForDismiss(using: transitionContext) | |
| 37 | + } | |
| 38 | + } | |
| 39 | + | |
| 40 | + func animationForPresent(using transitionContext: UIViewControllerContextTransitioning) { | |
| 41 | + let containerView = transitionContext.containerView | |
| 42 | + //1.Get fromVC and toVC | |
| 43 | + guard let fromVC = transitionContext.viewController(forKey: .from) as? CNUpSlideViewController else { return } | |
| 44 | + guard let toNaviVC = transitionContext.viewController(forKey: .to) as? CNSlideBaseNavigationController else { return } | |
| 45 | + guard let selectedCell = fromVC.selectedCell else { return } | |
| 46 | + let toVC = toNaviVC.topViewController as! CNUpSlideDetailViewController | |
| 47 | + let frame = selectedCell.convert(selectedCell.bgBackView.frame, to: fromVC.view) | |
| 48 | + //2.Set presentation original size. | |
| 49 | + toVC.view.frame = frame | |
| 50 | + toVC.scrollView.imageView.frame.size.width = GlobalConstants.todayCardSize.width | |
| 51 | + toVC.scrollView.imageView.frame.size.height = GlobalConstants.todayCardSize.height | |
| 52 | + | |
| 53 | + containerView.addSubview(toNaviVC.view) | |
| 54 | + | |
| 55 | + //3.Change original size to final size with animation. | |
| 56 | + UIView.animate(withDuration: transitonDuration, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0, options: [], animations: { | |
| 57 | + toVC.view.frame = UIScreen.main.bounds | |
| 58 | + toVC.scrollView.imageView.frame.size.width = KSreenWidth | |
| 59 | + toVC.scrollView.imageView.frame.size.height = KSreenWidth*DownSlideSingleCourseImgH/DownSlideSingleCourseW | |
| 60 | + toVC.closeBtn.alpha = 1 | |
| 61 | + | |
| 62 | + }) { (completed) in | |
| 63 | + transitionContext.completeTransition(completed) | |
| 64 | + } | |
| 65 | + } | |
| 66 | + | |
| 67 | + func animationForDismiss(using transitionContext: UIViewControllerContextTransitioning) { | |
| 68 | + guard let fromNaviVC = transitionContext.viewController(forKey: .from) as? CNSlideBaseNavigationController else { return } | |
| 69 | + guard let toVC = transitionContext.viewController(forKey: .to) as? CNUpSlideViewController else { return } | |
| 70 | + guard let selectedCell = toVC.selectedCell else { return } | |
| 71 | + let fromVC = fromNaviVC.topViewController as! CNUpSlideDetailViewController | |
| 72 | + | |
| 73 | + UIView.animate(withDuration: transitonDuration - 0.3, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: { | |
| 74 | + let frame = selectedCell.convert(selectedCell.bgBackView.frame, to: toVC.view) | |
| 75 | + fromVC.view.frame = frame | |
| 76 | + fromVC.view.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius | |
| 77 | + fromVC.scrollView.imageView.frame.size.width = GlobalConstants.todayCardSize.width | |
| 78 | + fromVC.scrollView.imageView.frame.size.height = GlobalConstants.todayCardSize.height | |
| 79 | + fromVC.closeBtn.alpha = 0 | |
| 80 | + | |
| 81 | + }) { (completed) in | |
| 82 | + transitionContext.completeTransition(completed) | |
| 83 | + } | |
| 84 | + } | |
| 85 | + | |
| 86 | +} | ... | ... |
metaCode/Classes/Other/AppDelegate.swift
| ... | ... | @@ -68,7 +68,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { |
| 68 | 68 | let ver : String = Bundle.main.infoDictionary?["CFBundleVersion"] as! String |
| 69 | 69 | let p : Dictionary = ["platform_id":kAppBundleID,"uuid":uuid,"plat":"i","ver":ver,"appId":APPId,"timestamp":String(NSNumber(floatLiteral: Date().timeIntervalSince1970).intValue),"clientPlat":"i","frmId":"ios"] |
| 70 | 70 | CNLiveNetworking.setupDefaultParam(p) |
| 71 | - | |
| 71 | + | |
| 72 | 72 | let shop_dic : Dictionary = ["Phone-Model":"iPhone","Uid":UserInfoManager.shared.userInfo.uid ,"CFBundleShortVersionString":ver,"Shop-Version":"0.6.2"] |
| 73 | 73 | CNLiveNetworking.setupDSShopParam(shop_dic) |
| 74 | 74 | CNLiveNetworking.setRequestTimeoutInterval(10) | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_DDGL.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "DS_WB_DDGL@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "author" : "xcode", | |
| 19 | + "version" : 1 | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_DDGL.imageset/DS_WB_DDGL@2x.png
0 → 100644
2 KB
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_DPFL.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "DS_WB_DPFL@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "author" : "xcode", | |
| 19 | + "version" : 1 | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_DPFL.imageset/DS_WB_DPFL@2x.png
0 → 100644
1013 Bytes
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_DTGL.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "DS_WB_DTGL@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "author" : "xcode", | |
| 19 | + "version" : 1 | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_DTGL.imageset/DS_WB_DTGL@2x.png
0 → 100644
2.41 KB
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_FBDT.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "DS_WB_FBDT@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "author" : "xcode", | |
| 19 | + "version" : 1 | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_FBDT.imageset/DS_WB_FBDT@2x.png
0 → 100644
1.07 KB
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_GLYHQ.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "DS_WB_GLYHQ@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "author" : "xcode", | |
| 19 | + "version" : 1 | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_GLYHQ.imageset/DS_WB_GLYHQ@2x.png
0 → 100644
2.68 KB
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_JYJL.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "DS_WB_JYJL@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "author" : "xcode", | |
| 19 | + "version" : 1 | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_JYJL.imageset/DS_WB_JYJL@2x.png
0 → 100644
2.21 KB
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_NO_Management.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "DS_WB_NO_Management@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "author" : "xcode", | |
| 19 | + "version" : 1 | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_NO_Management.imageset/DS_WB_NO_Management@2x.png
0 → 100644
2.04 KB
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_SJPZ_REPAST.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "DS_WB_SJPZ_REPAST@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "author" : "xcode", | |
| 19 | + "version" : 1 | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_SJPZ_REPAST.imageset/DS_WB_SJPZ_REPAST@2x.png
0 → 100644
2.18 KB
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_SPGL.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "DS_WB_SPGL@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "author" : "xcode", | |
| 19 | + "version" : 1 | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_SPGL.imageset/DS_WB_SPGL@2x.png
0 → 100644
2.11 KB
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_XZSP.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "DS_WB_XZSP@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "author" : "xcode", | |
| 19 | + "version" : 1 | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_XZSP.imageset/DS_WB_XZSP@2x.png
0 → 100644
1.32 KB
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_XZYHQ.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "DS_WB_XZYHQ@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "author" : "xcode", | |
| 19 | + "version" : 1 | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/DS_WB_XZYHQ.imageset/DS_WB_XZYHQ@2x.png
0 → 100644
2.96 KB
metaCode/Supporting Files/Assets.xcassets/Home/close_button.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "close_button@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "author" : "xcode", | |
| 19 | + "version" : 1 | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/close_button.imageset/close_button@2x.png
0 → 100644
1.14 KB
metaCode/Supporting Files/Assets.xcassets/Home/homepage_down_enter.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "homepage_down_enter@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "author" : "xcode", | |
| 19 | + "version" : 1 | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/homepage_down_enter.imageset/homepage_down_enter@2x.png
0 → 100644
2.18 KB
metaCode/Supporting Files/Assets.xcassets/Home/homepage_down_more.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "homepage_down_more@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "author" : "xcode", | |
| 19 | + "version" : 1 | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/homepage_down_more.imageset/homepage_down_more@2x.png
0 → 100644
1.66 KB