Commit c5301e359bc14100de310994d22aa5a5a189d47a

Authored by 张旭
2 parents 4bd776d9 184f9c53
Showing 49 changed files with 2541 additions and 17 deletions
... ... @@ -45,13 +45,27 @@ target 'metaCode' do
45 45 #轮播图
46 46 pod 'FSPagerView', '0.8.3'
47 47 #pod 'SDCycleScrollView', '~> 1.82'
  48 +
  49 + #播放器
  50 + pod 'ZFPlayer', :git => 'https://gitee.com/mirrors/ZFPlayer.git'
  51 + pod 'ZFPlayer/ControlView', :git => 'https://gitee.com/mirrors/ZFPlayer.git'
  52 + pod 'ZFPlayer/AVPlayer', :git => 'https://gitee.com/mirrors/ZFPlayer.git'
  53 + pod 'ZFPlayer/ijkplayer', :git => 'https://gitee.com/mirrors/ZFPlayer.git'
  54 + #分享
  55 + #pod 'CNLiveShareToolKit'
  56 + #网家家输入组件
  57 + pod 'CNLiveCustomUI/CNLiveContentToolTextView'
  58 + #业务工具库
  59 + pod 'CNLiveBusinessTools'
  60 +
48 61 #图片浏览器
49   - pod 'SKPhotoBrowser'
  62 + pod 'SKPhotoBrowser', :git => 'https://gitee.com/mirrors/SKPhotoBrowser.git'
50 63  
51 64 #视频播放器
52 65 pod 'PLPlayerKit'
53 66 #UI框架
54   - pod 'QMUIKit'
  67 +# pod 'QMUIKit'
  68 + pod 'YYWebImage', :git => 'https://gitee.com/mirrors/YYWebImage.git'
55 69  
56 70 target 'metaCodeTests' do
57 71 inherit! :search_paths
... ...
metaCode.xcodeproj/project.pbxproj
... ... @@ -158,11 +158,19 @@
158 158 792E57DB2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 792E57DA2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift */; };
159 159 79396EED2A319F220053E1AF /* NSObject+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79396EEC2A319F220053E1AF /* NSObject+CNLiveExtensions.swift */; };
160 160 79396EF12A31C21B0053E1AF /* CNLiveInfoShowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79396EF02A31C21B0053E1AF /* CNLiveInfoShowViewController.swift */; };
  161 + 7939B0732B47F12F005AE981 /* CNLiveShortVideoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7939B0722B47F12F005AE981 /* CNLiveShortVideoViewController.swift */; };
  162 + 7939B0752B47F1B9005AE981 /* CNLiveShortVideoListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7939B0742B47F1B9005AE981 /* CNLiveShortVideoListTableViewCell.swift */; };
  163 + 7939B0772B47F88A005AE981 /* CNLiveShortVideoControlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7939B0762B47F88A005AE981 /* CNLiveShortVideoControlView.swift */; };
161 164 793CAF522A58FCA200882EF4 /* CNLiveMineExchangeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 793CAF512A58FCA200882EF4 /* CNLiveMineExchangeViewController.swift */; };
  165 + 794294A72B4D18EC008AAFA0 /* CNLiveShortVideoContentListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794294A62B4D18EC008AAFA0 /* CNLiveShortVideoContentListView.swift */; };
  166 + 794294AA2B4D4381008AAFA0 /* CNLiveShortVideoCommentListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794294A92B4D4381008AAFA0 /* CNLiveShortVideoCommentListView.swift */; };
  167 + 794294AC2B4D44C0008AAFA0 /* CNLiveShortVideoCommentLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794294AB2B4D44C0008AAFA0 /* CNLiveShortVideoCommentLayout.swift */; };
162 168 794BC1652AF9E70D00A68C74 /* CNLiveShopOrderSendViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794BC1642AF9E70D00A68C74 /* CNLiveShopOrderSendViewController.swift */; };
163 169 794FF1052B01FC8800385E85 /* CNLiveShopOrderSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794FF1042B01FC8800385E85 /* CNLiveShopOrderSearchViewController.swift */; };
164 170 794FF1072B01FC9800385E85 /* CNLiveShopOrderSearchListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794FF1062B01FC9800385E85 /* CNLiveShopOrderSearchListViewController.swift */; };
165 171 794FF1092B02131300385E85 /* CNLiveSaveSearchDB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794FF1082B02131300385E85 /* CNLiveSaveSearchDB.swift */; };
  172 + 796308732B4B8EB80090D22A /* CNLiveShortVideoViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 796308722B4B8EB80090D22A /* CNLiveShortVideoViewModel.swift */; };
  173 + 796308752B4B90700090D22A /* CNLiveShortVideoHomeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 796308742B4B90700090D22A /* CNLiveShortVideoHomeModel.swift */; };
166 174 796398942A260C0100D045EB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7963988D2A260C0100D045EB /* AppDelegate.swift */; };
167 175 7963989D2A260E6200D045EB /* CNLiveBaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */; };
168 176 79656E382AAEBA8E00119A61 /* CNLiveMineInputViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79656E372AAEBA8E00119A61 /* CNLiveMineInputViewController.swift */; };
... ... @@ -192,6 +200,9 @@
192 200 799172362AF08D4500DC01A8 /* CNLiveShopBaseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 799172352AF08D4500DC01A8 /* CNLiveShopBaseModel.swift */; };
193 201 799172382AF090CD00DC01A8 /* CNLiveShopBodyListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 799172372AF090CD00DC01A8 /* CNLiveShopBodyListView.swift */; };
194 202 7991723A2AF091E100DC01A8 /* CNLiveShopOrderListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 799172392AF091E100DC01A8 /* CNLiveShopOrderListViewController.swift */; };
  203 + 7999415C2B4E8E8E0014C721 /* CNLiveRefresh.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7999415B2B4E8E8E0014C721 /* CNLiveRefresh.swift */; };
  204 + 79A212C02B0B5C5400BFA8E3 /* CNLiveShopCouponManagerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79A212BF2B0B5C5400BFA8E3 /* CNLiveShopCouponManagerViewController.swift */; };
  205 + 79A212C22B0B5D0700BFA8E3 /* CNLiveShopBodyCouponManagerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79A212C12B0B5D0700BFA8E3 /* CNLiveShopBodyCouponManagerView.swift */; };
195 206 79A267832AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79A267822AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift */; };
196 207 79A68C4A2A26E6CE00DC3B43 /* (null) in Sources */ = {isa = PBXBuildFile; };
197 208 79A68C4C2A26EA6000DC3B43 /* (null) in Sources */ = {isa = PBXBuildFile; };
... ... @@ -416,11 +427,19 @@
416 427 792E57DA2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCommonQiniuTool.swift; sourceTree = "<group>"; };
417 428 79396EEC2A319F220053E1AF /* NSObject+CNLiveExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSObject+CNLiveExtensions.swift"; sourceTree = "<group>"; };
418 429 79396EF02A31C21B0053E1AF /* CNLiveInfoShowViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveInfoShowViewController.swift; sourceTree = "<group>"; };
  430 + 7939B0722B47F12F005AE981 /* CNLiveShortVideoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShortVideoViewController.swift; sourceTree = "<group>"; };
  431 + 7939B0742B47F1B9005AE981 /* CNLiveShortVideoListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShortVideoListTableViewCell.swift; sourceTree = "<group>"; };
  432 + 7939B0762B47F88A005AE981 /* CNLiveShortVideoControlView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShortVideoControlView.swift; sourceTree = "<group>"; };
419 433 793CAF512A58FCA200882EF4 /* CNLiveMineExchangeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineExchangeViewController.swift; sourceTree = "<group>"; };
  434 + 794294A62B4D18EC008AAFA0 /* CNLiveShortVideoContentListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShortVideoContentListView.swift; sourceTree = "<group>"; };
  435 + 794294A92B4D4381008AAFA0 /* CNLiveShortVideoCommentListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShortVideoCommentListView.swift; sourceTree = "<group>"; };
  436 + 794294AB2B4D44C0008AAFA0 /* CNLiveShortVideoCommentLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShortVideoCommentLayout.swift; sourceTree = "<group>"; };
420 437 794BC1642AF9E70D00A68C74 /* CNLiveShopOrderSendViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopOrderSendViewController.swift; sourceTree = "<group>"; };
421 438 794FF1042B01FC8800385E85 /* CNLiveShopOrderSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopOrderSearchViewController.swift; sourceTree = "<group>"; };
422 439 794FF1062B01FC9800385E85 /* CNLiveShopOrderSearchListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopOrderSearchListViewController.swift; sourceTree = "<group>"; };
423 440 794FF1082B02131300385E85 /* CNLiveSaveSearchDB.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveSaveSearchDB.swift; sourceTree = "<group>"; };
  441 + 796308722B4B8EB80090D22A /* CNLiveShortVideoViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShortVideoViewModel.swift; sourceTree = "<group>"; };
  442 + 796308742B4B90700090D22A /* CNLiveShortVideoHomeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShortVideoHomeModel.swift; sourceTree = "<group>"; };
424 443 7963988D2A260C0100D045EB /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
425 444 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNLiveBaseViewController.swift; sourceTree = "<group>"; };
426 445 79656E372AAEBA8E00119A61 /* CNLiveMineInputViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineInputViewController.swift; sourceTree = "<group>"; };
... ... @@ -450,6 +469,9 @@
450 469 799172352AF08D4500DC01A8 /* CNLiveShopBaseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopBaseModel.swift; sourceTree = "<group>"; };
451 470 799172372AF090CD00DC01A8 /* CNLiveShopBodyListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopBodyListView.swift; sourceTree = "<group>"; };
452 471 799172392AF091E100DC01A8 /* CNLiveShopOrderListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopOrderListViewController.swift; sourceTree = "<group>"; };
  472 + 7999415B2B4E8E8E0014C721 /* CNLiveRefresh.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveRefresh.swift; sourceTree = "<group>"; };
  473 + 79A212BF2B0B5C5400BFA8E3 /* CNLiveShopCouponManagerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopCouponManagerViewController.swift; sourceTree = "<group>"; };
  474 + 79A212C12B0B5D0700BFA8E3 /* CNLiveShopBodyCouponManagerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopBodyCouponManagerView.swift; sourceTree = "<group>"; };
453 475 79A267822AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopBodyCustomView.swift; sourceTree = "<group>"; };
454 476 79A68C512A26F59C00DC3B43 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = metaCode/Info.plist; sourceTree = "<group>"; };
455 477 79B2E35F2AF39191002A8524 /* NSObject+CNLiveConfigModuleInline.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSObject+CNLiveConfigModuleInline.swift"; sourceTree = "<group>"; };
... ... @@ -989,6 +1011,60 @@
989 1011 path = Util;
990 1012 sourceTree = "<group>";
991 1013 };
  1014 + 7939B06D2B47EB46005AE981 /* VideoPage */ = {
  1015 + isa = PBXGroup;
  1016 + children = (
  1017 + 7939B06E2B47EB46005AE981 /* ViewModel */,
  1018 + 7939B06F2B47EB46005AE981 /* Controller */,
  1019 + 7939B0702B47EB46005AE981 /* Model */,
  1020 + 7939B0712B47EB46005AE981 /* View */,
  1021 + );
  1022 + path = VideoPage;
  1023 + sourceTree = "<group>";
  1024 + };
  1025 + 7939B06E2B47EB46005AE981 /* ViewModel */ = {
  1026 + isa = PBXGroup;
  1027 + children = (
  1028 + 796308722B4B8EB80090D22A /* CNLiveShortVideoViewModel.swift */,
  1029 + );
  1030 + path = ViewModel;
  1031 + sourceTree = "<group>";
  1032 + };
  1033 + 7939B06F2B47EB46005AE981 /* Controller */ = {
  1034 + isa = PBXGroup;
  1035 + children = (
  1036 + 7939B0722B47F12F005AE981 /* CNLiveShortVideoViewController.swift */,
  1037 + );
  1038 + path = Controller;
  1039 + sourceTree = "<group>";
  1040 + };
  1041 + 7939B0702B47EB46005AE981 /* Model */ = {
  1042 + isa = PBXGroup;
  1043 + children = (
  1044 + 796308742B4B90700090D22A /* CNLiveShortVideoHomeModel.swift */,
  1045 + 794294AB2B4D44C0008AAFA0 /* CNLiveShortVideoCommentLayout.swift */,
  1046 + );
  1047 + path = Model;
  1048 + sourceTree = "<group>";
  1049 + };
  1050 + 7939B0712B47EB46005AE981 /* View */ = {
  1051 + isa = PBXGroup;
  1052 + children = (
  1053 + 7939B0742B47F1B9005AE981 /* CNLiveShortVideoListTableViewCell.swift */,
  1054 + 7939B0762B47F88A005AE981 /* CNLiveShortVideoControlView.swift */,
  1055 + 794294A62B4D18EC008AAFA0 /* CNLiveShortVideoContentListView.swift */,
  1056 + 794294A92B4D4381008AAFA0 /* CNLiveShortVideoCommentListView.swift */,
  1057 + );
  1058 + path = View;
  1059 + sourceTree = "<group>";
  1060 + };
  1061 + 794294A82B4D3018008AAFA0 /* Share */ = {
  1062 + isa = PBXGroup;
  1063 + children = (
  1064 + );
  1065 + path = Share;
  1066 + sourceTree = "<group>";
  1067 + };
