Commit b38285baaf2fe00980799830646ee8635269b3e5
Merge branch 'master' of http://bj.gitlab.cnlive.com/ios-team/CNLiveMateCode
Showing
199 changed files
with
2029 additions
and
443 deletions
metaCode.xcodeproj/project.pbxproj
| @@ -90,6 +90,9 @@ | @@ -90,6 +90,9 @@ | ||
| 90 | 1938BD3D2B4BDD4B00390A34 /* CNLiveAlbumCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD3C2B4BDD4B00390A34 /* CNLiveAlbumCell.swift */; }; | 90 | 1938BD3D2B4BDD4B00390A34 /* CNLiveAlbumCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD3C2B4BDD4B00390A34 /* CNLiveAlbumCell.swift */; }; |
| 91 | 1938BD3F2B4BE7C500390A34 /* CNLiveAlbumMsgModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD3E2B4BE7C500390A34 /* CNLiveAlbumMsgModel.swift */; }; | 91 | 1938BD3F2B4BE7C500390A34 /* CNLiveAlbumMsgModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD3E2B4BE7C500390A34 /* CNLiveAlbumMsgModel.swift */; }; |
| 92 | 1938BD412B4BEC6900390A34 /* CNLiveAlbumListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD402B4BEC6900390A34 /* CNLiveAlbumListModel.swift */; }; | 92 | 1938BD412B4BEC6900390A34 /* CNLiveAlbumListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD402B4BEC6900390A34 /* CNLiveAlbumListModel.swift */; }; |
| 93 | + 1938BD432B4E34B200390A34 /* CNHomepageDuanJuDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD422B4E34B200390A34 /* CNHomepageDuanJuDetailViewController.swift */; }; | ||
| 94 | + 1938BD452B4E49CA00390A34 /* CNLiveDuanjuTitleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD442B4E49CA00390A34 /* CNLiveDuanjuTitleCell.swift */; }; | ||
| 95 | + 1938BD472B4FD5A500390A34 /* CNLiveIntegralAlertTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD462B4FD5A500390A34 /* CNLiveIntegralAlertTool.swift */; }; | ||
| 93 | 19565EC02AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */; }; | 96 | 19565EC02AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */; }; |
| 94 | 19565EC22AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */; }; | 97 | 19565EC22AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */; }; |
| 95 | 19565EC52AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EC42AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift */; }; | 98 | 19565EC52AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EC42AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift */; }; |
| @@ -352,6 +355,9 @@ | @@ -352,6 +355,9 @@ | ||
| 352 | 1938BD3C2B4BDD4B00390A34 /* CNLiveAlbumCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAlbumCell.swift; sourceTree = "<group>"; }; | 355 | 1938BD3C2B4BDD4B00390A34 /* CNLiveAlbumCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAlbumCell.swift; sourceTree = "<group>"; }; |
| 353 | 1938BD3E2B4BE7C500390A34 /* CNLiveAlbumMsgModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAlbumMsgModel.swift; sourceTree = "<group>"; }; | 356 | 1938BD3E2B4BE7C500390A34 /* CNLiveAlbumMsgModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAlbumMsgModel.swift; sourceTree = "<group>"; }; |
| 354 | 1938BD402B4BEC6900390A34 /* CNLiveAlbumListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAlbumListModel.swift; sourceTree = "<group>"; }; | 357 | 1938BD402B4BEC6900390A34 /* CNLiveAlbumListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAlbumListModel.swift; sourceTree = "<group>"; }; |
| 358 | + 1938BD422B4E34B200390A34 /* CNHomepageDuanJuDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNHomepageDuanJuDetailViewController.swift; sourceTree = "<group>"; }; | ||
| 359 | + 1938BD442B4E49CA00390A34 /* CNLiveDuanjuTitleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDuanjuTitleCell.swift; sourceTree = "<group>"; }; | ||
| 360 | + 1938BD462B4FD5A500390A34 /* CNLiveIntegralAlertTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveIntegralAlertTool.swift; sourceTree = "<group>"; }; | ||
| 355 | 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailBtnsCell.swift; sourceTree = "<group>"; }; | 361 | 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailBtnsCell.swift; sourceTree = "<group>"; }; |
| 356 | 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailOrderAssetCell.swift; sourceTree = "<group>"; }; | 362 | 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailOrderAssetCell.swift; sourceTree = "<group>"; }; |
| 357 | 19565EC42AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopProductManagerController.swift; sourceTree = "<group>"; }; | 363 | 19565EC42AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopProductManagerController.swift; sourceTree = "<group>"; }; |
| @@ -759,6 +765,7 @@ | @@ -759,6 +765,7 @@ | ||
| 759 | isa = PBXGroup; | 765 | isa = PBXGroup; |
| 760 | children = ( | 766 | children = ( |
| 761 | 1938BD292B48014E00390A34 /* CNHomepageDetailViewController.swift */, | 767 | 1938BD292B48014E00390A34 /* CNHomepageDetailViewController.swift */, |
| 768 | + 1938BD422B4E34B200390A34 /* CNHomepageDuanJuDetailViewController.swift */, | ||
| 762 | 1938BD2B2B4801A700390A34 /* CNHomePageAnimationTransition.swift */, | 769 | 1938BD2B2B4801A700390A34 /* CNHomePageAnimationTransition.swift */, |
| 763 | 1938BD2D2B48021E00390A34 /* CNHomePageBaseNavigationController.swift */, | 770 | 1938BD2D2B48021E00390A34 /* CNHomePageBaseNavigationController.swift */, |
| 764 | ); | 771 | ); |
| @@ -768,6 +775,7 @@ | @@ -768,6 +775,7 @@ | ||
| 768 | 1938BD392B4BDC2900390A34 /* HomepageDetail */ = { | 775 | 1938BD392B4BDC2900390A34 /* HomepageDetail */ = { |
| 769 | isa = PBXGroup; | 776 | isa = PBXGroup; |
| 770 | children = ( | 777 | children = ( |
| 778 | + 1938BD442B4E49CA00390A34 /* CNLiveDuanjuTitleCell.swift */, | ||
| 771 | 1938BD372B4BDC2500390A34 /* CNLiveAlbumImageCell.swift */, | 779 | 1938BD372B4BDC2500390A34 /* CNLiveAlbumImageCell.swift */, |
| 772 | 1938BD3C2B4BDD4B00390A34 /* CNLiveAlbumCell.swift */, | 780 | 1938BD3C2B4BDD4B00390A34 /* CNLiveAlbumCell.swift */, |
| 773 | ); | 781 | ); |
| @@ -791,6 +799,80 @@ | @@ -791,6 +799,80 @@ | ||
| 791 | path = PlayletHomePage; | 799 | path = PlayletHomePage; |
| 792 | sourceTree = "<group>"; | 800 | sourceTree = "<group>"; |
| 793 | }; | 801 | }; |
| 802 | + 1938BD482B512C5800390A34 /* DownSlide */ = { | ||
| 803 | + isa = PBXGroup; | ||
| 804 | + children = ( | ||
| 805 | + 7CD6753B2A2740B0008354C1 /* CNDownSlideView.swift */, | ||
| 806 | + 7CD6753A2A2740B0008354C1 /* CNDownSlideViewRemindView.swift */, | ||
| 807 | + 19FA20162AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift */, | ||
| 808 | + 19FA20182AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift */, | ||
| 809 | + 19CC4D462ADD006600308E2A /* CNDownSlideSingleCourseCell.swift */, | ||
| 810 | + 19CC4D4E2ADD0FC200308E2A /* CNUpSlideDetailScrollView.swift */, | ||
| 811 | + ); | ||
| 812 | + path = DownSlide; | ||
| 813 | + sourceTree = "<group>"; | ||
| 814 | + }; | ||
| 815 | + 1938BD492B512CA300390A34 /* UpSlide */ = { | ||
| 816 | + isa = PBXGroup; | ||
| 817 | + children = ( | ||
| 818 | + 7CD675392A2740B0008354C1 /* CNUpSlideView.swift */, | ||
| 819 | + 7CD675372A2740B0008354C1 /* CNUpSlideViewRemindView.swift */, | ||
| 820 | + ); | ||
| 821 | + path = UpSlide; | ||
| 822 | + sourceTree = "<group>"; | ||
| 823 | + }; | ||
| 824 | + 1938BD4A2B512CCE00390A34 /* MainView */ = { | ||
| 825 | + isa = PBXGroup; | ||
| 826 | + children = ( | ||
| 827 | + 7CD675382A2740B0008354C1 /* CNMainView.swift */, | ||
| 828 | + 7C4931372A307BDB000E44B4 /* CNHomePageGuideView.swift */, | ||
| 829 | + 19F1C2322AB5728B0083D06C /* CNIDCardView.swift */, | ||
| 830 | + 7C27032F2A36CBE30061EC50 /* CNCertificationView.swift */, | ||
| 831 | + 7C4931302A2F142F000E44B4 /* CNHomePageBackgroupView.swift */, | ||
| 832 | + ); | ||
| 833 | + path = MainView; | ||
| 834 | + sourceTree = "<group>"; | ||
| 835 | + }; | ||
| 836 | + 1938BD4B2B512D3000390A34 /* Shop */ = { | ||
| 837 | + isa = PBXGroup; | ||
| 838 | + children = ( | ||
| 839 | + 1938BD4C2B512EBF00390A34 /* ShopConsole */, | ||
| 840 | + 191733402B284D4A007BCC04 /* ShopCoupon */, | ||
| 841 | + 19565ED02AF8D904007D6727 /* GoodsManager */, | ||
| 842 | + 1938BD4D2B512F4600390A34 /* ShopDetail */, | ||
| 843 | + ); | ||
| 844 | + path = Shop; | ||
| 845 | + sourceTree = "<group>"; | ||
| 846 | + }; | ||
| 847 | + 1938BD4C2B512EBF00390A34 /* ShopConsole */ = { | ||
| 848 | + isa = PBXGroup; | ||
| 849 | + children = ( | ||
| 850 | + 19BB1FE92AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift */, | ||
| 851 | + ); | ||
| 852 | + path = ShopConsole; | ||
| 853 | + sourceTree = "<group>"; | ||
| 854 | + }; | ||
| 855 | + 1938BD4D2B512F4600390A34 /* ShopDetail */ = { | ||
| 856 | + isa = PBXGroup; | ||
| 857 | + children = ( | ||
| 858 | + 19BB1FF12AF21A950094D962 /* CNLliveShopDetailBannerCell.swift */, | ||
| 859 | + 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */, | ||
| 860 | + 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */, | ||
| 861 | + ); | ||
| 862 | + path = ShopDetail; | ||
| 863 | + sourceTree = "<group>"; | ||
| 864 | + }; | ||
| 865 | + 1938BD4E2B51316200390A34 /* VerticalViews */ = { | ||
| 866 | + isa = PBXGroup; | ||
| 867 | + children = ( | ||
| 868 | + 7CD675412A2740F8008354C1 /* CNCustomIndexView.swift */, | ||
| 869 | + 1938BD482B512C5800390A34 /* DownSlide */, | ||
| 870 | + 1938BD4A2B512CCE00390A34 /* MainView */, | ||
| 871 | + 1938BD492B512CA300390A34 /* UpSlide */, | ||
| 872 | + ); | ||
| 873 | + path = VerticalViews; | ||
| 874 | + sourceTree = "<group>"; | ||
| 875 | + }; | ||
| 794 | 19565EC32AF8ACC2007D6727 /* GoodsManager */ = { | 876 | 19565EC32AF8ACC2007D6727 /* GoodsManager */ = { |
| 795 | isa = PBXGroup; | 877 | isa = PBXGroup; |
| 796 | children = ( | 878 | children = ( |
| @@ -996,6 +1078,7 @@ | @@ -996,6 +1078,7 @@ | ||
| 996 | children = ( | 1078 | children = ( |
| 997 | 792E57D82A3AA2F2005834DB /* CNLiveCommonBaseModel.swift */, | 1079 | 792E57D82A3AA2F2005834DB /* CNLiveCommonBaseModel.swift */, |
| 998 | 792E57DA2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift */, | 1080 | 792E57DA2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift */, |
| 1081 | + 1938BD462B4FD5A500390A34 /* CNLiveIntegralAlertTool.swift */, | ||
| 999 | ); | 1082 | ); |
| 1000 | path = Util; | 1083 | path = Util; |
| 1001 | sourceTree = "<group>"; | 1084 | sourceTree = "<group>"; |
| @@ -1321,26 +1404,8 @@ | @@ -1321,26 +1404,8 @@ | ||
| 1321 | 7CD675232A26F8F8008354C1 /* View */ = { | 1404 | 7CD675232A26F8F8008354C1 /* View */ = { |
| 1322 | isa = PBXGroup; | 1405 | isa = PBXGroup; |
| 1323 | children = ( | 1406 | children = ( |
| 1324 | - 191733402B284D4A007BCC04 /* ShopCoupon */, | ||
| 1325 | - 19565ED02AF8D904007D6727 /* GoodsManager */, | ||
| 1326 | - 7CD675372A2740B0008354C1 /* CNUpSlideViewRemindView.swift */, | ||
| 1327 | - 7CD6753B2A2740B0008354C1 /* CNDownSlideView.swift */, | ||
| 1328 | - 7CD675382A2740B0008354C1 /* CNMainView.swift */, | ||
| 1329 | - 7CD6753A2A2740B0008354C1 /* CNDownSlideViewRemindView.swift */, | ||
| 1330 | - 7CD675392A2740B0008354C1 /* CNUpSlideView.swift */, | ||
| 1331 | - 7CD675412A2740F8008354C1 /* CNCustomIndexView.swift */, | ||
| 1332 | - 7C4931302A2F142F000E44B4 /* CNHomePageBackgroupView.swift */, | ||
| 1333 | - 7C4931372A307BDB000E44B4 /* CNHomePageGuideView.swift */, | ||
| 1334 | - 7C27032F2A36CBE30061EC50 /* CNCertificationView.swift */, | ||
| 1335 | - 19F1C2322AB5728B0083D06C /* CNIDCardView.swift */, | ||
| 1336 | - 19FA20162AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift */, | ||
| 1337 | - 19FA20182AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift */, | ||
| 1338 | - 19CC4D4E2ADD0FC200308E2A /* CNUpSlideDetailScrollView.swift */, | ||
| 1339 | - 19BB1FE92AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift */, | ||
| 1340 | - 19BB1FF12AF21A950094D962 /* CNLliveShopDetailBannerCell.swift */, | ||
| 1341 | - 19CC4D462ADD006600308E2A /* CNDownSlideSingleCourseCell.swift */, | ||
| 1342 | - 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */, | ||
| 1343 | - 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */, | 1407 | + 1938BD4E2B51316200390A34 /* VerticalViews */, |
| 1408 | + 1938BD4B2B512D3000390A34 /* Shop */, | ||
| 1344 | ); | 1409 | ); |
| 1345 | name = View; | 1410 | name = View; |
| 1346 | path = HomePage/View; | 1411 | path = HomePage/View; |
| @@ -1762,6 +1827,7 @@ | @@ -1762,6 +1827,7 @@ | ||
| 1762 | 191733562B2FE855007BCC04 /* CNLivePickerReusingModel.swift in Sources */, | 1827 | 191733562B2FE855007BCC04 /* CNLivePickerReusingModel.swift in Sources */, |
| 1763 | 790D019F2A2DD66E00C5978D /* CNLiveLoginViewModel.swift in Sources */, | 1828 | 790D019F2A2DD66E00C5978D /* CNLiveLoginViewModel.swift in Sources */, |
| 1764 | 1926C2912AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift in Sources */, | 1829 | 1926C2912AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift in Sources */, |
| 1830 | + 1938BD452B4E49CA00390A34 /* CNLiveDuanjuTitleCell.swift in Sources */, | ||
| 1765 | 7C7C62F62A4D72E9007A912E /* CNLiveIdentityDB.swift in Sources */, | 1831 | 7C7C62F62A4D72E9007A912E /* CNLiveIdentityDB.swift in Sources */, |
| 1766 | 19CC4D4F2ADD0FC200308E2A /* CNUpSlideDetailScrollView.swift in Sources */, | 1832 | 19CC4D4F2ADD0FC200308E2A /* CNUpSlideDetailScrollView.swift in Sources */, |
| 1767 | 191733642B392011007BCC04 /* CNLiveShopGoodsSearchViewController.swift in Sources */, | 1833 | 191733642B392011007BCC04 /* CNLiveShopGoodsSearchViewController.swift in Sources */, |
| @@ -1796,6 +1862,7 @@ | @@ -1796,6 +1862,7 @@ | ||
| 1796 | 191732FE2B0B3EBF007BCC04 /* CNLiveShopGoodsDetailsViewController.swift in Sources */, | 1862 | 191732FE2B0B3EBF007BCC04 /* CNLiveShopGoodsDetailsViewController.swift in Sources */, |
| 1797 | 79E496E32AB9357000127BF8 /* UITableViewCell+CNLiveExtension.swift in Sources */, | 1863 | 79E496E32AB9357000127BF8 /* UITableViewCell+CNLiveExtension.swift in Sources */, |
| 1798 | 7C83B4422A541EBF004BF4A4 /* CALayer+CNLiveExtensions.swift in Sources */, | 1864 | 7C83B4422A541EBF004BF4A4 /* CALayer+CNLiveExtensions.swift in Sources */, |
| 1865 | + 1938BD472B4FD5A500390A34 /* CNLiveIntegralAlertTool.swift in Sources */, | ||
| 1799 | 19565EC72AF8AD38007D6727 /* CNLiveShopNewProductController.swift in Sources */, | 1866 | 19565EC72AF8AD38007D6727 /* CNLiveShopNewProductController.swift in Sources */, |
| 1800 | 798A44F72A3077ED00815935 /* CNLiveHotButton.swift in Sources */, | 1867 | 798A44F72A3077ED00815935 /* CNLiveHotButton.swift in Sources */, |
| 1801 | 7CD6753D2A2740B0008354C1 /* CNMainView.swift in Sources */, | 1868 | 7CD6753D2A2740B0008354C1 /* CNMainView.swift in Sources */, |
| @@ -1882,6 +1949,7 @@ | @@ -1882,6 +1949,7 @@ | ||
| 1882 | 19FA201B2AE60423001F7186 /* CNLiveDownSlideModelLayout.swift in Sources */, | 1949 | 19FA201B2AE60423001F7186 /* CNLiveDownSlideModelLayout.swift in Sources */, |
| 1883 | 7C4931312A2F142F000E44B4 /* CNHomePageBackgroupView.swift in Sources */, | 1950 | 7C4931312A2F142F000E44B4 /* CNHomePageBackgroupView.swift in Sources */, |
| 1884 | 19BB1FF22AF21A950094D962 /* CNLliveShopDetailBannerCell.swift in Sources */, | 1951 | 19BB1FF22AF21A950094D962 /* CNLliveShopDetailBannerCell.swift in Sources */, |
| 1952 | + 1938BD432B4E34B200390A34 /* CNHomepageDuanJuDetailViewController.swift in Sources */, | ||
| 1885 | 790D018B2A2D8B3300C5978D /* CNLiveLoginViewController.swift in Sources */, | 1953 | 790D018B2A2D8B3300C5978D /* CNLiveLoginViewController.swift in Sources */, |
| 1886 | 7999415C2B4E8E8E0014C721 /* CNLiveRefresh.swift in Sources */, | 1954 | 7999415C2B4E8E8E0014C721 /* CNLiveRefresh.swift in Sources */, |
| 1887 | 19CC4D562ADD19C200308E2A /* String+Extension.swift in Sources */, | 1955 | 19CC4D562ADD19C200308E2A /* String+Extension.swift in Sources */, |
metaCode/Classes/Common/Base/CNLiveBaseTabBarViewController.swift
| @@ -64,7 +64,7 @@ class CNLiveBaseTabBarViewController: UITabBarController | @@ -64,7 +64,7 @@ class CNLiveBaseTabBarViewController: UITabBarController | ||
| 64 | 64 | ||
| 65 | creatTabbarView(viewController: homeVC, image: "tabbar_hoem_icon_default", selectImage: "tabbar_hoem_icon_selected", title: "首页") | 65 | creatTabbarView(viewController: homeVC, image: "tabbar_hoem_icon_default", selectImage: "tabbar_hoem_icon_selected", title: "首页") |
| 66 | 66 | ||
| 67 | - creatTabbarView(viewController: authVC, image: "tabbar_hoem_icon_default", selectImage: "tabbar_hoem_icon_selected", title: "认证") | 67 | + creatTabbarView(viewController: authVC, image: "tabbar_authentication_unSelect", selectImage: "tabbar_authentication", title: "认证") |
| 68 | 68 | ||
| 69 | creatTabbarView(viewController: mineVC, image: "tabbar_mine_icon_default", selectImage: "tabbar_mine_icon_selected", title: "我的") | 69 | creatTabbarView(viewController: mineVC, image: "tabbar_mine_icon_default", selectImage: "tabbar_mine_icon_selected", title: "我的") |
| 70 | 70 |
metaCode/Classes/Common/Util/CNLiveIntegralAlertTool.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveIntegralAlertTool.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/1/11. | ||
| 6 | +// 积分支付弹窗 | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | +import QMUIKit | ||
| 10 | +import SnapKit | ||
| 11 | + | ||
| 12 | +///积分支付状态类型 | ||
| 13 | +enum CNLiveIntegralPayStatus { | ||
| 14 | + ///积分充足 | ||
| 15 | + case integralEnough | ||
| 16 | + ///积分不足 | ||
| 17 | + case integralNotEnough | ||
| 18 | + ///支付中 | ||
| 19 | + case paying | ||
| 20 | + ///支付成功 | ||
| 21 | + case paySuccess | ||
| 22 | + ///支付失败 | ||
| 23 | + case payFailed | ||
| 24 | + | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +class CNLiveIntegralAlertTool:NSObject{ | ||
| 28 | + static let shared = CNLiveIntegralAlertTool() | ||
| 29 | + | ||
| 30 | + var homePageNeedReloadActionBlock:homePageNeedReloadBlockActionBlock? | ||
| 31 | + | ||
| 32 | + ///当前积分支付状态 | ||
| 33 | + var currentIntegralPayStatus: CNLiveIntegralPayStatus = .integralEnough | ||
| 34 | + | ||
| 35 | + let delegate = UIApplication.shared.delegate as! AppDelegate | ||
| 36 | + /// 专辑名称 | ||
| 37 | + var title:String = "" | ||
| 38 | + | ||
| 39 | + /// 专辑积分值 | ||
| 40 | + var integralCount:String = "0" | ||
| 41 | + /// 支付的商品id | ||
| 42 | + var productId:String = "" | ||
| 43 | + /// 用户积分值 | ||
| 44 | + var point:Int = 0 | ||
| 45 | + /// 用户积分model | ||
| 46 | + var checkInModel:MinePointCheckInModel? | ||
| 47 | + | ||
| 48 | + lazy var bgBtnView: UIButton = { | ||
| 49 | + let bgBtnView = UIButton(frame: self.delegate.window!.bounds) | ||
| 50 | + bgBtnView.backgroundColor = HexColor("#000000") | ||
| 51 | + bgBtnView.alpha = 0.6 | ||
| 52 | + bgBtnView.addTarget(self, action: #selector(bgBtnViewAction), for: .touchUpInside) | ||
| 53 | + return bgBtnView | ||
| 54 | + }() | ||
| 55 | + | ||
| 56 | + lazy var bottomBgView :UIView = { | ||
| 57 | + let bottomBgView = UIView(frame: CGRect(x: 0, y: KSreenHeight-267, width: KSreenWidth, height: 267)) | ||
| 58 | + bottomBgView.backgroundColor = HexColor("#FFFFFF") | ||
| 59 | + bottomBgView.layer.cornerRadius = 9 | ||
| 60 | + bottomBgView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] | ||
| 61 | + bottomBgView.tag = 10000 | ||
| 62 | + return bottomBgView | ||
| 63 | + }() | ||
| 64 | + | ||
| 65 | + ///专辑标题 | ||
| 66 | + lazy var albumTitleLabel: UILabel = { | ||
| 67 | + let titleLabel = UILabel.init(frame: CGRectMake(15, 15, KSreenWidth-15-60, 20)) | ||
| 68 | + titleLabel.textColor = HexColor("#333333") | ||
| 69 | + titleLabel.textAlignment = .left | ||
| 70 | + titleLabel.font = Font_16 | ||
| 71 | + titleLabel.text = "剧集名称45集" | ||
| 72 | + return titleLabel | ||
| 73 | + }() | ||
| 74 | + | ||
| 75 | + lazy var closeBtn: UIButton = { | ||
| 76 | + let closeBtn = UIButton(type: .custom) | ||
| 77 | + closeBtn.frame = CGRect(x: self.albumTitleLabel.right, y: 0, width: 50, height: 50) | ||
| 78 | + closeBtn.setImage(UIImage(named: "point_alert_close"), for: .normal) | ||
| 79 | + closeBtn.addTarget(self, action: #selector(closeBtnAction), for: .touchUpInside) | ||
| 80 | + return closeBtn | ||
| 81 | + }() | ||
| 82 | + | ||
| 83 | + lazy var bottomLineView :UIView = { | ||
| 84 | + let bottomLineView = UIView(frame: CGRect(x: 0, y: self.closeBtn.bottom+2, width: KSreenWidth, height: 1)) | ||
| 85 | + bottomLineView.backgroundColor = HexColor("#E4E4E4") | ||
| 86 | + return bottomLineView | ||
| 87 | + }() | ||
| 88 | + | ||
| 89 | + ///积分数量 | ||
| 90 | + lazy var integralCountLabel: UILabel = { | ||
| 91 | + let titleLabel = UILabel.init(frame: CGRectMake(0, self.bottomLineView.bottom+30, 100, 66)) | ||
| 92 | + titleLabel.textColor = HexColor("#333333") | ||
| 93 | + titleLabel.textAlignment = .left | ||
| 94 | + titleLabel.font = UIFont.boldSystemFont(ofSize: 55) | ||
| 95 | + titleLabel.text = "8000" | ||
| 96 | + return titleLabel | ||
| 97 | + }() | ||
| 98 | + ///余额XXX积分 | ||
| 99 | + lazy var balanceIntegralLabel: UILabel = { | ||
| 100 | + let titleLabel = UILabel.init(frame: CGRectMake(0, 0, 100, 20)) | ||
| 101 | + titleLabel.textColor = HexColor("#696969") | ||
| 102 | + titleLabel.textAlignment = .left | ||
| 103 | + titleLabel.font = Font_14 | ||
| 104 | + return titleLabel | ||
| 105 | + }() | ||
| 106 | + | ||
| 107 | + lazy var payBtn: UIButton = { | ||
| 108 | + let payBtn = UIButton(type: .custom) | ||
| 109 | + payBtn.frame = CGRect(x: 15, y: self.bottomBgView.height-15-44, width: KSreenWidth-30, height: 44) | ||
| 110 | + payBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal) | ||
| 111 | + // fillCode | ||
| 112 | + let bgLayer1 = CAGradientLayer() | ||
| 113 | + bgLayer1.colors = [UIColor(red: 0.4, green: 0.77, blue: 1, alpha: 1).cgColor, UIColor(red: 0.38, green: 0.6, blue: 1, alpha: 1).cgColor] | ||
| 114 | + bgLayer1.locations = [0, 1] | ||
| 115 | + bgLayer1.frame = payBtn.bounds | ||
| 116 | + bgLayer1.startPoint = CGPoint(x: 0, y: 0.5) | ||
| 117 | + bgLayer1.endPoint = CGPoint(x: 0.5, y: 0.5) | ||
| 118 | + payBtn.layer.addSublayer(bgLayer1) | ||
| 119 | + payBtn.addTarget(self, action: #selector(payBtnAction), for: .touchUpInside) | ||
| 120 | + return payBtn | ||
| 121 | + }() | ||
| 122 | + | ||
| 123 | + ///支付中img | ||
| 124 | + lazy var payingImgView :UIImageView = { | ||
| 125 | + let payingImgView = UIImageView(frame: CGRect(x: (KSreenWidth-45)/2.0, y: self.bottomLineView.bottom+65, width: 45, height: 43)) | ||
| 126 | + payingImgView.image = UIImage(named: "jifen_paying") | ||
| 127 | + return payingImgView | ||
| 128 | + }() | ||
| 129 | + ///支付成功img | ||
| 130 | + lazy var paySuccessImgView :UIImageView = { | ||
| 131 | + let paySuccessImgView = UIImageView(frame: CGRect(x: (KSreenWidth-78)/2.0, y: 60, width: 78, height: 78)) | ||
| 132 | + paySuccessImgView.image = UIImage(named: "jifen_paySuccess") | ||
| 133 | + return paySuccessImgView | ||
| 134 | + }() | ||
| 135 | + | ||
| 136 | + ///支付中 | ||
| 137 | + lazy var payingLabel: UILabel = { | ||
| 138 | + let titleLabel = UILabel.init(frame: CGRectMake(0, self.payingImgView.bottom+15, KSreenWidth-40, 20)) | ||
| 139 | + titleLabel.centerX = self.payingImgView.centerX | ||
| 140 | + titleLabel.textColor = HexColor("#333333") | ||
| 141 | + titleLabel.textAlignment = .center | ||
| 142 | + titleLabel.font = Font_14 | ||
| 143 | + return titleLabel | ||
| 144 | + }() | ||
| 145 | + | ||
| 146 | + // MARK: - show | ||
| 147 | + ///弹出积分购买弹窗 | ||
| 148 | + func showIntegralAlert(title:String,integralCount:String,productId:String){ | ||
| 149 | + self.title = title | ||
| 150 | + self.integralCount = integralCount | ||
| 151 | + self.productId = productId | ||
| 152 | + | ||
| 153 | + delegate.window?.addSubview(self.bgBtnView) | ||
| 154 | + delegate.window?.addSubview(self.bottomBgView) | ||
| 155 | + | ||
| 156 | + //专辑所需积分值 | ||
| 157 | + let intIntegralCount = Int(integralCount)! | ||
| 158 | + //用户积分值 | ||
| 159 | + self.getCheckIn { result, status in | ||
| 160 | + let checkInModel = result as! MinePointCheckInModel | ||
| 161 | + self.checkInModel = checkInModel | ||
| 162 | + let pointStr = checkInModel.integral ?? "0" | ||
| 163 | + let intPoint = Int(pointStr)! | ||
| 164 | + self.point = intPoint | ||
| 165 | + if intPoint > intIntegralCount{ | ||
| 166 | + //可以支付积分 | ||
| 167 | + self.currentIntegralPayStatus = .integralEnough | ||
| 168 | + | ||
| 169 | + }else{ | ||
| 170 | + //积分不足 | ||
| 171 | + self.currentIntegralPayStatus = .integralNotEnough | ||
| 172 | + } | ||
| 173 | + self.initUI() | ||
| 174 | + | ||
| 175 | + } | ||
| 176 | + } | ||
| 177 | + | ||
| 178 | + //隐藏积分购买弹窗 | ||
| 179 | + func hiddenIntegralAlert(){ | ||
| 180 | + delegate.window?.subviews.forEach({ view in | ||
| 181 | + if view.tag == 10000{ | ||
| 182 | + UIView.animate(withDuration: 0.25) { | ||
| 183 | + view.removeFromSuperview() | ||
| 184 | + self.bgBtnView.removeFromSuperview() | ||
| 185 | + } | ||
| 186 | + } | ||
| 187 | + }) | ||
| 188 | + } | ||
| 189 | + | ||
| 190 | + func initUI(){ | ||
| 191 | + self.bottomBgView.subviews.forEach { view in | ||
| 192 | + view.removeFromSuperview() | ||
| 193 | + } | ||
| 194 | + | ||
| 195 | + if self.currentIntegralPayStatus == .integralEnough{ | ||
| 196 | + //积分充足 | ||
| 197 | + self.bottomBgView.addSubview(self.albumTitleLabel) | ||
| 198 | + self.albumTitleLabel.text = self.title | ||
| 199 | + self.bottomBgView.addSubview(self.closeBtn) | ||
| 200 | + self.bottomBgView.addSubview(self.bottomLineView) | ||
| 201 | + self.bottomBgView.addSubview(self.integralCountLabel) | ||
| 202 | + let integralCountStr = "\(self.integralCount)积分" | ||
| 203 | + let priceAttri = NSMutableAttributedString.init(string: integralCountStr) | ||
| 204 | + priceAttri.addAttribute(.font, value: regular_adapt_font(pointSize: 55), range: NSMakeRange(0, integralCountStr.count-2)) | ||
| 205 | + priceAttri.addAttribute(.foregroundColor, value: HexColor("#333333")!, range: NSMakeRange(0, integralCountStr.count-2)) | ||
| 206 | + priceAttri.addAttribute(.font, value: regular_adapt_font(pointSize: 16), range: NSMakeRange(integralCountStr.count-2, 2)) | ||
| 207 | + priceAttri.addAttribute(.foregroundColor, value: HexColor("#333333")!, range: NSMakeRange(integralCountStr.count-2, 2)) | ||
| 208 | + self.integralCountLabel.attributedText = priceAttri | ||
| 209 | + | ||
| 210 | + self.bottomBgView.addSubview(self.balanceIntegralLabel) | ||
| 211 | + | ||
| 212 | + self.balanceIntegralLabel.text = String(format: "余额%d积分", self.point) | ||
| 213 | + | ||
| 214 | + self.bottomBgView.addSubview(self.payBtn) | ||
| 215 | + self.payBtn.setTitle("确认支付", for: .normal) | ||
| 216 | + | ||
| 217 | + self.integralCountLabel.snp.makeConstraints { make in | ||
| 218 | + make.centerX.equalTo(self.bottomBgView.snp.centerX) | ||
| 219 | + make.top.equalTo(self.bottomLineView.snp.bottom).offset(30) | ||
| 220 | + make.width.lessThanOrEqualToSuperview().offset(-10) | ||
| 221 | + } | ||
| 222 | + self.balanceIntegralLabel.snp.makeConstraints { make in | ||
| 223 | + make.centerX.equalTo(self.bottomBgView.snp.centerX) | ||
| 224 | + make.top.equalTo(self.integralCountLabel.snp.bottom).offset(5) | ||
| 225 | + make.width.lessThanOrEqualToSuperview() | ||
| 226 | + } | ||
| 227 | + | ||
| 228 | + }else if self.currentIntegralPayStatus == .integralNotEnough{ | ||
| 229 | + //积分不足 | ||
| 230 | + self.bottomBgView.addSubview(self.albumTitleLabel) | ||
| 231 | + self.albumTitleLabel.text = self.title | ||
| 232 | + self.bottomBgView.addSubview(self.closeBtn) | ||
| 233 | + self.bottomBgView.addSubview(self.bottomLineView) | ||
| 234 | + self.bottomBgView.addSubview(self.integralCountLabel) | ||
| 235 | + let integralCountStr = "\(self.integralCount)积分" | ||
| 236 | + let priceAttri = NSMutableAttributedString.init(string: integralCountStr) | ||
| 237 | + priceAttri.addAttribute(.font, value: regular_adapt_font(pointSize: 55), range: NSMakeRange(0, integralCountStr.count-2)) | ||
| 238 | + priceAttri.addAttribute(.foregroundColor, value: HexColor("#333333")!, range: NSMakeRange(0, integralCountStr.count-2)) | ||
| 239 | + priceAttri.addAttribute(.font, value: regular_adapt_font(pointSize: 16), range: NSMakeRange(integralCountStr.count-2, 2)) | ||
| 240 | + priceAttri.addAttribute(.foregroundColor, value: HexColor("#333333")!, range: NSMakeRange(integralCountStr.count-2, 2)) | ||
| 241 | + self.integralCountLabel.attributedText = priceAttri | ||
| 242 | + | ||
| 243 | + self.bottomBgView.addSubview(self.balanceIntegralLabel) | ||
| 244 | + self.balanceIntegralLabel.text = String(format: "余额%d积分 积分不足", self.point) | ||
| 245 | + | ||
| 246 | + self.bottomBgView.addSubview(self.payBtn) | ||
| 247 | + self.payBtn.setTitle("去赚积分", for: .normal) | ||
| 248 | + | ||
| 249 | + self.integralCountLabel.snp.makeConstraints { make in | ||
| 250 | + make.centerX.equalTo(self.bottomBgView.snp.centerX) | ||
| 251 | + make.top.equalTo(self.bottomLineView.snp.bottom).offset(30) | ||
| 252 | + make.width.lessThanOrEqualToSuperview().offset(-10) | ||
| 253 | + } | ||
| 254 | + self.balanceIntegralLabel.snp.makeConstraints { make in | ||
| 255 | + make.centerX.equalTo(self.bottomBgView.snp.centerX) | ||
| 256 | + make.top.equalTo(self.integralCountLabel.snp.bottom).offset(5) | ||
| 257 | + make.width.lessThanOrEqualToSuperview() | ||
| 258 | + } | ||
| 259 | + }else if self.currentIntegralPayStatus == .paying{ | ||
| 260 | + //支付中 | ||
| 261 | + self.bottomBgView.addSubview(self.albumTitleLabel) | ||
| 262 | + self.albumTitleLabel.text = self.title | ||
| 263 | + self.bottomBgView.addSubview(self.closeBtn) | ||
| 264 | + self.bottomBgView.addSubview(self.bottomLineView) | ||
| 265 | + self.bottomBgView.addSubview(self.payingImgView) | ||
| 266 | + self.payingImgView = UIImageView(frame: CGRect(x: (KSreenWidth-45)/2.0, y: self.bottomLineView.bottom+65, width: 45, height: 43)) | ||
| 267 | + self.payingImgView.image = UIImage(named: "jifen_paying") | ||
| 268 | + | ||
| 269 | + self.bottomBgView.addSubview(self.payingLabel) | ||
| 270 | + self.payingLabel.text = "支付中..." | ||
| 271 | + | ||
| 272 | + }else if self.currentIntegralPayStatus == .paySuccess{ | ||
| 273 | + //支付成功 | ||
| 274 | + self.bottomBgView.addSubview(self.paySuccessImgView) | ||
| 275 | + self.paySuccessImgView = UIImageView(frame: CGRect(x: (KSreenWidth-78)/2.0, y: 60, width: 78, height: 78)) | ||
| 276 | + self.paySuccessImgView.image = UIImage(named: "jifen_paySuccess") | ||
| 277 | + | ||
| 278 | + self.bottomBgView.addSubview(self.payingLabel) | ||
| 279 | + self.payingLabel.text = "支付成功\(self.integralCount)积分" | ||
| 280 | + | ||
| 281 | + self.bottomBgView.addSubview(self.payBtn) | ||
| 282 | + self.payBtn.setTitle("完成", for: .normal) | ||
| 283 | + | ||
| 284 | + }else if self.currentIntegralPayStatus == .payFailed{ | ||
| 285 | + //支付失败 | ||
| 286 | + }else{ | ||
| 287 | + //其他 | ||
| 288 | + } | ||
| 289 | + } | ||
| 290 | + | ||
| 291 | + //获取用户积分 | ||
| 292 | + func getCheckIn(resultBlock: @escaping downSlideResultBlock){ | ||
| 293 | + CNLiveMineViewModel.requestWithCheckIn { result, respStatue in | ||
| 294 | + if respStatue == .success { | ||
| 295 | + let checkModel = result as! MinePointCheckInModel | ||
| 296 | + resultBlock(checkModel, .success) | ||
| 297 | + } else { | ||
| 298 | + resultBlock(NSNull(), .failed) | ||
| 299 | + } | ||
| 300 | + } | ||
| 301 | + } | ||
| 302 | + | ||
| 303 | + // MARK: - BtnAction | ||
| 304 | + @objc func bgBtnViewAction(){ | ||
| 305 | + self.hiddenIntegralAlert() | ||
| 306 | + } | ||
| 307 | + @objc func closeBtnAction(){ | ||
| 308 | + self.hiddenIntegralAlert() | ||
| 309 | + } | ||
| 310 | + @objc func payBtnAction(){ | ||
| 311 | + if self.currentIntegralPayStatus == .integralEnough{ | ||
| 312 | + self.postOrderVideoByPoint() | ||
| 313 | + }else if self.currentIntegralPayStatus == .integralNotEnough{ | ||
| 314 | + self.hiddenIntegralAlert() | ||
| 315 | + //跳转任务中心 | ||
| 316 | + navigationViewController().pushViewController(CNLiveMineQuestViewController(checkModel: self.checkInModel!), animated: pushAnimated) | ||
| 317 | + | ||
| 318 | + }else if self.currentIntegralPayStatus == .paying{ | ||
| 319 | + | ||
| 320 | + }else if self.currentIntegralPayStatus == .paySuccess{ | ||
| 321 | + self.hiddenIntegralAlert() | ||
| 322 | + }else if self.currentIntegralPayStatus == .payFailed{ | ||
| 323 | + self.currentIntegralPayStatus = .integralEnough | ||
| 324 | + self.initUI() | ||
| 325 | + }else{ | ||
| 326 | + | ||
| 327 | + } | ||
| 328 | + } | ||
| 329 | + // MARK: - 积分付费接口 | ||
| 330 | + func postOrderVideoByPoint(){ | ||
| 331 | + self.currentIntegralPayStatus = .paying | ||
| 332 | + self.initUI() | ||
| 333 | + //付费接口 | ||
| 334 | + CNLiveHomePageViewModel.orderVideoByPoint(prdId: self.productId) { result, status in | ||
| 335 | + if status == .success{ | ||
| 336 | + //购买成功 | ||
| 337 | + self.currentIntegralPayStatus = .paySuccess | ||
| 338 | + self.initUI() | ||
| 339 | + //刷新短剧首页数据 | ||
| 340 | + self.homePageNeedReloadActionBlock!() | ||
| 341 | + }else{ | ||
| 342 | + //购买失败 | ||
| 343 | + if self.point > Int(self.integralCount)!{ | ||
| 344 | + //可以支付积分 | ||
| 345 | + self.currentIntegralPayStatus = .integralEnough | ||
| 346 | + }else{ | ||
| 347 | + //积分不足 | ||
| 348 | + self.currentIntegralPayStatus = .integralNotEnough | ||
| 349 | + } | ||
| 350 | + self.initUI() | ||
| 351 | + let errMsg = result as! String | ||
| 352 | + showMessage(message: errMsg) | ||
| 353 | + } | ||
| 354 | + } | ||
| 355 | + | ||
| 356 | + } | ||
| 357 | + | ||
| 358 | + | ||
| 359 | +} |
metaCode/Classes/Extensions/NSObject+CNLiveExtensions.swift
| @@ -166,7 +166,6 @@ func hiddenLoading() { | @@ -166,7 +166,6 @@ func hiddenLoading() { | ||
| 166 | MBProgressHUD.hide(for: delegate.window!, animated: true) | 166 | MBProgressHUD.hide(for: delegate.window!, animated: true) |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | - | ||
| 170 | ///####模型转换######### | 169 | ///####模型转换######### |
| 171 | /** | 170 | /** |
| 172 | * Json转对象 | 171 | * Json转对象 |
metaCode/Classes/Main/HomePage/Controller/AuthMainController/CNMetaCodeHomePageController.swift
| @@ -370,8 +370,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | @@ -370,8 +370,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | ||
| 370 | return true | 370 | return true |
| 371 | } | 371 | } |
| 372 | 372 | ||
| 373 | - // MARK: - NewPagedFlowView代理 | ||
| 374 | - | 373 | + // MARK: - NewPagedFlowView代理 水平方向滑动 |
| 375 | func numberOfPages(in flowView: NewPagedFlowView!) -> Int { | 374 | func numberOfPages(in flowView: NewPagedFlowView!) -> Int { |
| 376 | self.dataArray.count | 375 | self.dataArray.count |
| 377 | } | 376 | } |
| @@ -411,39 +410,37 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | @@ -411,39 +410,37 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | ||
| 411 | return CGSize(width: MainViewW, height: Height) | 410 | return CGSize(width: MainViewW, height: Height) |
| 412 | } | 411 | } |
| 413 | 412 | ||
| 414 | - ///NewPagedFlowView 开始滑动 | 413 | + ///NewPagedFlowView 水平方向开始滑动 |
| 415 | func willBeginScroll(_ scrollView: UIScrollView!) { | 414 | func willBeginScroll(_ scrollView: UIScrollView!) { |
| 416 | beginOffset = scrollView.contentOffset.x | 415 | beginOffset = scrollView.contentOffset.x |
| 417 | } | 416 | } |
| 418 | ///NewPagedFlowView 滑动中 | 417 | ///NewPagedFlowView 滑动中 |
| 419 | func didScroll(_ scrollView: UIScrollView!) { | 418 | func didScroll(_ scrollView: UIScrollView!) { |
| 420 | - | ||
| 421 | let currentOffset:CGFloat = scrollView.contentOffset.x | 419 | let currentOffset:CGFloat = scrollView.contentOffset.x |
| 422 | 420 | ||
| 423 | if(currentOffset > beginOffset){ | 421 | if(currentOffset > beginOffset){ |
| 424 | 422 | ||
| 425 | if let rightView = self.backgroupView.getRightView(){ | 423 | if let rightView = self.backgroupView.getRightView(){ |
| 426 | - | ||
| 427 | if let currentApearView = self.backgroupView.currentApearView{ | 424 | if let currentApearView = self.backgroupView.currentApearView{ |
| 428 | self.backgroupView.insertSubview(rightView, belowSubview: currentApearView) | 425 | self.backgroupView.insertSubview(rightView, belowSubview: currentApearView) |
| 429 | } | 426 | } |
| 430 | 427 | ||
| 431 | self.backgroupView.currentApearView?.maskLayer.right = KSreenWidth - (currentOffset-beginOffset)*2.5 | 428 | self.backgroupView.currentApearView?.maskLayer.right = KSreenWidth - (currentOffset-beginOffset)*2.5 |
| 432 | }else{ | 429 | }else{ |
| 433 | - | 430 | + |
| 434 | } | 431 | } |
| 435 | } | 432 | } |
| 436 | 433 | ||
| 437 | if(currentOffset < beginOffset){ | 434 | if(currentOffset < beginOffset){ |
| 438 | if let leftView = self.backgroupView.getLeftView(){ | 435 | if let leftView = self.backgroupView.getLeftView(){ |
| 439 | - | 436 | + |
| 440 | if let currentApearView = self.backgroupView.currentApearView{ | 437 | if let currentApearView = self.backgroupView.currentApearView{ |
| 441 | self.backgroupView.insertSubview(leftView, belowSubview: currentApearView) | 438 | self.backgroupView.insertSubview(leftView, belowSubview: currentApearView) |
| 442 | } | 439 | } |
| 443 | 440 | ||
| 444 | self.backgroupView.currentApearView?.maskLayer.left = (beginOffset-currentOffset)*2.5 | 441 | self.backgroupView.currentApearView?.maskLayer.left = (beginOffset-currentOffset)*2.5 |
| 445 | }else{ | 442 | }else{ |
| 446 | - | 443 | + |
| 447 | } | 444 | } |
| 448 | } | 445 | } |
| 449 | } | 446 | } |
metaCode/Classes/Main/HomePage/View/CNCertificationView.swift deleted
100644 → 0
| 1 | -// | ||
| 2 | -// CNCertificationView.swift | ||
| 3 | -// metaCode | ||
| 4 | -// | ||
| 5 | -// Created by daojian on 2023/6/12. | ||
| 6 | -// | ||
| 7 | - | ||
| 8 | -import Foundation | ||
| 9 | - | ||
| 10 | -///身份认证View | ||
| 11 | -class CNCertificationView : UIView{ | ||
| 12 | - ///添加身份点击事件回调 | ||
| 13 | - var addCertificationAction: closeBlock? | ||
| 14 | - | ||
| 15 | - lazy var contentView: UIView = { | ||
| 16 | - let W = self.width-50 | ||
| 17 | - let H = W*1.5 | ||
| 18 | - let contentView = UIView.init(frame: CGRect(x: 25, y: KSreenHeight*0.16, width: W, height: H )) | ||
| 19 | - contentView.backgroundColor = UIColor.white | ||
| 20 | - contentView.clipsToBounds = true | ||
| 21 | - contentView.layer.cornerRadius = 20 | ||
| 22 | - | ||
| 23 | - return contentView | ||
| 24 | - | ||
| 25 | - }() | ||
| 26 | - | ||
| 27 | -// ///添加身份认证按钮 | ||
| 28 | -// lazy var addCerBtn: UIButton = { | ||
| 29 | -// let addCerBtn = UIButton(type: .custom) | ||
| 30 | -// addCerBtn.frame = CGRect(x: 0, y: 0, width: 145, height: 141) | ||
| 31 | -// addCerBtn.centerX = self.contentView.width/2 | ||
| 32 | -// addCerBtn.centerY = self.contentView.height/2 | ||
| 33 | -// addCerBtn.setImage(UIImage(named: "homePage_addCertification_icon"), for: .normal) | ||
| 34 | -// addCerBtn.addTarget(self, action: #selector(addCerBtnAction), for: .touchUpInside) | ||
| 35 | -// return addCerBtn | ||
| 36 | -// }() | ||
| 37 | -// | ||
| 38 | -// ///添加身份按钮底部标题 | ||
| 39 | -// lazy var addCerBtnBottomTitle: UILabel = { | ||
| 40 | -// let addCerBtnBottomTitle = UILabel(frame: CGRect(x: 0, y: self.addCerBtn.bottom - 10, width: 100, height: 22)) | ||
| 41 | -// addCerBtnBottomTitle.centerX = self.addCerBtn.centerX | ||
| 42 | -// addCerBtnBottomTitle.textColor = UIColor("#0066FE") | ||
| 43 | -// addCerBtnBottomTitle.textAlignment = .center | ||
| 44 | -// addCerBtnBottomTitle.font = UIFont.systemFont(ofSize: 15, weight: .regular) | ||
| 45 | -// addCerBtnBottomTitle.text = "身份认证" | ||
| 46 | -// return addCerBtnBottomTitle | ||
| 47 | -// | ||
| 48 | -// }() | ||
| 49 | - | ||
| 50 | - override init(frame: CGRect) { | ||
| 51 | - super.init(frame: frame) | ||
| 52 | - self.initUI() | ||
| 53 | - | ||
| 54 | - } | ||
| 55 | - | ||
| 56 | - required init?(coder: NSCoder) { | ||
| 57 | - fatalError("init(coder:) has not been implemented") | ||
| 58 | - } | ||
| 59 | - | ||
| 60 | - func initUI() | ||
| 61 | - { | ||
| 62 | - self.addSubview(self.contentView) | ||
| 63 | -// self.contentView.addSubview(self.addCerBtn) | ||
| 64 | -// self.contentView.addSubview(self.addCerBtnBottomTitle) | ||
| 65 | -// } | ||
| 66 | - | ||
| 67 | -// @objc func addCerBtnAction(){ | ||
| 68 | -// | ||
| 69 | -// if(self.addCertificationAction != nil){ | ||
| 70 | -// self.addCertificationAction!() | ||
| 71 | -// } | ||
| 72 | -// | ||
| 73 | - } | ||
| 74 | -} |
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveAddGoodsSelectUploadImageView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveAddGoodsSelectUploadImageView.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveRoundedRectView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveRoundedRectView.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveSelUplSingleImageView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveSelUplSingleImageView.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveShopAddGoodsSingleView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveShopAddGoodsSingleView.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveShopAssociatedGoodsTableViewCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveShopAssociatedGoodsTableViewCell.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveShopClassifyCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveShopClassifyCell.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveShopClassifyInputTableViewCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveShopClassifyInputTableViewCell.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveShopClassifySectionHeaderView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveShopClassifySectionHeaderView.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveShopClassifySwitchTableViewCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveShopClassifySwitchTableViewCell.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveShopClassilyIconTableViewCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveShopClassilyIconTableViewCell.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveShopClassilyManageHeaderView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveShopClassilyManageHeaderView.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveShopClassilyManageTableViewCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveShopClassilyManageTableViewCell.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveShopGoodsListCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveShopGoodsListCell.swift
| @@ -50,7 +50,7 @@ class CNLiveShopGoodsListCell: UITableViewCell { | @@ -50,7 +50,7 @@ class CNLiveShopGoodsListCell: UITableViewCell { | ||
| 50 | titleLabel.textAlignment = .left | 50 | titleLabel.textAlignment = .left |
| 51 | titleLabel.font = Font_15 | 51 | titleLabel.font = Font_15 |
| 52 | titleLabel.adjustsFontSizeToFitWidth=true | 52 | titleLabel.adjustsFontSizeToFitWidth=true |
| 53 | - titleLabel.text = "啊啊啊啊啊" | 53 | + titleLabel.text = "标题" |
| 54 | return titleLabel | 54 | return titleLabel |
| 55 | }() | 55 | }() |
| 56 | ///副标题 | 56 | ///副标题 |
| @@ -60,7 +60,7 @@ class CNLiveShopGoodsListCell: UITableViewCell { | @@ -60,7 +60,7 @@ class CNLiveShopGoodsListCell: UITableViewCell { | ||
| 60 | subTitleLabel.textAlignment = .left | 60 | subTitleLabel.textAlignment = .left |
| 61 | subTitleLabel.font = Font_13 | 61 | subTitleLabel.font = Font_13 |
| 62 | subTitleLabel.adjustsFontSizeToFitWidth=true | 62 | subTitleLabel.adjustsFontSizeToFitWidth=true |
| 63 | - subTitleLabel.text = "啊啊啊啊" | 63 | + subTitleLabel.text = "副标题" |
| 64 | return subTitleLabel | 64 | return subTitleLabel |
| 65 | }() | 65 | }() |
| 66 | ///价格 | 66 | ///价格 |
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveShopGoodsListClassifyView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveShopGoodsListClassifyView.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveShopGoodsManageDetailsInputManager.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveShopGoodsManageDetailsInputManager.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveShopGoodsManageListTableViewCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveShopGoodsManageListTableViewCell.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveShopTextView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveShopTextView.swift
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveSwitchView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/GoodsManager/CNLiveSwitchView.swift
metaCode/Classes/Main/HomePage/View/CNLiveShopConsoleCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopConsole/CNLiveShopConsoleCell.swift
metaCode/Classes/Main/HomePage/View/ShopCoupon/CNLiveCouponGoodsListSearchView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopCoupon/CNLiveCouponGoodsListSearchView.swift
metaCode/Classes/Main/HomePage/View/ShopCoupon/CNLiveCouponGoodsListTableViewCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopCoupon/CNLiveCouponGoodsListTableViewCell.swift
metaCode/Classes/Main/HomePage/View/ShopCoupon/CNLiveCouponGoodsListView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopCoupon/CNLiveCouponGoodsListView.swift
metaCode/Classes/Main/HomePage/View/ShopCoupon/CNLiveCouponGoodsSearchView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopCoupon/CNLiveCouponGoodsSearchView.swift
metaCode/Classes/Main/HomePage/View/ShopCoupon/CNLiveCouponListTableViewCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopCoupon/CNLiveCouponListTableViewCell.swift
metaCode/Classes/Main/HomePage/View/ShopCoupon/CNLiveCreateCouponTableViewCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopCoupon/CNLiveCreateCouponTableViewCell.swift
metaCode/Classes/Main/HomePage/View/ShopCoupon/CNLiveCreateCouponTypeMoneyView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopCoupon/CNLiveCreateCouponTypeMoneyView.swift
metaCode/Classes/Main/HomePage/View/ShopCoupon/CNLivePickerSelectDateTools.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopCoupon/CNLivePickerSelectDateTools.swift
metaCode/Classes/Main/HomePage/View/ShopCoupon/CNLivePickerToolsView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopCoupon/CNLivePickerToolsView.swift
metaCode/Classes/Main/HomePage/View/ShopCoupon/CNLivePickerView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopCoupon/CNLivePickerView.swift
metaCode/Classes/Main/HomePage/View/ShopCoupon/CNLiveSelectCouponTapView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopCoupon/CNLiveSelectCouponTapView.swift
metaCode/Classes/Main/HomePage/View/ShopCoupon/CNLiveShopCouponCreateBottomView.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopCoupon/CNLiveShopCouponCreateBottomView.swift
metaCode/Classes/Main/HomePage/View/CNLiveShopDetailBtnsCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopDetail/CNLiveShopDetailBtnsCell.swift
metaCode/Classes/Main/HomePage/View/CNLiveShopDetailOrderAssetCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopDetail/CNLiveShopDetailOrderAssetCell.swift
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | // metaCode | 3 | // metaCode |
| 4 | // | 4 | // |
| 5 | // Created by zx on 2023/11/4. | 5 | // Created by zx on 2023/11/4. |
| 6 | -// 我的订单,我的资产 | 6 | +// 电商上滑详情页(下面的页) banner下的 我的订单,我的资产cell |
| 7 | 7 | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | enum CNLiveShopDetailDisplayType { | 9 | enum CNLiveShopDetailDisplayType { |
metaCode/Classes/Main/HomePage/View/CNLliveShopDetailBannerCell.swift renamed to metaCode/Classes/Main/HomePage/View/Shop/ShopDetail/CNLliveShopDetailBannerCell.swift
metaCode/Classes/Main/HomePage/View/CNCustomIndexView.swift renamed to metaCode/Classes/Main/HomePage/View/VerticalViews/CNCustomIndexView.swift
metaCode/Classes/Main/HomePage/View/CNDownSlideSingleCourseCell.swift renamed to metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideSingleCourseCell.swift
metaCode/Classes/Main/HomePage/View/CNDownSlideView.swift renamed to metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideView.swift
metaCode/Classes/Main/HomePage/View/CNDownSlideViewRemindView.swift renamed to metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideViewRemindView.swift
metaCode/Classes/Main/HomePage/View/CNLiveDownSlideRecommendCell.swift renamed to metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNLiveDownSlideRecommendCell.swift
metaCode/Classes/Main/HomePage/View/CNLiveDownSlideTodayRecommendCell.swift renamed to metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNLiveDownSlideTodayRecommendCell.swift
metaCode/Classes/Main/HomePage/View/CNUpSlideDetailScrollView.swift renamed to metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNUpSlideDetailScrollView.swift
metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNCertificationView.swift
0 → 100644
| 1 | +//// | ||
| 2 | +//// CNCertificationView.swift | ||
| 3 | +//// metaCode | ||
| 4 | +//// | ||
| 5 | +//// Created by daojian on 2023/6/12. | ||
| 6 | +//// 旧卡片(废弃) | ||
| 7 | +// | ||
| 8 | +//import Foundation | ||
| 9 | +// | ||
| 10 | +/////身份认证View | ||
| 11 | +//class CNCertificationView : UIView{ | ||
| 12 | +// ///添加身份点击事件回调 | ||
| 13 | +// var addCertificationAction: closeBlock? | ||
| 14 | +// | ||
| 15 | +// lazy var contentView: UIView = { | ||
| 16 | +// let W = self.width-50 | ||
| 17 | +// let H = W*1.5 | ||
| 18 | +// let contentView = UIView.init(frame: CGRect(x: 25, y: KSreenHeight*0.16, width: W, height: H )) | ||
| 19 | +// contentView.backgroundColor = UIColor.white | ||
| 20 | +// contentView.clipsToBounds = true | ||
| 21 | +// contentView.layer.cornerRadius = 20 | ||
| 22 | +// | ||
| 23 | +// return contentView | ||
| 24 | +// | ||
| 25 | +// }() | ||
| 26 | +// | ||
| 27 | +//// ///添加身份认证按钮 | ||
| 28 | +//// lazy var addCerBtn: UIButton = { | ||
| 29 | +//// let addCerBtn = UIButton(type: .custom) | ||
| 30 | +//// addCerBtn.frame = CGRect(x: 0, y: 0, width: 145, height: 141) | ||
| 31 | +//// addCerBtn.centerX = self.contentView.width/2 | ||
| 32 | +//// addCerBtn.centerY = self.contentView.height/2 | ||
| 33 | +//// addCerBtn.setImage(UIImage(named: "homePage_addCertification_icon"), for: .normal) | ||
| 34 | +//// addCerBtn.addTarget(self, action: #selector(addCerBtnAction), for: .touchUpInside) | ||
| 35 | +//// return addCerBtn | ||
| 36 | +//// }() | ||
| 37 | +//// | ||
| 38 | +//// ///添加身份按钮底部标题 | ||
| 39 | +//// lazy var addCerBtnBottomTitle: UILabel = { | ||
| 40 | +//// let addCerBtnBottomTitle = UILabel(frame: CGRect(x: 0, y: self.addCerBtn.bottom - 10, width: 100, height: 22)) | ||
| 41 | +//// addCerBtnBottomTitle.centerX = self.addCerBtn.centerX | ||
| 42 | +//// addCerBtnBottomTitle.textColor = UIColor("#0066FE") | ||
| 43 | +//// addCerBtnBottomTitle.textAlignment = .center | ||
| 44 | +//// addCerBtnBottomTitle.font = UIFont.systemFont(ofSize: 15, weight: .regular) | ||
| 45 | +//// addCerBtnBottomTitle.text = "身份认证" | ||
| 46 | +//// return addCerBtnBottomTitle | ||
| 47 | +//// | ||
| 48 | +//// }() | ||
| 49 | +// | ||
| 50 | +// override init(frame: CGRect) { | ||
| 51 | +// super.init(frame: frame) | ||
| 52 | +// self.initUI() | ||
| 53 | +// | ||
| 54 | +// } | ||
| 55 | +// | ||
| 56 | +// required init?(coder: NSCoder) { | ||
| 57 | +// fatalError("init(coder:) has not been implemented") | ||
| 58 | +// } | ||
| 59 | +// | ||
| 60 | +// func initUI() | ||
| 61 | +// { | ||
| 62 | +// self.addSubview(self.contentView) | ||
| 63 | +//// self.contentView.addSubview(self.addCerBtn) | ||
| 64 | +//// self.contentView.addSubview(self.addCerBtnBottomTitle) | ||
| 65 | +//// } | ||
| 66 | +// | ||
| 67 | +//// @objc func addCerBtnAction(){ | ||
| 68 | +//// | ||
| 69 | +//// if(self.addCertificationAction != nil){ | ||
| 70 | +//// self.addCertificationAction!() | ||
| 71 | +//// } | ||
| 72 | +//// | ||
| 73 | +// } | ||
| 74 | +//} |
metaCode/Classes/Main/HomePage/View/CNHomePageBackgroupView.swift renamed to metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNHomePageBackgroupView.swift
metaCode/Classes/Main/HomePage/View/CNHomePageGuideView.swift renamed to metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNHomePageGuideView.swift
metaCode/Classes/Main/HomePage/View/CNIDCardView.swift renamed to metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNIDCardView.swift
metaCode/Classes/Main/HomePage/View/CNMainView.swift renamed to metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNMainView.swift
metaCode/Classes/Main/HomePage/View/CNUpSlideView.swift renamed to metaCode/Classes/Main/HomePage/View/VerticalViews/UpSlide/CNUpSlideView.swift
metaCode/Classes/Main/HomePage/View/CNUpSlideViewRemindView.swift renamed to metaCode/Classes/Main/HomePage/View/VerticalViews/UpSlide/CNUpSlideViewRemindView.swift
metaCode/Classes/Main/HomePages/Controller/AuthController/CNLiveAuthViewController.swift
| @@ -28,7 +28,8 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | @@ -28,7 +28,8 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | ||
| 28 | var totolNum = 0//一共显示多少行cell | 28 | var totolNum = 0//一共显示多少行cell |
| 29 | 29 | ||
| 30 | var selectedCell: CNDownSlideSingleCourseCell? | 30 | var selectedCell: CNDownSlideSingleCourseCell? |
| 31 | - | 31 | + var selectedDuanjuCell: CNLiveHomePageDuanJuCell? |
| 32 | + | ||
| 32 | var statusBarShouldBeHidden = false | 33 | var statusBarShouldBeHidden = false |
| 33 | //we need to set `View controller-based status bar appearance = YES` in info.plist. | 34 | //we need to set `View controller-based status bar appearance = YES` in info.plist. |
| 34 | //so we can be able to hide statusBar. | 35 | //so we can be able to hide statusBar. |
| @@ -40,16 +41,6 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | @@ -40,16 +41,6 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | ||
| 40 | return .slide | 41 | return .slide |
| 41 | } | 42 | } |
| 42 | 43 | ||
| 43 | - var _downPath:String? | ||
| 44 | - var downPath:String? { | ||
| 45 | - get{ | ||
| 46 | - return _downPath | ||
| 47 | - } | ||
| 48 | - set{ | ||
| 49 | - _downPath = newValue! | ||
| 50 | - } | ||
| 51 | - } | ||
| 52 | - | ||
| 53 | // MARK: - 懒加载 | 44 | // MARK: - 懒加载 |
| 54 | ///数据源 | 45 | ///数据源 |
| 55 | lazy var dataArray: NSMutableArray = { | 46 | lazy var dataArray: NSMutableArray = { |
| @@ -57,9 +48,16 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | @@ -57,9 +48,16 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | ||
| 57 | return dataArray | 48 | return dataArray |
| 58 | }() | 49 | }() |
| 59 | 50 | ||
| 51 | + //短剧的数据源 | ||
| 52 | + lazy var duanjuDataArray: NSMutableArray = { | ||
| 53 | + var dataArray = NSMutableArray() | ||
| 54 | + return dataArray | ||
| 55 | + }() | ||
| 56 | + | ||
| 60 | override func viewWillAppear(_ animated: Bool) { | 57 | override func viewWillAppear(_ animated: Bool) { |
| 61 | super.viewWillAppear(animated) | 58 | super.viewWillAppear(animated) |
| 62 | self.updateStatusBarAndTabbarFrame(visible: true) | 59 | self.updateStatusBarAndTabbarFrame(visible: true) |
| 60 | + self.getMyAlbumCollection(page: 1) | ||
| 63 | } | 61 | } |
| 64 | override func viewDidLoad() { | 62 | override func viewDidLoad() { |
| 65 | super.viewDidLoad() | 63 | super.viewDidLoad() |
| @@ -115,6 +113,20 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | @@ -115,6 +113,20 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | ||
| 115 | else { | 113 | else { |
| 116 | return CNLiveHomePageDuanJuCell() | 114 | return CNLiveHomePageDuanJuCell() |
| 117 | } | 115 | } |
| 116 | + cell.setModelArr(modelArr: self.duanjuDataArray) | ||
| 117 | + cell.DuanJUCellSelectedCallBack = { | ||
| 118 | + duanJuCell in | ||
| 119 | + self.selectedDuanjuCell = duanJuCell | ||
| 120 | + | ||
| 121 | + let detailVC = CNHomePageBaseNavigationController(rootViewController:CNHomepageDuanJuDetailViewController(cell: duanJuCell)) | ||
| 122 | + | ||
| 123 | + detailVC.dismissClosure = { [weak self] in | ||
| 124 | + guard let StrongSelf = self else { return } | ||
| 125 | + StrongSelf.updateStatusBarAndTabbarFrame(visible: true) | ||
| 126 | + } | ||
| 127 | + self.updateStatusBarAndTabbarFrame(visible: false) | ||
| 128 | + self.present(detailVC, animated: true, completion: nil) | ||
| 129 | + } | ||
| 118 | return cell | 130 | return cell |
| 119 | }else{ | 131 | }else{ |
| 120 | let slideModel = self.dataArray[indexPath.row] as! CNLiveDownSlideModel | 132 | let slideModel = self.dataArray[indexPath.row] as! CNLiveDownSlideModel |
| @@ -189,6 +201,18 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | @@ -189,6 +201,18 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | ||
| 189 | 201 | ||
| 190 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | 202 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
| 191 | if self.isHaveDuanJU && indexPath.section == 0{ | 203 | if self.isHaveDuanJU && indexPath.section == 0{ |
| 204 | + //点击在追短剧 | ||
| 205 | + guard let cell = tableView.cellForRow(at: indexPath) as? CNLiveHomePageDuanJuCell else { return } | ||
| 206 | + selectedDuanjuCell = cell | ||
| 207 | + | ||
| 208 | + let detailVC = CNHomePageBaseNavigationController(rootViewController:CNHomepageDuanJuDetailViewController(cell: selectedDuanjuCell!)) | ||
| 209 | + | ||
| 210 | + detailVC.dismissClosure = { [weak self] in | ||
| 211 | + guard let StrongSelf = self else { return } | ||
| 212 | + StrongSelf.updateStatusBarAndTabbarFrame(visible: true) | ||
| 213 | + } | ||
| 214 | + updateStatusBarAndTabbarFrame(visible: false) | ||
| 215 | + present(detailVC, animated: true, completion: nil) | ||
| 192 | 216 | ||
| 193 | }else{ | 217 | }else{ |
| 194 | 218 | ||
| @@ -201,7 +225,7 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | @@ -201,7 +225,7 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | ||
| 201 | }else if slideModel.type == SlideModelTypeAllCourse12{ | 225 | }else if slideModel.type == SlideModelTypeAllCourse12{ |
| 202 | guard let cell = tableView.cellForRow(at: indexPath) as? CNDownSlideSingleCourseCell else { return } | 226 | guard let cell = tableView.cellForRow(at: indexPath) as? CNDownSlideSingleCourseCell else { return } |
| 203 | selectedCell = cell | 227 | selectedCell = cell |
| 204 | - let detailVC = CNSlideBaseNavigationController(rootViewController: CNUpSlideDetailViewController(cell: cell,slideModel: slideModel)) | 228 | + let detailVC = CNHomePageBaseNavigationController(rootViewController: CNHomepageDetailViewController(cell: cell,slideModel: slideModel)) |
| 205 | detailVC.dismissClosure = { [weak self] in | 229 | detailVC.dismissClosure = { [weak self] in |
| 206 | guard let StrongSelf = self else { return } | 230 | guard let StrongSelf = self else { return } |
| 207 | StrongSelf.updateStatusBarAndTabbarFrame(visible: true) | 231 | StrongSelf.updateStatusBarAndTabbarFrame(visible: true) |
| @@ -227,7 +251,8 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | @@ -227,7 +251,8 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | ||
| 227 | 251 | ||
| 228 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | 252 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { |
| 229 | if self.isHaveDuanJU && indexPath.section == 0{ | 253 | if self.isHaveDuanJU && indexPath.section == 0{ |
| 230 | - return 300 | 254 | + //标题55+n个cell*(45+15*2)+首尾15 |
| 255 | + return CGFloat(self.duanjuDataArray.count)*(45+15*2)+CGFloat(55)+15+15 | ||
| 231 | }else{ | 256 | }else{ |
| 232 | let slideModel = self.dataArray[indexPath.row] as! CNLiveDownSlideModel | 257 | let slideModel = self.dataArray[indexPath.row] as! CNLiveDownSlideModel |
| 233 | return CGFloat(slideModel.cellH) | 258 | return CGFloat(slideModel.cellH) |
| @@ -250,23 +275,33 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | @@ -250,23 +275,33 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa | ||
| 250 | for listModel in homePageListMdls { | 275 | for listModel in homePageListMdls { |
| 251 | if listModel.type == 3{ | 276 | if listModel.type == 3{ |
| 252 | //在追短剧 | 277 | //在追短剧 |
| 253 | - self.isHaveDuanJU = true | 278 | + self.getMyAlbumCollection(page: 1) |
| 254 | }else if listModel.type == 1{ | 279 | }else if listModel.type == 1{ |
| 255 | //页面 | 280 | //页面 |
| 256 | self.getPageApi(pageID: listModel.content) | 281 | self.getPageApi(pageID: listModel.content) |
| 257 | } | 282 | } |
| 258 | } | 283 | } |
| 259 | }else{ | 284 | }else{ |
| 260 | - | 285 | + self.getHomePageConfigListApi() |
| 261 | } | 286 | } |
| 262 | } | 287 | } |
| 263 | } | 288 | } |
| 264 | 289 | ||
| 265 | //我的专辑收藏--在追短剧 | 290 | //我的专辑收藏--在追短剧 |
| 266 | - func getMyAlbumCollection(){ | ||
| 267 | - CNLiveHomePageViewModel.requestGetHomePage { result, status in | 291 | + func getMyAlbumCollection(page:NSInteger){ |
| 292 | + CNLiveHomePageViewModel.requestGetHomePageMyAlbum(page: page){ result, status in | ||
| 268 | if status == .success{ | 293 | if status == .success{ |
| 269 | - | 294 | + let arr = result as! Array<CNLiveAlbumMsgModel> |
| 295 | + if arr.count>0{ | ||
| 296 | + //显示在追短剧cell | ||
| 297 | + self.isHaveDuanJU = true | ||
| 298 | + self.duanjuDataArray = NSMutableArray(array: arr) | ||
| 299 | + }else{ | ||
| 300 | + //隐藏在追短剧cell | ||
| 301 | + self.isHaveDuanJU = false | ||
| 302 | + } | ||
| 303 | + self.tableView.reloadData() | ||
| 304 | + | ||
| 270 | }else{ | 305 | }else{ |
| 271 | 306 | ||
| 272 | } | 307 | } |
metaCode/Classes/Main/HomePages/Controller/AuthController/push相关/CNHomePageAnimationTransition.swift
| @@ -39,26 +39,47 @@ extension CNHomePageAnimationTransition: UIViewControllerAnimatedTransitioning { | @@ -39,26 +39,47 @@ extension CNHomePageAnimationTransition: UIViewControllerAnimatedTransitioning { | ||
| 39 | let fromNavi = fromVCtemp.viewControllers![0] as! CNLiveBaseNavigationController | 39 | let fromNavi = fromVCtemp.viewControllers![0] as! CNLiveBaseNavigationController |
| 40 | let fromVC = fromNavi.viewControllers.first as! CNLiveAuthViewController | 40 | let fromVC = fromNavi.viewControllers.first as! CNLiveAuthViewController |
| 41 | guard let toNaviVC = transitionContext.viewController(forKey: .to) as? CNHomePageBaseNavigationController else { return } | 41 | guard let toNaviVC = transitionContext.viewController(forKey: .to) as? CNHomePageBaseNavigationController else { return } |
| 42 | - guard let selectedCell = fromVC.selectedCell else { return } | ||
| 43 | - let toVC = toNaviVC.topViewController as! CNHomepageDetailViewController | ||
| 44 | - let frame = selectedCell.convert(selectedCell.bgBackView.frame, to: fromVC.view) | ||
| 45 | - //2.Set presentation original size. | ||
| 46 | - toVC.view.frame = frame | ||
| 47 | - toVC.scrollView.imageView.frame.size.width = GlobalConstants.todayCardSize.width | ||
| 48 | - toVC.scrollView.imageView.frame.size.height = GlobalConstants.todayCardSize.height | ||
| 49 | - | ||
| 50 | - containerView.addSubview(toNaviVC.view) | ||
| 51 | - | ||
| 52 | - //3.Change original size to final size with animation. | ||
| 53 | - UIView.animate(withDuration: transitonDuration, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0, options: [], animations: { | ||
| 54 | - toVC.view.frame = UIScreen.main.bounds | ||
| 55 | - toVC.scrollView.imageView.frame.size.width = KSreenWidth | ||
| 56 | - toVC.scrollView.imageView.frame.size.height = KSreenWidth*DownSlideSingleCourseImgH/DownSlideSingleCourseW | ||
| 57 | - toVC.closeBtn.alpha = 1 | 42 | + if toNaviVC.topViewController is CNHomepageDetailViewController{ |
| 43 | + guard let selectedCell = fromVC.selectedCell else { return } | ||
| 44 | + let toVC = toNaviVC.topViewController as! CNHomepageDetailViewController | ||
| 45 | + let frame = selectedCell.convert(selectedCell.bgBackView.frame, to: fromVC.view) | ||
| 46 | + //2.Set presentation original size. | ||
| 47 | + toVC.view.frame = frame | ||
| 48 | + toVC.scrollView.imageView.frame.size.width = GlobalConstants.todayCardSize.width | ||
| 49 | + toVC.scrollView.imageView.frame.size.height = GlobalConstants.todayCardSize.height | ||
| 50 | + | ||
| 51 | + containerView.addSubview(toNaviVC.view) | ||
| 52 | + | ||
| 53 | + //3.Change original size to final size with animation. | ||
| 54 | + UIView.animate(withDuration: transitonDuration, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0, options: [], animations: { | ||
| 55 | + toVC.view.frame = UIScreen.main.bounds | ||
| 56 | + toVC.scrollView.imageView.frame.size.width = KSreenWidth | ||
| 57 | + toVC.scrollView.imageView.frame.size.height = KSreenWidth*DownSlideSingleCourseImgH/DownSlideSingleCourseW | ||
| 58 | + toVC.closeBtn.alpha = 1 | ||
| 59 | + | ||
| 60 | + }) { (completed) in | ||
| 61 | + transitionContext.completeTransition(completed) | ||
| 62 | + } | ||
| 63 | + }else if toNaviVC.topViewController is CNHomepageDuanJuDetailViewController{ | ||
| 64 | + guard let selectedCell = fromVC.selectedDuanjuCell else { return } | ||
| 65 | + let toVC = toNaviVC.topViewController as! CNHomepageDuanJuDetailViewController | ||
| 66 | + let frame = selectedCell.convert(selectedCell.totalView.frame, to: fromVC.view) | ||
| 67 | + //2.Set presentation original size. | ||
| 68 | + toVC.view.frame = frame | ||
| 69 | + containerView.addSubview(toNaviVC.view) | ||
| 58 | 70 | ||
| 59 | - }) { (completed) in | ||
| 60 | - transitionContext.completeTransition(completed) | 71 | + //3.Change original size to final size with animation. |
| 72 | + UIView.animate(withDuration: transitonDuration, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0, options: [], animations: { | ||
| 73 | + toVC.view.frame = UIScreen.main.bounds | ||
| 74 | + toVC.closeBtn.alpha = 1 | ||
| 75 | + | ||
| 76 | + }) { (completed) in | ||
| 77 | + transitionContext.completeTransition(completed) | ||
| 78 | + } | ||
| 79 | + }else{ | ||
| 80 | + return | ||
| 61 | } | 81 | } |
| 82 | + | ||
| 62 | } | 83 | } |
| 63 | 84 | ||
| 64 | func animationForDismiss(using transitionContext: UIViewControllerContextTransitioning) { | 85 | func animationForDismiss(using transitionContext: UIViewControllerContextTransitioning) { |
| @@ -66,19 +87,36 @@ extension CNHomePageAnimationTransition: UIViewControllerAnimatedTransitioning { | @@ -66,19 +87,36 @@ extension CNHomePageAnimationTransition: UIViewControllerAnimatedTransitioning { | ||
| 66 | guard let toVCTabbar = transitionContext.viewController(forKey: .to) as? CNLiveBaseTabBarViewController else { return } | 87 | guard let toVCTabbar = transitionContext.viewController(forKey: .to) as? CNLiveBaseTabBarViewController else { return } |
| 67 | let toVCNav = toVCTabbar.viewControllers?.first as! CNLiveBaseNavigationController | 88 | let toVCNav = toVCTabbar.viewControllers?.first as! CNLiveBaseNavigationController |
| 68 | let toVC = toVCNav.viewControllers.first as! CNLiveAuthViewController | 89 | let toVC = toVCNav.viewControllers.first as! CNLiveAuthViewController |
| 69 | - guard let selectedCell = toVC.selectedCell else { return } | ||
| 70 | - let fromVC = fromNaviVC.topViewController as! CNHomepageDetailViewController | ||
| 71 | - | ||
| 72 | - UIView.animate(withDuration: transitonDuration - 0.3, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: { | ||
| 73 | - let frame = selectedCell.convert(selectedCell.bgBackView.frame, to: toVC.view) | ||
| 74 | - fromVC.view.frame = frame | ||
| 75 | - fromVC.view.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius | ||
| 76 | - fromVC.scrollView.imageView.frame.size.width = GlobalConstants.todayCardSize.width | ||
| 77 | - fromVC.scrollView.imageView.frame.size.height = GlobalConstants.todayCardSize.height | ||
| 78 | - fromVC.closeBtn.alpha = 0 | 90 | + if fromNaviVC.topViewController is CNHomepageDetailViewController{ |
| 91 | + guard let selectedCell = toVC.selectedCell else { return } | ||
| 92 | + let fromVC = fromNaviVC.topViewController as! CNHomepageDetailViewController | ||
| 79 | 93 | ||
| 80 | - }) { (completed) in | ||
| 81 | - transitionContext.completeTransition(completed) | 94 | + UIView.animate(withDuration: transitonDuration - 0.3, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: { |
| 95 | + let frame = selectedCell.convert(selectedCell.bgBackView.frame, to: toVC.view) | ||
| 96 | + fromVC.view.frame = frame | ||
| 97 | + fromVC.view.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius | ||
| 98 | + fromVC.scrollView.imageView.frame.size.width = GlobalConstants.todayCardSize.width | ||
| 99 | + fromVC.scrollView.imageView.frame.size.height = GlobalConstants.todayCardSize.height | ||
| 100 | + fromVC.closeBtn.alpha = 0 | ||
| 101 | + | ||
| 102 | + }) { (completed) in | ||
| 103 | + transitionContext.completeTransition(completed) | ||
| 104 | + } | ||
| 105 | + }else if fromNaviVC.topViewController is CNHomepageDuanJuDetailViewController{ | ||
| 106 | + guard let selectedCell = toVC.selectedDuanjuCell else { return } | ||
| 107 | + let fromVC = fromNaviVC.topViewController as! CNHomepageDuanJuDetailViewController | ||
| 108 | + UIView.animate(withDuration: transitonDuration - 0.3, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: { | ||
| 109 | + let frame = selectedCell.convert(selectedCell.totalView.frame, to: toVC.view) | ||
| 110 | + fromVC.view.frame = frame | ||
| 111 | + fromVC.view.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius | ||
| 112 | + fromVC.closeBtn.alpha = 0 | ||
| 113 | + | ||
| 114 | + }) { (completed) in | ||
| 115 | + transitionContext.completeTransition(completed) | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + }else{ | ||
| 119 | + return | ||
| 82 | } | 120 | } |
| 83 | } | 121 | } |
| 84 | 122 |
metaCode/Classes/Main/HomePages/Controller/AuthController/push相关/CNHomepageDetailViewController.swift
| @@ -6,12 +6,16 @@ | @@ -6,12 +6,16 @@ | ||
| 6 | // 首页短剧--大图点击详情页 | 6 | // 首页短剧--大图点击详情页 |
| 7 | 7 | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | +import MJRefresh | ||
| 10 | +import EmptyDataSet_Swift | ||
| 9 | 11 | ||
| 10 | -class CNHomepageDetailViewController: CNLiveBaseViewController ,UITableViewDataSource, UITableViewDelegate{ | 12 | +class CNHomepageDetailViewController: CNLiveBaseViewController ,UITableViewDataSource, UITableViewDelegate,EmptyDataSetSource, EmptyDataSetDelegate{ |
| 11 | 13 | ||
| 12 | let kCNLiveAlbumImageCellIdentifier = "kCNLiveAlbumImageCellIdentifier" | 14 | let kCNLiveAlbumImageCellIdentifier = "kCNLiveAlbumImageCellIdentifier" |
| 13 | let kCNLiveAlbumCellIdentifier = "kCNLiveAlbumCellIdentifier" | 15 | let kCNLiveAlbumCellIdentifier = "kCNLiveAlbumCellIdentifier" |
| 14 | 16 | ||
| 17 | + var pageNum: NSInteger | ||
| 18 | + var network_type: CNLiveMineResponseType! | ||
| 15 | // MARK: - 懒加载 | 19 | // MARK: - 懒加载 |
| 16 | ///数据源 | 20 | ///数据源 |
| 17 | lazy var dataArray: NSMutableArray = { | 21 | lazy var dataArray: NSMutableArray = { |
| @@ -22,6 +26,8 @@ class CNHomepageDetailViewController: CNLiveBaseViewController ,UITableViewData | @@ -22,6 +26,8 @@ class CNHomepageDetailViewController: CNLiveBaseViewController ,UITableViewData | ||
| 22 | let tableView = UITableView(frame: .zero, style: .plain) | 26 | let tableView = UITableView(frame: .zero, style: .plain) |
| 23 | tableView.dataSource = self | 27 | tableView.dataSource = self |
| 24 | tableView.delegate = self | 28 | tableView.delegate = self |
| 29 | + tableView.emptyDataSetSource = self | ||
| 30 | + tableView.emptyDataSetDelegate = self | ||
| 25 | tableView.separatorStyle = .none | 31 | tableView.separatorStyle = .none |
| 26 | tableView.tableFooterView = UIView.init() | 32 | tableView.tableFooterView = UIView.init() |
| 27 | tableView.register(CNLiveAlbumCell.self, forCellReuseIdentifier: kCNLiveAlbumCellIdentifier) | 33 | tableView.register(CNLiveAlbumCell.self, forCellReuseIdentifier: kCNLiveAlbumCellIdentifier) |
| @@ -75,11 +81,13 @@ class CNHomepageDetailViewController: CNLiveBaseViewController ,UITableViewData | @@ -75,11 +81,13 @@ class CNHomepageDetailViewController: CNLiveBaseViewController ,UITableViewData | ||
| 75 | }() | 81 | }() |
| 76 | 82 | ||
| 77 | init(cell: CNDownSlideSingleCourseCell,slideModel:CNLiveDownSlideModel) { | 83 | init(cell: CNDownSlideSingleCourseCell,slideModel:CNLiveDownSlideModel) { |
| 84 | + self.pageNum = 1 | ||
| 78 | self.cell = cell | 85 | self.cell = cell |
| 79 | super.init(nibName: nil, bundle: nil) | 86 | super.init(nibName: nil, bundle: nil) |
| 80 | self.slideModel = slideModel | 87 | self.slideModel = slideModel |
| 81 | self.setupTranstion() | 88 | self.setupTranstion() |
| 82 | setNeedsStatusBarAppearanceUpdate() | 89 | setNeedsStatusBarAppearanceUpdate() |
| 90 | + | ||
| 83 | } | 91 | } |
| 84 | 92 | ||
| 85 | private func setupTranstion() { | 93 | private func setupTranstion() { |
| @@ -95,7 +103,7 @@ class CNHomepageDetailViewController: CNLiveBaseViewController ,UITableViewData | @@ -95,7 +103,7 @@ class CNHomepageDetailViewController: CNLiveBaseViewController ,UITableViewData | ||
| 95 | super.viewDidLoad() | 103 | super.viewDidLoad() |
| 96 | setupUI() | 104 | setupUI() |
| 97 | getImageFromCell() | 105 | getImageFromCell() |
| 98 | - self.getBlockContents() | 106 | + self.getBlockContents(page: 1) |
| 99 | } | 107 | } |
| 100 | 108 | ||
| 101 | private func setupUI() { | 109 | private func setupUI() { |
| @@ -137,7 +145,6 @@ class CNHomepageDetailViewController: CNLiveBaseViewController ,UITableViewData | @@ -137,7 +145,6 @@ class CNHomepageDetailViewController: CNLiveBaseViewController ,UITableViewData | ||
| 137 | 145 | ||
| 138 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | 146 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { |
| 139 | 147 | ||
| 140 | -// let goodsModel = self.dataArray[indexPath.row] as! CNLiveShopGoodsListModel | ||
| 141 | if indexPath.section == 0{ | 148 | if indexPath.section == 0{ |
| 142 | guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveAlbumImageCellIdentifier) as? CNLiveAlbumImageCell | 149 | guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveAlbumImageCellIdentifier) as? CNLiveAlbumImageCell |
| 143 | else { | 150 | else { |
| @@ -167,17 +174,52 @@ class CNHomepageDetailViewController: CNLiveBaseViewController ,UITableViewData | @@ -167,17 +174,52 @@ class CNHomepageDetailViewController: CNLiveBaseViewController ,UITableViewData | ||
| 167 | } | 174 | } |
| 168 | 175 | ||
| 169 | // MARK: - 获取全部专辑列表 | 176 | // MARK: - 获取全部专辑列表 |
| 170 | - func getBlockContents(){ | ||
| 171 | - CNLiveHomePageViewModel.getBlockContents(blockId: self.slideModel!.blockId ?? "") { result, status in | 177 | + func getBlockContents(page:NSInteger){ |
| 178 | + showLoading(message: "") | ||
| 179 | + CNLiveHomePageViewModel.getBlockContents(blockId: self.slideModel!.blockId ?? "", page: page) {[weak self] result, status in | ||
| 180 | + hiddenLoading() | ||
| 172 | if status == .success{ | 181 | if status == .success{ |
| 173 | - let albumArr = result as! Array<CNLiveAlbumModel> | ||
| 174 | - self.dataArray = NSMutableArray(array: albumArr) | ||
| 175 | - self.tableView.reloadData() | ||
| 176 | - }else{ | 182 | + if self!.pageNum > 1 { |
| 183 | + self!.dataArray.addObjects(from: result as! [CNLiveAlbumModel]) | ||
| 184 | + } | ||
| 185 | + if self!.pageNum == 1 { | ||
| 186 | + self!.dataArray.removeAllObjects() | ||
| 187 | + self!.dataArray.addObjects(from: result as! [CNLiveAlbumModel]) | ||
| 188 | + if self!.dataArray.count > 0 && self!.tableView.mj_header == nil && self!.tableView.mj_footer == nil { | ||
| 189 | + self!.addRefreshView() | ||
| 190 | + self!.pageNum = self!.pageNum + 1 | ||
| 191 | + self!.getBlockContents(page: self!.pageNum) | ||
| 192 | + } | ||
| 193 | + } | ||
| 177 | 194 | ||
| 195 | + self!.tableView.mj_header?.endRefreshing() | ||
| 196 | + self!.tableView.mj_footer?.endRefreshing() | ||
| 197 | + self!.tableView.reloadData() | ||
| 198 | + if (result as! Array<Any>).count == 0 { | ||
| 199 | + self!.tableView.mj_footer?.endRefreshingWithNoMoreData() | ||
| 200 | + self!.tableView.reloadData() | ||
| 201 | + } | ||
| 202 | + | ||
| 203 | + }else if (status == .noNetwork) { | ||
| 204 | + self!.network_type = .noNetwork | ||
| 205 | + self!.tableView.reloadEmptyDataSet() | ||
| 206 | + } else { | ||
| 207 | + self!.network_type = .failed | ||
| 208 | + self!.tableView.reloadEmptyDataSet() | ||
| 178 | } | 209 | } |
| 179 | } | 210 | } |
| 180 | } | 211 | } |
| 212 | + func addRefreshView() { | ||
| 213 | + tableView.mj_header = MJRefreshNormalHeader.init(refreshingBlock: {[weak self] in | ||
| 214 | + self!.pageNum = 1 | ||
| 215 | + self!.getBlockContents(page: 1) | ||
| 216 | + }) | ||
| 217 | + | ||
| 218 | + tableView.mj_footer = MJRefreshAutoNormalFooter.init(refreshingBlock: {[weak self] in | ||
| 219 | + self!.pageNum = self!.pageNum + 1 | ||
| 220 | + self!.getBlockContents(page: self!.pageNum) | ||
| 221 | + }) | ||
| 222 | + } | ||
| 181 | 223 | ||
| 182 | @objc private func handleDismissPan(gesture: UIPanGestureRecognizer) { | 224 | @objc private func handleDismissPan(gesture: UIPanGestureRecognizer) { |
| 183 | if !draggingDownToDismiss { | 225 | if !draggingDownToDismiss { |
| @@ -271,3 +313,48 @@ extension CNHomepageDetailViewController: UIGestureRecognizerDelegate { | @@ -271,3 +313,48 @@ extension CNHomepageDetailViewController: UIGestureRecognizerDelegate { | ||
| 271 | return true | 313 | return true |
| 272 | } | 314 | } |
| 273 | } | 315 | } |
| 316 | + | ||
| 317 | +extension CNHomepageDetailViewController { | ||
| 318 | + | ||
| 319 | + func image(forEmptyDataSet scrollView: UIScrollView) -> UIImage? { | ||
| 320 | + if network_type == .failed || network_type == .unkonw { | ||
| 321 | + return UIImage(named: "mine_list_source_unusual_failed") | ||
| 322 | + } | ||
| 323 | + if dataArray.count == 0 { | ||
| 324 | + return UIImage(named: "mine_list_source_unusual_empty") | ||
| 325 | + } | ||
| 326 | + if network_type == .noNetwork { | ||
| 327 | + return UIImage(named: "mine_list_source_unusual_noNet") | ||
| 328 | + } | ||
| 329 | + return UIImage(named: "mine_list_source_unusual_empty") | ||
| 330 | + } | ||
| 331 | + | ||
| 332 | + func title(forEmptyDataSet scrollView: UIScrollView) -> NSAttributedString? { | ||
| 333 | + var defult_string = "" | ||
| 334 | + if network_type == .failed || network_type == .unkonw { | ||
| 335 | + defult_string = "接口请求错误,刷新试试~" | ||
| 336 | + } | ||
| 337 | + if network_type == .noNetwork { | ||
| 338 | + defult_string = "网络开小差了,刷新试试~" | ||
| 339 | + } | ||
| 340 | + if dataArray.count == 0 { | ||
| 341 | + defult_string = "暂时没有数据~" | ||
| 342 | + } | ||
| 343 | + return NSAttributedString(string: defult_string, attributes: [.font: Font_17,.foregroundColor: HexColor("#666666")!]) | ||
| 344 | + } | ||
| 345 | + | ||
| 346 | + func buttonTitle(forEmptyDataSet scrollView: UIScrollView, for state: UIControl.State) -> NSAttributedString? { | ||
| 347 | + if network_type == .failed || network_type == .noNetwork { | ||
| 348 | + let attributes = [NSAttributedString.Key.font:Font_16_Fit, | ||
| 349 | + NSAttributedString.Key.foregroundColor: HexColor("#609BFF")] | ||
| 350 | + return NSAttributedString(string: "刷一刷", attributes: attributes as [NSAttributedString.Key : Any]) | ||
| 351 | + } | ||
| 352 | + return nil | ||
| 353 | + } | ||
| 354 | + | ||
| 355 | + func emptyDataSet(_ scrollView: UIScrollView, didTapView view: UIView) { | ||
| 356 | + if network_type == .failed || network_type == .noNetwork { | ||
| 357 | + getBlockContents(page: 1) | ||
| 358 | + } | ||
| 359 | + } | ||
| 360 | +} |
metaCode/Classes/Main/HomePages/Controller/AuthController/push相关/CNHomepageDuanJuDetailViewController.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNHomepageDuanJuDetailViewController.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/1/5. | ||
| 6 | +// 首页短剧--在追短剧点击详情页 | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | +import MJRefresh | ||
| 10 | +import EmptyDataSet_Swift | ||
| 11 | + | ||
| 12 | +class CNHomepageDuanJuDetailViewController: CNLiveBaseViewController ,UITableViewDataSource, UITableViewDelegate,EmptyDataSetSource, EmptyDataSetDelegate{ | ||
| 13 | + | ||
| 14 | + let kCNLiveDuanjuTitleCellIdentifier = "kCNLiveDuanjuTitleCellIdentifier" | ||
| 15 | + let kCNLiveAlbumCellIdentifier = "kCNLiveAlbumCellIdentifier" | ||
| 16 | + | ||
| 17 | + var pageNum: NSInteger | ||
| 18 | + var network_type: CNLiveMineResponseType! | ||
| 19 | + // MARK: - 懒加载 | ||
| 20 | + ///数据源 | ||
| 21 | + lazy var dataArray: NSMutableArray = { | ||
| 22 | + var dataArray = NSMutableArray() | ||
| 23 | + return dataArray | ||
| 24 | + }() | ||
| 25 | + lazy var tableView : UITableView = { | ||
| 26 | + let tableView = UITableView(frame: .zero, style: .plain) | ||
| 27 | + tableView.dataSource = self | ||
| 28 | + tableView.delegate = self | ||
| 29 | + tableView.emptyDataSetSource = self | ||
| 30 | + tableView.emptyDataSetDelegate = self | ||
| 31 | + tableView.separatorStyle = .none | ||
| 32 | + tableView.tableFooterView = UIView.init() | ||
| 33 | + tableView.register(CNLiveAlbumCell.self, forCellReuseIdentifier: kCNLiveAlbumCellIdentifier) | ||
| 34 | + tableView.register(CNLiveDuanjuTitleCell.self, forCellReuseIdentifier: kCNLiveDuanjuTitleCellIdentifier) | ||
| 35 | + return tableView | ||
| 36 | + }() | ||
| 37 | + | ||
| 38 | + var dismissClosure: (()->())? | ||
| 39 | + //the point when start to interactive | ||
| 40 | + var interactiveStartingPoint: CGPoint? = nil | ||
| 41 | + | ||
| 42 | + var draggingDownToDismiss = false | ||
| 43 | + | ||
| 44 | + let cell: CNLiveHomePageDuanJuCell! | ||
| 45 | + | ||
| 46 | + private lazy var dismissPanGesture: UIPanGestureRecognizer = { | ||
| 47 | + let ges = UIPanGestureRecognizer() | ||
| 48 | + ges.maximumNumberOfTouches = 1 | ||
| 49 | + ges.addTarget(self, action: #selector(handleDismissPan(gesture:))) | ||
| 50 | + ges.delegate = self | ||
| 51 | + return ges | ||
| 52 | + }() | ||
| 53 | + | ||
| 54 | + lazy var closeBtn: UIButton = { | ||
| 55 | + let btn = UIButton() | ||
| 56 | + btn.frame = CGRect(x: KSreenWidth - 20 - 30, y: KStatusBarHeight+20, width: 30, height: 30) | ||
| 57 | + btn.setImage(#imageLiteral(resourceName: "close_button"), for: .normal) | ||
| 58 | + btn.addTarget(self, action: #selector(closeAction), for: .touchUpInside) | ||
| 59 | + return btn | ||
| 60 | + }() | ||
| 61 | + | ||
| 62 | + init(cell:CNLiveHomePageDuanJuCell) { | ||
| 63 | + self.pageNum = 1 | ||
| 64 | + self.cell = cell | ||
| 65 | + super.init(nibName: nil, bundle: nil) | ||
| 66 | + self.setupTranstion() | ||
| 67 | + setNeedsStatusBarAppearanceUpdate() | ||
| 68 | + | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + private func setupTranstion() { | ||
| 72 | + modalPresentationStyle = .custom | ||
| 73 | + transitioningDelegate = self | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + required init?(coder aDecoder: NSCoder) { | ||
| 77 | + fatalError("init(coder:) has not been implemented") | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + override func viewDidLoad() { | ||
| 81 | + super.viewDidLoad() | ||
| 82 | + setupUI() | ||
| 83 | + self.getMyAlbum(page: 1) | ||
| 84 | + self.view.backgroundColor = .white | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + private func setupUI() { | ||
| 88 | + self.view.layer.masksToBounds = true | ||
| 89 | + self.view.addSubview(self.tableView) | ||
| 90 | + self.tableView.frame = CGRect(x: 0, y: KStatusBarHeight, width: KSreenWidth, height: KSreenHeight-KStatusBarHeight) | ||
| 91 | + view.addSubview(closeBtn) | ||
| 92 | + view.addGestureRecognizer(dismissPanGesture) | ||
| 93 | + | ||
| 94 | + if #available(iOS 11.0, *) { | ||
| 95 | + } else { | ||
| 96 | + automaticallyAdjustsScrollViewInsets = false | ||
| 97 | + } | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + @objc private func closeAction() { | ||
| 101 | + dismiss(animated: true, completion: nil) | ||
| 102 | + let nav = self.navigationController as! CNHomePageBaseNavigationController | ||
| 103 | + nav.dismissClosure?() | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + func numberOfSections(in tableView: UITableView) -> Int { | ||
| 107 | + 2 | ||
| 108 | + } | ||
| 109 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
| 110 | + if section == 0{ | ||
| 111 | + return 1 | ||
| 112 | + }else{ | ||
| 113 | + return self.dataArray.count | ||
| 114 | + } | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
| 118 | + if indexPath.section == 0{ | ||
| 119 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDuanjuTitleCellIdentifier) as? CNLiveDuanjuTitleCell | ||
| 120 | + else { | ||
| 121 | + let cell = CNLiveDuanjuTitleCell() | ||
| 122 | + return cell | ||
| 123 | + } | ||
| 124 | + return cell | ||
| 125 | + }else{ | ||
| 126 | + let albumModel = self.dataArray[indexPath.row] as! CNLiveAlbumMsgModel | ||
| 127 | + | ||
| 128 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveAlbumCellIdentifier) as? CNLiveAlbumCell | ||
| 129 | + else { | ||
| 130 | + let cell = CNLiveAlbumCell() | ||
| 131 | + return cell | ||
| 132 | + } | ||
| 133 | + cell.albumMsgModel = albumModel | ||
| 134 | + return cell | ||
| 135 | + } | ||
| 136 | + } | ||
| 137 | + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
| 138 | + if indexPath.section == 0{ | ||
| 139 | + return 45//10+30+5 | ||
| 140 | + }else{ | ||
| 141 | + return 75 | ||
| 142 | + } | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + // MARK: - 获取我的在追短剧列表 | ||
| 146 | + func getMyAlbum(page:NSInteger){ | ||
| 147 | + CNLiveHomePageViewModel.requestGetHomePageMyAlbum(page: page){[weak self] result, status in | ||
| 148 | + if status == .success{ | ||
| 149 | + if self!.pageNum > 1 { | ||
| 150 | + self!.dataArray.addObjects(from: result as! [CNLiveAlbumMsgModel]) | ||
| 151 | + } | ||
| 152 | + if self!.pageNum == 1 { | ||
| 153 | + self!.dataArray.removeAllObjects() | ||
| 154 | + self!.dataArray.addObjects(from: result as! [CNLiveAlbumMsgModel]) | ||
| 155 | + if self!.dataArray.count > 0 && self!.tableView.mj_header == nil && self!.tableView.mj_footer == nil { | ||
| 156 | + self!.addRefreshView() | ||
| 157 | + self!.pageNum = self!.pageNum + 1 | ||
| 158 | + self!.getMyAlbum(page: self!.pageNum) | ||
| 159 | + | ||
| 160 | + } | ||
| 161 | + } | ||
| 162 | + | ||
| 163 | + self!.tableView.mj_header?.endRefreshing() | ||
| 164 | + self!.tableView.mj_footer?.endRefreshing() | ||
| 165 | + self!.tableView.reloadData() | ||
| 166 | + if (result as! Array<Any>).count == 0 { | ||
| 167 | + self!.tableView.mj_footer?.endRefreshingWithNoMoreData() | ||
| 168 | + self!.tableView.reloadData() | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + }else if (status == .noNetwork) { | ||
| 172 | + self!.network_type = .noNetwork | ||
| 173 | + self!.tableView.reloadEmptyDataSet() | ||
| 174 | + } else { | ||
| 175 | + self!.network_type = .failed | ||
| 176 | + self!.tableView.reloadEmptyDataSet() | ||
| 177 | + } | ||
| 178 | + } | ||
| 179 | + } | ||
| 180 | + func addRefreshView() { | ||
| 181 | + tableView.mj_header = MJRefreshNormalHeader.init(refreshingBlock: {[weak self] in | ||
| 182 | + self!.pageNum = 1 | ||
| 183 | + self!.getMyAlbum(page: 1) | ||
| 184 | + }) | ||
| 185 | + | ||
| 186 | + tableView.mj_footer = MJRefreshAutoNormalFooter.init(refreshingBlock: {[weak self] in | ||
| 187 | + self!.pageNum = self!.pageNum + 1 | ||
| 188 | + self!.getMyAlbum(page: self!.pageNum) | ||
| 189 | + }) | ||
| 190 | + } | ||
| 191 | + | ||
| 192 | + @objc private func handleDismissPan(gesture: UIPanGestureRecognizer) { | ||
| 193 | + if !draggingDownToDismiss { | ||
| 194 | + return | ||
| 195 | + } | ||
| 196 | + | ||
| 197 | + let startingPoint: CGPoint | ||
| 198 | + | ||
| 199 | + if let p = interactiveStartingPoint { | ||
| 200 | + startingPoint = p | ||
| 201 | + } else { | ||
| 202 | + startingPoint = gesture.location(in: nil) | ||
| 203 | + interactiveStartingPoint = startingPoint | ||
| 204 | + } | ||
| 205 | + | ||
| 206 | + let currentLocation = gesture.location(in: nil) | ||
| 207 | + | ||
| 208 | + var progress = (currentLocation.y - startingPoint.y) / 100 | ||
| 209 | + | ||
| 210 | + //prevent viewController bigger when scrolling up | ||
| 211 | + if currentLocation.y <= startingPoint.y { | ||
| 212 | + progress = 0 | ||
| 213 | + } | ||
| 214 | + | ||
| 215 | + if progress >= 1.0 { | ||
| 216 | + dismiss(animated: true, completion: nil) | ||
| 217 | + let nav = self.navigationController as! CNHomePageBaseNavigationController | ||
| 218 | + nav.dismissClosure?() | ||
| 219 | +// dismissClosure?() | ||
| 220 | + stopDismissPanGesture(gesture) | ||
| 221 | + return | ||
| 222 | + } | ||
| 223 | + | ||
| 224 | + let targetShrinkScale: CGFloat = 0.86 | ||
| 225 | + let currentScale: CGFloat = 1 - (1 - targetShrinkScale) * progress | ||
| 226 | + | ||
| 227 | + switch gesture.state { | ||
| 228 | + case .began,.changed: | ||
| 229 | + gesture.view?.transform = CGAffineTransform(scaleX: currentScale, y: currentScale) | ||
| 230 | + gesture.view?.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius * (progress) | ||
| 231 | + case .cancelled,.ended: | ||
| 232 | + stopDismissPanGesture(gesture) | ||
| 233 | + default: | ||
| 234 | + break | ||
| 235 | + } | ||
| 236 | + } | ||
| 237 | + | ||
| 238 | + //当下拉Offset超过100或取消下拉手势时,执行此方法 | ||
| 239 | + private func stopDismissPanGesture(_ gesture: UIPanGestureRecognizer) { | ||
| 240 | + draggingDownToDismiss = false | ||
| 241 | + interactiveStartingPoint = nil | ||
| 242 | + UIView.animate(withDuration: 0.2) { | ||
| 243 | + gesture.view?.transform = CGAffineTransform.identity | ||
| 244 | + } | ||
| 245 | + } | ||
| 246 | + | ||
| 247 | +} | ||
| 248 | + | ||
| 249 | +extension CNHomepageDuanJuDetailViewController: UIViewControllerTransitioningDelegate { | ||
| 250 | + | ||
| 251 | + func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? { | ||
| 252 | + return CNHomePageAnimationTransition(animationType: .present) | ||
| 253 | + } | ||
| 254 | + | ||
| 255 | + func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { | ||
| 256 | + return CNHomePageAnimationTransition(animationType: .dismiss) | ||
| 257 | + } | ||
| 258 | + | ||
| 259 | + func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? { | ||
| 260 | + return CNUpSlideCardPresentationController(presentedViewController: presented, presenting: presenting) | ||
| 261 | + } | ||
| 262 | +} | ||
| 263 | + | ||
| 264 | +extension CNHomepageDuanJuDetailViewController: UIScrollViewDelegate { | ||
| 265 | + func scrollViewDidScroll(_ scrollView: UIScrollView) { | ||
| 266 | + | ||
| 267 | + if scrollView.contentOffset.y < 0 { | ||
| 268 | + scrollView.contentOffset = .zero | ||
| 269 | + draggingDownToDismiss = true | ||
| 270 | + } | ||
| 271 | + } | ||
| 272 | +} | ||
| 273 | + | ||
| 274 | +extension CNHomepageDuanJuDetailViewController: UIGestureRecognizerDelegate { | ||
| 275 | + func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { | ||
| 276 | + return true | ||
| 277 | + } | ||
| 278 | +} | ||
| 279 | + | ||
| 280 | +extension CNHomepageDuanJuDetailViewController { | ||
| 281 | + | ||
| 282 | + func image(forEmptyDataSet scrollView: UIScrollView) -> UIImage? { | ||
| 283 | + if network_type == .failed || network_type == .unkonw { | ||
| 284 | + return UIImage(named: "mine_list_source_unusual_failed") | ||
| 285 | + } | ||
| 286 | + if dataArray.count == 0 { | ||
| 287 | + return UIImage(named: "mine_list_source_unusual_empty") | ||
| 288 | + } | ||
| 289 | + if network_type == .noNetwork { | ||
| 290 | + return UIImage(named: "mine_list_source_unusual_noNet") | ||
| 291 | + } | ||
| 292 | + return UIImage(named: "mine_list_source_unusual_empty") | ||
| 293 | + } | ||
| 294 | + | ||
| 295 | + func title(forEmptyDataSet scrollView: UIScrollView) -> NSAttributedString? { | ||
| 296 | + var defult_string = "" | ||
| 297 | + if network_type == .failed || network_type == .unkonw { | ||
| 298 | + defult_string = "接口请求错误,刷新试试~" | ||
| 299 | + } | ||
| 300 | + if network_type == .noNetwork { | ||
| 301 | + defult_string = "网络开小差了,刷新试试~" | ||
| 302 | + } | ||
| 303 | + if dataArray.count == 0 { | ||
| 304 | + defult_string = "暂时没有数据~" | ||
| 305 | + } | ||
| 306 | + return NSAttributedString(string: defult_string, attributes: [.font: Font_17,.foregroundColor: HexColor("#666666")!]) | ||
| 307 | + } | ||
| 308 | + | ||
| 309 | + func buttonTitle(forEmptyDataSet scrollView: UIScrollView, for state: UIControl.State) -> NSAttributedString? { | ||
| 310 | + if network_type == .failed || network_type == .noNetwork { | ||
| 311 | + let attributes = [NSAttributedString.Key.font:Font_16_Fit, | ||
| 312 | + NSAttributedString.Key.foregroundColor: HexColor("#609BFF")] | ||
| 313 | + return NSAttributedString(string: "刷一刷", attributes: attributes as [NSAttributedString.Key : Any]) | ||
| 314 | + } | ||
| 315 | + return nil | ||
| 316 | + } | ||
| 317 | + | ||
| 318 | + func emptyDataSet(_ scrollView: UIScrollView, didTapView view: UIView) { | ||
| 319 | + if network_type == .failed || network_type == .noNetwork { | ||
| 320 | + getMyAlbum(page: 1) | ||
| 321 | + } | ||
| 322 | + } | ||
| 323 | +} |
metaCode/Classes/Main/HomePages/Controller/PlayletHomePage/CNLivePlayletHomePageController.swift
| @@ -9,15 +9,15 @@ import Foundation | @@ -9,15 +9,15 @@ import Foundation | ||
| 9 | 9 | ||
| 10 | class CNLivePlayletHomePageController:CNLiveBaseViewController, UITableViewDataSource, UITableViewDelegate{ | 10 | class CNLivePlayletHomePageController:CNLiveBaseViewController, UITableViewDataSource, UITableViewDelegate{ |
| 11 | 11 | ||
| 12 | + var jianjieLblHeight:CGFloat = 36 | ||
| 13 | + | ||
| 12 | let kCNLivePlayletCellIdentifier = "kCNLivePlayletCellIdentifier" | 14 | let kCNLivePlayletCellIdentifier = "kCNLivePlayletCellIdentifier" |
| 13 | let kCNLivePlayletHeaderCellIdentifier = "kCNLivePlayletHeaderCellIdentifier" | 15 | let kCNLivePlayletHeaderCellIdentifier = "kCNLivePlayletHeaderCellIdentifier" |
| 14 | - | ||
| 15 | - // MARK: - 懒加载 | ||
| 16 | ///数据源 | 16 | ///数据源 |
| 17 | - lazy var dataArray: NSMutableArray = { | ||
| 18 | - var dataArray = NSMutableArray() | ||
| 19 | - return dataArray | ||
| 20 | - }() | 17 | + var albumModelArr:Array<CNLiveAlbumListModel> = [CNLiveAlbumListModel]() |
| 18 | + var albumId = "" | ||
| 19 | + // MARK: - 懒加载 | ||
| 20 | + | ||
| 21 | lazy var tableView : UITableView = { | 21 | lazy var tableView : UITableView = { |
| 22 | let tableView = UITableView(frame: .zero, style: .plain) | 22 | let tableView = UITableView(frame: .zero, style: .plain) |
| 23 | tableView.dataSource = self | 23 | tableView.dataSource = self |
| @@ -29,6 +29,20 @@ class CNLivePlayletHomePageController:CNLiveBaseViewController, UITableViewDataS | @@ -29,6 +29,20 @@ class CNLivePlayletHomePageController:CNLiveBaseViewController, UITableViewDataS | ||
| 29 | return tableView | 29 | return tableView |
| 30 | }() | 30 | }() |
| 31 | 31 | ||
| 32 | + init(aid:String){ | ||
| 33 | + super.init(nibName: nil, bundle: nil) | ||
| 34 | + self.albumId = aid | ||
| 35 | + self.getAlbumList(aid: aid)// self.albumModel!.contentId 或 self.albumMsgModel!.albumId | ||
| 36 | + } | ||
| 37 | + init(albumModelArr:Array<CNLiveAlbumListModel>) { | ||
| 38 | + self.albumModelArr = Array(albumModelArr) | ||
| 39 | + super.init(nibName: nil, bundle: nil) | ||
| 40 | + self.tableView.reloadData() | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + required init?(coder: NSCoder) { | ||
| 44 | + fatalError("init(coder:) has not been implemented") | ||
| 45 | + } | ||
| 32 | override func viewDidLoad() { | 46 | override func viewDidLoad() { |
| 33 | super.viewDidLoad() | 47 | super.viewDidLoad() |
| 34 | self.setUI() | 48 | self.setUI() |
| @@ -38,6 +52,39 @@ class CNLivePlayletHomePageController:CNLiveBaseViewController, UITableViewDataS | @@ -38,6 +52,39 @@ class CNLivePlayletHomePageController:CNLiveBaseViewController, UITableViewDataS | ||
| 38 | self.view.addSubview(self.tableView) | 52 | self.view.addSubview(self.tableView) |
| 39 | self.tableView.frame = CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: KSreenHeight-KNavigationHeight) | 53 | self.tableView.frame = CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: KSreenHeight-KNavigationHeight) |
| 40 | } | 54 | } |
| 55 | + | ||
| 56 | + // MARK: - 获取短剧主页数据 | ||
| 57 | + //获取专辑视频列表详情(播放地址 ,点赞数等信息) | ||
| 58 | + func getAlbumList(aid:String){ | ||
| 59 | + showLoading(message: "") | ||
| 60 | + CNLiveHomePageViewModel.getAlbumList(aid: aid){ result, status in | ||
| 61 | + hiddenLoading() | ||
| 62 | + if status == .success{ | ||
| 63 | + let arr = result as! Array<CNLiveAlbumListModel> | ||
| 64 | + self.albumModelArr = Array(arr) | ||
| 65 | + self.getAlbumMsg(aid: aid) | ||
| 66 | + }else{ | ||
| 67 | + | ||
| 68 | + } | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | + //获取专辑详情(简介等) | ||
| 72 | + func getAlbumMsg(aid:String){ | ||
| 73 | + CNLiveHomePageViewModel.getAlbumMsg(aid: aid) { result, status in | ||
| 74 | + hiddenLoading() | ||
| 75 | + if status == .success{ | ||
| 76 | + let model = result as! CNLiveAlbumMsgModel | ||
| 77 | + for listModel in self.albumModelArr { | ||
| 78 | + listModel.albumMsgModel = model | ||
| 79 | + } | ||
| 80 | + self.tableView.reloadData() | ||
| 81 | + }else{ | ||
| 82 | + | ||
| 83 | + } | ||
| 84 | + } | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + | ||
| 41 | func numberOfSections(in tableView: UITableView) -> Int { | 88 | func numberOfSections(in tableView: UITableView) -> Int { |
| 42 | 2 | 89 | 2 |
| 43 | } | 90 | } |
| @@ -45,19 +92,28 @@ class CNLivePlayletHomePageController:CNLiveBaseViewController, UITableViewDataS | @@ -45,19 +92,28 @@ class CNLivePlayletHomePageController:CNLiveBaseViewController, UITableViewDataS | ||
| 45 | if section == 0{ | 92 | if section == 0{ |
| 46 | return 1 | 93 | return 1 |
| 47 | } | 94 | } |
| 48 | - return 30 //self.dataArray.count | 95 | + return self.albumModelArr.count |
| 49 | } | 96 | } |
| 50 | 97 | ||
| 51 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | 98 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { |
| 52 | 99 | ||
| 53 | -// let goodsModel = self.dataArray[indexPath.row] as! CNLiveShopGoodsListModel | ||
| 54 | if indexPath.section == 0{ | 100 | if indexPath.section == 0{ |
| 55 | guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLivePlayletHeaderCellIdentifier) as? CNLivePlayletHomePageHeaderCell | 101 | guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLivePlayletHeaderCellIdentifier) as? CNLivePlayletHomePageHeaderCell |
| 56 | else { | 102 | else { |
| 57 | let cell = CNLivePlayletHomePageHeaderCell() | 103 | let cell = CNLivePlayletHomePageHeaderCell() |
| 58 | return cell | 104 | return cell |
| 59 | } | 105 | } |
| 60 | - | 106 | + cell.homePageHeaderCellChangedBlock = { headerCell,jianjieHeight in |
| 107 | + self.jianjieLblHeight = jianjieHeight | ||
| 108 | + self.tableView.reloadData() | ||
| 109 | + } | ||
| 110 | + cell.homePageNeedReloadActionBlock = { | ||
| 111 | + self.getAlbumList(aid: self.albumId) | ||
| 112 | + } | ||
| 113 | + if self.albumModelArr.count > 0{ | ||
| 114 | + let albumListModel = self.albumModelArr[0] | ||
| 115 | + cell.albumListModel = albumListModel | ||
| 116 | + } | ||
| 61 | return cell | 117 | return cell |
| 62 | }else{ | 118 | }else{ |
| 63 | guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLivePlayletCellIdentifier) as? CNLivePlayletHomePageCell | 119 | guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLivePlayletCellIdentifier) as? CNLivePlayletHomePageCell |
| @@ -65,15 +121,24 @@ class CNLivePlayletHomePageController:CNLiveBaseViewController, UITableViewDataS | @@ -65,15 +121,24 @@ class CNLivePlayletHomePageController:CNLiveBaseViewController, UITableViewDataS | ||
| 65 | let cell = CNLivePlayletHomePageCell() | 121 | let cell = CNLivePlayletHomePageCell() |
| 66 | return cell | 122 | return cell |
| 67 | } | 123 | } |
| 68 | - cell.iconImgView.backgroundColor = .red | 124 | + let albumListModel = self.albumModelArr[indexPath.row] |
| 125 | + cell.albumListModel = albumListModel | ||
| 69 | return cell | 126 | return cell |
| 70 | } | 127 | } |
| 71 | } | 128 | } |
| 72 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | 129 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { |
| 73 | if indexPath.section == 0{ | 130 | if indexPath.section == 0{ |
| 74 | - return 300 | 131 | + return 15+147+20+self.jianjieLblHeight+25+39+23.5+15.5 |
| 132 | + }else{ | ||
| 133 | + return 75+12*2 | ||
| 134 | + } | ||
| 135 | + } | ||
| 136 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
| 137 | + if indexPath.section == 0{ | ||
| 75 | }else{ | 138 | }else{ |
| 76 | - return 100 | 139 | + let albumListModel = self.albumModelArr[indexPath.row] |
| 140 | + let aid = albumListModel.albumMsgModel?.albumId ?? "" | ||
| 141 | + navigationViewController().visibleViewController?.navigationController?.pushViewController(CNLiveShortVideoViewController(aid: aid), animated: pushAnimated) | ||
| 77 | } | 142 | } |
| 78 | } | 143 | } |
| 79 | } | 144 | } |
metaCode/Classes/Main/HomePages/Model/CNLiveAlbumModel.swift
| @@ -26,13 +26,13 @@ class CNLiveAlbumProductModel:BaseModel{ | @@ -26,13 +26,13 @@ class CNLiveAlbumProductModel:BaseModel{ | ||
| 26 | var productId = "" | 26 | var productId = "" |
| 27 | var productTitle = "" | 27 | var productTitle = "" |
| 28 | var productImg = "" | 28 | var productImg = "" |
| 29 | - var albumProductType = "" | ||
| 30 | - var productType = "" | 29 | + var albumProductType = ""//专辑类型 |
| 30 | + var productType = ""//类型 0免费 1积分 2付费 3 4试听 | ||
| 31 | var androidRmb = "" | 31 | var androidRmb = "" |
| 32 | var androidOriginalRmb = "" | 32 | var androidOriginalRmb = "" |
| 33 | var iosOriginalRmb = "" | 33 | var iosOriginalRmb = "" |
| 34 | var iosRmb = "" | 34 | var iosRmb = "" |
| 35 | - var point = "" | 35 | + var point = ""//积分 |
| 36 | var promCode = "" | 36 | var promCode = "" |
| 37 | var orderingGuide = "" | 37 | var orderingGuide = "" |
| 38 | var activityDesc = "" | 38 | var activityDesc = "" |
| @@ -40,7 +40,7 @@ class CNLiveAlbumProductModel:BaseModel{ | @@ -40,7 +40,7 @@ class CNLiveAlbumProductModel:BaseModel{ | ||
| 40 | var validPeriod = "" | 40 | var validPeriod = "" |
| 41 | var expiryDate = "" | 41 | var expiryDate = "" |
| 42 | var effectiveDate = "" | 42 | var effectiveDate = "" |
| 43 | - var check = false | 43 | + var check = false////false需要付费 true免费或者付过费 |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | 46 |
metaCode/Classes/Main/HomePages/Model/CNLiveAlbumMsgModel.swift
| @@ -10,7 +10,7 @@ import Foundation | @@ -10,7 +10,7 @@ import Foundation | ||
| 10 | class CNLiveAlbumMsgModel:BaseModel{ | 10 | class CNLiveAlbumMsgModel:BaseModel{ |
| 11 | var albumId = "" | 11 | var albumId = "" |
| 12 | var albumImg = "" | 12 | var albumImg = "" |
| 13 | - var albumName = "" | 13 | + var albumName = ""//专辑名称 |
| 14 | var product:CNLiveAlbumProductModel? | 14 | var product:CNLiveAlbumProductModel? |
| 15 | var desc = "" | 15 | var desc = "" |
| 16 | var descImg = "" | 16 | var descImg = "" |
metaCode/Classes/Main/HomePages/View/HomePage/CNLiveHomePageDuanJuCell.swift
| @@ -6,64 +6,83 @@ | @@ -6,64 +6,83 @@ | ||
| 6 | // 首页-在追短剧cell | 6 | // 首页-在追短剧cell |
| 7 | 7 | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | -//enum GlobalConstants { | ||
| 10 | -// static let leftMargin: CGFloat = 20 | ||
| 11 | -// | ||
| 12 | -// static let toDayCardRowH: CGFloat = 440 | ||
| 13 | -// static let toDayCardCornerRadius: CGFloat = 12.0 | ||
| 14 | -// static let todayCardSize: CGSize = CGSize(width: KSreenWidth - 2 * 15, height: DownSlideSingleCourseImgH) | ||
| 15 | -// static let cardDetailTopImageH: CGFloat = 500 | ||
| 16 | -// | ||
| 17 | -// static let iconBorderColor: CGColor = UIColor(red: 239/255.0, green: 240/255.0, blue: 241/255.0, alpha: 1).cgColor | ||
| 18 | -// static let iconBorderWidth: CGFloat = 0.8 | ||
| 19 | -// static let iconCornerRadius: CGFloat = 17.5 | ||
| 20 | -// | ||
| 21 | -// static let textBlueColor = UIColor(red: 0/255.0, green: 122/255.0, blue: 255/255.0, alpha: 1.0) //007AFF | ||
| 22 | -// static let speratorLineColor = UIColor(red: 224/255.0, green: 224/255.0, blue: 224/255.0, alpha: 1) | ||
| 23 | -// | ||
| 24 | -//} | ||
| 25 | -// | ||
| 26 | -/////全部课程 标题高度 | ||
| 27 | -//let DownSlideAllCourseTitleH: CGFloat = 55 | ||
| 28 | -////全部课程 每row_topY间距 | ||
| 29 | -//let DownSlideAllCourseRowTopYGap: CGFloat = 10 | ||
| 30 | -////全部课程 每row_topY间距 | ||
| 31 | -//let DownSlideAllCourseRowBottomYGap: CGFloat = 20 | ||
| 32 | -////全部课程 每row_img宽高 | ||
| 33 | -//let DownSlideAllCourseRowImageWH: CGFloat = 45 | ||
| 34 | -// | ||
| 35 | -/////全部课程 每row高度 | ||
| 36 | -//let DownSlideAllCourseRowH: CGFloat = DownSlideAllCourseRowTopYGap+DownSlideAllCourseRowBottomYGap + DownSlideAllCourseRowImageWH | ||
| 37 | -/////全部课程 宽度 | ||
| 38 | -//let DownSlideAllCourseW: CGFloat = KSreenWidth - DownSlideRecommendLeftGap*2 | ||
| 39 | -// | ||
| 40 | -/////单节课程 大图高度 | ||
| 41 | -//let DownSlideSingleCourseImgH: CGFloat = 345 | ||
| 42 | -/////单节课程 更多课程高度 | ||
| 43 | -//let DownSlideSingleCourseMoreH: CGFloat = 60 | ||
| 44 | -/////单节课程 宽度 | ||
| 45 | -//let DownSlideSingleCourseW: CGFloat = KSreenWidth - DownSlideRecommendLeftGap*2 | 9 | +import QMUIKit |
| 10 | + | ||
| 11 | +typealias DuanJUCellSelectedCallBackBlock = (_ cell: CNLiveHomePageDuanJuCell) -> Void | ||
| 12 | + | ||
| 13 | +class CNLiveHomePageDuanJuCell:UITableViewCell,UITableViewDelegate,UITableViewDataSource{ | ||
| 14 | + let kCNLiveAlbumCellIdentifier = "kCNLiveAlbumCellIdentifier" | ||
| 15 | +// let bgBackView = UIView() | ||
| 46 | 16 | ||
| 47 | -class CNLiveHomePageDuanJuCell:UITableViewCell{ | 17 | + var DuanJUCellSelectedCallBack:DuanJUCellSelectedCallBackBlock? |
| 18 | + lazy var modelArr: NSMutableArray = { | ||
| 19 | + var dataArray = NSMutableArray() | ||
| 20 | + return dataArray | ||
| 21 | + }() | ||
| 22 | + func setModelArr(modelArr:NSMutableArray){ | ||
| 23 | + self.modelArr = NSMutableArray(array: modelArr) | ||
| 48 | 24 | ||
| 49 | - let bgBackView = UIView() | ||
| 50 | - let bgImageView = UIImageView() | 25 | + self.tableView.height = CGFloat(self.modelArr.count)*(45+15*2) |
| 26 | + self.totalView.height = CGFloat(self.modelArr.count)*(45+15*2) + 55 | ||
| 27 | + self.tableView.reloadData() | ||
| 28 | + | ||
| 29 | +// //定义view的阴影颜色 | ||
| 30 | +// self.totalView.layer.shadowColor = UIColor.black.cgColor | ||
| 31 | +// //阴影偏移量 | ||
| 32 | +// self.totalView.layer.shadowOffset=CGSize(width:1, height:1) | ||
| 33 | +// //定义view的阴影宽度,模糊计算的半径 | ||
| 34 | +// self.totalView.layer.shadowRadius = 12 | ||
| 35 | +// //定义view的阴影透明度,注意:如果view没有设置背景色阴影也是不会显示的 | ||
| 36 | +// self.totalView.layer.shadowOpacity = 0.4 | ||
| 51 | 37 | ||
| 52 | - //slideModel | ||
| 53 | - var _slideModel : CNLiveDownSlideModel? | ||
| 54 | - var slideModel : CNLiveDownSlideModel? { | ||
| 55 | - get{ | ||
| 56 | - _slideModel | ||
| 57 | - } | ||
| 58 | - set{ | ||
| 59 | - _slideModel = newValue! | ||
| 60 | - self.setupNewUI(model: _slideModel!) | ||
| 61 | - } | ||
| 62 | } | 38 | } |
| 39 | + //MARK: - 懒加载 | ||
| 40 | + ///区块标题 | ||
| 41 | + lazy var blockTitleLabl: UILabel = { | ||
| 42 | + let titleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: DownSlideRecommendLeftGap+5, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) | ||
| 43 | + titleLbl.text = "在追短剧" | ||
| 44 | + titleLbl.font = BoldFont_21 | ||
| 45 | + titleLbl.textColor = HexColor("#333333") | ||
| 46 | + return titleLbl | ||
| 47 | + }() | ||
| 48 | + lazy var totalView : UIView = { | ||
| 49 | + let totalView = UIView(frame: CGRect(x: 15, y: 15, width: KSreenWidth-30, height: 100)) | ||
| 50 | + return totalView | ||
| 51 | + }() | ||
| 52 | + | ||
| 53 | + lazy var tableView : UITableView = { | ||
| 54 | + let tableView = UITableView(frame: CGRect(x: 0, y: self.blockTitleLabl.bottom+5, width: KSreenWidth-30, height: 50), style: .plain) | ||
| 55 | + tableView.dataSource = self | ||
| 56 | + tableView.delegate = self | ||
| 57 | + tableView.separatorStyle = .none | ||
| 58 | + tableView.tableFooterView = UIView.init() | ||
| 59 | + tableView.backgroundColor = .clear | ||
| 60 | + tableView.register(CNLiveAlbumCell.self, forCellReuseIdentifier: kCNLiveAlbumCellIdentifier) | ||
| 61 | + return tableView | ||
| 62 | + }() | ||
| 63 | 63 | ||
| 64 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | 64 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { |
| 65 | super.init(style: style, reuseIdentifier: reuseIdentifier) | 65 | super.init(style: style, reuseIdentifier: reuseIdentifier) |
| 66 | self.selectionStyle = .none | 66 | self.selectionStyle = .none |
| 67 | + | ||
| 68 | + self.contentView.addSubview(self.totalView) | ||
| 69 | + | ||
| 70 | + self.totalView.addSubview(self.blockTitleLabl) | ||
| 71 | + self.totalView.addSubview(self.tableView) | ||
| 72 | + self.tableView.backgroundColor = .white | ||
| 73 | + self.totalView.layer.cornerRadius = 12 | ||
| 74 | + self.totalView.clipsToBounds = true | ||
| 75 | + self.totalView.backgroundColor = .white | ||
| 76 | + | ||
| 77 | + //定义view的阴影颜色 | ||
| 78 | + self.totalView.layer.shadowColor = UIColor.black.cgColor | ||
| 79 | + //阴影偏移量 | ||
| 80 | + self.totalView.layer.shadowOffset=CGSize(width:1, height:1) | ||
| 81 | + //定义view的阴影宽度,模糊计算的半径 | ||
| 82 | + self.totalView.layer.shadowRadius = 12 | ||
| 83 | + //定义view的阴影透明度,注意:如果view没有设置背景色阴影也是不会显示的 | ||
| 84 | + self.totalView.layer.shadowOpacity = 0.4 | ||
| 85 | + | ||
| 67 | setupUI() | 86 | setupUI() |
| 68 | } | 87 | } |
| 69 | 88 | ||
| @@ -72,123 +91,33 @@ class CNLiveHomePageDuanJuCell:UITableViewCell{ | @@ -72,123 +91,33 @@ class CNLiveHomePageDuanJuCell:UITableViewCell{ | ||
| 72 | } | 91 | } |
| 73 | 92 | ||
| 74 | private func setupUI() { | 93 | private func setupUI() { |
| 75 | - contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) | 94 | + contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) |
| 76 | } | 95 | } |
| 77 | 96 | ||
| 78 | - func setupNewUI(model:CNLiveDownSlideModel){ | ||
| 79 | - if model.type == SlideModelTypeAllCourse12 { | ||
| 80 | - //全部课程列表 | ||
| 81 | - contentView.addSubview(bgBackView) | ||
| 82 | - | ||
| 83 | - bgBackView.frame = CGRect(x: DownSlideRecommendLeftGap, y: 0,width:DownSlideSingleCourseW , height:model.cellH-DownSlideRecommendLeftGap) | ||
| 84 | - bgBackView.layer.shadowColor = HexColor("#000000")?.cgColor | ||
| 85 | - bgBackView.layer.shadowRadius = 12 | ||
| 86 | - bgBackView.layer.shadowOpacity = 1 | ||
| 87 | - bgBackView.layer.shadowOffset = CGSize(width: 0, height: 0) | ||
| 88 | - bgBackView.layer.cornerRadius = 12 | ||
| 89 | - bgBackView.clipsToBounds = true | ||
| 90 | - bgBackView.backgroundColor = HexColor("#FFFFFF") | ||
| 91 | - | ||
| 92 | - let titleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: DownSlideRecommendLeftGap, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) | ||
| 93 | - titleLbl.text = model.blockName ?? "全部课程" | ||
| 94 | - titleLbl.font = BoldFont_21 | ||
| 95 | - titleLbl.textColor = HexColor("#333333") | ||
| 96 | - bgBackView.addSubview(titleLbl) | ||
| 97 | - | ||
| 98 | - //总块数 | ||
| 99 | - let contentsNum = model.contents.count | ||
| 100 | - //model行数 | ||
| 101 | - let row = model.rowNum | ||
| 102 | - //总显示块数 | ||
| 103 | - var totalNum = (contentsNum >= row) ? row : contentsNum | ||
| 104 | - if row == 0{//row为0 , contents全部显示 | ||
| 105 | - totalNum = contentsNum | ||
| 106 | - } | ||
| 107 | - for i in 0..<totalNum{//i是第几行 | ||
| 108 | - let contentMdl = model.contents[i] | ||
| 109 | - | ||
| 110 | - //小icon | ||
| 111 | - let imageView = UIImageView(frame: CGRectMake(DownSlideRecommendLeftGap, titleLbl.bottom+DownSlideRecommendLeftGap+CGFloat(i)*(DownSlideAllCourseRowTopYGap+DownSlideAllCourseRowImageWH+DownSlideAllCourseRowBottomYGap), CGFloat(DownSlideAllCourseRowImageWH), CGFloat(DownSlideAllCourseRowImageWH))) | ||
| 112 | - imageView.kf.setImage(with: URL(string:contentMdl.poster!)) | ||
| 113 | - bgBackView.addSubview(imageView) | ||
| 114 | - | ||
| 115 | - let titleLbl = UILabel(frame: CGRect(x: imageView.right+DownSlideRecommendLeftGap, y: imageView.top, width: DownSlideSingleCourseW-90-imageView.right, height: 21)) | ||
| 116 | - titleLbl.text = contentMdl.title ?? "婴儿课程" | ||
| 117 | - titleLbl.font = Font_15 | ||
| 118 | - titleLbl.textColor = HexColor("#333333") | ||
| 119 | - bgBackView.addSubview(titleLbl) | ||
| 120 | - | ||
| 121 | - let subTitleLbl = UILabel(frame: CGRect(x: titleLbl.left, y:titleLbl.bottom+3 , width: titleLbl.width, height: 17)) | ||
| 122 | - subTitleLbl.text = contentMdl.subTitle ?? "适应3-6岁" | ||
| 123 | - subTitleLbl.font = Font_12 | ||
| 124 | - subTitleLbl.textColor = HexColor("#999999") | ||
| 125 | - bgBackView.addSubview(subTitleLbl) | ||
| 126 | - | ||
| 127 | - let enterBtn = UIButton(type: .custom) | ||
| 128 | - enterBtn.frame = CGRect(x: bgBackView.right-25-65, y: 0, width: 65, height: 30) | ||
| 129 | - enterBtn.centerY = imageView.centerY | ||
| 130 | - enterBtn.setBackgroundImage(UIImage(named: "homepage_down_enter"), for: .normal) | ||
| 131 | - enterBtn.setTitle("进入", for: .normal) | ||
| 132 | - enterBtn.titleLabel?.font = BoldFont_13 | ||
| 133 | - enterBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal) | ||
| 134 | - enterBtn.addTarget(self, action: #selector(enterBtnAction(_:)), for: .touchUpInside) | ||
| 135 | - enterBtn.tag = i | ||
| 136 | - bgBackView.addSubview(enterBtn) | ||
| 137 | - } | ||
| 138 | - }else if model.type == SlideModelTypeOneCourse75 { | ||
| 139 | - //单图课程 | ||
| 140 | - contentView.addSubview(bgBackView) | ||
| 141 | - bgBackView.addSubview(bgImageView) | ||
| 142 | - | ||
| 143 | - bgBackView.frame = CGRect(x: DownSlideRecommendLeftGap, y: 0,width:DownSlideSingleCourseW , height:DownSlideSingleCourseMoreH+DownSlideSingleCourseImgH) | ||
| 144 | - bgBackView.layer.shadowColor = UIColor.black.cgColor | ||
| 145 | - bgBackView.layer.shadowOpacity = 0.4 | ||
| 146 | - bgBackView.layer.shadowOffset = CGSize(width: 0, height: 1) | ||
| 147 | - | ||
| 148 | - bgImageView.frame = CGRect(x: 0, y: 0,width:DownSlideSingleCourseW , height:DownSlideSingleCourseImgH) | ||
| 149 | - bgImageView.contentMode = .scaleAspectFill | ||
| 150 | - bgImageView.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius | ||
| 151 | - bgImageView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] | ||
| 152 | - bgImageView.layer.masksToBounds = true | ||
| 153 | - bgImageView.kf.setImage(with: URL(string: model.contents[0].poster ?? "")) | ||
| 154 | - | ||
| 155 | - let titleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: DownSlideRecommendLeftGap, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) | ||
| 156 | - titleLbl.text = model.contents[0].title ?? "婴儿课程" | ||
| 157 | - titleLbl.font = BoldFont_21 | ||
| 158 | - titleLbl.textColor = HexColor("#FFFFFF") | ||
| 159 | - bgImageView.addSubview(titleLbl) | ||
| 160 | - | ||
| 161 | - let subTitleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y:titleLbl.bottom , width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) | ||
| 162 | - subTitleLbl.text = model.contents[0].subTitle ?? "适应3-6岁" | ||
| 163 | - subTitleLbl.font = Font_12 | ||
| 164 | - subTitleLbl.textColor = HexColor("#FFFFFF") | ||
| 165 | - bgImageView.addSubview(subTitleLbl) | ||
| 166 | - | ||
| 167 | - //单节底部视图 | ||
| 168 | - let singleCourseBottomView = UIView(frame: CGRect(x: 0, y: DownSlideSingleCourseImgH, width: DownSlideSingleCourseW, height: DownSlideSingleCourseMoreH)) | ||
| 169 | - singleCourseBottomView.layer.cornerRadius = 12 | ||
| 170 | - singleCourseBottomView.layer.maskedCorners = [.layerMinXMaxYCorner, .layerMaxXMaxYCorner] | ||
| 171 | - singleCourseBottomView.backgroundColor = .white | ||
| 172 | - singleCourseBottomView.isUserInteractionEnabled = true | ||
| 173 | - bgBackView.addSubview(singleCourseBottomView) | ||
| 174 | - | ||
| 175 | - let moreLabel = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: 15, width: DownSlideSingleCourseW - 50 - DownSlideRecommendLeftGap , height: 30)) | ||
| 176 | - moreLabel.text = model.blockName ?? "更多" | ||
| 177 | - moreLabel.font = Font_15 | ||
| 178 | - moreLabel.textColor = HexColor("#333333") | ||
| 179 | - singleCourseBottomView.addSubview(moreLabel) | ||
| 180 | - | ||
| 181 | - let moreImgView = UIImageView(image: UIImage(named: "homepage_down_more")) | ||
| 182 | - moreImgView.left = moreLabel.right | ||
| 183 | - moreImgView.centerY = moreLabel.centerY | ||
| 184 | - singleCourseBottomView.addSubview(moreImgView) | ||
| 185 | - } | 97 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { |
| 98 | + self.modelArr.count | ||
| 186 | } | 99 | } |
| 187 | 100 | ||
| 101 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
| 102 | + let model = self.modelArr[indexPath.row] as! CNLiveAlbumMsgModel | ||
| 103 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveAlbumCellIdentifier) as? CNLiveAlbumCell | ||
| 104 | + else { | ||
| 105 | + let cell = CNLiveAlbumCell() | ||
| 106 | + return cell | ||
| 107 | + } | ||
| 108 | + cell.albumMsgModel = model | ||
| 109 | + | ||
| 110 | + return cell | ||
| 111 | + } | ||
| 112 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
| 113 | + self.DuanJUCellSelectedCallBack!(self) | ||
| 114 | + } | ||
| 115 | + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
| 116 | + return 45+15*2 | ||
| 117 | + } | ||
| 188 | //MARK: - 事件 | 118 | //MARK: - 事件 |
| 189 | - @objc func enterBtnAction(_ sender: UIButton){ | ||
| 190 | - let tag = sender.tag | ||
| 191 | - let contentMdl = self.slideModel?.contents[tag] | ||
| 192 | - CNLiveDownSlideTool.pushWebVCWithContentsMdl(contentMdl: contentMdl!) | 119 | + @objc func playBtnAction(){ |
| 120 | + showLoading(message: "") | ||
| 121 | +// self.getAlbumList() | ||
| 193 | } | 122 | } |
| 194 | } | 123 | } |
metaCode/Classes/Main/HomePages/View/HomepageDetail/CNLiveAlbumCell.swift
| @@ -10,6 +10,19 @@ import QMUIKit | @@ -10,6 +10,19 @@ import QMUIKit | ||
| 10 | class CNLiveAlbumCell:UITableViewCell{ | 10 | class CNLiveAlbumCell:UITableViewCell{ |
| 11 | 11 | ||
| 12 | var albumModelArr:Array<CNLiveAlbumListModel>? | 12 | var albumModelArr:Array<CNLiveAlbumListModel>? |
| 13 | + | ||
| 14 | + var _albumMsgModel : CNLiveAlbumMsgModel? | ||
| 15 | + var albumMsgModel : CNLiveAlbumMsgModel? { | ||
| 16 | + get{ | ||
| 17 | + _albumMsgModel | ||
| 18 | + } | ||
| 19 | + set{ | ||
| 20 | + _albumMsgModel = newValue! | ||
| 21 | + | ||
| 22 | + self.setupNewUIMsgModel(model: _albumMsgModel!) | ||
| 23 | + } | ||
| 24 | + } | ||
| 25 | + | ||
| 13 | //AlbumModel | 26 | //AlbumModel |
| 14 | var _albumModel : CNLiveAlbumModel? | 27 | var _albumModel : CNLiveAlbumModel? |
| 15 | var albumModel : CNLiveAlbumModel? { | 28 | var albumModel : CNLiveAlbumModel? { |
| @@ -35,7 +48,7 @@ class CNLiveAlbumCell:UITableViewCell{ | @@ -35,7 +48,7 @@ class CNLiveAlbumCell:UITableViewCell{ | ||
| 35 | titleLabel.textColor = HexColor("#333333") | 48 | titleLabel.textColor = HexColor("#333333") |
| 36 | titleLabel.textAlignment = .left | 49 | titleLabel.textAlignment = .left |
| 37 | titleLabel.font = Font_15 | 50 | titleLabel.font = Font_15 |
| 38 | - titleLabel.text = "啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊" | 51 | + titleLabel.text = "标题" |
| 39 | return titleLabel | 52 | return titleLabel |
| 40 | }() | 53 | }() |
| 41 | ///副标题 | 54 | ///副标题 |
| @@ -76,39 +89,76 @@ class CNLiveAlbumCell:UITableViewCell{ | @@ -76,39 +89,76 @@ class CNLiveAlbumCell:UITableViewCell{ | ||
| 76 | self.titleLabl.text = model.title | 89 | self.titleLabl.text = model.title |
| 77 | self.subTitleLabel.text = model.subTitle | 90 | self.subTitleLabel.text = model.subTitle |
| 78 | self.iconImgView.kf.setImage(with: URL(string: model.poster)) | 91 | self.iconImgView.kf.setImage(with: URL(string: model.poster)) |
| 92 | + self.titleLabl.width = KSreenWidth-(self.iconImgView.right+15)-80 | ||
| 93 | + self.playBtn.left = KSreenWidth-80 | ||
| 79 | } | 94 | } |
| 80 | - @objc func playBtnAction(){ | ||
| 81 | - showLoading(message: "") | ||
| 82 | - self.getAlbumList() | ||
| 83 | - } | ||
| 84 | - | ||
| 85 | - //获取专辑详情(简介等) | ||
| 86 | - func getAlbumMsg(){ | ||
| 87 | - CNLiveHomePageViewModel.getAlbumMsg(aid: self.albumModel!.contentId) { result, status in | ||
| 88 | - hiddenLoading() | ||
| 89 | - if status == .success{ | ||
| 90 | - let model = result as! CNLiveAlbumMsgModel | ||
| 91 | - for listModel in self.albumModelArr! { | ||
| 92 | - listModel.albumMsgModel = model | ||
| 93 | - } | ||
| 94 | - print("") | ||
| 95 | - }else{ | ||
| 96 | - | ||
| 97 | - } | ||
| 98 | - } | 95 | + func setupNewUIMsgModel(model:CNLiveAlbumMsgModel){ |
| 96 | + self.titleLabl.text = model.albumName | ||
| 97 | + self.subTitleLabel.text = model.subTitle | ||
| 98 | + self.iconImgView.kf.setImage(with: URL(string: model.albumImg)) | ||
| 99 | + self.titleLabl.width = KSreenWidth-(self.iconImgView.right+15)-80-30 | ||
| 100 | + self.playBtn.left = KSreenWidth-80-30 | ||
| 99 | } | 101 | } |
| 100 | - //获取专辑视频列表详情(播放地址 ,点赞数等信息) | ||
| 101 | - func getAlbumList(){ | 102 | + @objc func playBtnAction(){ |
| 102 | showLoading(message: "") | 103 | showLoading(message: "") |
| 103 | - CNLiveHomePageViewModel.getAlbumList(aid: self.albumModel!.contentId){ result, status in | ||
| 104 | - hiddenLoading() | ||
| 105 | - if status == .success{ | ||
| 106 | - let arr = result as! Array<CNLiveAlbumListModel> | ||
| 107 | - self.albumModelArr = Array(arr) | ||
| 108 | - self.getAlbumMsg() | ||
| 109 | - }else{ | ||
| 110 | - | ||
| 111 | - } | 104 | + var aid = "" |
| 105 | + if self.albumModel != nil{ | ||
| 106 | + aid = self.albumModel!.contentId | ||
| 107 | + }else if self.albumMsgModel != nil{ | ||
| 108 | + aid = self.albumMsgModel!.albumId | ||
| 109 | + }else{ | ||
| 110 | + aid = "" | ||
| 112 | } | 111 | } |
| 112 | + | ||
| 113 | + navigationViewController().visibleViewController?.navigationController?.pushViewController(CNLiveShortVideoViewController(aid: aid), animated: pushAnimated) | ||
| 114 | + | ||
| 115 | +// self.getAlbumList() | ||
| 113 | } | 116 | } |
| 117 | + | ||
| 118 | +// //获取专辑详情(简介等) | ||
| 119 | +// func getAlbumMsg(){ | ||
| 120 | +// var aid = "" | ||
| 121 | +// if self.albumModel != nil{ | ||
| 122 | +// aid = self.albumModel!.contentId | ||
| 123 | +// }else if self.albumMsgModel != nil{ | ||
| 124 | +// aid = self.albumMsgModel!.albumId | ||
| 125 | +// }else{ | ||
| 126 | +// aid = "" | ||
| 127 | +// } | ||
| 128 | +// CNLiveHomePageViewModel.getAlbumMsg(aid: aid) { result, status in | ||
| 129 | +// hiddenLoading() | ||
| 130 | +// if status == .success{ | ||
| 131 | +// let model = result as! CNLiveAlbumMsgModel | ||
| 132 | +// for listModel in self.albumModelArr! { | ||
| 133 | +// listModel.albumMsgModel = model | ||
| 134 | +// } | ||
| 135 | +// navigationViewController().visibleViewController?.navigationController?.pushViewController(CNLiveShortVideoViewController(aid: aid), animated: pushAnimated) | ||
| 136 | +// }else{ | ||
| 137 | +// | ||
| 138 | +// } | ||
| 139 | +// } | ||
| 140 | +// } | ||
| 141 | +// //获取专辑视频列表详情(播放地址 ,点赞数等信息) | ||
| 142 | +// func getAlbumList(){ | ||
| 143 | +// showLoading(message: "") | ||
| 144 | +// var aid = "" | ||
| 145 | +// if self.albumModel != nil{ | ||
| 146 | +// aid = self.albumModel!.contentId | ||
| 147 | +// }else if self.albumMsgModel != nil{ | ||
| 148 | +// aid = self.albumMsgModel!.albumId | ||
| 149 | +// }else{ | ||
| 150 | +// aid = "" | ||
| 151 | +// } | ||
| 152 | +// | ||
| 153 | +// CNLiveHomePageViewModel.getAlbumList(aid: aid){ result, status in | ||
| 154 | +// hiddenLoading() | ||
| 155 | +// if status == .success{ | ||
| 156 | +// let arr = result as! Array<CNLiveAlbumListModel> | ||
| 157 | +// self.albumModelArr = Array(arr) | ||
| 158 | +// self.getAlbumMsg() | ||
| 159 | +// }else{ | ||
| 160 | +// | ||
| 161 | +// } | ||
| 162 | +// } | ||
| 163 | +// } | ||
| 114 | } | 164 | } |
metaCode/Classes/Main/HomePages/View/HomepageDetail/CNLiveDuanjuTitleCell.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveDuanjuTitleCell.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/1/10. | ||
| 6 | +// 在追短剧详情页-title cell | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +class CNLiveDuanjuTitleCell:UITableViewCell{ | ||
| 11 | + | ||
| 12 | + //MARK: - 懒加载 | ||
| 13 | + ///区块标题 | ||
| 14 | + lazy var blockTitleLabl: UILabel = { | ||
| 15 | + let titleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: 10, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) | ||
| 16 | + titleLbl.text = "在追短剧" | ||
| 17 | + titleLbl.font = BoldFont_21 | ||
| 18 | + titleLbl.textColor = HexColor("#333333") | ||
| 19 | + return titleLbl | ||
| 20 | + }() | ||
| 21 | + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
| 22 | + super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
| 23 | + self.selectionStyle = .none | ||
| 24 | + | ||
| 25 | + setupUI() | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + required init?(coder aDecoder: NSCoder) { | ||
| 29 | + fatalError("init(coder:) has not been implemented") | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + private func setupUI() { | ||
| 33 | + contentView.backgroundColor = .white | ||
| 34 | + self.contentView.addSubview(self.blockTitleLabl) | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + | ||
| 38 | +} |
metaCode/Classes/Main/HomePages/View/PlayletHomePage/CNLivePlayletHomePageCell.swift
| @@ -7,56 +7,109 @@ | @@ -7,56 +7,109 @@ | ||
| 7 | 7 | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | import QMUIKit | 9 | import QMUIKit |
| 10 | +import Kingfisher | ||
| 10 | class CNLivePlayletHomePageCell:UITableViewCell{ | 11 | class CNLivePlayletHomePageCell:UITableViewCell{ |
| 12 | + | ||
| 13 | + var _albumListModel : CNLiveAlbumListModel? | ||
| 14 | + var albumListModel : CNLiveAlbumListModel? { | ||
| 15 | + get{ | ||
| 16 | + _albumListModel | ||
| 17 | + } | ||
| 18 | + set{ | ||
| 19 | + _albumListModel = newValue! | ||
| 20 | + | ||
| 21 | + self.setupNewUI(model: _albumListModel!) | ||
| 22 | + } | ||
| 23 | + } | ||
| 11 | //MARK: - 懒加载 | 24 | //MARK: - 懒加载 |
| 12 | lazy var iconImgView :UIImageView = { | 25 | lazy var iconImgView :UIImageView = { |
| 13 | - let iconImgView = UIImageView(frame: CGRect(x: 20, y: 10, width: 60, height: 90)) | 26 | + let iconImgView = UIImageView(frame: CGRect(x: 15, y: 12, width: 57, height: 75)) |
| 27 | + iconImgView.layer.cornerRadius = 5 | ||
| 28 | + iconImgView.clipsToBounds = true | ||
| 14 | return iconImgView | 29 | return iconImgView |
| 15 | }() | 30 | }() |
| 31 | + lazy var payIconImgView :UIImageView = { | ||
| 32 | + let payIconImgView = UIImageView(frame: CGRect(x: 0, y: 0, width: 30, height: 14)) | ||
| 33 | + payIconImgView.image = UIImage(named: "homePage_payed") | ||
| 34 | + return payIconImgView | ||
| 35 | + }() | ||
| 36 | + | ||
| 16 | ///标题 | 37 | ///标题 |
| 17 | lazy var titleLabl: UILabel = { | 38 | lazy var titleLabl: UILabel = { |
| 18 | - let titleLabel = UILabel.init(frame: CGRectMake(self.iconImgView.right+15, 15, KSreenWidth-(self.iconImgView.right+15)-10, 21)) | 39 | + let titleLabel = UILabel.init(frame: CGRectMake(self.iconImgView.right+15, self.iconImgView.top, KSreenWidth-(self.iconImgView.right+15)-10, 21)) |
| 19 | titleLabel.textColor = HexColor("#333333") | 40 | titleLabel.textColor = HexColor("#333333") |
| 20 | titleLabel.textAlignment = .left | 41 | titleLabel.textAlignment = .left |
| 21 | - titleLabel.font = Font_15 | 42 | + titleLabel.font = Font_13 |
| 22 | titleLabel.numberOfLines = 2 | 43 | titleLabel.numberOfLines = 2 |
| 23 | - titleLabel.text = "啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊" | 44 | + titleLabel.text = "视频标题" |
| 24 | let height = titleLabel.qmui_lineHeight | 45 | let height = titleLabel.qmui_lineHeight |
| 25 | titleLabel.height = height*2 | 46 | titleLabel.height = height*2 |
| 26 | return titleLabel | 47 | return titleLabel |
| 27 | }() | 48 | }() |
| 28 | ///时长 | 49 | ///时长 |
| 29 | lazy var timeLabel: UILabel = { | 50 | lazy var timeLabel: UILabel = { |
| 30 | - let titleLabel = UILabel.init(frame: CGRectMake(self.iconImgView.right+15, self.titleLabl.bottom+10, 40, 21)) | 51 | + let titleLabel = UILabel.init(frame: CGRectMake(self.iconImgView.right+15, self.iconImgView.bottom-21, 150, 21)) |
| 31 | titleLabel.textColor = HexColor("#333333") | 52 | titleLabel.textColor = HexColor("#333333") |
| 32 | titleLabel.textAlignment = .left | 53 | titleLabel.textAlignment = .left |
| 33 | - titleLabel.font = Font_15 | 54 | + titleLabel.font = Font_12 |
| 34 | titleLabel.text = "04:31" | 55 | titleLabel.text = "04:31" |
| 35 | let height = titleLabel.qmui_lineHeight | 56 | let height = titleLabel.qmui_lineHeight |
| 36 | titleLabel.height = height | 57 | titleLabel.height = height |
| 37 | return titleLabel | 58 | return titleLabel |
| 38 | }() | 59 | }() |
| 39 | - lazy var likeBtn: UIButton = { | ||
| 40 | - let likeBtn = UIButton.init(type: .custom) | ||
| 41 | - likeBtn.frame = CGRect(x: self.timeLabel.right+20, y: self.timeLabel.top, width: 60, height: 20) | ||
| 42 | - likeBtn.setTitle("24.0w", for: .normal) | ||
| 43 | - likeBtn.setTitleColor(HexColor("#333333"), for: .normal) | ||
| 44 | - likeBtn.setImage(UIImage(named: "DS_coupon_unSelect"), for: .normal) | ||
| 45 | - likeBtn.titleLabel?.font = Font_14 | ||
| 46 | - likeBtn.setupButtonImageAndTitlePossitionWith(padding: 5, style: .left) | ||
| 47 | - return likeBtn | ||
| 48 | - }() | ||
| 49 | - | 60 | + |
| 50 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | 61 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { |
| 51 | super.init(style: style, reuseIdentifier: reuseIdentifier) | 62 | super.init(style: style, reuseIdentifier: reuseIdentifier) |
| 52 | self.selectionStyle = .none | 63 | self.selectionStyle = .none |
| 53 | self.addSubview(self.iconImgView) | 64 | self.addSubview(self.iconImgView) |
| 65 | + self.iconImgView.addSubview(self.payIconImgView) | ||
| 54 | self.addSubview(self.titleLabl) | 66 | self.addSubview(self.titleLabl) |
| 55 | self.addSubview(self.timeLabel) | 67 | self.addSubview(self.timeLabel) |
| 56 | - self.addSubview(self.likeBtn) | ||
| 57 | } | 68 | } |
| 58 | 69 | ||
| 59 | required init?(coder: NSCoder) { | 70 | required init?(coder: NSCoder) { |
| 60 | fatalError("init(coder:) has not been implemented") | 71 | fatalError("init(coder:) has not been implemented") |
| 61 | } | 72 | } |
| 73 | + func setupNewUI(model:CNLiveAlbumListModel){ | ||
| 74 | + self.titleLabl.text = model.title | ||
| 75 | + self.timeLabel.text = model.duration | ||
| 76 | + self.iconImgView.kf.setImage(with: URL(string: model.poster)) | ||
| 77 | + if model.product?.check == true{ | ||
| 78 | + //付过费 或 免费 | ||
| 79 | + self.payIconImgView.isHidden = true | ||
| 80 | + //显示已购买 或者 不显示 | ||
| 81 | + if model.product?.productType == "0"{ | ||
| 82 | + //免费 | ||
| 83 | + self.payIconImgView.isHidden = true | ||
| 84 | + }else if model.product?.productType == "1"{ | ||
| 85 | + //积分 | ||
| 86 | + self.payIconImgView.isHidden = false | ||
| 87 | + self.payIconImgView.image = UIImage(named: "homePage_payed") | ||
| 88 | + }else if model.product?.productType == "2"{ | ||
| 89 | + //付费 | ||
| 90 | + self.payIconImgView.isHidden = false | ||
| 91 | + self.payIconImgView.image = UIImage(named: "homePage_payed") | ||
| 92 | + }else{ | ||
| 93 | + self.payIconImgView.isHidden = false | ||
| 94 | + self.payIconImgView.image = UIImage(named: "homePage_payed") | ||
| 95 | + } | ||
| 96 | + }else{ | ||
| 97 | + //需要付费 | ||
| 98 | + if model.product?.productType == "0"{ | ||
| 99 | + //免费 | ||
| 100 | + self.payIconImgView.isHidden = true | ||
| 101 | + }else if model.product?.productType == "1"{ | ||
| 102 | + //积分 | ||
| 103 | + self.payIconImgView.isHidden = false | ||
| 104 | + self.payIconImgView.image = UIImage(named: "homePage_payment") | ||
| 105 | + }else if model.product?.productType == "2"{ | ||
| 106 | + //付费 | ||
| 107 | + self.payIconImgView.isHidden = false | ||
| 108 | + self.payIconImgView.image = UIImage(named: "homePage_payment") | ||
| 109 | + }else{ | ||
| 110 | + self.payIconImgView.isHidden = false | ||
| 111 | + self.payIconImgView.image = UIImage(named: "homePage_payment") | ||
| 112 | + } | ||
| 113 | + } | ||
| 114 | + } | ||
| 62 | } | 115 | } |
metaCode/Classes/Main/HomePages/View/PlayletHomePage/CNLivePlayletHomePageHeaderCell.swift
| @@ -9,30 +9,66 @@ import Foundation | @@ -9,30 +9,66 @@ import Foundation | ||
| 9 | import QMUIKit | 9 | import QMUIKit |
| 10 | import SwiftUI | 10 | import SwiftUI |
| 11 | import SnapKit | 11 | import SnapKit |
| 12 | +import Kingfisher | ||
| 13 | + | ||
| 14 | +//cell高度变化 | ||
| 15 | +typealias homePageHeaderCellChangedBlockActionBlock = (_ cell: CNLivePlayletHomePageHeaderCell ,_ jianjieHeight:CGFloat) -> Void | ||
| 16 | +//刷新短剧首页 | ||
| 17 | +typealias homePageNeedReloadBlockActionBlock = () -> Void | ||
| 18 | + | ||
| 19 | + | ||
| 12 | class CNLivePlayletHomePageHeaderCell:UITableViewCell{ | 20 | class CNLivePlayletHomePageHeaderCell:UITableViewCell{ |
| 21 | + var homePageHeaderCellChangedBlock:homePageHeaderCellChangedBlockActionBlock? | ||
| 22 | + var homePageNeedReloadActionBlock:homePageNeedReloadBlockActionBlock? | ||
| 23 | + | ||
| 24 | + | ||
| 25 | + let followBtnSubLayer = "followBtnSubLayer" | ||
| 26 | + let payBtnSubLayer = "payBtnSubLayer" | ||
| 27 | + | ||
| 28 | + var _albumListModel : CNLiveAlbumListModel? | ||
| 29 | + var albumListModel : CNLiveAlbumListModel? { | ||
| 30 | + get{ | ||
| 31 | + _albumListModel | ||
| 32 | + } | ||
| 33 | + set{ | ||
| 34 | + _albumListModel = newValue! | ||
| 35 | + | ||
| 36 | + self.setupNewUI(model: _albumListModel!) | ||
| 37 | + } | ||
| 38 | + } | ||
| 39 | + | ||
| 13 | //MARK: - 懒加载 | 40 | //MARK: - 懒加载 |
| 14 | lazy var iconImgView :UIImageView = { | 41 | lazy var iconImgView :UIImageView = { |
| 15 | - let iconImgView = UIImageView(frame: CGRect(x: 20, y: 20, width: 100, height: 100)) | 42 | + let iconImgView = UIImageView(frame: CGRect(x: 15, y: 20, width: 112, height: 147)) |
| 43 | + iconImgView.layer.cornerRadius = 5 | ||
| 44 | + iconImgView.clipsToBounds = true | ||
| 16 | return iconImgView | 45 | return iconImgView |
| 17 | }() | 46 | }() |
| 47 | + | ||
| 48 | + lazy var payIconImgView :UIImageView = { | ||
| 49 | + let payIconImgView = UIImageView(frame: CGRect(x: 0, y: 0, width: 30, height: 14)) | ||
| 50 | + payIconImgView.image = UIImage(named: "homePage_payment") | ||
| 51 | + return payIconImgView | ||
| 52 | + }() | ||
| 53 | + | ||
| 18 | ///标题 | 54 | ///标题 |
| 19 | lazy var titleLabl: UILabel = { | 55 | lazy var titleLabl: UILabel = { |
| 20 | - let titleLabel = UILabel.init(frame: CGRectMake(self.iconImgView.right+10, self.iconImgView.top+20, KSreenWidth-(self.iconImgView.right+15)-10, 21)) | 56 | + let titleLabel = UILabel.init(frame: CGRectMake(self.iconImgView.right+15, self.iconImgView.top, KSreenWidth-(self.iconImgView.right+15)-10, 21)) |
| 21 | titleLabel.textColor = HexColor("#333333") | 57 | titleLabel.textColor = HexColor("#333333") |
| 22 | titleLabel.textAlignment = .left | 58 | titleLabel.textAlignment = .left |
| 23 | - titleLabel.font = Font_20 | ||
| 24 | - titleLabel.text = "啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊" | 59 | + titleLabel.font = BoldFont_15 |
| 60 | + titleLabel.text = "短剧标题" | ||
| 25 | let height = titleLabel.qmui_lineHeight | 61 | let height = titleLabel.qmui_lineHeight |
| 26 | titleLabel.height = height | 62 | titleLabel.height = height |
| 27 | return titleLabel | 63 | return titleLabel |
| 28 | }() | 64 | }() |
| 29 | ///集数 | 65 | ///集数 |
| 30 | lazy var jishuLabel: UILabel = { | 66 | lazy var jishuLabel: UILabel = { |
| 31 | - let titleLabel = UILabel.init(frame: CGRectMake(self.titleLabl.left, self.titleLabl.bottom+20, 40, 21)) | ||
| 32 | - titleLabel.textColor = HexColor("#333333") | 67 | + let titleLabel = UILabel.init(frame: CGRectMake(self.titleLabl.left, self.titleLabl.bottom+20, KSreenWidth-(self.iconImgView.right+15)-10, 21)) |
| 68 | + titleLabel.textColor = HexColor("#999999") | ||
| 33 | titleLabel.textAlignment = .left | 69 | titleLabel.textAlignment = .left |
| 34 | - titleLabel.font = Font_15 | ||
| 35 | - titleLabel.text = "45集" | 70 | + titleLabel.font = Font_12 |
| 71 | + titleLabel.text = "1集" | ||
| 36 | let height = titleLabel.qmui_lineHeight | 72 | let height = titleLabel.qmui_lineHeight |
| 37 | titleLabel.height = height | 73 | titleLabel.height = height |
| 38 | return titleLabel | 74 | return titleLabel |
| @@ -42,8 +78,9 @@ class CNLivePlayletHomePageHeaderCell:UITableViewCell{ | @@ -42,8 +78,9 @@ class CNLivePlayletHomePageHeaderCell:UITableViewCell{ | ||
| 42 | let titleLabel = UILabel.init(frame: CGRectMake(self.iconImgView.left, self.iconImgView.bottom+10, KSreenWidth-2*self.iconImgView.left, 21)) | 78 | let titleLabel = UILabel.init(frame: CGRectMake(self.iconImgView.left, self.iconImgView.bottom+10, KSreenWidth-2*self.iconImgView.left, 21)) |
| 43 | titleLabel.textColor = HexColor("#333333") | 79 | titleLabel.textColor = HexColor("#333333") |
| 44 | titleLabel.textAlignment = .left | 80 | titleLabel.textAlignment = .left |
| 45 | - titleLabel.font = Font_14 | ||
| 46 | - titleLabel.text = "啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈" | 81 | + titleLabel.font = Font_12 |
| 82 | + titleLabel.backgroundColor = UIColor(red:0.98, green:0.98, blue:0.98, alpha:1.00) | ||
| 83 | + titleLabel.text = "简介" | ||
| 47 | titleLabel.numberOfLines = 0 | 84 | titleLabel.numberOfLines = 0 |
| 48 | var lines = titleLabel.getRealLabelTextLines() | 85 | var lines = titleLabel.getRealLabelTextLines() |
| 49 | let height = titleLabel.qmui_lineHeight | 86 | let height = titleLabel.qmui_lineHeight |
| @@ -62,10 +99,10 @@ class CNLivePlayletHomePageHeaderCell:UITableViewCell{ | @@ -62,10 +99,10 @@ class CNLivePlayletHomePageHeaderCell:UITableViewCell{ | ||
| 62 | expandBtn.setTitle("展开", for: .normal) | 99 | expandBtn.setTitle("展开", for: .normal) |
| 63 | expandBtn.setTitle("收起", for: .selected) | 100 | expandBtn.setTitle("收起", for: .selected) |
| 64 | 101 | ||
| 65 | - expandBtn.setTitleColor(HexColor("#333333"), for: .normal) | ||
| 66 | - expandBtn.setImage(UIImage(named: "DS_coupon_unSelect"), for: .normal) | ||
| 67 | - expandBtn.setImage(UIImage(named: "DS_coupon_unSelect"), for: .selected) | ||
| 68 | - expandBtn.titleLabel?.font = Font_16 | 102 | + expandBtn.setTitleColor(HexColor("#666666"), for: .normal) |
| 103 | + expandBtn.setImage(UIImage(named: "homepage_unfold"), for: .normal) | ||
| 104 | + expandBtn.setImage(UIImage(named: "homepage_fold"), for: .selected) | ||
| 105 | + expandBtn.titleLabel?.font = Font_12 | ||
| 69 | expandBtn.setupButtonImageAndTitlePossitionWith(padding: 5, style: .right) | 106 | expandBtn.setupButtonImageAndTitlePossitionWith(padding: 5, style: .right) |
| 70 | expandBtn.addTarget(self, action: #selector(expandBtnAction), for: .touchUpInside) | 107 | expandBtn.addTarget(self, action: #selector(expandBtnAction), for: .touchUpInside) |
| 71 | return expandBtn | 108 | return expandBtn |
| @@ -74,31 +111,51 @@ class CNLivePlayletHomePageHeaderCell:UITableViewCell{ | @@ -74,31 +111,51 @@ class CNLivePlayletHomePageHeaderCell:UITableViewCell{ | ||
| 74 | lazy var followBtn: UIButton = { | 111 | lazy var followBtn: UIButton = { |
| 75 | let followBtn = UIButton(type: .custom) | 112 | let followBtn = UIButton(type: .custom) |
| 76 | followBtn.setTitle("追剧", for: .normal) | 113 | followBtn.setTitle("追剧", for: .normal) |
| 77 | - followBtn.setTitleColor(.black, for: .normal) | ||
| 78 | - followBtn.setTitleColor(.black, for: .selected) | ||
| 79 | - followBtn.setTitle("已追剧", for: .selected) | ||
| 80 | - followBtn.layer.borderColor = UIColor.black.cgColor | ||
| 81 | - followBtn.layer.borderWidth = 1 | ||
| 82 | - followBtn.layer.cornerRadius = 3 | 114 | + followBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal) |
| 115 | + followBtn.titleLabel?.font = Font_15 | ||
| 116 | + followBtn.layer.cornerRadius = 20 | ||
| 83 | followBtn.clipsToBounds = true | 117 | followBtn.clipsToBounds = true |
| 84 | followBtn.addTarget(self, action: #selector(followBtnAction), for: .touchUpInside) | 118 | followBtn.addTarget(self, action: #selector(followBtnAction), for: .touchUpInside) |
| 119 | + | ||
| 120 | + let gradient = CAGradientLayer() | ||
| 121 | + gradient.frame = self.bounds | ||
| 122 | + gradient.colors = [HexColor("#FFD20B")!.cgColor, HexColor("#FFA81A")!.cgColor] | ||
| 123 | + gradient.locations = [0, 1] | ||
| 124 | + gradient.startPoint = CGPoint(x: 0.96, y: 0.42) | ||
| 125 | + gradient.endPoint = CGPoint(x: 0.42, y: 0.42) | ||
| 126 | + gradient.name = followBtnSubLayer | ||
| 127 | + followBtn.layer.insertSublayer(gradient, at: 0) | ||
| 85 | return followBtn | 128 | return followBtn |
| 86 | }() | 129 | }() |
| 87 | //付费解锁全集|已购买 | 130 | //付费解锁全集|已购买 |
| 88 | lazy var paymentBtn: UIButton = { | 131 | lazy var paymentBtn: UIButton = { |
| 89 | let paymentBtn = UIButton(type: .custom) | 132 | let paymentBtn = UIButton(type: .custom) |
| 90 | paymentBtn.setTitle("付费解锁全集", for: .normal) | 133 | paymentBtn.setTitle("付费解锁全集", for: .normal) |
| 91 | - paymentBtn.setTitleColor(.white, for: .normal) | ||
| 92 | - paymentBtn.setTitle("已购买", for: .selected) | ||
| 93 | - paymentBtn.setTitleColor(.black, for: .selected) | ||
| 94 | - paymentBtn.backgroundColor = .blue | ||
| 95 | - paymentBtn.layer.borderColor = UIColor.black.cgColor | ||
| 96 | - paymentBtn.layer.borderWidth = 1 | ||
| 97 | - paymentBtn.layer.cornerRadius = 3 | 134 | + paymentBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal) |
| 135 | + paymentBtn.titleLabel?.font = Font_15 | ||
| 136 | + paymentBtn.layer.cornerRadius = 20 | ||
| 98 | paymentBtn.clipsToBounds = true | 137 | paymentBtn.clipsToBounds = true |
| 99 | paymentBtn.addTarget(self, action: #selector(paymentBtnAction), for: .touchUpInside) | 138 | paymentBtn.addTarget(self, action: #selector(paymentBtnAction), for: .touchUpInside) |
| 139 | + | ||
| 140 | + let gradient = CAGradientLayer() | ||
| 141 | + gradient.frame = self.bounds | ||
| 142 | + gradient.colors = [HexColor("#67C5FF")!.cgColor, HexColor("#609AFF")!.cgColor] | ||
| 143 | + gradient.locations = [0, 1] | ||
| 144 | + gradient.startPoint = CGPoint(x: 0, y: 0.5) | ||
| 145 | + gradient.endPoint = CGPoint(x: 0.5, y: 0.5) | ||
| 146 | + gradient.name = payBtnSubLayer | ||
| 147 | + paymentBtn.layer.insertSublayer(gradient, at: 0) | ||
| 100 | return paymentBtn | 148 | return paymentBtn |
| 101 | }() | 149 | }() |
| 150 | + ///全部剧集 | ||
| 151 | + lazy var allJuJiLabl: UILabel = { | ||
| 152 | + let allJuJiLabl = UILabel.init(frame: CGRectMake(self.iconImgView.right+15, self.followBtn.bottom+20, 100, 16)) | ||
| 153 | + allJuJiLabl.textColor = HexColor("#333333") | ||
| 154 | + allJuJiLabl.textAlignment = .left | ||
| 155 | + allJuJiLabl.font = BoldFont_16 | ||
| 156 | + allJuJiLabl.text = "全部剧集" | ||
| 157 | + return allJuJiLabl | ||
| 158 | + }() | ||
| 102 | 159 | ||
| 103 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | 160 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { |
| 104 | super.init(style: style, reuseIdentifier: reuseIdentifier) | 161 | super.init(style: style, reuseIdentifier: reuseIdentifier) |
| @@ -108,12 +165,14 @@ class CNLivePlayletHomePageHeaderCell:UITableViewCell{ | @@ -108,12 +165,14 @@ class CNLivePlayletHomePageHeaderCell:UITableViewCell{ | ||
| 108 | 165 | ||
| 109 | func setUI(){ | 166 | func setUI(){ |
| 110 | self.contentView.addSubview(self.iconImgView) | 167 | self.contentView.addSubview(self.iconImgView) |
| 168 | + self.iconImgView.addSubview(self.payIconImgView) | ||
| 111 | self.contentView.addSubview(self.titleLabl) | 169 | self.contentView.addSubview(self.titleLabl) |
| 112 | self.contentView.addSubview(self.jishuLabel) | 170 | self.contentView.addSubview(self.jishuLabel) |
| 113 | self.contentView.addSubview(self.jianjieLabel) | 171 | self.contentView.addSubview(self.jianjieLabel) |
| 114 | self.contentView.addSubview(self.expandBtn) | 172 | self.contentView.addSubview(self.expandBtn) |
| 115 | self.contentView.addSubview(self.followBtn) | 173 | self.contentView.addSubview(self.followBtn) |
| 116 | self.contentView.addSubview(self.paymentBtn) | 174 | self.contentView.addSubview(self.paymentBtn) |
| 175 | + self.contentView.addSubview(self.allJuJiLabl) | ||
| 117 | 176 | ||
| 118 | let lines = jianjieLabel.getRealLabelTextLines() | 177 | let lines = jianjieLabel.getRealLabelTextLines() |
| 119 | if lines <= 2{ | 178 | if lines <= 2{ |
| @@ -123,25 +182,100 @@ class CNLivePlayletHomePageHeaderCell:UITableViewCell{ | @@ -123,25 +182,100 @@ class CNLivePlayletHomePageHeaderCell:UITableViewCell{ | ||
| 123 | } | 182 | } |
| 124 | 183 | ||
| 125 | self.followBtn.snp.makeConstraints { make in | 184 | self.followBtn.snp.makeConstraints { make in |
| 126 | - make.top.equalTo(self.jianjieLabel.snp.bottom).offset(40) | ||
| 127 | - make.left.equalTo(self.jianjieLabel.snp.left).offset(30) | ||
| 128 | - make.width.equalTo(120) | ||
| 129 | - make.height.equalTo(30) | 185 | + make.top.equalTo(self.jianjieLabel.snp.bottom).offset(25) |
| 186 | + make.left.equalTo(self.iconImgView.snp.left) | ||
| 187 | + make.width.equalTo(140) | ||
| 188 | + make.height.equalTo(40) | ||
| 130 | } | 189 | } |
| 131 | self.paymentBtn.snp.makeConstraints { make in | 190 | self.paymentBtn.snp.makeConstraints { make in |
| 132 | make.top.equalTo(self.followBtn) | 191 | make.top.equalTo(self.followBtn) |
| 133 | - make.left.equalTo(self.followBtn.snp.left).offset(KSreenWidth/2) | ||
| 134 | - make.width.equalTo(120) | ||
| 135 | - make.height.equalTo(30) | 192 | + make.left.equalTo(self.followBtn.snp.right).offset(15) |
| 193 | + make.right.equalTo(self.contentView.snp.right).offset(-15) | ||
| 194 | + make.height.equalTo(40) | ||
| 195 | + } | ||
| 196 | + self.allJuJiLabl.snp.makeConstraints { make in | ||
| 197 | + make.top.equalTo(self.followBtn.snp.bottom).offset(20) | ||
| 198 | + make.left.equalTo(self.iconImgView.snp.left) | ||
| 199 | + make.width.equalTo(100) | ||
| 200 | + make.height.equalTo(16) | ||
| 136 | } | 201 | } |
| 137 | - | ||
| 138 | - self.iconImgView.backgroundColor = .red | ||
| 139 | } | 202 | } |
| 140 | 203 | ||
| 141 | required init?(coder: NSCoder) { | 204 | required init?(coder: NSCoder) { |
| 142 | fatalError("init(coder:) has not been implemented") | 205 | fatalError("init(coder:) has not been implemented") |
| 143 | } | 206 | } |
| 144 | 207 | ||
| 208 | + func setupNewUI(model:CNLiveAlbumListModel){ | ||
| 209 | + | ||
| 210 | + self.titleLabl.text = model.albumMsgModel?.albumName ?? "专辑名称" | ||
| 211 | + self.jishuLabel.text = String(format: "共%@集",model.albumMsgModel?.episodeNow ?? "1") | ||
| 212 | + self.iconImgView.kf.setImage(with: URL(string: model.albumMsgModel?.albumImg ?? "")) | ||
| 213 | + if model.product?.check == true{ | ||
| 214 | + //付过费 或 免费 | ||
| 215 | + self.paymentBtn.isUserInteractionEnabled = false | ||
| 216 | + self.paymentChangeStatus(isPayed: true) | ||
| 217 | + self.payIconImgView.isHidden = true | ||
| 218 | + //显示已购买 或者 不显示 | ||
| 219 | + if model.albumMsgModel?.product?.albumProductType == "0"{ | ||
| 220 | + //免费 | ||
| 221 | + self.payIconImgView.isHidden = true | ||
| 222 | + }else if model.product?.albumProductType == "1"{ | ||
| 223 | + //积分 | ||
| 224 | + self.payIconImgView.isHidden = false | ||
| 225 | + self.payIconImgView.image = UIImage(named: "homePage_payed") | ||
| 226 | + }else if model.product?.albumProductType == "2"{ | ||
| 227 | + //付费 | ||
| 228 | + self.payIconImgView.isHidden = false | ||
| 229 | + self.payIconImgView.image = UIImage(named: "homePage_payed") | ||
| 230 | + }else{ | ||
| 231 | + self.payIconImgView.isHidden = false | ||
| 232 | + self.payIconImgView.image = UIImage(named: "homePage_payed") | ||
| 233 | + } | ||
| 234 | + }else{ | ||
| 235 | + //需要付费 | ||
| 236 | + self.paymentBtn.isUserInteractionEnabled = true | ||
| 237 | + self.paymentChangeStatus(isPayed: false) | ||
| 238 | + if model.product?.albumProductType == "0"{ | ||
| 239 | + //免费 | ||
| 240 | + self.payIconImgView.isHidden = true | ||
| 241 | + }else if model.product?.albumProductType == "1"{ | ||
| 242 | + //积分 | ||
| 243 | + self.payIconImgView.isHidden = false | ||
| 244 | + self.payIconImgView.image = UIImage(named: "homePage_payment") | ||
| 245 | + }else if model.product?.albumProductType == "2"{ | ||
| 246 | + //付费 | ||
| 247 | + self.payIconImgView.isHidden = false | ||
| 248 | + self.payIconImgView.image = UIImage(named: "homePage_payment") | ||
| 249 | + }else{ | ||
| 250 | + self.payIconImgView.isHidden = false | ||
| 251 | + self.payIconImgView.image = UIImage(named: "homePage_payment") | ||
| 252 | + } | ||
| 253 | + } | ||
| 254 | + | ||
| 255 | + self.jianjieLabel.text = (model.albumMsgModel?.desc != "") ? model.albumMsgModel?.desc : "短剧简介" | ||
| 256 | + let lines = jianjieLabel.getRealLabelTextLines() | ||
| 257 | + let height = jianjieLabel.qmui_lineHeight | ||
| 258 | + if lines <= 2{ | ||
| 259 | + self.expandBtn.isHidden = true | ||
| 260 | + }else{ | ||
| 261 | + self.expandBtn.isHidden = false | ||
| 262 | + } | ||
| 263 | + | ||
| 264 | + if self.expandBtn.isSelected{ | ||
| 265 | + //展开状态 | ||
| 266 | + self.jianjieLabel.height = height*CGFloat(lines) | ||
| 267 | + | ||
| 268 | + }else{ | ||
| 269 | + //收起状态 | ||
| 270 | + self.jianjieLabel.height = 2*height | ||
| 271 | + } | ||
| 272 | + if model.albumMsgModel!.collection{ | ||
| 273 | + self.followChangeStatus(isFollowed: true) | ||
| 274 | + }else{ | ||
| 275 | + self.followChangeStatus(isFollowed: false) | ||
| 276 | + } | ||
| 277 | + } | ||
| 278 | + | ||
| 145 | // MARK: - Action | 279 | // MARK: - Action |
| 146 | @objc func expandBtnAction(button:UIButton){ | 280 | @objc func expandBtnAction(button:UIButton){ |
| 147 | button.isSelected = !button.isSelected | 281 | button.isSelected = !button.isSelected |
| @@ -155,16 +289,127 @@ class CNLivePlayletHomePageHeaderCell:UITableViewCell{ | @@ -155,16 +289,127 @@ class CNLivePlayletHomePageHeaderCell:UITableViewCell{ | ||
| 155 | //文本展开状态,点击收起 | 289 | //文本展开状态,点击收起 |
| 156 | self.jianjieLabel.height = 2*height | 290 | self.jianjieLabel.height = 2*height |
| 157 | } | 291 | } |
| 292 | + self.homePageHeaderCellChangedBlock!(self, self.jianjieLabel.height) | ||
| 158 | self.expandBtn.top = self.jianjieLabel.bottom | 293 | self.expandBtn.top = self.jianjieLabel.bottom |
| 159 | 294 | ||
| 160 | } | 295 | } |
| 161 | @objc func followBtnAction(button:UIButton){ | 296 | @objc func followBtnAction(button:UIButton){ |
| 162 | button.isSelected = !button.isSelected | 297 | button.isSelected = !button.isSelected |
| 163 | - | 298 | + if button.isSelected{ |
| 299 | + //已追剧->取消追剧 | ||
| 300 | + if self.albumListModel?.albumMsgModel?.product?.check == true{ | ||
| 301 | + //已购买,不能取消追剧 | ||
| 302 | + }else{ | ||
| 303 | + self.postAlbumCollect(type: 2) | ||
| 304 | + } | ||
| 305 | + }else{ | ||
| 306 | + //未追剧->追剧 | ||
| 307 | + self.postAlbumCollect(type: 1) | ||
| 308 | + } | ||
| 164 | } | 309 | } |
| 165 | @objc func paymentBtnAction(button:UIButton){ | 310 | @objc func paymentBtnAction(button:UIButton){ |
| 166 | button.isSelected = !button.isSelected | 311 | button.isSelected = !button.isSelected |
| 312 | + if self.albumListModel?.product?.check == false{ | ||
| 313 | + //未购买->购买 | ||
| 314 | + CNLiveIntegralAlertTool.shared.showIntegralAlert(title: "\(self.albumListModel?.albumMsgModel?.albumName ?? "")共\(self.albumListModel?.albumMsgModel?.episodeNow ?? "1")集", integralCount: self.albumListModel?.albumMsgModel?.product?.point ?? "0", productId: self.albumListModel?.product?.productId ?? "") | ||
| 315 | + CNLiveIntegralAlertTool.shared.homePageNeedReloadActionBlock = { | ||
| 316 | + self.homePageNeedReloadActionBlock!() | ||
| 317 | + DispatchQueue.main.asyncAfter(deadline: .now()+1.5) { [self] in | ||
| 318 | + self.followChangeStatus(isFollowed: true) | ||
| 319 | + } | ||
| 320 | + } | ||
| 321 | + } | ||
| 322 | + } | ||
| 323 | + func paymentChangeStatus(isPayed:Bool){ | ||
| 324 | + if isPayed{ | ||
| 325 | + //已购买 | ||
| 326 | + self.paymentBtn.setTitle("已购买", for: .normal) | ||
| 327 | + self.paymentBtn.setTitleColor(HexColor("#619CFF"), for: .normal) | ||
| 328 | + | ||
| 329 | + let payLayer = self.subLayer(name: payBtnSubLayer, viewLayer: self.paymentBtn.layer) | ||
| 167 | 330 | ||
| 331 | + payLayer?.removeFromSuperlayer() | ||
| 332 | + self.paymentBtn.backgroundColor = HexColor("#ECF3FF") | ||
| 333 | + }else{ | ||
| 334 | + //未购买 | ||
| 335 | + self.paymentBtn.setTitle("付费解锁全集", for: .normal) | ||
| 336 | + self.paymentBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal) | ||
| 337 | + | ||
| 338 | + let payLayer = self.subLayer(name: payBtnSubLayer, viewLayer: self.paymentBtn.layer) | ||
| 339 | + | ||
| 340 | + if (payLayer != nil){ | ||
| 341 | + //已添加layer | ||
| 342 | + }else{ | ||
| 343 | + //未添加layer | ||
| 344 | + let gradient = CAGradientLayer() | ||
| 345 | + gradient.frame = self.bounds | ||
| 346 | + gradient.colors = [HexColor("#67C5FF")!.cgColor, HexColor("#609AFF")!.cgColor] | ||
| 347 | + gradient.locations = [0, 1] | ||
| 348 | + gradient.startPoint = CGPoint(x: 0, y: 0.5) | ||
| 349 | + gradient.endPoint = CGPoint(x: 0.5, y: 0.5) | ||
| 350 | + gradient.name = followBtnSubLayer | ||
| 351 | + self.paymentBtn.layer.insertSublayer(gradient, at: 0) | ||
| 352 | + self.paymentBtn.backgroundColor = .clear | ||
| 353 | + } | ||
| 354 | + } | ||
| 355 | + | ||
| 356 | + } | ||
| 357 | + func followChangeStatus(isFollowed:Bool){ | ||
| 358 | + if isFollowed{ | ||
| 359 | + //已追剧 | ||
| 360 | + self.followBtn.setTitleColor(HexColor("#F5A623"), for: .normal) | ||
| 361 | + self.followBtn.setTitle("已追剧", for: .normal) | ||
| 362 | + let follLayer = self.subLayer(name: followBtnSubLayer, viewLayer: self.followBtn.layer) | ||
| 363 | + follLayer?.removeFromSuperlayer() | ||
| 364 | + self.followBtn.backgroundColor = HexColor("#FDF4E4") | ||
| 365 | + }else{ | ||
| 366 | + //未追剧 | ||
| 367 | + self.followBtn.setTitle("追剧", for: .normal) | ||
| 368 | + self.followBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal) | ||
| 369 | + let follLayer = self.subLayer(name: followBtnSubLayer, viewLayer: self.followBtn.layer) | ||
| 370 | + if (follLayer != nil){ | ||
| 371 | + //已添加layer | ||
| 372 | + }else{ | ||
| 373 | + //未添加layer | ||
| 374 | + let gradient = CAGradientLayer() | ||
| 375 | + gradient.frame = self.bounds | ||
| 376 | + gradient.colors = [HexColor("#FFD20B")!.cgColor, HexColor("#FFA81A")!.cgColor] | ||
| 377 | + gradient.locations = [0, 1] | ||
| 378 | + gradient.startPoint = CGPoint(x: 0.96, y: 0.42) | ||
| 379 | + gradient.endPoint = CGPoint(x: 0.42, y: 0.42) | ||
| 380 | + gradient.name = followBtnSubLayer | ||
| 381 | + followBtn.layer.insertSublayer(gradient, at: 0) | ||
| 382 | + self.followBtn.backgroundColor = .clear | ||
| 383 | + } | ||
| 384 | + | ||
| 385 | + } | ||
| 386 | + } | ||
| 387 | + | ||
| 388 | + func subLayer(name:String,viewLayer:CALayer) -> CALayer?{ | ||
| 389 | + if let subLayer = viewLayer.sublayers?.first(where: { $0.name == name }) { | ||
| 390 | + // 这里可以对获取到的子图层进行操作或者访问其属性等 | ||
| 391 | + return subLayer | ||
| 392 | + } else { | ||
| 393 | + print("未找到指定名称的图层") | ||
| 394 | + return nil | ||
| 395 | + } | ||
| 396 | + } | ||
| 397 | + | ||
| 398 | + // MARK: - 网络请求 追剧1/取消追剧2 | ||
| 399 | + func postAlbumCollect(type:NSInteger){ | ||
| 400 | + CNLiveHomePageViewModel.postAlbumCollect(aid: self.albumListModel?.albumMsgModel?.albumId ?? "", type: type) { result, status in | ||
| 401 | + if status == .success{ | ||
| 402 | + if type == 1{ | ||
| 403 | + self.followChangeStatus(isFollowed: true) | ||
| 404 | + }else if type == 0{ | ||
| 405 | + self.followChangeStatus(isFollowed: false) | ||
| 406 | + }else{ | ||
| 407 | + self.followChangeStatus(isFollowed: false) | ||
| 408 | + } | ||
| 409 | + }else{ | ||
| 410 | + showMessage(message: "网络请求失败") | ||
| 411 | + } | ||
| 412 | + } | ||
| 168 | } | 413 | } |
| 169 | 414 | ||
| 170 | } | 415 | } |
metaCode/Classes/Main/HomePages/ViewModel/CNLiveHomePageViewModel.swift
| @@ -32,12 +32,35 @@ class CNLiveHomePageViewModel:NSObject{ | @@ -32,12 +32,35 @@ class CNLiveHomePageViewModel:NSObject{ | ||
| 32 | } | 32 | } |
| 33 | } | 33 | } |
| 34 | } | 34 | } |
| 35 | + /// 短剧主页-专辑收藏(追剧) | ||
| 36 | + static func postAlbumCollect(aid:String,type:NSInteger,resultBlock: @escaping downSlideResultBlock) { | ||
| 37 | + let param = NSMutableDictionary() | ||
| 38 | + param.setValue(aid, forKey: "aid") | ||
| 39 | + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | ||
| 40 | + param.setValue("\(type)", forKey: "type") | ||
| 41 | + | ||
| 42 | + CNLiveNetworking.setAllowRequestDefaultArgument(true) | ||
| 43 | + CNLiveNetworking.setupShowDataResult(false) | ||
| 44 | + CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseCMSUrl+"/contentApi/albumCollect", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | ||
| 45 | + hiddenLoading() | ||
| 46 | + if (error == nil) { | ||
| 47 | + let resp = result as! NSDictionary | ||
| 48 | + let errorCode = "\(resp["errorCode"] ?? "0")" | ||
| 49 | + if (errorCode == "0") { | ||
| 50 | + | ||
| 51 | + resultBlock(NSNull(),.success) | ||
| 52 | + } | ||
| 53 | + else{ | ||
| 54 | + resultBlock(NSNull(),.failed) | ||
| 55 | + } | ||
| 56 | + } | ||
| 57 | + } | ||
| 58 | + } | ||
| 35 | /// 获取首页我的专辑收藏数据 | 59 | /// 获取首页我的专辑收藏数据 |
| 36 | - static func requestGetHomePage(resultBlock: @escaping downSlideResultBlock) { | 60 | + static func requestGetHomePageMyAlbum(page:NSInteger,resultBlock: @escaping downSlideResultBlock) { |
| 37 | let param = NSMutableDictionary() | 61 | let param = NSMutableDictionary() |
| 38 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 62 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 39 | - param.setValue("1", forKey: "page") | ||
| 40 | - param.setValue("50", forKey: "pageSize") | 63 | + param.setValue("\(page)", forKey: "page") |
| 41 | 64 | ||
| 42 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 65 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 43 | CNLiveNetworking.setupShowDataResult(false) | 66 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -47,10 +70,19 @@ class CNLiveHomePageViewModel:NSObject{ | @@ -47,10 +70,19 @@ class CNLiveHomePageViewModel:NSObject{ | ||
| 47 | let resp = result as! NSDictionary | 70 | let resp = result as! NSDictionary |
| 48 | let errorCode = "\(resp["errorCode"] ?? "0")" | 71 | let errorCode = "\(resp["errorCode"] ?? "0")" |
| 49 | if (errorCode == "0") { | 72 | if (errorCode == "0") { |
| 50 | - let dataDic = resp["data"] as! Dictionary<String, Any> | ||
| 51 | - let dataMdl = newDictionaryToModel(dataDic, CNLiveHomePageModel.self) | 73 | + let dataArr = resp["data"] as! Array<Any> |
| 74 | + var resArr = [] | ||
| 75 | + if dataArr.count > 0{ | ||
| 76 | + //有在追短剧 | ||
| 77 | + for dataDic in dataArr { | ||
| 78 | + let dataMdl = newDictionaryToModel(dataDic as! [String : Any], CNLiveAlbumMsgModel.self) | ||
| 79 | + resArr.append(dataMdl) | ||
| 80 | + } | ||
| 81 | + }else{ | ||
| 82 | + //没有在追短剧 | ||
| 83 | + } | ||
| 52 | 84 | ||
| 53 | - resultBlock(dataMdl,.success) | 85 | + resultBlock(resArr,.success) |
| 54 | } | 86 | } |
| 55 | else{ | 87 | else{ |
| 56 | resultBlock(NSNull(),.failed) | 88 | resultBlock(NSNull(),.failed) |
| @@ -59,9 +91,11 @@ class CNLiveHomePageViewModel:NSObject{ | @@ -59,9 +91,11 @@ class CNLiveHomePageViewModel:NSObject{ | ||
| 59 | } | 91 | } |
| 60 | } | 92 | } |
| 61 | /// 获取首页-全部专辑列表 | 93 | /// 获取首页-全部专辑列表 |
| 62 | - static func getBlockContents(blockId:String,resultBlock: @escaping downSlideResultBlock) { | 94 | + static func getBlockContents(blockId:String,page:NSInteger,resultBlock: @escaping downSlideResultBlock) { |
| 63 | let param = NSMutableDictionary() | 95 | let param = NSMutableDictionary() |
| 64 | param.setValue(blockId, forKey: "blockId") | 96 | param.setValue(blockId, forKey: "blockId") |
| 97 | + param.setValue("\(page)", forKey: "page") | ||
| 98 | +// param.setValue("10", forKey: "pageSize") | ||
| 65 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 99 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 66 | CNLiveNetworking.setupShowDataResult(false) | 100 | CNLiveNetworking.setupShowDataResult(false) |
| 67 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/getBlockContents", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 101 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/getBlockContents", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| @@ -140,4 +174,65 @@ class CNLiveHomePageViewModel:NSObject{ | @@ -140,4 +174,65 @@ class CNLiveHomePageViewModel:NSObject{ | ||
| 140 | } | 174 | } |
| 141 | } | 175 | } |
| 142 | } | 176 | } |
| 177 | + | ||
| 178 | + /// 积分支付 | ||
| 179 | + static func orderVideoByPoint(prdId:String,resultBlock: @escaping downSlideResultBlock) { | ||
| 180 | + let param = NSMutableDictionary() | ||
| 181 | + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | ||
| 182 | + param.setValue(APPId_wjj, forKey: "sp_id") | ||
| 183 | + param.setValue(prdId, forKey: "prdId") | ||
| 184 | + param.setValue("apple", forKey: "frmId") | ||
| 185 | + param.setValue(CNLiveHomePageViewModel.getRandomOrderId(), forKey: "srvOrderId") | ||
| 186 | + let customParam = NSMutableDictionary() | ||
| 187 | + customParam.setValue(APPId, forKey: "appId") | ||
| 188 | + customParam.setValue(APPKey, forKey: "appKey") | ||
| 189 | + | ||
| 190 | + CNLiveNetworking.setupShowResult(true) | ||
| 191 | + CNLiveNetworking.setAllowRequestDefaultArgument(true) | ||
| 192 | + CNLiveNetworking.setupShowDataResult(false) | ||
| 193 | + CNLiveNetworking.setupCustomParam(customParam as? [String : String]) | ||
| 194 | + CNLiveNetworking.requestNetwork(with: .POST, urlString: "\(CNLiveEnvironmentManager.shared.img_token_url)/pom/orderVideoByPoint", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | ||
| 195 | + hiddenLoading() | ||
| 196 | + if (error == nil) { | ||
| 197 | + let resp = result as! NSDictionary | ||
| 198 | + let errorCode = "\(resp["errorCode"] ?? "0")" | ||
| 199 | + if (errorCode == "0") { | ||
| 200 | + //兑换成功 | ||
| 201 | + resultBlock(NSNull(),.success) | ||
| 202 | + }else if (errorCode == "4002") { | ||
| 203 | + //积分不足 | ||
| 204 | + resultBlock("积分不足",.failed) | ||
| 205 | + }else | ||
| 206 | + { | ||
| 207 | + resultBlock("兑换失败,请稍候再试!",.failed) | ||
| 208 | + } | ||
| 209 | + } | ||
| 210 | + } | ||
| 211 | + } | ||
| 212 | + static func getRandomOrderId() -> String { | ||
| 213 | + // appId+渠道+年月日+毫秒数后10位+2位数的随机数 | ||
| 214 | + var randomOrderId = "" | ||
| 215 | + //年月日 | ||
| 216 | + let formatter = DateFormatter() | ||
| 217 | + formatter.dateFormat = "yyyyMMdd" | ||
| 218 | + let currentDate = Date() | ||
| 219 | + let currentDateString = formatter.string(from: currentDate) | ||
| 220 | + | ||
| 221 | + //取毫秒时间戳 | ||
| 222 | + let timestamp13 = String(format: "%ld",self.getNow13Timestamp())//timeStamp) | ||
| 223 | + //拼接 | ||
| 224 | + randomOrderId = String(format: "%@%@%@%d", APPId_wjj, currentDateString, timestamp13, Int.random(in: 0..<10)) | ||
| 225 | + | ||
| 226 | + return randomOrderId | ||
| 227 | + } | ||
| 228 | + static func getNow13Timestamp() -> Int { | ||
| 229 | + let formatter = DateFormatter() | ||
| 230 | + formatter.dateStyle = .medium | ||
| 231 | + formatter.timeStyle = .short | ||
| 232 | + formatter.dateFormat = "yyyy-MM-dd HH:mm:ss" | ||
| 233 | + formatter.timeZone = TimeZone(identifier: "Asia/Beijing") | ||
| 234 | + let dateNow = Date() | ||
| 235 | + let timeStamp = Int(dateNow.timeIntervalSince1970) | ||
| 236 | + return timeStamp*1000 | ||
| 237 | + } | ||
| 143 | } | 238 | } |
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopOrderListViewController.swift
| @@ -49,6 +49,7 @@ class CNLiveShopOrderListViewController: CNLiveBaseViewController, UITableViewDe | @@ -49,6 +49,7 @@ class CNLiveShopOrderListViewController: CNLiveBaseViewController, UITableViewDe | ||
| 49 | 49 | ||
| 50 | var pageNum: NSInteger | 50 | var pageNum: NSInteger |
| 51 | var network_type: CNLiveMineResponseType! | 51 | var network_type: CNLiveMineResponseType! |
| 52 | + | ||
| 52 | var _show_type:CNLiveShopOrderListShowType! | 53 | var _show_type:CNLiveShopOrderListShowType! |
| 53 | init(show_type:CNLiveShopOrderListShowType) { | 54 | init(show_type:CNLiveShopOrderListShowType) { |
| 54 | self.pageNum = 1 | 55 | self.pageNum = 1 |
metaCode/Supporting Files/Assets.xcassets/Home/Console/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/HomePage/Contents.json
metaCode/Supporting Files/Assets.xcassets/HomePage/homePage_payed.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "homePage_payed@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "homePage_payed@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/HomePage/homePage_payed.imageset/homePage_payed@2x.png
0 → 100644
2.86 KB
metaCode/Supporting Files/Assets.xcassets/HomePage/homePage_payed.imageset/homePage_payed@3x.png
0 → 100644
5.77 KB
metaCode/Supporting Files/Assets.xcassets/HomePage/homePage_payment.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "homePage_payment@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "homePage_payment@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/HomePage/homePage_payment.imageset/homePage_payment@2x.png
0 → 100644
2.2 KB
metaCode/Supporting Files/Assets.xcassets/HomePage/homePage_payment.imageset/homePage_payment@3x.png
0 → 100644
4.44 KB
metaCode/Supporting Files/Assets.xcassets/HomePage/homepage_fold.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "homepage_fold@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "homepage_fold@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/HomePage/homepage_fold.imageset/homepage_fold@2x.png
0 → 100644
209 Bytes
metaCode/Supporting Files/Assets.xcassets/HomePage/homepage_fold.imageset/homepage_fold@3x.png
0 → 100644
414 Bytes
metaCode/Supporting Files/Assets.xcassets/HomePage/homepage_unfold.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "homepage_unfold@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "homepage_unfold@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/HomePage/homepage_unfold.imageset/homepage_unfold@2x.png
0 → 100644
206 Bytes
metaCode/Supporting Files/Assets.xcassets/HomePage/homepage_unfold.imageset/homepage_unfold@3x.png
0 → 100644
419 Bytes
metaCode/Supporting Files/Assets.xcassets/HomePage/jifen_paySuccess.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "jifen_paySuccess@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "jifen_paySuccess@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/HomePage/jifen_paySuccess.imageset/jifen_paySuccess@2x.png
0 → 100644
12.4 KB
metaCode/Supporting Files/Assets.xcassets/HomePage/jifen_paySuccess.imageset/jifen_paySuccess@3x.png
0 → 100644
27.2 KB
metaCode/Supporting Files/Assets.xcassets/HomePage/jifen_paying.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "jifen_paying@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "jifen_paying@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/HomePage/jifen_paying.imageset/jifen_paying@2x.png
0 → 100644
3.01 KB
metaCode/Supporting Files/Assets.xcassets/HomePage/jifen_paying.imageset/jifen_paying@3x.png
0 → 100644
5.57 KB
metaCode/Supporting Files/Assets.xcassets/HomePage/point_alert_close.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "point_alert_close@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "point_alert_close@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/HomePage/point_alert_close.imageset/point_alert_close@2x.png
0 → 100644
977 Bytes
metaCode/Supporting Files/Assets.xcassets/HomePage/point_alert_close.imageset/point_alert_close@3x.png
0 → 100644
1.73 KB
metaCode/Supporting Files/Assets.xcassets/Home/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_DDGL.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_DDGL.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_DDGL.imageset/订单管理@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_DDGL.imageset/订单管理@2x.png
2.1 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_DDGL.imageset/订单管理@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_DDGL.imageset/订单管理@3x.png
4.82 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_DPFL.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_DPFL.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_DPFL.imageset/店铺分类管理@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_DPFL.imageset/店铺分类管理@2x.png
2.35 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_DPFL.imageset/店铺分类管理@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_DPFL.imageset/店铺分类管理@3x.png
4.86 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_DTGL.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_DTGL.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_DTGL.imageset/动态管理@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_DTGL.imageset/动态管理@2x.png
2.5 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_DTGL.imageset/动态管理@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_DTGL.imageset/动态管理@3x.png
5.08 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_FBDT.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_FBDT.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_FBDT.imageset/发布动态@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_FBDT.imageset/发布动态@2x.png
2.35 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_FBDT.imageset/发布动态@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_FBDT.imageset/发布动态@3x.png
4.7 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_GLYHQ.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_GLYHQ.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_GLYHQ.imageset/优惠券管理@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_GLYHQ.imageset/优惠券管理@2x.png
2.99 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_GLYHQ.imageset/优惠券管理@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_GLYHQ.imageset/优惠券管理@3x.png
6.08 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_JYJL.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_JYJL.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_JYJL.imageset/交易记录@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_JYJL.imageset/交易记录@2x.png
2.59 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_JYJL.imageset/交易记录@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_JYJL.imageset/交易记录@3x.png
5.68 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_NO_Management.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_NO_Management.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_NO_Management.imageset/直播管理@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_NO_Management.imageset/直播管理@2x.png
2.44 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_NO_Management.imageset/直播管理@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_NO_Management.imageset/直播管理@3x.png
5.15 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_SJPZ_REPAST.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_SJPZ_REPAST.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_SJPZ_REPAST.imageset/创建店铺分类@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_SJPZ_REPAST.imageset/创建店铺分类@2x.png
2.43 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_SJPZ_REPAST.imageset/创建店铺分类@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_SJPZ_REPAST.imageset/创建店铺分类@3x.png
5.19 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_SPGL.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_SPGL.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_SPGL.imageset/商品管理@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_SPGL.imageset/商品管理@2x.png
2.41 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_SPGL.imageset/商品管理@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_SPGL.imageset/商品管理@3x.png
5.15 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_XZSP.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_XZSP.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_XZSP.imageset/新增商品@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_XZSP.imageset/新增商品@2x.png
1.81 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_XZSP.imageset/新增商品@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_XZSP.imageset/新增商品@3x.png
3.85 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_XZYHQ.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_XZYHQ.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_XZYHQ.imageset/新增优惠券@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_XZYHQ.imageset/新增优惠券@2x.png
2.31 KB
metaCode/Supporting Files/Assets.xcassets/Home/Console/DS_WB_XZYHQ.imageset/新增优惠券@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Console/DS_WB_XZYHQ.imageset/新增优惠券@3x.png
4.92 KB
metaCode/Supporting Files/Assets.xcassets/RenzhenPage/Contents.json
0 → 100644
metaCode/Supporting Files/Assets.xcassets/Home/DS_main_rightArrow.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/DS_main_rightArrow.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/DS_main_rightArrow.imageset/DS_main_rightArrow@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/DS_main_rightArrow.imageset/DS_main_rightArrow@2x.png
330 Bytes
metaCode/Supporting Files/Assets.xcassets/Home/DS_main_rightArrow.imageset/DS_main_rightArrow@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/DS_main_rightArrow.imageset/DS_main_rightArrow@3x.png
436 Bytes
metaCode/Supporting Files/Assets.xcassets/Home/close_button.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/close_button.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/close_button.imageset/close_button@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/close_button.imageset/close_button@2x.png
1.14 KB
metaCode/Supporting Files/Assets.xcassets/Home/collectMoneyImage.imageset/4661683514280_.pic.jpg renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/collectMoneyImage.imageset/4661683514280_.pic.jpg
75 KB
metaCode/Supporting Files/Assets.xcassets/Home/collectMoneyImage.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/collectMoneyImage.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_addCertification_icon.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_addCertification_icon.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_addCertification_icon.imageset/添加@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_addCertification_icon.imageset/添加@2x.png
54.8 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_addCertification_icon.imageset/添加@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_addCertification_icon.imageset/添加@3x.png
114 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_backBtn_icon.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_backBtn_icon.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_backBtn_icon.imageset/回到首页@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_backBtn_icon.imageset/回到首页@2x.png
1.73 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_backBtn_icon.imageset/回到首页@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_backBtn_icon.imageset/回到首页@3x.png
2.99 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_backViewImage.imageset/4671683516653_.pic.jpg renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_backViewImage.imageset/4671683516653_.pic.jpg
82.2 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_backViewImage.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_backViewImage.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_backgroup_blue.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_backgroup_blue.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_backgroup_blue.imageset/背景-蓝@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_backgroup_blue.imageset/背景-蓝@2x.png
60.9 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_backgroup_blue.imageset/背景-蓝@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_backgroup_blue.imageset/背景-蓝@3x.png
155 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_backgroup_red.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_backgroup_red.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_backgroup_red.imageset/背景-红@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_backgroup_red.imageset/背景-红@2x.png
58.6 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_backgroup_red.imageset/背景-红@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_backgroup_red.imageset/背景-红@3x.png
148 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_backhome_icon.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_backhome_icon.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_backhome_icon.imageset/返回@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_backhome_icon.imageset/返回@2x.png
1.08 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_backhome_icon.imageset/返回@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_backhome_icon.imageset/返回@3x.png
2.01 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_close_icon.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_close_icon.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_close_icon.imageset/关闭@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_close_icon.imageset/关闭@2x.png
422 Bytes
metaCode/Supporting Files/Assets.xcassets/Home/homePage_close_icon.imageset/关闭@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_close_icon.imageset/关闭@3x.png
693 Bytes
metaCode/Supporting Files/Assets.xcassets/Home/homePage_down_icon.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_down_icon.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_down_icon.imageset/下滑@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_down_icon.imageset/下滑@2x.png
621 Bytes
metaCode/Supporting Files/Assets.xcassets/Home/homePage_down_icon.imageset/下滑@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_down_icon.imageset/下滑@3x.png
1.3 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_homePage_down.imageset/4491683252485_.pic.jpg renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_homePage_down.imageset/4491683252485_.pic.jpg
5.25 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_homePage_down.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_homePage_down.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_idCardBG.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_idCardBG.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_idCardBG.imageset/homePage_idCardBG@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_idCardBG.imageset/homePage_idCardBG@2x.png
19.2 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_idCardBG.imageset/homePage_idCardBG@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_idCardBG.imageset/homePage_idCardBG@3x.png
36.6 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_mainView_front.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_mainView_front.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_mainView_front.imageset/证件@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_mainView_front.imageset/证件@2x.png
35.9 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_mainView_front.imageset/证件@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_mainView_front.imageset/证件@3x.png
67.6 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_payMoneyImage.imageset/4651683514228_.pic.jpg renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_payMoneyImage.imageset/4651683514228_.pic.jpg
52.1 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_payMoneyImage.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_payMoneyImage.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_topImage.imageset/4771683609542_.pic.jpg renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_topImage.imageset/4771683609542_.pic.jpg
230 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_topImage.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_topImage.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_up_icon.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_up_icon.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_up_icon.imageset/上滑@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_up_icon.imageset/上滑@2x.png
638 Bytes
metaCode/Supporting Files/Assets.xcassets/Home/homePage_up_icon.imageset/上滑@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_up_icon.imageset/上滑@3x.png
1.27 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_zhongguorenming_bank.imageset/4431683250159_.pic.jpg renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_zhongguorenming_bank.imageset/4431683250159_.pic.jpg
79.4 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_zhongguorenming_bank.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homePage_zhongguorenming_bank.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homepage_cardBGImg.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_cardBGImg.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homepage_cardBGImg.imageset/homepage_cardBGImg@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_cardBGImg.imageset/homepage_cardBGImg@2x.png
24.7 KB
metaCode/Supporting Files/Assets.xcassets/Home/homepage_cardBGImg.imageset/homepage_cardBGImg@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_cardBGImg.imageset/homepage_cardBGImg@3x.png
48.4 KB
metaCode/Supporting Files/Assets.xcassets/Home/homepage_desc_bgImg.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_desc_bgImg.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homepage_desc_bgImg.imageset/homepage_desc_bgImg@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_desc_bgImg.imageset/homepage_desc_bgImg@2x.png
95.9 KB
metaCode/Supporting Files/Assets.xcassets/Home/homepage_desc_bgImg.imageset/homepage_desc_bgImg@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_desc_bgImg.imageset/homepage_desc_bgImg@3x.png
311 KB
metaCode/Supporting Files/Assets.xcassets/Home/homepage_detail.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_detail.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homepage_detail.imageset/homepage_detail@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_detail.imageset/homepage_detail@2x.png
293 Bytes
metaCode/Supporting Files/Assets.xcassets/Home/homepage_detail_asset_bg.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_detail_asset_bg.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homepage_detail_asset_bg.imageset/homepage_detail_asset_bg@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_detail_asset_bg.imageset/homepage_detail_asset_bg@2x.png
56.3 KB
metaCode/Supporting Files/Assets.xcassets/Home/homepage_detail_dongtai_bg.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_detail_dongtai_bg.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homepage_detail_dongtai_bg.imageset/homepage_detail_dongtai_bg@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_detail_dongtai_bg.imageset/homepage_detail_dongtai_bg@2x.png
38.1 KB
metaCode/Supporting Files/Assets.xcassets/Home/homepage_detail_order_bg.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_detail_order_bg.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homepage_detail_order_bg.imageset/homepage_detail_order_bg@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_detail_order_bg.imageset/homepage_detail_order_bg@2x.png
48.1 KB
metaCode/Supporting Files/Assets.xcassets/Home/homepage_down_enter.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_down_enter.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homepage_down_enter.imageset/homepage_down_enter@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_down_enter.imageset/homepage_down_enter@2x.png
2.18 KB
metaCode/Supporting Files/Assets.xcassets/Home/homepage_down_more.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_down_more.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homepage_down_more.imageset/homepage_down_more@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/homepage_down_more.imageset/homepage_down_more@2x.png
1.66 KB
metaCode/Supporting Files/Assets.xcassets/Home/icon_shop_order_close.imageset/Contents.json renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/icon_shop_order_close.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/icon_shop_order_close.imageset/icon_shop_order_close@2x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/icon_shop_order_close.imageset/icon_shop_order_close@2x.png
962 Bytes
metaCode/Supporting Files/Assets.xcassets/Home/icon_shop_order_close.imageset/icon_shop_order_close@3x.png renamed to metaCode/Supporting Files/Assets.xcassets/RenzhenPage/icon_shop_order_close.imageset/icon_shop_order_close@3x.png
1.75 KB
metaCode/Supporting Files/Assets.xcassets/TabBar/tabbar_authentication.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "authentication@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "authentication@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/TabBar/tabbar_authentication.imageset/authentication@2x.png
0 → 100644
1.4 KB
metaCode/Supporting Files/Assets.xcassets/TabBar/tabbar_authentication.imageset/authentication@3x.png
0 → 100644
2.52 KB
metaCode/Supporting Files/Assets.xcassets/TabBar/tabbar_authentication_unSelect.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "authentication_unSelect@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "authentication_unSelect@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/TabBar/tabbar_authentication_unSelect.imageset/authentication_unSelect@2x.png
0 → 100644
1.32 KB
metaCode/Supporting Files/Assets.xcassets/TabBar/tabbar_authentication_unSelect.imageset/authentication_unSelect@3x.png
0 → 100644
2.34 KB