992 1068 79579CAA2AAAE905006E5B38 /* Database */ = {
993 1069 isa = PBXGroup;
994 1070 children = (
... ... @@ -1054,6 +1130,7 @@
1054 1130 796398902A260C0100D045EB /* Main */ = {
1055 1131 isa = PBXGroup;
1056 1132 children = (
  1133 + 7939B06D2B47EB46005AE981 /* VideoPage */,
1057 1134 1938BD112B3D6C0C00390A34 /* HomePages */,
1058 1135 7991722C2AF08CF100DC01A8 /* ShopPage */,
1059 1136 790D01972A2DCAE400C5978D /* MinePage */,
... ... @@ -1075,6 +1152,7 @@
1075 1152 796398922A260C0100D045EB /* Config */ = {
1076 1153 isa = PBXGroup;
1077 1154 children = (
  1155 + 794294A82B4D3018008AAFA0 /* Share */,
1078 1156 79E496E42AB936E200127BF8 /* Tool */,
1079 1157 79579CAA2AAAE905006E5B38 /* Database */,
1080 1158 7CD675512A29C04B008354C1 /* CNLiveConfigstant.swift */,
... ... @@ -1134,6 +1212,7 @@
1134 1212 children = (
1135 1213 798A44F52A3077ED00815935 /* CNLiveHotButton.swift */,
1136 1214 798A44FA2A30999900815935 /* CNLiveAlertTool.swift */,
  1215 + 7999415B2B4E8E8E0014C721 /* CNLiveRefresh.swift */,
1137 1216 );
1138 1217 path = CustomView;
1139 1218 sourceTree = "<group>";
... ... @@ -1173,6 +1252,7 @@
1173 1252 798916EC2B048E8200D08302 /* CNLiveShopTransViewController.swift */,
1174 1253 798916EE2B048EC800D08302 /* CNLiveShopTransListViewController.swift */,
1175 1254 79BB1C132B05C51900C5720C /* CNLiveShopCouponViewController.swift */,
  1255 + 79A212BF2B0B5C5400BFA8E3 /* CNLiveShopCouponManagerViewController.swift */,
1176 1256 );
1177 1257 path = Controller;
1178 1258 sourceTree = "<group>";
... ... @@ -1195,6 +1275,7 @@
1195 1275 798916F02B0491A400D08302 /* CNLiveShopBodyTransListView.swift */,
1196 1276 79BB1C152B05C62900C5720C /* CNLiveShopBodyCouponView.swift */,
1197 1277 79D094DB2B0765DD008CB1F3 /* CNLiveShopBodyCouponGoodsListView.swift */,
  1278 + 79A212C12B0B5D0700BFA8E3 /* CNLiveShopBodyCouponManagerView.swift */,
1198 1279 );
1199 1280 path = View;
1200 1281 sourceTree = "<group>";
... ... @@ -1364,6 +1445,7 @@
1364 1445 818163B52A25CFCC00579C86 /* Frameworks */,
1365 1446 818163B62A25CFCC00579C86 /* Resources */,
1366 1447 E0FAE2296315BED785FA507E /* [CP] Embed Pods Frameworks */,
  1448 + 43270B0E3FD1AFD4E05616D0 /* [CP] Copy Pods Resources */,
1367 1449 );
1368 1450 buildRules = (
1369 1451 );
... ... @@ -1402,6 +1484,7 @@
1402 1484 818163D52A25CFCF00579C86 /* Frameworks */,
1403 1485 818163D62A25CFCF00579C86 /* Resources */,
1404 1486 035341748B563C741D14CD83 /* [CP] Embed Pods Frameworks */,
  1487 + 51DB2DC03E9B32399B70EEC8 /* [CP] Copy Pods Resources */,
1405 1488 );
1406 1489 buildRules = (
1407 1490 );
... ... @@ -1527,6 +1610,40 @@
1527 1610 shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
1528 1611 showEnvVarsInLog = 0;
1529 1612 };
  1613 + 43270B0E3FD1AFD4E05616D0 /* [CP] Copy Pods Resources */ = {
  1614 + isa = PBXShellScriptBuildPhase;
  1615 + buildActionMask = 2147483647;
  1616 + files = (
  1617 + );
  1618 + inputFileListPaths = (
  1619 + "${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-resources-${CONFIGURATION}-input-files.xcfilelist",
  1620 + );
  1621 + name = "[CP] Copy Pods Resources";
  1622 + outputFileListPaths = (
  1623 + "${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-resources-${CONFIGURATION}-output-files.xcfilelist",
  1624 + );
  1625 + runOnlyForDeploymentPostprocessing = 0;
  1626 + shellPath = /bin/sh;
  1627 + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-resources.sh\"\n";
  1628 + showEnvVarsInLog = 0;
  1629 + };
  1630 + 51DB2DC03E9B32399B70EEC8 /* [CP] Copy Pods Resources */ = {
  1631 + isa = PBXShellScriptBuildPhase;
  1632 + buildActionMask = 2147483647;
  1633 + files = (
  1634 + );
  1635 + inputFileListPaths = (
  1636 + "${PODS_ROOT}/Target Support Files/Pods-metaCode-metaCodeUITests/Pods-metaCode-metaCodeUITests-resources-${CONFIGURATION}-input-files.xcfilelist",
  1637 + );
  1638 + name = "[CP] Copy Pods Resources";
  1639 + outputFileListPaths = (
  1640 + "${PODS_ROOT}/Target Support Files/Pods-metaCode-metaCodeUITests/Pods-metaCode-metaCodeUITests-resources-${CONFIGURATION}-output-files.xcfilelist",
  1641 + );
  1642 + runOnlyForDeploymentPostprocessing = 0;
  1643 + shellPath = /bin/sh;
  1644 + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-metaCode-metaCodeUITests/Pods-metaCode-metaCodeUITests-resources.sh\"\n";
  1645 + showEnvVarsInLog = 0;
  1646 + };
1530 1647 53AB1F83C55845CC654163DE /* [CP] Check Pods Manifest.lock */ = {
1531 1648 isa = PBXShellScriptBuildPhase;
1532 1649 buildActionMask = 2147483647;
... ... @@ -1663,6 +1780,7 @@
1663 1780 191733642B392011007BCC04 /* CNLiveShopGoodsSearchViewController.swift in Sources */,
1664 1781 79EABB892AB4497700F3A4E2 /* CNLiveSaveStandDB.swift in Sources */,
1665 1782 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */,
  1783 + 7939B0732B47F12F005AE981 /* CNLiveShortVideoViewController.swift in Sources */,
1666 1784 19BB1FEA2AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift in Sources */,
1667 1785 191733132B109F7B007BCC04 /* CNLivePlayerGestureView.swift in Sources */,
1668 1786 1938BD202B46799A00390A34 /* CNLivePlayletHomePageController.swift in Sources */,
... ... @@ -1719,6 +1837,7 @@
1719 1837 191732F52B085BAE007BCC04 /* CNLiveShopClassilyIconTableViewCell.swift in Sources */,
1720 1838 191732E32B05F474007BCC04 /* CNLiveShopGoodsManageDetailsInputManager.swift in Sources */,
1721 1839 79B2E3602AF39191002A8524 /* NSObject+CNLiveConfigModuleInline.swift in Sources */,
  1840 + 79A212C02B0B5C5400BFA8E3 /* CNLiveShopCouponManagerViewController.swift in Sources */,
1722 1841 7C2703362A3AFD3A0061EC50 /* CNLiveEnvironment.swift in Sources */,
1723 1842 798A44FD2A309EBA00815935 /* CNLiveTypeFeedBackViewController.swift in Sources */,
1724 1843 79656E382AAEBA8E00119A61 /* CNLiveMineInputViewController.swift in Sources */,
... ... @@ -1748,10 +1867,14 @@
1748 1867 1938BD2C2B4801A700390A34 /* CNHomePageAnimationTransition.swift in Sources */,
1749 1868 191733452B284DCD007BCC04 /* CNLiveShopCouponListModel.swift in Sources */,
1750 1869 7C2703302A36CBE30061EC50 /* CNCertificationView.swift in Sources */,
  1870 + 796308752B4B90700090D22A /* CNLiveShortVideoHomeModel.swift in Sources */,
1751 1871 19CC4D542ADD163D00308E2A /* CNUpSlideCardPresentationController.swift in Sources */,
1752 1872 790D01A32A2DDBA300C5978D /* CNLiveConfigManager.swift in Sources */,
  1873 + 7939B0752B47F1B9005AE981 /* CNLiveShortVideoListTableViewCell.swift in Sources */,
  1874 + 794294A72B4D18EC008AAFA0 /* CNLiveShortVideoContentListView.swift in Sources */,
1753 1875 19565EC52AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift in Sources */,
1754 1876 19CC4D492ADD06C500308E2A /* UITableView+Extension.swift in Sources */,
  1877 + 796308732B4B8EB80090D22A /* CNLiveShortVideoViewModel.swift in Sources */,
1755 1878 19E9D1602B3A98C200D0FB30 /* CNLiveShopAssociatedGoodsTableViewCell.swift in Sources */,
1756 1879 191732CE2B04AACD007BCC04 /* CNLiveShopTextView.swift in Sources */,
1757 1880 7C2703332A36CC660061EC50 /* CNLiveGlobalBlock.swift in Sources */,
... ... @@ -1775,6 +1898,7 @@
1775 1898 19BB1FF22AF21A950094D962 /* CNLliveShopDetailBannerCell.swift in Sources */,
1776 1899 1938BD432B4E34B200390A34 /* CNHomepageDuanJuDetailViewController.swift in Sources */,
1777 1900 790D018B2A2D8B3300C5978D /* CNLiveLoginViewController.swift in Sources */,
  1901 + 7999415C2B4E8E8E0014C721 /* CNLiveRefresh.swift in Sources */,
1778 1902 19CC4D562ADD19C200308E2A /* String+Extension.swift in Sources */,
1779 1903 7905BB492AB0588B0089BC50 /* CNLiveMineAuthResultViewController.swift in Sources */,
1780 1904 19565EC22AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift in Sources */,
... ... @@ -1783,6 +1907,7 @@
1783 1907 191733152B109FD7007BCC04 /* CNLivePlayerTopNaviView.swift in Sources */,
1784 1908 794FF1052B01FC8800385E85 /* CNLiveShopOrderSearchViewController.swift in Sources */,
1785 1909 798A44EC2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift in Sources */,
  1910 + 794294AC2B4D44C0008AAFA0 /* CNLiveShortVideoCommentLayout.swift in Sources */,
1786 1911 791C1C882AFB6FD7003E6362 /* CNLiveShopOrderExpressFirmViewController.swift in Sources */,
1787 1912 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */,
1788 1913 794BC1652AF9E70D00A68C74 /* CNLiveShopOrderSendViewController.swift in Sources */,
... ... @@ -1791,6 +1916,7 @@
1791 1916 790D01852A2D89E100C5978D /* UIColor+CNLiveExtensions.swift in Sources */,
1792 1917 19FA20192AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift in Sources */,
1793 1918 790B1FB42A4153E90074CF00 /* CNLiveMineBaseModel.swift in Sources */,
  1919 + 794294AA2B4D4381008AAFA0 /* CNLiveShortVideoCommentListView.swift in Sources */,
1794 1920 7978A8432A396632007C86B8 /* CNLiveMineViewModel.swift in Sources */,
1795 1921 191733022B0C4EAB007BCC04 /* CNLiveSelUplSingleImageView.swift in Sources */,
1796 1922 798A44EE2A305AAC00815935 /* CNLiveBaseNavigationController.swift in Sources */,
... ... @@ -1804,11 +1930,13 @@
1804 1930 19565ECF2AF8D8F6007D6727 /* CNLiveShopGoodsListCell.swift in Sources */,
1805 1931 1965FA3E2AFB176E00F0F435 /* CNLiveShopAddGoodsSingleView.swift in Sources */,
1806 1932 7CD6753C2A2740B0008354C1 /* CNUpSlideViewRemindView.swift in Sources */,
  1933 + 7939B0772B47F88A005AE981 /* CNLiveShortVideoControlView.swift in Sources */,
1807 1934 191733602B352488007BCC04 /* CNLiveCouponGoodsListTableViewCell.swift in Sources */,
1808 1935 79BB1C142B05C51900C5720C /* CNLiveShopCouponViewController.swift in Sources */,
1809 1936 798916ED2B048E8200D08302 /* CNLiveShopTransViewController.swift in Sources */,
1810 1937 191733172B10A017007BCC04 /* CNLivePlayerBottomNaviView.swift in Sources */,
1811 1938 19BB1FEC2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift in Sources */,
  1939 + 79A212C22B0B5D0700BFA8E3 /* CNLiveShopBodyCouponManagerView.swift in Sources */,
1812 1940 794FF1072B01FC9800385E85 /* CNLiveShopOrderSearchListViewController.swift in Sources */,
1813 1941 798A44E82A30134400815935 /* CNLiveMineHeaderView.swift in Sources */,
1814 1942 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNLiveExtensions.swift in Sources */,
... ...
metaCode/Classes/CustomView/CNLiveRefresh.swift 0 → 100644
  1 +//
  2 +// CNLiveHeaderRefresh.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2024/1/10.
  6 +//
  7 +
  8 +import Foundation
  9 +import MJRefresh
  10 +
  11 +class CNLiveHeaderRefresh: MJRefreshNormalHeader {
  12 +
  13 + override func prepare() {
  14 + super.prepare()
  15 + self.loadingView?.color = .white
  16 + self.arrowView!.isHidden = true
  17 + self.stateLabel?.isHidden = true
  18 + self.lastUpdatedTimeLabel?.isHidden = true
  19 + }
  20 +}
  21 +
  22 +class CNLiveFooterRefresh: MJRefreshAutoNormalFooter {
  23 + override func prepare() {
  24 + super.prepare()
  25 + self.stateLabel?.textColor = .white
  26 + self.loadingView?.color = .white
  27 + }
  28 +}
... ...
metaCode/Classes/Environment/CNLiveEnvironment.swift
... ... @@ -33,6 +33,10 @@ let APPBaseWjjBUrl: String = CNLiveEnvironmentManager.shared.base_wjj_b_url
33 33 let APPBaseWjjShopUrl: String = CNLiveEnvironmentManager.shared.base_mjj_shop_url
34 34 /// cms接口
35 35 let APPBaseCMSUrl: String = CNLiveEnvironmentManager.shared.base_cms_url
  36 +/// 用户云接口
  37 +let APPBaseTokenUrl: String = CNLiveEnvironmentManager.shared.img_token_url
  38 +/// cms_api接口
  39 +let APPBaseCMSClassUrl: String = CNLiveEnvironmentManager.shared.base_cms_class_url
36 40 ///当前APP的环境
37 41 let APPCurrentEnvironment: CNLiveEnvironment = CNLiveEnvironmentManager.shared.currentEnvironment
38 42  
... ... @@ -82,6 +86,8 @@ class CNLiveEnvironmentManager: NSObject{
82 86 var base_web_UA: String = "yuanma"
83 87 /// cms域名请求
84 88 var base_cms_url: String
  89 + /// UGC视频请求地址
  90 + var base_cms_class_url: String
85 91  
86 92 ///当前环境
87 93 var currentEnvironment: CNLiveEnvironment
... ... @@ -102,6 +108,7 @@ class CNLiveEnvironmentManager: NSObject{
102 108 self.base_wjj_b_url = ""
103 109 self.base_mjj_shop_url = ""
104 110 self.base_cms_url = ""
  111 + self.base_cms_class_url = ""
105 112 self.currentEnvironment = .development
106 113 }
107 114 //重新copy 和 mutableCopy 方法
... ... @@ -144,6 +151,7 @@ class CNLiveEnvironmentManager: NSObject{
144 151 self.base_wjj_url = "https://apiwjj.cnlive.com"
145 152 self.base_mjj_shop_url = "https://manageshop.cnlive.com"
146 153 self.base_cms_url = "https://cmsapi.cnlive.com"
  154 + self.base_cms_class_url = "https://cmstest.cnlive.com"
147 155 }
148 156 //testFlight 环境配置
149 157 func testFlightEnvironment(){
... ... @@ -161,6 +169,7 @@ class CNLiveEnvironmentManager: NSObject{
161 169 self.base_wjj_url = "https://apiwjj.cnlive.com"
162 170 self.base_mjj_shop_url = "https://manageshop.cnlive.com"
163 171 self.base_cms_url = "https://cmsapi.cnlive.com"
  172 + self.base_cms_class_url = "https://cms.cnlive.com/api"
164 173 }
165 174 //production 生产环境配置
166 175 func productionEnvironment(){
... ... @@ -178,6 +187,7 @@ class CNLiveEnvironmentManager: NSObject{
178 187 self.base_wjj_url = "https://apiwjj.cnlive.com"
179 188 self.base_mjj_shop_url = "https://manageshop.cnlive.com"
180 189 self.base_cms_url = "https://cmsapi.cnlive.com"
  190 + self.base_cms_class_url = "https://cms.cnlive.com/api"
181 191 }
182 192  
183 193 }
... ...
metaCode/Classes/Extensions/NSString+CNLiveExtensions.swift
... ... @@ -75,7 +75,10 @@ extension NSString {
75 75 }else{
76 76 format.dateFormat = dateFormat
77 77 }
78   - return format.date(from: self as String)! as NSDate
  78 +
  79 + let date = format.date(from: self as String)!
  80 +
  81 + return date as NSDate
79 82 }
80 83  
81 84 /// 保留2位小数
... ...
metaCode/Classes/Main/HomePages/Controller/AuthController/CNLiveAuthViewController.swift
... ... @@ -94,16 +94,16 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
94 94 // MARK: - UITableViewDelegate
95 95 func numberOfSections(in tableView: UITableView) -> Int {
96 96 if self.isHaveDuanJU{
97   - 2
  97 + return 2
98 98 }else{
99   - 1
  99 + return 1
100 100 }
101 101 }
102 102 func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
103 103 if self.isHaveDuanJU && section == 0{
104   - 1
  104 + return 1
105 105 }else{
106   - self.dataArray.count
  106 + return self.dataArray.count
107 107 }
108 108 }
109 109  
... ...
metaCode/Classes/Main/HomePages/ViewModel/CNLiveHomePageViewModel.swift
... ... @@ -126,7 +126,6 @@ class CNLiveHomePageViewModel:NSObject{
126 126 let param = NSMutableDictionary()
127 127 param.setValue(aid, forKey: "aid")
128 128 param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")
129   -
130 129 CNLiveNetworking.setAllowRequestDefaultArgument(true)
131 130 CNLiveNetworking.setupShowDataResult(false)
132 131 CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/getAlbumMsg", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
... ... @@ -152,7 +151,6 @@ class CNLiveHomePageViewModel:NSObject{
152 151 let param = NSMutableDictionary()
153 152 param.setValue(aid, forKey: "aid")
154 153 param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")
155   -
156 154 CNLiveNetworking.setAllowRequestDefaultArgument(true)
157 155 CNLiveNetworking.setupShowDataResult(false)
158 156 CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/ugcApi/albumList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
... ... @@ -170,8 +168,7 @@ class CNLiveHomePageViewModel:NSObject{
170 168 }
171 169  
172 170 resultBlock(listArr,.success)
173   - }
174   - else{
  171 + }else{
175 172 resultBlock(NSNull(),.failed)
176 173 }
177 174 }
... ...
metaCode/Classes/Main/MinePage/Controller/CNLiveMineViewController.swift
... ... @@ -45,11 +45,12 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate,
45 45 ["name":"更多设置","icon":"mine_list_icon_set_more"]]
46 46 dataArray.add(array03)
47 47  
48   -// let array04 : [Dictionary] = [["name":"订单列表","icon":"mine_list_icon_help_feedback"],
49   -// ["name":"交易记录","icon":"mine_list_icon_help_feedback"],
50   -// ["name":"新增优惠券","icon":"mine_list_icon_help_feedback"],
51   -// ["name":"优惠券管理","icon":"mine_list_icon_help_feedback"]]
52   -// dataArray.add(array04)
  48 + let array04 : [Dictionary] = [["name":"订单列表","icon":"mine_list_icon_help_feedback"],
  49 + ["name":"交易记录","icon":"mine_list_icon_help_feedback"],
  50 + ["name":"新增优惠券","icon":"mine_list_icon_help_feedback"],
  51 + ["name":"优惠券管理","icon":"mine_list_icon_help_feedback"],
  52 + ["name":"抖音短视频","icon":"mine_list_icon_help_feedback"]]
  53 + dataArray.add(array04)
53 54  
54 55 return dataArray
55 56 }()
... ... @@ -188,6 +189,12 @@ extension CNLiveMineViewController {
188 189 if indexPath.row == 2 {
189 190 self.navigationController?.pushViewController(CNLiveShopCouponViewController.init(), animated: true)
190 191 }
  192 + if indexPath.row == 3 {
  193 + self.navigationController?.pushViewController(CNLiveShopCouponManagerViewController.init(), animated: true)
  194 + }
  195 + if indexPath.row == 4 {
  196 + self.navigationController?.pushViewController(CNLiveShortVideoViewController.init(aid: "cms_ugc_10504077_1704334474587"), animated: true)
  197 + }
191 198 }
192 199  
193 200 }
... ...
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopCouponManagerViewController.swift 0 → 100644
  1 +//
  2 +// CNLiveShopCouponManagerViewController.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2023/11/20.
  6 +//
  7 +
  8 +import Foundation
  9 +import EmptyDataSet_Swift
  10 +
  11 +class CNLiveShopCouponManagerViewController: CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource, EmptyDataSetSource, EmptyDataSetDelegate {
  12 +
  13 + let kShopBodyCouponManagerTableViewIdentifier = "kShopBodyCouponManagerTableViewIdentifier"
  14 + lazy var tableView : UITableView = {
  15 + let tableView = UITableView(frame: .zero, style: .plain)
  16 + tableView.dataSource = self
  17 + tableView.delegate = self
  18 + tableView.emptyDataSetSource = self
  19 + tableView.emptyDataSetDelegate = self
  20 + tableView.backgroundColor = HexColor("#f1f2f6")
  21 + tableView.tableFooterView = UIView.init()
  22 + tableView.separatorStyle = .none
  23 + tableView.register(ShopBodyCouponManagerTableView.self, forCellReuseIdentifier: kShopBodyCouponManagerTableViewIdentifier)
  24 + return tableView
  25 + }()
  26 +
  27 + lazy var delectButton: UIButton = {
  28 + let delectButton = UIButton.init(type: .custom)
  29 + delectButton.frame = CGRect(x: KSreenWidth - 70, y: (get_system_nav_height() - (get_system_statusBar_height() + 25))/2 + get_system_statusBar_height(), width: 60, height: 25)
  30 + delectButton.setTitle("删除", for: .normal)
  31 + delectButton.titleLabel?.font = semibold_adapt_font(pointSize: 15)
  32 + delectButton.setTitleColor(HexColor("#F5A623"), for: .normal)
  33 + delectButton.backgroundColor = .clear
  34 + delectButton.layer.masksToBounds = true
  35 + delectButton.layer.cornerRadius = 5
  36 + delectButton.addTarget(self, action: #selector(delectBtnClick), for: .touchUpInside)
  37 + delectButton.tag = 1000
  38 + return delectButton
  39 + }()
  40 +
  41 + lazy var dataArray: NSMutableArray = {
  42 + let dataArray = NSMutableArray.init()
  43 + return dataArray
  44 + }()
  45 +
  46 +
  47 + var network_type: CNLiveMineResponseType!
  48 + var completerBlock: CNLiveShopOrderExpressFirmCompleterBlock!
  49 + override func viewDidLoad() {
  50 + super.viewDidLoad()
  51 + navigationBarHidden = false
  52 + titleName = "优惠券"
  53 + topNavView.addSubview(delectButton)
  54 +
  55 + loadDataSourceAction()
  56 +
  57 + view.addSubview(tableView)
  58 + tableView.snp.makeConstraints { make in
  59 + make.top.equalTo(KNavigationHeight)
  60 + make.left.right.equalToSuperview()
  61 + make.bottom.equalToSuperview().offset(get_system_tabbar_height() - get_system_tabbar_ui_height())
  62 + }
  63 + }
  64 +
  65 + func loadDataSourceAction() {
  66 + CNLiveShopViewModel.requestCouponList { [weak self] result, respStatue in
  67 + if respStatue == .success {
  68 + self!.dataArray.addObjects(from: (result as! NSMutableArray) as! [ShopOrderCouponListModel])
  69 + self!.tableView.reloadData()
  70 + }else if (respStatue == .noNetwork) {
  71 + self!.network_type = .noNetwork
  72 + self!.tableView.reloadEmptyDataSet()
  73 + } else {
  74 + self!.network_type = .failed
  75 + self!.tableView.reloadEmptyDataSet()
  76 + }
  77 + }
  78 + }
  79 +
  80 + @objc func delectBtnClick() {
  81 +
  82 + }
  83 +
  84 +}
  85 +extension CNLiveShopCouponManagerViewController {
  86 +
  87 + func numberOfSections(in tableView: UITableView) -> Int {
  88 + return 1
  89 + }
  90 + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  91 + return self.dataArray.count
  92 + }
  93 + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  94 + guard let cell = tableView.dequeueReusableCell(withIdentifier: kShopBodyCouponManagerTableViewIdentifier) as? ShopBodyCouponManagerTableView else {
  95 + return ShopBodyCouponManagerTableView()
  96 + }
  97 + cell.setupWithDataSource(listModel: dataArray[indexPath.row] as! ShopOrderCouponListModel)
  98 + return cell
  99 + }
  100 + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  101 + return adapt_length(length: 70)
  102 + }
  103 + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  104 +
  105 + }
  106 +}
  107 +
  108 +extension CNLiveShopCouponManagerViewController {
  109 +
  110 + func image(forEmptyDataSet scrollView: UIScrollView) -> UIImage? {
  111 + if network_type == .failed || network_type == .unkonw {
  112 + return UIImage(named: "mine_list_source_unusual_failed")
  113 + }
  114 + if dataArray.count == 0 {
  115 + return UIImage(named: "mine_list_source_unusual_empty")
  116 + }
  117 + if network_type == .noNetwork {
  118 + return UIImage(named: "mine_list_source_unusual_noNet")
  119 + }
  120 + return UIImage(named: "mine_list_source_unusual_empty")
  121 + }
  122 +
  123 + func title(forEmptyDataSet scrollView: UIScrollView) -> NSAttributedString? {
  124 + var defult_string = ""
  125 + if network_type == .failed || network_type == .unkonw {
  126 + defult_string = "接口请求错误,刷新试试~"
  127 + }
  128 + if network_type == .noNetwork {
  129 + defult_string = "网络开小差了,刷新试试~"
  130 + }
  131 + if dataArray.count == 0 {
  132 + defult_string = "暂时没有数据~"
  133 + }
  134 + return NSAttributedString(string: defult_string, attributes: [.font: Font_17,.foregroundColor: HexColor("#666666")!])
  135 + }
  136 +
  137 + func buttonTitle(forEmptyDataSet scrollView: UIScrollView, for state: UIControl.State) -> NSAttributedString? {
  138 + if network_type == .failed || network_type == .noNetwork {
  139 + let attributes = [NSAttributedString.Key.font:Font_16_Fit,
  140 + NSAttributedString.Key.foregroundColor: HexColor("#609BFF")]
  141 + return NSAttributedString(string: "刷一刷", attributes: attributes as [NSAttributedString.Key : Any])
  142 + }
  143 + return nil
  144 + }
  145 +
  146 + func emptyDataSet(_ scrollView: UIScrollView, didTapView view: UIView) {
  147 + if network_type == .failed || network_type == .noNetwork {
  148 + loadDataSourceAction()
  149 + }
  150 + }
  151 +}
... ...
metaCode/Classes/Main/ShopPage/View/CNLiveShopBodyCouponManagerView.swift 0 → 100644
  1 +//
  2 +// CNLiveShopBodyCouponManagerView.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2023/11/20.
  6 +//
  7 +
  8 +import Foundation
  9 +
  10 +typealias clickCouponListActionCallBack = (_ index: NSInteger,_ listModel: ShopOrderCouponListModel) -> Void
  11 +typealias clickCouponListEditCallBack = (_ select: Bool,_ couponId: NSString) -> Void
  12 +class ShopBodyCouponManagerTableView: UITableViewCell {
  13 +
  14 + lazy var selectBtn: UIButton = {
  15 + let selectBtn = UIButton.init(type: .custom)
  16 + selectBtn.isHidden = true
  17 + selectBtn.setImage(UIImage(named: "DS_coupon_unSelect"), for: .normal)
  18 + selectBtn.setImage(UIImage(named: "DS_coupon_edit_se"), for: .selected)
  19 + selectBtn.addTarget(self, action: #selector(editBtnClick), for: .touchUpInside)
  20 + return selectBtn
  21 + }()
  22 +
  23 + lazy var bgWhiteView: UIView = {
  24 + let bgWhiteView = UIView.init()
  25 + bgWhiteView.backgroundColor = .white
  26 + bgWhiteView.layer.cornerRadius = adapt_length(length: 7)
  27 + bgWhiteView.clipsToBounds = true
  28 + return bgWhiteView
  29 + }()
  30 +
  31 + lazy var leftBgView: UIView = {
  32 + let leftBgView = UIView.init()
  33 + leftBgView.backgroundColor = HexColor("#fba2a2")
  34 + return leftBgView
  35 + }()
  36 +
  37 + lazy var lessMoneyLabel: UILabel = {
  38 + let lessMoneyLabel = UILabel.init()
  39 + lessMoneyLabel.textColor = .white
  40 + lessMoneyLabel.font = regular_adapt_font(pointSize: 38)
  41 + lessMoneyLabel.textAlignment = .center
  42 + return lessMoneyLabel
  43 + }()
  44 +
  45 + lazy var maxMoneyLabel: UILabel = {
  46 + let maxMoneyLabel = UILabel.init()
  47 + maxMoneyLabel.textColor = .white
  48 + maxMoneyLabel.font = regular_adapt_font(pointSize: 12.5)
  49 + maxMoneyLabel.textAlignment = .center
  50 + return maxMoneyLabel
  51 + }()
  52 +
  53 + lazy var titleLabel: UILabel = {
  54 + let titleLabel = UILabel.init()
  55 + titleLabel.textColor = HexColor("#444444")
  56 + titleLabel.font = medium_adapt_font(pointSize: 15)
  57 + titleLabel.textAlignment = .left
  58 + return titleLabel
  59 + }()
  60 +
  61 + lazy var idLabel: UILabel = {
  62 + let idLabel = UILabel.init()
  63 + idLabel.textColor = HexColor("#bebebe")
  64 + idLabel.font = regular_adapt_font(pointSize: 12)
  65 + idLabel.textAlignment = .left
  66 + return idLabel
  67 + }()
  68 +
  69 + lazy var typeLabel: UILabel = {
  70 + let typeLabel = UILabel.init()
  71 + typeLabel.textColor = HexColor("#999999")
  72 + typeLabel.font = regular_adapt_font(pointSize: 12)
  73 + typeLabel.textAlignment = .left
  74 + return typeLabel
  75 + }()
  76 +
  77 + lazy var totalLabel: UILabel = {
  78 + let totalLabel = UILabel.init()
  79 + totalLabel.textColor = HexColor("#bebebe")
  80 + totalLabel.font = regular_adapt_font(pointSize: 12)
  81 + totalLabel.textAlignment = .left
  82 + return totalLabel
  83 + }()
  84 +
  85 + lazy var lineView: UILabel = {
  86 + let lineView = UILabel.init()
  87 + lineView.backgroundColor = HexColor("#e6e6e6")
  88 + return totalLabel
  89 + }()
  90 +
  91 + lazy var showMessageLabel: UILabel = {
  92 + let showMessageLabel = UILabel.init()
  93 + showMessageLabel.textColor = HexColor("#999999")
  94 + showMessageLabel.text = "是否显示"
  95 + showMessageLabel.font = regular_adapt_font(pointSize: 12)
  96 + showMessageLabel.textAlignment = .left
  97 + return showMessageLabel
  98 + }()
  99 +
  100 + lazy var shareBtn: UIButton = {
  101 + let shareBtn = UIButton.init(type: .custom)
  102 + shareBtn.tag = 1001
  103 + shareBtn.setTitle("分享", for: .normal)
  104 + shareBtn.titleLabel?.font = regular_adapt_font(pointSize: 13)
  105 + shareBtn.setTitleColor(HexColor("#fd862e"), for: .normal)
  106 + shareBtn.addTarget(self, action: #selector(actionClick), for: .touchUpInside)
  107 + return shareBtn
  108 + }()
  109 +
  110 + lazy var editBtn: UIButton = {
  111 + let editBtn = UIButton.init(type: .custom)
  112 + editBtn.tag = 1002
  113 + editBtn.setTitle("编辑", for: .normal)
  114 + editBtn.titleLabel?.font = regular_adapt_font(pointSize: 13)
  115 + editBtn.setTitleColor(HexColor("#fd862e"), for: .normal)
  116 + editBtn.addTarget(self, action: #selector(actionClick), for: .touchUpInside)
  117 + return editBtn
  118 + }()
  119 +
  120 + lazy var showSwitch: UISwitch = {
  121 + let showSwitch = UISwitch.init()
  122 + showSwitch.addTarget(self, action: #selector(switchChangesd), for: .touchUpInside)
  123 + showSwitch.transform = CGAffineTransformMakeScale(0.7, 0.7)
  124 + return showSwitch
  125 + }()
  126 +
  127 + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
  128 + super.init(style: style, reuseIdentifier: reuseIdentifier)
  129 + contentView.backgroundColor = .clear
  130 + selectionStyle = .none
  131 + isUserInteractionEnabled = true
  132 +
  133 + addSubview(selectBtn)
  134 + selectBtn.snp.makeConstraints { make in
  135 + make.left.equalToSuperview().offset(adapt_length(length: 15))
  136 + make.centerY.equalToSuperview()
  137 + make.size.equalTo(adapt_length(length: 30))
  138 + }
  139 +
  140 + contentView.addSubview(bgWhiteView)
  141 + bgWhiteView.snp.makeConstraints { make in
  142 + make.left.equalTo(contentView).offset(adapt_length(length: 15))
  143 + make.right.equalToSuperview().offset(-adapt_length(length: 15))
  144 + make.top.bottom.equalToSuperview()
  145 + }
  146 +
  147 + bgWhiteView.addSubview(leftBgView)
  148 + leftBgView.snp.makeConstraints { make in
  149 + make.left.top.right.equalTo(bgWhiteView)
  150 + make.width.equalTo(adapt_length(length: 110))
  151 + }
  152 +
  153 + leftBgView.addSubview(lessMoneyLabel)
  154 + lessMoneyLabel.snp.makeConstraints { make in
  155 + make.top.equalTo(leftBgView).offset(adapt_length(length: 23))
  156 + make.left.right.equalTo(leftBgView)
  157 + }
  158 +
  159 + leftBgView.addSubview(maxMoneyLabel)
  160 + maxMoneyLabel.snp.makeConstraints { make in
  161 + make.top.equalTo(lessMoneyLabel.snp.bottom)
  162 + make.left.right.equalTo(leftBgView)
  163 + }
  164 +
  165 + bgWhiteView.addSubview(titleLabel)
  166 + titleLabel.snp.makeConstraints { make in
  167 + make.center.equalToSuperview()
  168 + }
  169 +
  170 + bgWhiteView.addSubview(idLabel)
  171 + idLabel.snp.makeConstraints { make in
  172 + make.right.equalTo(shareBtn.snp.left)
  173 + make.left.equalTo(titleLabel.snp.right).offset(adapt_length(length: 10))
  174 + make.centerY.equalTo(titleLabel)
  175 + }
  176 +
  177 + bgWhiteView.addSubview(typeLabel)
  178 + typeLabel.snp.makeConstraints { make in
  179 + make.left.equalTo(titleLabel)
  180 + make.top.equalTo(titleLabel.snp.bottom).offset(adapt_length(length: 5))
  181 + }
  182 +
  183 + bgWhiteView.addSubview(totalLabel)
  184 + totalLabel.snp.makeConstraints { make in
  185 + make.left.equalTo(titleLabel)
  186 + make.top.equalTo(typeLabel.snp.bottom).offset(adapt_length(length: 1))
  187 + make.right.equalTo(editBtn.snp.left)
  188 + }
  189 +
  190 + bgWhiteView.addSubview(lineView)
  191 + lineView.snp.makeConstraints { make in
  192 + make.left.equalTo(titleLabel)
  193 + make.top.equalTo(totalLabel.snp.bottom).offset(adapt_length(length: 10))
  194 + make.right.equalTo(bgWhiteView).offset(-adapt_length(length: 15))
  195 + make.height.equalTo(adapt_length(length: 0.5))
  196 + }
  197 +
  198 + bgWhiteView.addSubview(showMessageLabel)
  199 + showMessageLabel.snp.makeConstraints { make in
  200 + make.left.equalTo(titleLabel)
  201 + make.bottom.equalTo(bgWhiteView).offset(-adapt_length(length: 15))
  202 + }
  203 +
  204 + bgWhiteView.addSubview(shareBtn)
  205 + shareBtn.snp.makeConstraints { make in
  206 + make.right.equalTo(lineView)
  207 + make.centerY.equalTo(titleLabel)
  208 + make.width.equalTo(adapt_length(length: 30))
  209 + make.height.equalTo(adapt_length(length: 18.5))
  210 + }
  211 +
  212 + bgWhiteView.addSubview(editBtn)
  213 + editBtn.snp.makeConstraints { make in
  214 + make.right.equalTo(lineView)
  215 + make.centerY.equalTo(totalLabel)
  216 + make.width.equalTo(adapt_length(length: 45))
  217 + make.height.equalTo(adapt_length(length: 18.5))
  218 + }
  219 +
  220 + bgWhiteView.addSubview(showSwitch)
  221 + showSwitch.snp.makeConstraints { make in
  222 + make.centerY.equalTo(showMessageLabel)
  223 + make.right.equalTo(lineView)
  224 + }
  225 + }
  226 +
  227 + override func setEditing(_ editing: Bool, animated: Bool) {
  228 + if editing {
  229 + selectBtn.isHidden = false
  230 + bgWhiteView.snp.remakeConstraints { make in
  231 + make.left.equalTo(contentView).offset(adapt_length(length: 55))
  232 + }
  233 + } else {
  234 + selectBtn.isSelected = false
  235 + selectBtn.isHidden = true
  236 + bgWhiteView.snp.makeConstraints { make in
  237 + make.left.equalTo(contentView).offset(adapt_length(length: 15))
  238 + }
  239 + }
  240 + }
  241 +
  242 + var _listModel: ShopOrderCouponListModel!
  243 + func setupWithDataSource(listModel: ShopOrderCouponListModel) {
  244 + _listModel = listModel
  245 + }
  246 +
  247 + func dealDiscountAndFilledNumber(count: NSInteger) -> NSString {
  248 + var afterCount: NSString = ""
  249 + if (count >= 0 && count < 10000) {
  250 + afterCount = "\(count)" as NSString
  251 + } else if (count > 10000 && count < 10000000) {
  252 + if (count%10000 != 0) {
  253 + afterCount = "\(count/10000)万" as NSString
  254 + } else {
  255 +
  256 + }
  257 + }
  258 + return afterCount
  259 + }
  260 +
  261 + @objc func switchChangesd(sender: UISwitch) {
  262 +
  263 + }
  264 +
  265 + var actionCallBack: clickCouponListActionCallBack!
  266 + @objc func actionClick(sender: UISwitch) {
  267 + if (actionCallBack != nil) {
  268 + actionCallBack(sender.tag - 1001, _listModel)
  269 + }
  270 + }
  271 +
  272 + var editCallBack: clickCouponListEditCallBack!
  273 + @objc func editBtnClick(sender: UIButton) {
  274 + sender.isSelected = !sender.isSelected
  275 + if (editCallBack != nil) {
  276 + editCallBack(sender.isSelected, _listModel.id! as NSString)
  277 + }
  278 + }
  279 +
  280 + required init?(coder: NSCoder) {
  281 + fatalError("init(coder:) has not been implemented")
  282 + }
  283 +}
... ...
metaCode/Classes/Main/ShopPage/ViewModel/CNLiveShopViewModel.swift
... ... @@ -943,6 +943,44 @@ class CNLiveShopViewModel: NSObject {
943 943 }
944 944 }
945 945  
946   -
  946 + /// 获取优惠券列表数据
  947 + /// - Parameter resultBlock: 返回
  948 + static func requestCouponList(resultBlock: @escaping resultShopBlock) {
  949 + let param = NSMutableDictionary()
  950 + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid")
  951 + let custom_param = NSMutableDictionary()
  952 + custom_param.setValue(APPId_wjj, forKey: "appId")
  953 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  954 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  955 + CNLiveNetworking.setupShowDataResult(false)
  956 + CNLiveNetworking.setupDSRequest(true)
  957 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  958 + CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/shopCouponList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  959 + hiddenLoading()
  960 + if (error == nil) {
  961 + let resp = result as! NSDictionary
  962 + let errorCode = "\(resp["code"] ?? "0")"
  963 + if (errorCode == "200") {
  964 + if resp["data"] is NSNull {
  965 + resultBlock(Array<ShopOrderCouponListModel>(),.failed)
  966 + } else {
  967 + let model = dictionaryToModel(resp as! [String : Any], ShopOrderCouponDataListModel.self,"data") as! ShopOrderCouponDataListModel
  968 + resultBlock(model.list,.success)
  969 + }
  970 + } else {
  971 + showMessage(message: resp["message"] as! String)
  972 + resultBlock(NSNull(),.failed)
  973 + }
  974 + } else {
  975 + if CNLiveNetworking.isNetworking() {
  976 + showMessage(message: "请求失败")
  977 + resultBlock(NSNull(),.failed)
  978 + } else {
  979 + showMessage(message: "似乎与网络断开链接")
  980 + resultBlock(NSNull(),.noNetwork)
  981 + }
  982 + }
  983 + }
  984 + }
947 985  
948 986 }
... ...
metaCode/Classes/Main/VideoPage/Controller/CNLiveShortVideoViewController.swift 0 → 100644
  1 +//
  2 +// CNLiveVideoViewController.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2024/1/5.
  6 +//
  7 +
  8 +import Foundation
  9 +import ZFPlayer
  10 +import APButton
  11 +import EmptyDataSet_Swift
  12 +import MJRefresh
  13 +
  14 +class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource, CNLiveShortVideoListTableViewCellDelegate, EmptyDataSetSource, EmptyDataSetDelegate {
  15 +
  16 + var player: ZFPlayerController!
  17 + let kVideoBodyListViewCellIdentifier = "kVideoBodyListViewCellIdentifier"
  18 + lazy var tableView : UITableView = {
  19 + let tableView = UITableView(frame: .zero, style: .plain)
  20 + tableView.dataSource = self
  21 + tableView.delegate = self
  22 + tableView.emptyDataSetSource = self
  23 + tableView.emptyDataSetDelegate = self
  24 + tableView.isPagingEnabled = true
  25 + tableView.estimatedRowHeight = 0
  26 + tableView.estimatedSectionFooterHeight = 0
  27 + tableView.estimatedSectionHeaderHeight = 0
  28 + tableView.frame = view.bounds
  29 + tableView.rowHeight = tableView.frame.size.height
  30 + tableView.backgroundColor = .black
  31 + tableView.tableFooterView = UIView.init()
  32 + tableView.separatorStyle = .none
  33 + tableView.scrollsToTop = false
  34 + tableView.showsVerticalScrollIndicator = false
  35 + tableView.showsHorizontalScrollIndicator = false
  36 + tableView.contentInsetAdjustmentBehavior = .never;
  37 + tableView.register(CNLiveShortVideoListTableViewCell.self, forCellReuseIdentifier: kVideoBodyListViewCellIdentifier)
  38 + return tableView
  39 + }()
  40 +
  41 + lazy var backBtn: UIButton = {
  42 + let button = UIButton(type: .custom)
  43 + button.setImage(UIImage(named: "short_video_close"), for: .normal)
  44 + button.addTarget(self, action: #selector(backClick(_:)), for: .touchUpInside)
  45 + return button
  46 + }()
  47 +
  48 + lazy var controlView: CNLiveShortVideoControlView = {
  49 + let controlView = CNLiveShortVideoControlView.init(frame: CGRectZero)
  50 + return controlView
  51 + }()
  52 +
  53 + lazy var dataArray: NSMutableArray = {
  54 + let dataArray = NSMutableArray.init()
  55 + return dataArray
  56 + }()
  57 + lazy var dataURLArray: NSMutableArray = {
  58 + let dataArray = NSMutableArray.init()
  59 + return dataArray
  60 + }()
  61 +
  62 + var aid: String! = ""
  63 + var pageNum: NSInteger! = 1
  64 + var currentIndex: NSInteger! = 0
  65 + var headerRefreshView: CNLiveHeaderRefresh!
  66 + var footerRefreshView: CNLiveFooterRefresh!
  67 + var playerManager = ZFIJKPlayerManager.init()
  68 +// var playerManager = ZFAVPlayerManager.init()
  69 +
  70 + /// 初始化播放器
  71 + /// - Parameters:
  72 + /// - aid: 专辑 id
  73 + /// - page: 当前页数
  74 + /// - currentIndex: 当前点击的索引
  75 + /// - dataArray: 当前请求的数据
  76 + init(aid: String,page: NSInteger, currentIndex: NSInteger, dataArray: [CNLiveAlbumListModel]) {
  77 + self.aid = aid
  78 + self.pageNum = page
  79 + self.currentIndex = currentIndex
  80 + super.init(nibName:nil, bundle:nil)
  81 + self.dataArray.addObjects(from: dataArray)
  82 + dataArray.forEach {[weak self] listModel in
  83 + guard let self = self else { return }
  84 + self.dataURLArray.add(listModel.videoUrl)
  85 + }
  86 + }
  87 +
  88 + /// 初始化播放器
  89 + /// - Parameter aid: 专辑 id
  90 + init(aid: String) {
  91 + self.aid = aid
  92 + super.init(nibName:nil, bundle:nil)
  93 + }
  94 +
  95 + required init?(coder: NSCoder) {
  96 + fatalError("init(coder:) has not been implemented")
  97 + }
  98 +
  99 + override func viewDidLoad() {
  100 + super.viewDidLoad()
  101 + view.backgroundColor = .black
  102 + view.addSubview(tableView)
  103 + view.addSubview(backBtn)
  104 +
  105 + requestData {}
  106 + addRefreshView()
  107 +
  108 + player = ZFPlayerController(scrollView: tableView, playerManager: playerManager, containerViewTag: 100)
  109 + player.disableGestureTypes = [.pan, .pinch]
  110 + player.controlView = controlView
  111 + player.allowOrentitaionRotation = false
  112 + player.isWWANAutoPlay = true
  113 + player.playerDisapperaPercent = 1.0
  114 + player.playerDidToEnd = { [weak self] asset in
  115 + guard let self = self else { return }
  116 + self.player.currentPlayerManager.replay()
  117 + }
  118 + player.playerPrepareToPlay = {[weak self] asset, assetURL in
  119 + guard let self = self else { return }
  120 + self.controlView.videoPlayer((self.player)!, currentTime: self.player.currentTime, totalTime: self.player.totalTime)
  121 + let index = self.dataURLArray.index(of: assetURL.absoluteString)
  122 + let homeModel = self.dataArray[index] as! CNLiveAlbumListModel
  123 + let indexPath = IndexPath(row: index, section: 0)
  124 + let cell: CNLiveShortVideoListTableViewCell = self.tableView.cellForRow(at: indexPath) as! CNLiveShortVideoListTableViewCell
  125 + cell.hiddenView(isHidden: homeModel.product!.albumProductType != "0")
  126 + if (homeModel.product!.albumProductType != "0") {
  127 + self.player.stopCurrentPlayingCell()
  128 + }
  129 + }
  130 + // 更新另一个控制层的时间
  131 + player.playerPlayTimeChanged = { [weak self] asset, currentTime, duration in
  132 + guard let self = self else { return }
  133 + self.controlView.videoPlayer((self.player)!, currentTime: currentTime, totalTime: duration)
  134 + }
  135 + // 更新另一个控制层的缓冲时间
  136 + player.playerBufferTimeChanged = { [weak self] asset, bufferTime in
  137 + guard let self = self else { return }
  138 + self.controlView.videoPlayer((self.player)!, bufferTime: bufferTime)
  139 + }
  140 + // 停止的时候找出最合适的播放
  141 + player.zf_scrollViewDidEndScrollingCallback = { [weak self] indexPath in
  142 + guard let self = self else { return }
  143 + if self.player.playingIndexPath != nil {
  144 + return
  145 + }
  146 + self.playVideo(at: indexPath)
  147 + }
  148 + }
  149 +
  150 + func addRefreshView() {
  151 + headerRefreshView = CNLiveHeaderRefresh(refreshingBlock: { [weak self] in
  152 + guard let self = self else { return }
  153 + self.pageNum = 1
  154 + self.requestData {}
  155 + })
  156 + footerRefreshView = CNLiveFooterRefresh(refreshingBlock: { [weak self] in
  157 + guard let self = self else { return }
  158 + self.player.stopCurrentPlayingCell()
  159 + self.pageNum += 1
  160 + self.requestData {}
  161 + })
  162 + }
  163 +
  164 + override func viewWillLayoutSubviews() {
  165 + super.viewWillLayoutSubviews()
  166 + self.backBtn.frame = CGRectMake(15, CGRectGetMaxY(UIApplication.shared.statusBarFrame), 45, 45)
  167 + }
  168 +
  169 + func requestData(resultBlock: @escaping () -> Void) {
  170 + CNLiveShortVideoViewModel.requstWithShortVideo(aid: self.aid, page: self.pageNum) { [weak self] result, respStatue in
  171 + guard let self = self else { return }
  172 + if respStatue == .success {
  173 + if self.pageNum == 1 {
  174 + self.dataArray.removeAllObjects()
  175 + self.dataURLArray.removeAllObjects()
  176 + }
  177 + let listArray = (result as! [Any]).first as! [CNLiveAlbumListModel]
  178 + self.dataArray.addObjects(from: listArray)
  179 + let urlArray = (result as! [Any]).last as! [String]
  180 + self.dataURLArray.addObjects(from: urlArray)
  181 + if self.tableView.mj_header != nil && self.tableView.mj_footer != nil {
  182 + self.tableView.mj_footer?.endRefreshing()
  183 + self.tableView.mj_header?.endRefreshing()
  184 + }
  185 + self.tableView.reloadData()
  186 + let hasNextPage = (result as! [Any])[1] as! Bool
  187 + if listArray.count == 0 && urlArray.count == 0 {
  188 + if !hasNextPage {
  189 + self.tableView.mj_footer?.endRefreshingWithNoMoreData()
  190 + self.tableView.reloadData()
  191 + }
  192 + } else {
  193 + if self.tableView.mj_header == nil {
  194 + self.tableView.mj_header = headerRefreshView
  195 + }
  196 + if self.tableView.mj_footer == nil {
  197 + self.tableView.mj_footer = footerRefreshView
  198 + }
  199 + }
  200 + if self.pageNum == 1 {
  201 + self.playTheIndex(index: self.currentIndex)
  202 + }
  203 + } else {
  204 + if self.tableView.mj_header != nil && self.tableView.mj_footer != nil {
  205 + self.tableView.mj_footer?.endRefreshing()
  206 + self.tableView.mj_header?.endRefreshing()
  207 + }
  208 + if self.dataArray.count == 0 {
  209 + self.tableView.reloadEmptyDataSet()
  210 + }
  211 + }
  212 + }
  213 + }
  214 +
  215 + open func playTheIndex(index: NSInteger) {
  216 + // 指定到某一行播放
  217 + let indexPath = IndexPath(row: index, section: 0)
  218 + tableView.scrollToRow(at: indexPath, at: .none, animated: false)
  219 +
  220 + // 使用zf_filterShouldPlayCellWhileScrolled过滤播放
  221 + self.player.zf_filterShouldPlayCellWhileScrolled { [weak self] indexPath in
  222 + guard let self = self else { return }
  223 + self.playVideo(at: indexPath)
  224 + }
  225 + }
  226 +
  227 + override var shouldAutorotate: Bool {
  228 + return false
  229 + }
  230 +
  231 + override var preferredStatusBarStyle: UIStatusBarStyle {
  232 + return .lightContent
  233 + }
  234 +
  235 + override var prefersStatusBarHidden: Bool {
  236 + return false
  237 + }
  238 +
  239 + override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
  240 + return .portrait
  241 + }
  242 +
  243 + @objc func backClick(_ sender: UIButton) {
  244 + self.navigationController?.popViewController(animated: true)
  245 + }
  246 +
  247 + func playVideo(at indexPath: IndexPath) {
  248 + let data: CNLiveAlbumListModel = dataArray[indexPath.row] as! CNLiveAlbumListModel
  249 + self.player.playTheIndexPath(indexPath, assetURL: URL(string: data.videoUrl)!)
  250 + controlView.resetControlView()
  251 + controlView.showCoverView(withUrl: data.poster)
  252 + }
  253 +
  254 + deinit {
  255 + tableView.delegate = nil
  256 + tableView.dataSource = nil
  257 + controlView.removeFromSuperview()
  258 + player.stopCurrentPlayingCell()
  259 + if (playerManager.player != nil) {
  260 + playerManager.player.stop()
  261 + }
  262 + print("销毁了")
  263 + }
  264 +}
  265 +extension CNLiveShortVideoViewController {
  266 +
  267 + func likeActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton) {
  268 + CNLiveShortVideoViewModel.requestRankWithLike(contentId: viewcell.homeModel.pid, contentTitle: viewcell.homeModel.title, contentSid: viewcell.homeModel.icon!.id, support: viewcell.homeModel.tool!.liked, tagName: viewcell.homeModel.tagName) {result, respStatue in
  269 + if respStatue == .success {
  270 + viewcell.homeModel.tool!.liked = !viewcell.homeModel.tool!.liked
  271 + button.isSelected = viewcell.homeModel.tool!.liked
  272 + }
  273 + }
  274 + }
  275 + func commentActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton) {
  276 +
  277 + }
  278 + func shareActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton) {
  279 +
  280 + }
  281 + func iconActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton) {
  282 +
  283 + }
  284 + func faviActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton) {
  285 +
  286 + }
  287 + func listActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton) {
  288 + CNLiveShortVideoContentListView.showVideoContentListView(title: viewcell.homeModel.albumMsgModel!.albumName,dataArray: dataArray, result: {[weak self] listModel in
  289 + guard let self = self else { return }
  290 + let index = self.dataArray.index(of: listModel) as NSInteger
  291 + self.playTheIndex(index: index)
  292 + })
  293 + }
  294 + func payActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton) {
  295 + let payButton = button as! APButton
  296 + payButton.startAnimating()
  297 + DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { [weak self] in
  298 + guard let self = self else { return }
  299 + payButton.stopAnimating()
  300 + for item in self.dataArray {
  301 + let homeModel = item as! CNLiveAlbumListModel
  302 + homeModel.product!.albumProductType = "0"
  303 + self.tableView.reloadData()
  304 + }
  305 + let index = self.dataArray.index(of: viewcell.homeModel as Any)
  306 + self.playTheIndex(index: index)
  307 + }
  308 +
  309 + }
  310 +}
  311 +
  312 +extension CNLiveShortVideoViewController {
  313 +
  314 + func numberOfSections(in tableView: UITableView) -> Int {
  315 + return 1
  316 + }
  317 +
  318 + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  319 + return dataArray.count
  320 + }
  321 +
  322 + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  323 + guard let cell = tableView.dequeueReusableCell(withIdentifier: kVideoBodyListViewCellIdentifier) as? CNLiveShortVideoListTableViewCell else {
  324 + return CNLiveShortVideoListTableViewCell()
  325 + }
  326 + cell.setupWithData(model: dataArray[indexPath.row] as! CNLiveAlbumListModel)
  327 + cell.delegate = self
  328 + return cell
  329 + }
  330 +
  331 + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  332 + self.playVideo(at: indexPath)
  333 + }
  334 +
  335 + func image(forEmptyDataSet scrollView: UIScrollView) -> UIImage? {
  336 + return UIImage(named: "short_video_default")
  337 + }
  338 +
  339 + func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
  340 + scrollView.zf_scrollViewDidEndDecelerating()
  341 + }
  342 +
  343 + func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
  344 + scrollView.zf_scrollViewDidEndDraggingWillDecelerate(decelerate)
  345 + }
  346 +
  347 + func scrollViewDidScrollToTop(_ scrollView: UIScrollView) {
  348 + scrollView.zf_scrollViewDidScrollToTop()
  349 + }
  350 +
  351 + func scrollViewDidScroll(_ scrollView: UIScrollView) {
  352 + scrollView.zf_scrollViewDidScroll()
  353 + }
  354 +
  355 + func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
  356 + scrollView.zf_scrollViewWillBeginDragging()
  357 + }
  358 +
  359 + func zf_playTheVideo(at indexPath: IndexPath) {
  360 + self.playVideo(at: indexPath)
  361 + }
  362 +}
  363 +
... ...
metaCode/Classes/Main/VideoPage/Model/CNLiveShortVideoCommentLayout.swift 0 → 100644
  1 +//
  2 +// CNLiveShortVideoCommentLayout.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2024/1/9.
  6 +//
  7 +
  8 +import Foundation
... ...
metaCode/Classes/Main/VideoPage/Model/CNLiveShortVideoHomeModel.swift 0 → 100644
  1 +//
  2 +// CNLiveShortVideoHomeModel.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2024/1/8.
  6 +//
  7 +
  8 +import Foundation
  9 +
  10 +//!!!: 评论相关 model
  11 +class ShortVideoHomeCommentModel: BaseModel {
  12 + var total_hd: Int? = 0 //总数
  13 + var hasNext: String? = ""
  14 + var comments = [ShortVideoHomeCommentListModel]()
  15 +}
  16 +
  17 +class ShortVideoHomeCommentListModel: BaseModel {
  18 + var comment = ShortVideoHomeCommentFListModel()
  19 + var replyData = ShortVideoHomeCommentRListModel()
  20 +}
  21 +//评论数据
  22 +class ShortVideoHomeCommentFListModel: BaseModel {
  23 + var commentId: String? = ""
  24 + var pid: String? = ""
  25 + var uid: String? = ""
  26 + var nick: String? = ""
  27 + var facepath: String? = ""
  28 + var content: String? = ""
  29 + var created_at: String? = ""
  30 + var praise: String? = ""
  31 + var plat: String? = ""
  32 + var isOffical: Bool? = false
  33 + var model: String? = ""
  34 + var spId: String? = ""
  35 + var seqId: Int? = 0
  36 + var topicId: String? = ""
  37 + var praiseCount: Int? = 0
  38 + var isPraised: Bool? = false
  39 + var icon: String? = ""
  40 +}
  41 +//回复数据
  42 +class ShortVideoHomeCommentRListModel: BaseModel {
  43 + var total_hd: Int? = 0 //总数
  44 + var replys = [ShortVideoHomeCommentRListItemModel]()
  45 +}
  46 +
  47 +class ShortVideoHomeCommentRListItemModel: BaseModel {
  48 + var praiseCount: Int? = 0
  49 + var isPraised: Bool? = false
  50 + var commentId: String? = ""
  51 + var replyId: String? = ""
  52 + var topicId: String? = ""
  53 + var created_at: String? = ""
  54 + var plat: String? = ""
  55 + var fromFace: String? = ""
  56 + var fromSid: String? = ""
  57 + var fromNick: String? = ""
  58 + var toSid: String? = ""
  59 + var toNick: String? = ""
  60 + var toFace: String? = ""
  61 + var seqId: Int? = 0
  62 + var content: String? = ""
  63 + var level: Int? = 0
  64 + var icon: String? = ""
  65 +}
... ...
metaCode/Classes/Main/VideoPage/View/CNLiveShortVideoCommentListView.swift 0 → 100644
  1 +//
  2 +// CNLiveShortVideoCommentListView.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2024/1/9.
  6 +//
  7 +
  8 +import Foundation
  9 +
  10 +class CNLiveShortVideoCommentListView: UIView {
  11 +
  12 +}
... ...
metaCode/Classes/Main/VideoPage/View/CNLiveShortVideoContentListView.swift 0 → 100644
  1 +//
  2 +// CNLiveShortVideoContentListView.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2024/1/9.
  6 +//
  7 +
  8 +import Foundation
  9 +
  10 +typealias CloseVideoListResultBlock = (_ listModel: Any) ->Void
  11 +class CNLiveShortVideoContentListView: UIView, UITableViewDelegate, UITableViewDataSource {
  12 +
  13 + lazy var grayMaskView: UIView = {
  14 + let grayMaskView = UIView()
  15 + grayMaskView.backgroundColor = UIColor.black.withAlphaComponent(0.2)
  16 + return grayMaskView
  17 + }()
  18 +
  19 + lazy var contentView: UIView = {
  20 + let view = UIView.init()
  21 + view.backgroundColor = HexColor("#010101")
  22 + return view
  23 + }()
  24 +
  25 + lazy var closeButton: UIButton = {
  26 + let button = UIButton(type: .custom)
  27 + button.setImage(UIImage(named: "short_video_close"), for: .normal)
  28 + button.backgroundColor = .clear
  29 + button.addTarget(self, action: #selector(closeMethod), for: .touchUpInside)
  30 + return button
  31 + }()
  32 +
  33 + lazy var titleLabel: UILabel = {
  34 + let label = UILabel()
  35 + label.textColor = UIColor.white
  36 + label.font = semibold_adapt_font(pointSize: 19)
  37 + label.textAlignment = .left
  38 + label.numberOfLines = 1
  39 + label.lineBreakMode = .byTruncatingTail
  40 + label.text = "爱得供养"
  41 + return label
  42 + }()
  43 +
  44 + lazy var lineLabel: UILabel = {
  45 + let lineLabel = UILabel.init()
  46 + lineLabel.backgroundColor = HexColor("#686868")
  47 + return lineLabel
  48 + }()
  49 +
  50 + let kVideoContentListViewCellIdentifier = "kVideoContentListViewCellIdentifier"
  51 + lazy var tableView : UITableView = {
  52 + let tableView = UITableView(frame: .zero, style: .plain)
  53 + tableView.dataSource = self
  54 + tableView.delegate = self
  55 + tableView.rowHeight = 90
  56 + tableView.estimatedRowHeight = 90
  57 + tableView.estimatedSectionFooterHeight = 0
  58 + tableView.estimatedSectionHeaderHeight = 0
  59 + tableView.backgroundColor = HexColor("#010101")
  60 + tableView.tableFooterView = UIView.init()
  61 + tableView.separatorStyle = .none
  62 + tableView.scrollsToTop = false
  63 + tableView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: get_system_tabbar_ui_offsetHeight(), right: 0)
  64 + tableView.contentInsetAdjustmentBehavior = .never;
  65 + tableView.register(CNLiveShortVideoContentListTableViewCell.self, forCellReuseIdentifier: kVideoContentListViewCellIdentifier)
  66 + return tableView
  67 + }()
  68 +
  69 + lazy var dataSource: NSMutableArray = {
  70 + let array = NSMutableArray()
  71 + return array
  72 + }()
  73 +
  74 + var resultBlock: CloseVideoListResultBlock!
  75 +
  76 + override init(frame: CGRect) {
  77 + super.init(frame: frame)
  78 +
  79 + addSubview(grayMaskView)
  80 + grayMaskView.snp.makeConstraints { make in
  81 + make.edges.equalToSuperview()
  82 + }
  83 +
  84 + grayMaskView.addSubview(contentView)
  85 + contentView.snp.makeConstraints { make in
  86 + make.top.equalTo(250)
  87 + make.right.left.bottom.equalToSuperview()
  88 + }
  89 + contentView.addSubview(closeButton)
  90 + closeButton.snp.makeConstraints { make in
  91 + make.right.equalToSuperview().offset(-15)
  92 + make.top.equalToSuperview().offset(15)
  93 + make.size.equalTo(30)
  94 + }
  95 + contentView.addSubview(titleLabel)
  96 + titleLabel.snp.makeConstraints { make in
  97 + make.top.left.equalToSuperview().offset(20)
  98 + make.right.equalTo(closeButton.snp.left).offset(-10)
  99 + }
  100 + contentView.addSubview(lineLabel)
  101 + lineLabel.snp.makeConstraints { make in
  102 + make.top.equalTo(closeButton.snp.bottom).offset(15)
  103 + make.centerX.equalToSuperview()
  104 + make.left.equalToSuperview().offset(10)
  105 + make.right.equalToSuperview().offset(-10)
  106 + make.height.equalTo(1)
  107 + }
  108 + contentView.addSubview(tableView)
  109 + tableView.snp.makeConstraints { make in
  110 + make.bottom.left.right.equalToSuperview()
  111 + make.top.equalTo(lineLabel.snp.bottom).offset(10)
  112 + }
  113 + }
  114 +
  115 + func setupWithDataSource(title: String,dataArray: NSMutableArray) {
  116 + dataSource = dataArray
  117 + titleLabel.text = title
  118 + self.tableView.reloadData()
  119 + }
  120 +
  121 + required init?(coder: NSCoder) {
  122 + fatalError("init(coder:) has not been implemented")
  123 + }
  124 +
  125 + deinit {
  126 + print("弹出界面销毁")
  127 + }
  128 +
  129 + @objc func closeMethod() {
  130 + removeFromSuperview()
  131 + }
  132 +
  133 + static public func showVideoContentListView(title: String,dataArray: NSMutableArray,result: @escaping CloseVideoListResultBlock) {
  134 +
  135 + let pickerView = CNLiveShortVideoContentListView.init(frame: CGRect.zero)
  136 + pickerView.resultBlock = result
  137 + pickerView.setupWithDataSource(title: title,dataArray: dataArray)
  138 +
  139 + let delegate = UIApplication.shared.delegate as! AppDelegate
  140 + delegate.window?.addSubview(pickerView)
  141 + pickerView.snp.makeConstraints { make in
  142 + make.edges.equalToSuperview()
  143 + }
  144 + delegate.window?.layoutIfNeeded()
  145 + pickerView.alpha = 0
  146 + UIView.animate(withDuration: 0.1) {
  147 + pickerView.alpha = 1
  148 + } completion: { _ in}
  149 + }
  150 +
  151 +}
  152 +
  153 +extension CNLiveShortVideoContentListView {
  154 + func numberOfSections(in tableView: UITableView) -> Int {
  155 + return 1
  156 + }
  157 + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  158 + return dataSource.count
  159 + }
  160 + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  161 + guard let cell = tableView.dequeueReusableCell(withIdentifier: kVideoContentListViewCellIdentifier) as? CNLiveShortVideoContentListTableViewCell else {
  162 + return CNLiveShortVideoContentListTableViewCell()
  163 + }
  164 + cell.setupWithDataModel(listModel: dataSource[indexPath.row] as! CNLiveAlbumListModel)
  165 + return cell
  166 + }
  167 + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  168 + self.resultBlock(dataSource[indexPath.row] as! CNLiveAlbumListModel)
  169 + closeMethod()
  170 + }
  171 +}
  172 +
  173 +class CNLiveShortVideoContentListTableViewCell: UITableViewCell {
  174 +
  175 + lazy var iconView: UIImageView = {
  176 + let imageView = UIImageView.init()
  177 + imageView.image = UIImage(named: "short_video_default")
  178 + imageView.contentMode = .scaleAspectFill
  179 + imageView.layer.cornerRadius = 5
  180 + imageView.layer.masksToBounds = true
  181 + imageView.clipsToBounds = true
  182 + return imageView
  183 + }()
  184 +
  185 + lazy var titleLabel: UILabel = {
  186 + let titleLabel = UILabel.init()
  187 + titleLabel.textColor = .white
  188 + titleLabel.lineBreakMode = .byTruncatingTail
  189 + titleLabel.numberOfLines = 2
  190 + titleLabel.font = medium_adapt_font(pointSize: 12)
  191 + return titleLabel
  192 + }()
  193 +
  194 + lazy var timeLabel: UILabel = {
  195 + let timeLabel = UILabel.init()
  196 + timeLabel.textColor = .white
  197 + timeLabel.font = light_adapt_font(pointSize: 13)
  198 + return timeLabel
  199 + }()
  200 +
  201 + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
  202 + super.init(style: style, reuseIdentifier: reuseIdentifier)
  203 + contentView.backgroundColor = .clear
  204 + backgroundColor = .clear
  205 + selectionStyle = .none
  206 +
  207 +
  208 + contentView.addSubview(iconView)
  209 + iconView.snp.makeConstraints { make in
  210 + make.left.top.equalToSuperview().offset(20)
  211 + make.width.equalTo(50)
  212 + make.height.equalTo(70)
  213 + }
  214 + contentView.addSubview(titleLabel)
  215 + titleLabel.snp.makeConstraints { make in
  216 + make.left.equalTo(iconView.snp.right).offset(10)
  217 + make.top.equalToSuperview().offset(20)
  218 + make.right.equalToSuperview().offset(-20)
  219 + }
  220 + contentView.addSubview(timeLabel)
  221 + timeLabel.snp.makeConstraints { make in
  222 + make.left.equalTo(iconView.snp.right).offset(10)
  223 + make.bottom.equalTo(iconView.snp.bottom)
  224 + make.right.equalToSuperview().offset(-20)
  225 + }
  226 + }
  227 +
  228 + func setupWithDataModel(listModel: CNLiveAlbumListModel) {
  229 + iconView.kf.indicatorType = .activity
  230 + iconView.kf.setImage(with: URL(string: listModel.poster), placeholder: UIImage(named: "short_video_default"))
  231 + let paragraphStyle = NSMutableParagraphStyle()
  232 + paragraphStyle.lineSpacing = 6
  233 + titleLabel.attributedText = NSAttributedString(string: listModel.title, attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle, ])
  234 + timeLabel.text = listModel.duration
  235 + }
  236 +
  237 + required init?(coder: NSCoder) {
  238 + fatalError("init(coder:) has not been implemented")
  239 + }
  240 +}
... ...
metaCode/Classes/Main/VideoPage/View/CNLiveShortVideoControlView.swift 0 → 100644
  1 +//
  2 +// CNLiveShortVideoControlView.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2024/1/5.
  6 +//
  7 +
  8 +import Foundation
  9 +import ZFPlayer
  10 +import Kingfisher
  11 +class CNLiveShortVideoControlView: UIView, ZFPlayerMediaControl {
  12 +
  13 + weak var player: ZFPlayerController?
  14 +
  15 + lazy var playBtn: UIButton = {
  16 + let button = UIButton(type: .custom)
  17 + button.isUserInteractionEnabled = false
  18 + button.setImage(UIImage(named: "short_video_play"), for: .normal)
  19 + return button
  20 + }()
  21 +
  22 + lazy var sliderView: ZFSliderView = {
  23 + let sliderView = ZFSliderView()
  24 + sliderView.maximumTrackTintColor = UIColor(red: 1, green: 1, blue: 1, alpha: 0.2)
  25 + sliderView.minimumTrackTintColor = UIColor.white
  26 + sliderView.bufferTrackTintColor = UIColor.lightGray
  27 + sliderView.sliderHeight = 1
  28 + sliderView.isHideSliderBlock = false
  29 + return sliderView
  30 + }()
  31 +
  32 +
  33 + override init(frame: CGRect) {
  34 + super.init(frame: frame)
  35 + addSubview(playBtn)
  36 + addSubview(sliderView)
  37 + }
  38 +
  39 + deinit {
  40 + print("控制界面销毁了")
  41 + }
  42 +
  43 + override func layoutSubviews() {
  44 + super.layoutSubviews()
  45 + var min_x: CGFloat = 0
  46 + var min_y: CGFloat = 0
  47 + var min_w: CGFloat = 0
  48 + var min_h: CGFloat = 0
  49 + let min_view_w = self.zf_width
  50 + let min_view_h = self.zf_height
  51 +
  52 + min_w = 100
  53 + min_h = 100
  54 + self.playBtn.frame = CGRect(x: min_x, y: min_y, width: min_w, height: min_h)
  55 + self.playBtn.center = self.center
  56 +
  57 + min_x = 20
  58 + min_y = min_view_h - (60 + get_system_tabbar_ui_offsetHeight())
  59 + min_w = min_view_w - 40
  60 + min_h = 1
  61 + self.sliderView.frame = CGRect(x: min_x, y: min_y, width: min_w, height: min_h)
  62 + }
  63 +
  64 + public func resetControlView() {
  65 + self.playBtn.isHidden = true
  66 + self.sliderView.value = 0
  67 + self.sliderView.bufferValue = 0
  68 + }
  69 +
  70 + required init?(coder: NSCoder) {
  71 + fatalError("init(coder:) has not been implemented")
  72 + }
  73 +
  74 + func videoPlayer(_ videoPlayer: ZFPlayerController, loadStateChanged state: ZFPlayerLoadState) {
  75 + if (state == .stalled || state == .prepare) && videoPlayer.currentPlayerManager.isPlaying {
  76 + self.sliderView.startAnimating()
  77 + } else {
  78 + self.sliderView.stopAnimating()
  79 + }
  80 + }
  81 +
  82 + func videoPlayer(_ videoPlayer: ZFPlayerController, currentTime: TimeInterval, totalTime: TimeInterval) {
  83 + self.sliderView.value = videoPlayer.progress
  84 + }
  85 +
  86 + func videoPlayer(_ videoPlayer: ZFPlayerController, bufferTime: TimeInterval) {
  87 + self.sliderView.bufferValue = videoPlayer.bufferProgress
  88 + }
  89 +
  90 + func gestureSingleTapped(_ gestureControl: ZFPlayerGestureControl) {
  91 + if (self.player?.currentPlayerManager.isPlaying == true) {
  92 + self.player?.currentPlayerManager.pause()
  93 + self.playBtn.isHidden = false
  94 + self.playBtn.transform = CGAffineTransform(scaleX: 1.5, y: 1.5)
  95 + UIView.animate(withDuration: 0.2, delay: 0, options: .curveEaseIn, animations: { [weak self] in
  96 + guard let self = self else { return }
  97 + self.playBtn.transform = .identity
  98 + }, completion: nil)
  99 + } else {
  100 + self.player?.currentPlayerManager.play()
  101 + self.playBtn.isHidden = true
  102 + }
  103 + }
  104 +
  105 + func showCoverView(withUrl coverUrl: String) {
  106 + self.player?.currentPlayerManager.view.coverImageView.kf.setImage(with: URL(string: coverUrl), placeholder: UIImage.imageWithColor(color: UIColor.black, size: UIScreen.main.bounds.size))
  107 + }
  108 +}
... ...
metaCode/Classes/Main/VideoPage/View/CNLiveShortVideoListTableViewCell.swift 0 → 100644
  1 +//
  2 +// CNLiveShortVideoListTableViewCell.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2024/1/5.
  6 +//
  7 +
  8 +import Foundation
  9 +import ZFPlayer
  10 +import Kingfisher
  11 +import APButton
  12 +
  13 +protocol CNLiveShortVideoListTableViewCellDelegate : AnyObject {
  14 + func likeActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton)
  15 + func commentActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton)
  16 + func shareActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton)
  17 + func iconActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton)
  18 + func faviActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton)
  19 + func listActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton)
  20 + func payActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton)
  21 +}
  22 +
  23 +class CNLiveShortVideoListTableViewCell: UITableViewCell {
  24 +
  25 + lazy var titleLabel: UILabel = {
  26 + let label = UILabel()
  27 + label.textColor = UIColor.white
  28 + label.font = semibold_adapt_font(pointSize: 19)
  29 + label.textAlignment = .left
  30 + label.numberOfLines = 1
  31 + label.lineBreakMode = .byTruncatingTail
  32 + return label
  33 + }()
  34 +
  35 + lazy var descLabel: UILabel = {
  36 + let label = UILabel()
  37 + label.textColor = UIColor.white
  38 + label.font = regular_adapt_font(pointSize: 15)
  39 + label.textAlignment = .left
  40 + label.numberOfLines = 3
  41 + label.lineBreakMode = .byTruncatingTail
  42 + return label
  43 + }()
  44 +
  45 + lazy var tipsLabel: UILabel = {
  46 + let label = UILabel()
  47 + label.textColor = UIColor.white
  48 + label.font = semibold_adapt_font(pointSize: 15)
  49 + label.textAlignment = .center
  50 + label.numberOfLines = 0
  51 + label.isHidden = true
  52 + return label
  53 + }()
  54 +
  55 + lazy var listBtn: UIButton = {
  56 + let button = UIButton(type: .custom)
  57 + button.setTitleColor(.white, for: .normal)
  58 + button.contentHorizontalAlignment = .left
  59 + button.contentEdgeInsets = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 0)
  60 + button.titleLabel?.textAlignment = .left
  61 + button.titleLabel?.lineBreakMode = .byTruncatingTail
  62 + button.titleLabel?.font = semibold_adapt_font(pointSize: 15)
  63 + button.layer.cornerRadius = 10
  64 + button.layer.masksToBounds = true
  65 + button.backgroundColor = HexColor("#414141")
  66 + button.addTarget(self, action: #selector(listMethod), for: .touchUpInside)
  67 + return button
  68 + }()
  69 +
  70 + lazy var iconBtn: UIButton = {
  71 + let button = UIButton(type: .custom)
  72 + button.setImage(UIImage(named: "mine_sub_about_app_logo"), for: .normal)
  73 + button.layer.cornerRadius = 25
  74 + button.layer.masksToBounds = true
  75 + button.layer.borderColor = UIColor.white.cgColor
  76 + button.layer.borderWidth = 1
  77 + button.backgroundColor = .clear
  78 + button.addTarget(self, action: #selector(iconMothod), for: .touchUpInside)
  79 + return button
  80 + }()
  81 +
  82 + lazy var faviBtn: APButton = {
  83 + let button = APButton()
  84 + button.setImage(UIImage(named: "short_video_guan_zhu"), for: .normal)
  85 + button.layer.cornerRadius = 10
  86 + button.layer.masksToBounds = true
  87 + button.backgroundColor = .clear
  88 + button.activityIndicator.color = .white
  89 + button.addTarget(self, action: #selector(faviMothod), for: .touchUpInside)
  90 + return button
  91 + }()
  92 +
  93 + lazy var topBtn: UIButton = {
  94 + let button = UIButton(type: .custom)
  95 + button.setImage(UIImage(named: "short_video_to_top"), for: .normal)
  96 + button.backgroundColor = .clear
  97 + button.isUserInteractionEnabled = false
  98 + return button
  99 + }()
  100 +
  101 + lazy var likeBtn: ImageButton = {
  102 + let button = ImageButton(type: .custom)
  103 + button.setImage(UIImage(named: "short_video_zan_nomal"), for: .normal)
  104 + button.setImage(UIImage(named: "short_video_zan_select"), for: .selected)
  105 + button.setTitle("22.8w", for: .normal)
  106 + button.setTitleColor(.white, for: .normal)
  107 + button.titleLabel?.font = light_adapt_font(pointSize: 15)
  108 + button.addTarget(self, action: #selector(likeMothod), for: .touchUpInside)
  109 + return button
  110 + }()
  111 +
  112 + lazy var commentBtn: ImageButton = {
  113 + let button = ImageButton(type: .custom)
  114 + button.setImage(UIImage(named: "short_video_comment"), for: .normal)
  115 + button.setTitle("232.8w", for: .normal)
  116 + button.setTitleColor(.white, for: .normal)
  117 + button.titleLabel?.font = light_adapt_font(pointSize: 15)
  118 + button.addTarget(self, action: #selector(commentMothod), for: .touchUpInside)
  119 + return button
  120 + }()
  121 +
  122 + lazy var shareBtn: ImageButton = {
  123 + let button = ImageButton(type: .custom)
  124 + button.setImage(UIImage(named: "short_video_share"), for: .normal)
  125 + button.setTitle("0.8w", for: .normal)
  126 + button.setTitleColor(.white, for: .normal)
  127 + button.titleLabel?.font = light_adapt_font(pointSize: 15)
  128 + button.addTarget(self, action: #selector(shareMothod), for: .touchUpInside)
  129 + return button
  130 + }()
  131 +
  132 + lazy var payView: UIView = {
  133 + let payView = setupWithPayView()
  134 + payView.isHidden = true
  135 + return payView
  136 + }()
  137 +
  138 + //控制器承载图
  139 + lazy var coverImageView: UIImageView = {
  140 + let coverImageView = UIImageView()
  141 + coverImageView.isUserInteractionEnabled = true
  142 + coverImageView.tag = 100
  143 + coverImageView.contentMode = .scaleAspectFit
  144 + coverImageView.image = UIImage(named: "short_video_default")
  145 + return coverImageView
  146 + }()
  147 +
  148 + var homeModel: CNLiveAlbumListModel!
  149 + weak var delegate: CNLiveShortVideoListTableViewCellDelegate!
  150 +
  151 + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
  152 + super.init(style: style, reuseIdentifier: reuseIdentifier)
  153 + contentView.backgroundColor = .clear
  154 + backgroundColor = .clear
  155 + selectionStyle = .none
  156 +
  157 + contentView.addSubview(coverImageView)
  158 + contentView.addSubview(shareBtn)
  159 + contentView.addSubview(commentBtn)
  160 + contentView.addSubview(likeBtn)
  161 + contentView.addSubview(iconBtn)
  162 + contentView.addSubview(faviBtn)
  163 + contentView.addSubview(descLabel)
  164 + contentView.addSubview(titleLabel)
  165 + contentView.addSubview(listBtn)
  166 + listBtn.addSubview(topBtn)
  167 + contentView.addSubview(tipsLabel)
  168 + contentView.addSubview(payView)
  169 + }
  170 +
  171 + func setupWithData(model: CNLiveAlbumListModel) {
  172 + homeModel = model
  173 + coverImageView.kf.indicatorType = .activity
  174 + coverImageView.kf.setImage(with: URL(string: model.poster), placeholder: UIImage(named: "short_video_default"))
  175 + iconBtn.kf.setImage(with: URL(string: model.icon!.face), for: .normal)
  176 + likeBtn.setTitle(model.tool?.likesNum, for: .normal)
  177 + commentBtn.setTitle(model.tool?.commentsNum, for: .normal)
  178 + shareBtn.setTitle(model.tool?.shareNum, for: .normal)
  179 + likeBtn.isSelected = model.tool!.liked
  180 + titleLabel.text = model.shortTitle
  181 + descLabel.text = model.title
  182 + listBtn.setTitle(model.albumMsgModel?.albumName, for: .normal)
  183 +
  184 + let imageV: UIImageView = payView.viewWithTag(1000) as! UIImageView
  185 + imageV.kf.indicatorType = .activity
  186 + imageV.kf.setImage(with: URL(string: model.poster))
  187 + let titleL: UILabel = payView.viewWithTag(1001) as! UILabel
  188 + titleL.text = model.title
  189 + let timeL: UILabel = payView.viewWithTag(1002) as! UILabel
  190 + timeL.text = model.duration
  191 + }
  192 +
  193 + override func layoutSubviews() {
  194 + super.layoutSubviews()
  195 + coverImageView.frame = contentView.bounds
  196 + shareBtn.snp.makeConstraints { [weak self] make in
  197 + guard let self = self else { return }
  198 + make.bottom.equalTo(self.snp.bottom).offset(-(70 + get_system_tabbar_ui_offsetHeight()))
  199 + make.right.equalTo(self.snp.right).offset(-20)
  200 + make.width.equalTo(55)
  201 + make.height.equalTo(50)
  202 + }
  203 + commentBtn.snp.makeConstraints { [weak self] make in
  204 + guard let self = self else { return }
  205 + make.bottom.equalTo(shareBtn.snp.top).offset(-20)
  206 + make.right.equalTo(self.snp.right).offset(-20)
  207 + make.width.equalTo(55)
  208 + make.height.equalTo(50)
  209 + }
  210 + likeBtn.snp.makeConstraints { [weak self] make in
  211 + guard let self = self else { return }
  212 + make.bottom.equalTo(commentBtn.snp.top).offset(-20)
  213 + make.right.equalTo(self.snp.right).offset(-20)
  214 + make.width.equalTo(55)
  215 + make.height.equalTo(50)
  216 + }
  217 + iconBtn.snp.makeConstraints { [weak self] make in
  218 + guard let self = self else { return }
  219 + make.bottom.equalTo(likeBtn.snp.top).offset(-20)
  220 + make.right.equalTo(self.snp.right).offset(-20)
  221 + make.width.height.equalTo(50)
  222 + }
  223 + faviBtn.snp.makeConstraints { [weak self] make in
  224 + guard let self = self else { return }
  225 + make.centerX.equalTo(self.iconBtn)
  226 + make.bottom.equalTo(self.iconBtn).offset(10)
  227 + make.height.width.equalTo(20)
  228 + }
  229 + descLabel.snp.makeConstraints {[weak self] make in
  230 + guard let self = self else { return }
  231 + make.bottom.equalTo(self.snp.bottom).offset(-(70 + get_system_tabbar_ui_offsetHeight()))
  232 + make.left.equalTo(self.snp.left).offset(20)
  233 + make.right.equalTo(shareBtn.snp.left).offset(-10)
  234 + }
  235 + titleLabel.snp.makeConstraints { [weak self] make in
  236 + guard let self = self else { return }
  237 + make.bottom.equalTo(descLabel.snp.top).offset(-10)
  238 + make.left.equalTo(self.snp.left).offset(20)
  239 + make.right.equalTo(shareBtn.snp.left).offset(-10)
  240 + }
  241 + listBtn.snp.makeConstraints { make in
  242 + make.centerX.equalToSuperview()
  243 + make.top.equalTo(descLabel.snp.bottom).offset(20)
  244 + make.left.equalToSuperview().offset(20)
  245 + make.right.equalToSuperview().offset(-20)
  246 + make.bottom.equalToSuperview().offset(-get_system_tabbar_ui_offsetHeight())
  247 + }
  248 + topBtn.snp.makeConstraints { make in
  249 + make.centerY.equalToSuperview()
  250 + make.right.equalToSuperview().offset(-15)
  251 + }
  252 + tipsLabel.snp.makeConstraints { make in
  253 + make.centerX.equalToSuperview()
  254 + make.centerY.equalToSuperview().offset(-30)
  255 + }
  256 + payView.snp.makeConstraints { make in
  257 + make.centerX.equalToSuperview()
  258 + make.left.equalToSuperview().offset(20)
  259 + make.right.equalToSuperview().offset(-20)
  260 + make.bottom.equalTo(listBtn.snp.top).offset(-10)
  261 + make.height.equalTo(165)
  262 + }
  263 + }
  264 +
  265 + open func hiddenView(isHidden: Bool) {
  266 + if (isHidden) {
  267 + self.commentBtn.isHidden = true
  268 + self.faviBtn.isHidden = true
  269 + self.shareBtn.isHidden = true
  270 + self.likeBtn.isHidden = true
  271 + self.iconBtn.isHidden = true
  272 + self.titleLabel.isHidden = true
  273 + self.descLabel.isHidden = true
  274 + self.tipsLabel.isHidden = false
  275 + self.payView.isHidden = false
  276 + } else {
  277 + self.commentBtn.isHidden = false
  278 + self.faviBtn.isHidden = false
  279 + self.shareBtn.isHidden = false
  280 + self.likeBtn.isHidden = false
  281 + self.iconBtn.isHidden = false
  282 + self.titleLabel.isHidden = false
  283 + self.descLabel.isHidden = false
  284 + self.tipsLabel.isHidden = true
  285 + self.payView.isHidden = true
  286 + }
  287 + }
  288 +
  289 + @objc func likeMothod(button: UIButton) {
  290 + self.delegate.likeActionMethod(viewcell: self, button: button)
  291 + }
  292 +
  293 + @objc func commentMothod(button: UIButton) {
  294 + self.delegate.commentActionMethod(viewcell: self, button: button)
  295 + }
  296 +
  297 + @objc func shareMothod(button: UIButton) {
  298 + self.delegate.shareActionMethod(viewcell: self, button: button)
  299 + }
  300 +
  301 + @objc func iconMothod(button: UIButton) {
  302 + self.delegate.iconActionMethod(viewcell: self, button: button)
  303 + }
  304 +
  305 + @objc func faviMothod(button: UIButton) {
  306 + self.delegate.faviActionMethod(viewcell: self, button: button)
  307 + }
  308 +
  309 + @objc func listMethod(button: UIButton) {
  310 + self.delegate.listActionMethod(viewcell: self, button: button)
  311 + }
  312 +
  313 + @objc func payMethod(button: UIButton) {
  314 + self.delegate.payActionMethod(viewcell: self, button: button)
  315 + }
  316 +
  317 + required init?(coder: NSCoder) {
  318 + fatalError("init(coder:) has not been implemented")
  319 + }
  320 +
  321 + deinit {
  322 + print("cell界面销毁了")
  323 + }
  324 +
  325 +}
  326 +
  327 +extension CNLiveShortVideoListTableViewCell {
  328 +
  329 + private func setupWithPayView() -> UIView {
  330 + let view = UIView.init()
  331 + view.backgroundColor = HexColor("#414141")
  332 + view.layer.cornerRadius = 10
  333 + view.layer.masksToBounds = true
  334 +
  335 + let imageView = UIImageView.init()
  336 + imageView.contentMode = .scaleAspectFill
  337 + imageView.layer.cornerRadius = 5
  338 + imageView.layer.masksToBounds = true
  339 + imageView.clipsToBounds = true
  340 + imageView.tag = 1000
  341 + view.addSubview(imageView)
  342 + imageView.snp.makeConstraints { make in
  343 + make.left.top.equalToSuperview().offset(20)
  344 + make.width.equalTo(50)
  345 + make.height.equalTo(70)
  346 + }
  347 +
  348 + let titleLabel = UILabel.init()
  349 + titleLabel.textColor = .white
  350 + titleLabel.lineBreakMode = .byTruncatingTail
  351 + titleLabel.numberOfLines = 2
  352 + titleLabel.tag = 1001
  353 + titleLabel.font = medium_adapt_font(pointSize: 12)
  354 + view.addSubview(titleLabel)
  355 + titleLabel.snp.makeConstraints { make in
  356 + make.left.equalTo(imageView.snp.right).offset(10)
  357 + make.top.equalToSuperview().offset(20)
  358 + make.right.equalToSuperview().offset(-20)
  359 + }
  360 +
  361 + let timeLabel = UILabel.init()
  362 + timeLabel.textColor = .white
  363 + timeLabel.tag = 1002
  364 + timeLabel.font = light_adapt_font(pointSize: 13)
  365 + view.addSubview(timeLabel)
  366 + timeLabel.snp.makeConstraints { make in
  367 + make.left.equalTo(imageView.snp.right).offset(10)
  368 + make.bottom.equalTo(imageView.snp.bottom)
  369 + make.right.equalToSuperview().offset(-20)
  370 + }
  371 +
  372 + let lineLabel = UILabel.init()
  373 + lineLabel.backgroundColor = HexColor("#686868")
  374 + view.addSubview(lineLabel)
  375 + lineLabel.snp.makeConstraints { make in
  376 + make.left.equalToSuperview().offset(20)
  377 + make.height.equalTo(1)
  378 + make.top.equalTo(imageView.snp.bottom).offset(10)
  379 + make.right.equalToSuperview().offset(-20)
  380 + }
  381 +
  382 + let payButton = APButton()
  383 + payButton.setTitle("840积分解锁全42集", for: .normal)
  384 + payButton.setTitleColor(.white, for: .normal)
  385 + payButton.layer.cornerRadius = 20
  386 + payButton.activityIndicator.color = .white
  387 + payButton.layer.masksToBounds = true
  388 + payButton.viewWithTag(1003)
  389 + payButton.backgroundColor = HexColor("#67C5FF")
  390 + payButton.titleLabel?.font = medium_adapt_font(pointSize: 15)
  391 + payButton.addTarget(self, action: #selector(payMethod), for: .touchUpInside)
  392 + view.addSubview(payButton)
  393 + payButton.snp.makeConstraints { make in
  394 + make.centerX.equalToSuperview()
  395 + make.width.equalTo(200)
  396 + make.height.equalTo(40)
  397 + make.top.equalTo(lineLabel.snp.bottom).offset(10)
  398 + }
  399 + payButton.setGradient(colors: [UIColor(red: 103/255.0, green: 197/255.0, blue: 255/255.0, alpha: 0.3),UIColor(red: 96/255.0, green: 154/255.0, blue: 255/255.0, alpha: 0.3)], startPoint: CGPoint(x: 0, y: 0.5), endPoint: CGPoint(x: 1, y: 0.5))
  400 + return view
  401 + }
  402 +}
  403 +
  404 +class ImageButton: UIButton {
  405 + override func layoutSubviews() {
  406 + super.layoutSubviews()
  407 +
  408 + guard let imageView = self.imageView, let titleLabel = self.titleLabel else {
  409 + return
  410 + }
  411 + let imageRect = CGRect(x: (self.bounds.width - imageView.bounds.width) / 2, y: 0, width: imageView.bounds.width, height: imageView.bounds.height)
  412 + imageView.frame = imageRect
  413 + let titleRect = CGRect(x: 0, y: imageRect.maxY + 3.0, width: self.bounds.width, height: titleLabel.bounds.height)
  414 + titleLabel.frame = titleRect
  415 + titleLabel.textAlignment = .center
  416 + }
  417 + override func setTitle(_ title: String?, for state: UIControl.State) {
  418 + super.setTitle(title, for: state)
  419 + setNeedsLayout()
  420 + }
  421 + override func setImage(_ image: UIImage?, for state: UIControl.State) {
  422 + super.setImage(image, for: state)
  423 + setNeedsLayout()
  424 + }
  425 +}
... ...
metaCode/Classes/Main/VideoPage/ViewModel/CNLiveShortVideoViewModel.swift 0 → 100644
  1 +//
  2 +// CNLiveShortVideoViewModel.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2024/1/8.
  6 +//
  7 +
  8 +import Foundation
  9 +import CNLiveRequestBastKit
  10 +
  11 +typealias resultShortVideoBlock = (_ result: Any,_ respStatue :CNLiveMineResponseType) -> Void
  12 +class CNLiveShortVideoViewModel: NSObject {
  13 +
  14 + /// 获取短视频数据
  15 + /// - Parameters:
  16 + /// - aid: 专辑 id
  17 + /// - reultShortVideoBlock: 返回
  18 + static func requstWithShortVideo(aid: String,page: NSInteger,reultShortVideoBlock: @escaping resultShortVideoBlock) {
  19 + let param = NSMutableDictionary()
  20 + param.setValue(aid, forKey: "aid")
  21 + param.setValue("", forKey: "app_channel_id")
  22 + param.setValue("\(page)", forKey: "page")
  23 + param.setValue("10", forKey: "pageSize")
  24 + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")
  25 + let custom_param = NSMutableDictionary()
  26 + custom_param.setValue(APPId_wjj, forKey: "appId")
  27 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  28 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  29 + CNLiveNetworking.setupShowDataResult(false)
  30 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  31 + CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/ugcApi/albumList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  32 + hiddenLoading()
  33 + if (error == nil) {
  34 + let resp = result as! NSDictionary
  35 + let errorCode = "\(resp["errorCode"] ?? "0")"
  36 + if (errorCode == "0") {
  37 + if resp["data"] is NSNull {
  38 + reultShortVideoBlock(NSNull(), .failed)
  39 + } else {
  40 + CNLiveShortVideoViewModel.requstWithAlbumMsgVideo(aid: aid) { result, respStatue in
  41 + if respStatue == .success {
  42 + let resp_dict = resp["data"] as! NSDictionary
  43 + let array = resp_dict["list"] as! NSArray
  44 + let tempArray = NSMutableArray()
  45 + let tempUrlArray = NSMutableArray()
  46 + for item in array {
  47 + let listModel = dictionaryToModel(item as! [String : Any], CNLiveAlbumListModel.self,"") as! CNLiveAlbumListModel
  48 + listModel.albumMsgModel = result as? CNLiveAlbumMsgModel
  49 + tempArray.add(listModel)
  50 + tempUrlArray.add(listModel.videoUrl as String)
  51 + }
  52 + reultShortVideoBlock([tempArray, resp_dict["hasNextPage"], tempUrlArray], .success)
  53 + } else {
  54 + let resp_dict = resp["data"] as! NSDictionary
  55 + let array = resp_dict["list"] as! NSArray
  56 + let tempArray = NSMutableArray()
  57 + let tempUrlArray = NSMutableArray()
  58 + for item in array {
  59 + let listModel = dictionaryToModel(item as! [String : Any], CNLiveAlbumListModel.self,"") as! CNLiveAlbumListModel
  60 + tempArray.add(listModel)
  61 + tempUrlArray.add(listModel.videoUrl as String)
  62 + }
  63 + reultShortVideoBlock([tempArray, resp_dict["hasNextPage"], tempUrlArray], .success)
  64 + }
  65 + }
  66 + }
  67 + } else {
  68 + showMessage(message: resp["errorMessage"] as! String)
  69 + reultShortVideoBlock(NSNull(),.failed)
  70 + }
  71 + } else {
  72 + if CNLiveNetworking.isNetworking() {
  73 + showMessage(message: "请求失败")
  74 + reultShortVideoBlock(NSNull(),.failed)
  75 + } else {
  76 + showMessage(message: "似乎与网络断开链接")
  77 + reultShortVideoBlock(NSNull(),.noNetwork)
  78 + }
  79 + }
  80 + }
  81 + }
  82 +
  83 + /// 获取专辑信息接口
  84 + /// - Parameters:
  85 + /// - aid: 专辑名称
  86 + /// - reultShortVideoBlock: 返回
  87 + static func requstWithAlbumMsgVideo(aid: String,reultShortVideoBlock: @escaping resultShortVideoBlock) {
  88 + let param = NSMutableDictionary()
  89 + param.setValue(aid, forKey: "aid")
  90 + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")
  91 + let custom_param = NSMutableDictionary()
  92 + custom_param.setValue(APPId_wjj, forKey: "appId")
  93 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  94 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  95 + CNLiveNetworking.setupShowDataResult(false)
  96 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  97 + CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/getAlbumMsg", param: param as! [String : Any], cacheType: .networkOnly) { task, result, error in
  98 + hiddenLoading()
  99 + if (error == nil) {
  100 + let resp = result as! NSDictionary
  101 + let errorCode = "\(resp["errorCode"] ?? "0")"
  102 + if (errorCode == "0") {
  103 + if resp["data"] is NSNull {
  104 + reultShortVideoBlock(NSNull(), .failed)
  105 + } else {
  106 + let listModel = dictionaryToModel(resp["data"] as! [String : Any], CNLiveAlbumMsgModel.self,"") as! CNLiveAlbumMsgModel
  107 + reultShortVideoBlock(listModel, .success)
  108 + }
  109 + } else {
  110 + showMessage(message: resp["errorMessage"] as! String)
  111 + reultShortVideoBlock(NSNull(),.failed)
  112 + }
  113 + } else {
  114 + if CNLiveNetworking.isNetworking() {
  115 + showMessage(message: "请求失败")
  116 + reultShortVideoBlock(NSNull(),.failed)
  117 + } else {
  118 + showMessage(message: "似乎与网络断开链接")
  119 + reultShortVideoBlock(NSNull(),.noNetwork)
  120 + }
  121 + }
  122 + }
  123 + }
  124 +
  125 +
  126 + /// 短视频点赞功能
  127 + /// - Parameters:
  128 + /// - contentId: 点赞内容 id
  129 + /// - contentTitle: 点赞的视频标题
  130 + /// - support: 1:点赞 0:取消点赞
  131 + /// - reultShortVideoBlock: 返回
  132 + static func requestRankWithLike(contentId: String, contentTitle: String, contentSid: String, support: Bool,tagName: String,reultShortVideoBlock: @escaping resultShortVideoBlock) {
  133 + let param = NSMutableDictionary()
  134 + param.setValue(contentId, forKey: "contentId")
  135 + param.setValue(APPId_wjj, forKey: "appId")
  136 + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")
  137 + param.setValue(contentId, forKey: "contentTitle")
  138 + param.setValue(contentSid, forKey: "contentSid")
  139 + param.setValue(support ? "1":"0", forKey: "support")
  140 + param.setValue("false", forKey: "isRank")
  141 + param.setValue("1", forKey: "isUgc")
  142 + param.setValue(tagName, forKey: "contentTag")
  143 + let custom_param = NSMutableDictionary()
  144 + custom_param.setValue(APPId_wjj, forKey: "appId")
  145 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  146 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  147 + CNLiveNetworking.setupShowDataResult(false)
  148 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  149 + CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseTokenUrl+"/support/supportBySpIdForRank/insert", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  150 + hiddenLoading()
  151 + if (error == nil) {
  152 + let resp = result as! NSDictionary
  153 + let errorCode = "\(resp["errorCode"] ?? "0")"
  154 + if (errorCode == "0") {
  155 + reultShortVideoBlock(support ? "取消点赞成功" : "点赞成功", .success)
  156 + } else {
  157 + showMessage(message: resp["errorMessage"] as! String)
  158 + reultShortVideoBlock(NSNull(),.failed)
  159 + }
  160 + } else {
  161 + if CNLiveNetworking.isNetworking() {
  162 + showMessage(message: "请求失败")
  163 + reultShortVideoBlock(NSNull(),.failed)
  164 + } else {
  165 + showMessage(message: "似乎与网络断开链接")
  166 + reultShortVideoBlock(NSNull(),.noNetwork)
  167 + }
  168 + }
  169 + }
  170 + }
  171 +
  172 + //!!!: 评论相关
  173 +
  174 + /// 获取评论列表数
  175 + /// - Parameters:
  176 + /// - pid: 视频 pid
  177 + /// - page: 页数
  178 + /// - reultShortVideoBlock: 返回
  179 + static func requestCommentList(pid: String,page: NSInteger,reultShortVideoBlock: @escaping resultShortVideoBlock) {
  180 + let param = NSMutableDictionary()
  181 + param.setValue(pid, forKey: "topicId")
  182 + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")
  183 + param.setValue("\(page)", forKey: "seqId")
  184 + param.setValue("10", forKey: "count")
  185 + let custom_param = NSMutableDictionary()
  186 + custom_param.setValue(APPId_wjj, forKey: "appId")
  187 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  188 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  189 + CNLiveNetworking.setupShowDataResult(false)
  190 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  191 + CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSClassUrl+"/ugcApi/ugcVideoList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  192 + hiddenLoading()
  193 + if (error == nil) {
  194 + let resp = result as! NSDictionary
  195 + let errorCode = "\(resp["errorCode"] ?? "0")"
  196 + if (errorCode == "0") {
  197 + if resp["data"] is NSNull {
  198 + reultShortVideoBlock(NSNull(), .failed)
  199 + } else {
  200 + let listModel = dictionaryToModel(resp["data"] as! [String : Any], ShortVideoHomeCommentModel.self,"") as! ShortVideoHomeCommentModel
  201 + reultShortVideoBlock(listModel, .success)
  202 + }
  203 + } else {
  204 + showMessage(message: resp["errorMessage"] as! String)
  205 + reultShortVideoBlock(NSNull(),.failed)
  206 + }
  207 + } else {
  208 + if CNLiveNetworking.isNetworking() {
  209 + showMessage(message: "请求失败")
  210 + reultShortVideoBlock(NSNull(),.failed)
  211 + } else {
  212 + showMessage(message: "似乎与网络断开链接")
  213 + reultShortVideoBlock(NSNull(),.noNetwork)
  214 + }
  215 + }
  216 + }
  217 + }
  218 +
  219 + /// 发布评论
  220 + /// - Parameters:
  221 + /// - videoId: 视频 id
  222 + /// - comment: 评论内容
  223 + /// - isAuthor: 是否是作者
  224 + /// - reultShortVideoBlock: 返回
  225 + static func requestCommentWithSend(videoId: String, comment: String, isAuthor: Bool,reultShortVideoBlock: @escaping resultShortVideoBlock) {
  226 + let param = NSMutableDictionary()
  227 + param.setValue(videoId, forKey: "topicId")
  228 + param.setValue(APPId_wjj, forKey: "appId")
  229 + param.setValue(comment, forKey: "comment")
  230 + param.setValue(isAuthor ? "1":"0", forKey: "isAuthor")
  231 + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")
  232 + let custom_param = NSMutableDictionary()
  233 + custom_param.setValue(APPId_wjj, forKey: "appId")
  234 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  235 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  236 + CNLiveNetworking.setupShowDataResult(false)
  237 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  238 + CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseTokenUrl+"/commentServices/commentForUgc/insertComment", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  239 + hiddenLoading()
  240 + if (error == nil) {
  241 + let resp = result as! NSDictionary
  242 + let errorCode = "\(resp["errorCode"] ?? "0")"
  243 + if (errorCode == "0") {
  244 + reultShortVideoBlock("评论成功", .success)
  245 + } else {
  246 + showMessage(message: resp["errorMessage"] as! String)
  247 + reultShortVideoBlock(NSNull(),.failed)
  248 + }
  249 + } else {
  250 + if CNLiveNetworking.isNetworking() {
  251 + showMessage(message: "请求失败")
  252 + reultShortVideoBlock(NSNull(),.failed)
  253 + } else {
  254 + showMessage(message: "似乎与网络断开链接")
  255 + reultShortVideoBlock(NSNull(),.noNetwork)
  256 + }
  257 + }
  258 + }
  259 + }
  260 +
  261 +
  262 + /// 对评论进行回复
  263 + /// - Parameters:
  264 + /// - commentId: 评论 id
  265 + /// - comment: 评论内容
  266 + /// - toSid: 被回复者ID
  267 + /// - fromSid: 回复者ID
  268 + /// - level: 1:一级评论回复 2:二级评论回复
  269 + /// - reultShortVideoBlock: 返回
  270 + static func requestCommentWithReply(commentId: String, comment: String, toSid: String, fromSid: String, level: String,reultShortVideoBlock: @escaping resultShortVideoBlock) {
  271 + let param = NSMutableDictionary()
  272 + param.setValue(commentId, forKey: "commentId")
  273 + param.setValue(APPId_wjj, forKey: "appId")
  274 + param.setValue(comment, forKey: "comment")
  275 + param.setValue(toSid, forKey: "toSid")
  276 + param.setValue(fromSid, forKey: "fromSid")
  277 + param.setValue(level, forKey: "level")
  278 + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")
  279 + let custom_param = NSMutableDictionary()
  280 + custom_param.setValue(APPId_wjj, forKey: "appId")
  281 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  282 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  283 + CNLiveNetworking.setupShowDataResult(false)
  284 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  285 + CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseTokenUrl+"/commentServices/commentForUgc/insertReply", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  286 + hiddenLoading()
  287 + if (error == nil) {
  288 + let resp = result as! NSDictionary
  289 + let errorCode = "\(resp["errorCode"] ?? "0")"
  290 + if (errorCode == "0") {
  291 + reultShortVideoBlock("回复成功", .success)
  292 + } else {
  293 + showMessage(message: resp["errorMessage"] as! String)
  294 + reultShortVideoBlock(NSNull(),.failed)
  295 + }
  296 + } else {
  297 + if CNLiveNetworking.isNetworking() {
  298 + showMessage(message: "请求失败")
  299 + reultShortVideoBlock(NSNull(),.failed)
  300 + } else {
  301 + showMessage(message: "似乎与网络断开链接")
  302 + reultShortVideoBlock(NSNull(),.noNetwork)
  303 + }
  304 + }
  305 + }
  306 + }
  307 +
  308 +
  309 + /// 获取回复数据列表
  310 + /// - Parameters:
  311 + /// - commentId: 评论 id
  312 + /// - page: 页数
  313 + /// - reultShortVideoBlock: 返回
  314 + static func requestcommentWithReplyList(commentId: String,page: NSInteger,reultShortVideoBlock: @escaping resultShortVideoBlock) {
  315 + let param = NSMutableDictionary()
  316 + param.setValue(commentId, forKey: "commentId")
  317 + param.setValue("\(page)", forKey: "seqId")
  318 + param.setValue("10", forKey: "count")
  319 + let custom_param = NSMutableDictionary()
  320 + custom_param.setValue(APPId_wjj, forKey: "appId")
  321 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  322 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  323 + CNLiveNetworking.setupShowDataResult(false)
  324 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  325 + CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseCMSClassUrl+"/commentServices/commentForUgc/loadReplys", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  326 + hiddenLoading()
  327 + if (error == nil) {
  328 + let resp = result as! NSDictionary
  329 + let errorCode = "\(resp["errorCode"] ?? "0")"
  330 + if (errorCode == "0") {
  331 + if resp["data"] is NSNull {
  332 + reultShortVideoBlock(NSNull(), .failed)
  333 + } else {
  334 + let resp_dict = resp["data"] as! NSDictionary
  335 + let resp_reply_dict = resp_dict["replyData"] as! NSDictionary
  336 + let array = resp_reply_dict["replys"] as! NSArray
  337 + let tempArray = NSMutableArray()
  338 + for item in array {
  339 + let listModel = dictionaryToModel(item as! [String : Any], ShortVideoHomeCommentRListItemModel.self,"") as! ShortVideoHomeCommentRListItemModel
  340 + tempArray.add(listModel)
  341 + }
  342 + reultShortVideoBlock(tempArray, .success)
  343 + }
  344 + } else {
  345 + showMessage(message: resp["errorMessage"] as! String)
  346 + reultShortVideoBlock(NSNull(),.failed)
  347 + }
  348 + } else {
  349 + if CNLiveNetworking.isNetworking() {
  350 + showMessage(message: "请求失败")
  351 + reultShortVideoBlock(NSNull(),.failed)
  352 + } else {
  353 + showMessage(message: "似乎与网络断开链接")
  354 + reultShortVideoBlock(NSNull(),.noNetwork)
  355 + }
  356 + }
  357 + }
  358 + }
  359 +
  360 + /// 删除评论
  361 + /// - Parameters:
  362 + /// - videoId: 视频 id
  363 + /// - commentId: 评论 id
  364 + /// - reultShortVideoBlock: 返回
  365 + static func requestCommentDelete(videoId: String, commentId: String, reultShortVideoBlock: @escaping resultShortVideoBlock) {
  366 + let param = NSMutableDictionary()
  367 + param.setValue(commentId, forKey: "commentId")
  368 + param.setValue(APPId_wjj, forKey: "appId")
  369 + param.setValue(videoId, forKey: "topicId")
  370 + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")
  371 + let custom_param = NSMutableDictionary()
  372 + custom_param.setValue(APPId_wjj, forKey: "appId")
  373 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  374 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  375 + CNLiveNetworking.setupShowDataResult(false)
  376 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  377 + CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseTokenUrl+"/commentServices/commentForUgc/deleteComment", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  378 + hiddenLoading()
  379 + if (error == nil) {
  380 + let resp = result as! NSDictionary
  381 + let errorCode = "\(resp["errorCode"] ?? "0")"
  382 + if (errorCode == "0") {
  383 + reultShortVideoBlock("删除成功", .success)
  384 + } else {
  385 + showMessage(message: resp["errorMessage"] as! String)
  386 + reultShortVideoBlock(NSNull(),.failed)
  387 + }
  388 + } else {
  389 + if CNLiveNetworking.isNetworking() {
  390 + showMessage(message: "请求失败")
  391 + reultShortVideoBlock(NSNull(),.failed)
  392 + } else {
  393 + showMessage(message: "似乎与网络断开链接")
  394 + reultShortVideoBlock(NSNull(),.noNetwork)
  395 + }
  396 + }
  397 + }
  398 + }
  399 +
  400 + /// 删除回复
  401 + /// - Parameters:
  402 + /// - replyId: 回复 id
  403 + /// - commentId: 评论 id
  404 + /// - reultShortVideoBlock: 返回
  405 + static func requestCommentReplyDelete(replyId: String, commentId: String, reultShortVideoBlock: @escaping resultShortVideoBlock) {
  406 + let param = NSMutableDictionary()
  407 + param.setValue(commentId, forKey: "commentId")
  408 + param.setValue(APPId_wjj, forKey: "appId")
  409 + param.setValue(replyId, forKey: "replyId")
  410 + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")
  411 + let custom_param = NSMutableDictionary()
  412 + custom_param.setValue(APPId_wjj, forKey: "appId")
  413 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  414 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  415 + CNLiveNetworking.setupShowDataResult(false)
  416 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  417 + CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseTokenUrl+"/commentServices/commentForUgc/deleteReply", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  418 + hiddenLoading()
  419 + if (error == nil) {
  420 + let resp = result as! NSDictionary
  421 + let errorCode = "\(resp["errorCode"] ?? "0")"
  422 + if (errorCode == "0") {
  423 + reultShortVideoBlock("删除成功", .success)
  424 + } else {
  425 + showMessage(message: resp["errorMessage"] as! String)
  426 + reultShortVideoBlock(NSNull(),.failed)
  427 + }
  428 + } else {
  429 + if CNLiveNetworking.isNetworking() {
  430 + showMessage(message: "请求失败")
  431 + reultShortVideoBlock(NSNull(),.failed)
  432 + } else {
  433 + showMessage(message: "似乎与网络断开链接")
  434 + reultShortVideoBlock(NSNull(),.noNetwork)
  435 + }
  436 + }
  437 + }
  438 + }
  439 +
  440 +}
... ...
metaCode/Supporting Files/Assets.xcassets/Shop/DS_coupon_edit_se.imageset/选中@2x.png 0 → 100644

1.26 KB

metaCode/Supporting Files/Assets.xcassets/Shop/DS_coupon_edit_se.imageset/选中@3x.png 0 → 100644

1.96 KB

metaCode/Supporting Files/Assets.xcassets/Video/Contents.json 0 → 100644
  1 +{
  2 + "info" : {
  3 + "author" : "xcode",
  4 + "version" : 1
  5 + }
  6 +}
... ...
metaCode/Supporting Files/Assets.xcassets/Video/short_video_close.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "short_video_close@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "short_video_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/Video/short_video_close.imageset/short_video_close@2x.png 0 → 100644

1.14 KB

metaCode/Supporting Files/Assets.xcassets/Video/short_video_close.imageset/short_video_close@3x.png 0 → 100644

2.1 KB

metaCode/Supporting Files/Assets.xcassets/Video/short_video_comment.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "short_video_comment@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "short_video_comment@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/Video/short_video_comment.imageset/short_video_comment@2x.png 0 → 100644

1.08 KB

metaCode/Supporting Files/Assets.xcassets/Video/short_video_comment.imageset/short_video_comment@3x.png 0 → 100644

1.9 KB

metaCode/Supporting Files/Assets.xcassets/Video/short_video_default.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "short_video_default@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "short_video_default@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/Video/short_video_default.imageset/short_video_default@2x.png 0 → 100644

13.6 KB

metaCode/Supporting Files/Assets.xcassets/Video/short_video_default.imageset/short_video_default@3x.png 0 → 100644

25.6 KB

metaCode/Supporting Files/Assets.xcassets/Video/short_video_guan_zhu.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "short_video_guan_zhu@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "short_video_guan_zhu@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/Video/short_video_guan_zhu.imageset/short_video_guan_zhu@2x.png 0 → 100644

670 Bytes

metaCode/Supporting Files/Assets.xcassets/Video/short_video_guan_zhu.imageset/short_video_guan_zhu@3x.png 0 → 100644

1.11 KB

metaCode/Supporting Files/Assets.xcassets/Video/short_video_play.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "short_video_play@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "short_video_play@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/Video/short_video_play.imageset/short_video_play@2x.png 0 → 100644

4.58 KB

metaCode/Supporting Files/Assets.xcassets/Video/short_video_play.imageset/short_video_play@3x.png 0 → 100644

9.68 KB

metaCode/Supporting Files/Assets.xcassets/Video/short_video_share.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "short_video_share@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "short_video_share@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/Video/short_video_share.imageset/short_video_share@2x.png 0 → 100644

1.25 KB

metaCode/Supporting Files/Assets.xcassets/Video/short_video_share.imageset/short_video_share@3x.png 0 → 100644

2.32 KB

metaCode/Supporting Files/Assets.xcassets/Video/short_video_to_top.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "short_video_to_top@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "short_video_to_top@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/Video/short_video_to_top.imageset/short_video_to_top@2x.png 0 → 100644

270 Bytes

metaCode/Supporting Files/Assets.xcassets/Video/short_video_to_top.imageset/short_video_to_top@3x.png 0 → 100644

489 Bytes

metaCode/Supporting Files/Assets.xcassets/Video/short_video_zan_nomal.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "short_video_zan_nomal@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "short_video_zan_nomal@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/Video/short_video_zan_nomal.imageset/short_video_zan_nomal@2x.png 0 → 100644

1.2 KB

metaCode/Supporting Files/Assets.xcassets/Video/short_video_zan_nomal.imageset/short_video_zan_nomal@3x.png 0 → 100644

2.15 KB

metaCode/Supporting Files/Assets.xcassets/Video/short_video_zan_select.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "short_video_zan_select@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "short_video_zan_select@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/Video/short_video_zan_select.imageset/short_video_zan_select@2x.png 0 → 100644

1.51 KB

metaCode/Supporting Files/Assets.xcassets/Video/short_video_zan_select.imageset/short_video_zan_select@3x.png 0 → 100644

2.7 KB