Commit 70545b57099670ff242047de91d43efac75101c9
Merge branch 'master' of http://bj.gitlab.cnlive.com/ios-team/CNLiveMateCode
# Conflicts: # Podfile # metaCode.xcodeproj/project.pbxproj # metaCode/Supporting Files/Assets.xcassets/Shop/DS_coupon_edit_se.imageset/Contents.json
Showing
31 changed files
with
3546 additions
and
389 deletions
Too many changes to show.
To preserve performance only 31 of 290 files are displayed.
Podfile
| @@ -56,6 +56,14 @@ target 'metaCode' do | @@ -56,6 +56,14 @@ target 'metaCode' do | ||
| 56 | #分享 | 56 | #分享 |
| 57 | #pod 'CNLiveShareToolKit' | 57 | #pod 'CNLiveShareToolKit' |
| 58 | 58 | ||
| 59 | + #图片浏览器 | ||
| 60 | + pod 'SKPhotoBrowser' | ||
| 61 | + | ||
| 62 | + #视频播放器 | ||
| 63 | + pod 'PLPlayerKit' | ||
| 64 | + #UI框架 | ||
| 65 | + pod 'QMUIKit' | ||
| 66 | + | ||
| 59 | target 'metaCodeTests' do | 67 | target 'metaCodeTests' do |
| 60 | inherit! :search_paths | 68 | inherit! :search_paths |
| 61 | # Pods for testing | 69 | # Pods for testing |
metaCode.xcodeproj/project.pbxproj
| @@ -9,9 +9,87 @@ | @@ -9,9 +9,87 @@ | ||
| 9 | /* Begin PBXBuildFile section */ | 9 | /* Begin PBXBuildFile section */ |
| 10 | 0D39E93D7229931C86EB1161 /* Pods_metaCode_metaCodeUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63D879B49B1E42F1584DD75E /* Pods_metaCode_metaCodeUITests.framework */; }; | 10 | 0D39E93D7229931C86EB1161 /* Pods_metaCode_metaCodeUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63D879B49B1E42F1584DD75E /* Pods_metaCode_metaCodeUITests.framework */; }; |
| 11 | 19123FC12ABC11170075C883 /* CNWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19123FC02ABC11170075C883 /* CNWebViewController.swift */; }; | 11 | 19123FC12ABC11170075C883 /* CNWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19123FC02ABC11170075C883 /* CNWebViewController.swift */; }; |
| 12 | + 1917328E2B032583007BCC04 /* CNLiveRoundedRectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917328D2B032583007BCC04 /* CNLiveRoundedRectView.swift */; }; | ||
| 13 | + 191732902B0348F6007BCC04 /* CNLiveSwitchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917328F2B0348F6007BCC04 /* CNLiveSwitchView.swift */; }; | ||
| 14 | + 191732CE2B04AACD007BCC04 /* CNLiveShopTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732CD2B04AACD007BCC04 /* CNLiveShopTextView.swift */; }; | ||
| 15 | + 191732E32B05F474007BCC04 /* CNLiveShopGoodsManageDetailsInputManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732E22B05F474007BCC04 /* CNLiveShopGoodsManageDetailsInputManager.swift */; }; | ||
| 16 | + 191732E52B05FFE8007BCC04 /* CNLiveModalPresentationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732E42B05FFE8007BCC04 /* CNLiveModalPresentationViewController.swift */; }; | ||
| 17 | + 191732E72B0615C1007BCC04 /* UIScrollView+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732E62B0615C1007BCC04 /* UIScrollView+CNLiveExtensions.swift */; }; | ||
| 18 | + 191732E92B0706B3007BCC04 /* CNLiveShopClassifyCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732E82B0706B3007BCC04 /* CNLiveShopClassifyCell.swift */; }; | ||
| 19 | + 191732EB2B070943007BCC04 /* CNLiveShopGoodsManageDetailsGoodsCategoryModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732EA2B070943007BCC04 /* CNLiveShopGoodsManageDetailsGoodsCategoryModel.swift */; }; | ||
| 20 | + 191732ED2B073C52007BCC04 /* CNLiveShopClassifyListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732EC2B073C52007BCC04 /* CNLiveShopClassifyListModel.swift */; }; | ||
| 21 | + 191732EF2B075C3A007BCC04 /* CNLiveCreateShopClassifyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732EE2B075C3A007BCC04 /* CNLiveCreateShopClassifyViewController.swift */; }; | ||
| 22 | + 191732F12B084822007BCC04 /* CNLiveShopClassifyInputTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732F02B084822007BCC04 /* CNLiveShopClassifyInputTableViewCell.swift */; }; | ||
| 23 | + 191732F32B084DBC007BCC04 /* CNLiveShopClassifySwitchTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732F22B084DBC007BCC04 /* CNLiveShopClassifySwitchTableViewCell.swift */; }; | ||
| 24 | + 191732F52B085BAE007BCC04 /* CNLiveShopClassilyIconTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732F42B085BAE007BCC04 /* CNLiveShopClassilyIconTableViewCell.swift */; }; | ||
| 25 | + 191732F82B08AB9D007BCC04 /* CNLiveShopClassilyViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732F72B08AB9D007BCC04 /* CNLiveShopClassilyViewModel.swift */; }; | ||
| 26 | + 191732FB2B0AF34A007BCC04 /* CNLiveShopGoodsDetailsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732FA2B0AF34A007BCC04 /* CNLiveShopGoodsDetailsModel.swift */; }; | ||
| 27 | + 191732FE2B0B3EBF007BCC04 /* CNLiveShopGoodsDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732FD2B0B3EBF007BCC04 /* CNLiveShopGoodsDetailsViewController.swift */; }; | ||
| 28 | + 191733002B0B58E5007BCC04 /* CNLiveSelectUploadImageModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191732FF2B0B58E5007BCC04 /* CNLiveSelectUploadImageModel.swift */; }; | ||
| 29 | + 191733022B0C4EAB007BCC04 /* CNLiveSelUplSingleImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733012B0C4EAB007BCC04 /* CNLiveSelUplSingleImageView.swift */; }; | ||
| 30 | + 191733042B0F216E007BCC04 /* NSDictionary+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733032B0F216E007BCC04 /* NSDictionary+CNLiveExtensions.swift */; }; | ||
| 31 | + 1917330A2B10864F007BCC04 /* Array+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733092B10864F007BCC04 /* Array+CNLiveExtensions.swift */; }; | ||
| 32 | + 1917330D2B1096AB007BCC04 /* CNLivePlayerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917330C2B1096AB007BCC04 /* CNLivePlayerViewController.swift */; }; | ||
| 33 | + 1917330F2B10989C007BCC04 /* CNLivePlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917330E2B10989C007BCC04 /* CNLivePlayerView.swift */; }; | ||
| 34 | + 191733112B109EDC007BCC04 /* CNLivePlayerControlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733102B109EDC007BCC04 /* CNLivePlayerControlView.swift */; }; | ||
| 35 | + 191733132B109F7B007BCC04 /* CNLivePlayerGestureView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733122B109F7B007BCC04 /* CNLivePlayerGestureView.swift */; }; | ||
| 36 | + 191733152B109FD7007BCC04 /* CNLivePlayerTopNaviView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733142B109FD7007BCC04 /* CNLivePlayerTopNaviView.swift */; }; | ||
| 37 | + 191733172B10A017007BCC04 /* CNLivePlayerBottomNaviView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733162B10A017007BCC04 /* CNLivePlayerBottomNaviView.swift */; }; | ||
| 38 | + 191733192B10A05D007BCC04 /* CNLivePlayerProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733182B10A05D007BCC04 /* CNLivePlayerProgressView.swift */; }; | ||
| 39 | + 1917331B2B10A0EF007BCC04 /* CNLivePlayerLoadingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917331A2B10A0EF007BCC04 /* CNLivePlayerLoadingView.swift */; }; | ||
| 40 | + 1917331D2B10A15A007BCC04 /* CNLivePlayerFailureView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917331C2B10A15A007BCC04 /* CNLivePlayerFailureView.swift */; }; | ||
| 41 | + 1917331F2B10A1BE007BCC04 /* CNLivePlayerEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917331E2B10A1BE007BCC04 /* CNLivePlayerEnum.swift */; }; | ||
| 42 | + 191733212B143F3A007BCC04 /* CNLiveGradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733202B143F3A007BCC04 /* CNLiveGradientView.swift */; }; | ||
| 43 | + 191733232B14601A007BCC04 /* CNLivePlayerProgressSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733222B14601A007BCC04 /* CNLivePlayerProgressSlider.swift */; }; | ||
| 44 | + 191733252B146078007BCC04 /* CNLivePlayerSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733242B146078007BCC04 /* CNLivePlayerSlider.swift */; }; | ||
| 45 | + 191733272B148BB1007BCC04 /* CNLivePlayerFastForwardPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733262B148BB1007BCC04 /* CNLivePlayerFastForwardPreviewView.swift */; }; | ||
| 46 | + 191733292B148BF7007BCC04 /* CNLivePlayerVolumeBrightnessView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733282B148BF7007BCC04 /* CNLivePlayerVolumeBrightnessView.swift */; }; | ||
| 47 | + 1917332B2B15CDC6007BCC04 /* CNLivePlayerLandscapeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917332A2B15CDC6007BCC04 /* CNLivePlayerLandscapeViewController.swift */; }; | ||
| 48 | + 1917332D2B15DB20007BCC04 /* CNLivePlayerKVOModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917332C2B15DB20007BCC04 /* CNLivePlayerKVOModel.swift */; }; | ||
| 49 | + 1917332F2B16C7C9007BCC04 /* CNLiveTimer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917332E2B16C7C9007BCC04 /* CNLiveTimer.swift */; }; | ||
| 50 | + 191733312B170537007BCC04 /* CNLiveCommonManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733302B170537007BCC04 /* CNLiveCommonManager.swift */; }; | ||
| 51 | + 191733362B27EFD4007BCC04 /* CNLiveShopClassilyManageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733352B27EFD3007BCC04 /* CNLiveShopClassilyManageViewController.swift */; }; | ||
| 52 | + 191733382B27FD66007BCC04 /* CNLiveShopClassifySectionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733372B27FD66007BCC04 /* CNLiveShopClassifySectionHeaderView.swift */; }; | ||
| 53 | + 1917333A2B27FDF3007BCC04 /* CNLiveShopClassilyManageTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733392B27FDF3007BCC04 /* CNLiveShopClassilyManageTableViewCell.swift */; }; | ||
| 54 | + 1917333C2B27FE75007BCC04 /* CNLiveShopClassilyManageHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917333B2B27FE75007BCC04 /* CNLiveShopClassilyManageHeaderView.swift */; }; | ||
| 55 | + 1917333F2B284C93007BCC04 /* CNLiveShopCouponCreateViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917333E2B284C93007BCC04 /* CNLiveShopCouponCreateViewController.swift */; }; | ||
| 56 | + 191733422B284D5E007BCC04 /* CNLiveShopCouponCreateBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733412B284D5E007BCC04 /* CNLiveShopCouponCreateBottomView.swift */; }; | ||
| 57 | + 191733452B284DCD007BCC04 /* CNLiveShopCouponListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733442B284DCD007BCC04 /* CNLiveShopCouponListModel.swift */; }; | ||
| 58 | + 191733482B2855E8007BCC04 /* CNLiveShopCouponViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733472B2855E8007BCC04 /* CNLiveShopCouponViewModel.swift */; }; | ||
| 59 | + 1917334A2B2BE746007BCC04 /* CNLiveCreateCouponTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733492B2BE746007BCC04 /* CNLiveCreateCouponTableViewCell.swift */; }; | ||
| 60 | + 1917334C2B2BE9CA007BCC04 /* CNLiveCreateCouponTypeMoneyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917334B2B2BE9CA007BCC04 /* CNLiveCreateCouponTypeMoneyView.swift */; }; | ||
| 61 | + 1917334E2B2C1A08007BCC04 /* CNLiveSelectCouponTapView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917334D2B2C1A08007BCC04 /* CNLiveSelectCouponTapView.swift */; }; | ||
| 62 | + 191733502B2C3E1F007BCC04 /* CNLivePickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917334F2B2C3E1F007BCC04 /* CNLivePickerView.swift */; }; | ||
| 63 | + 191733522B2C4CEA007BCC04 /* CNLivePickerSelectDateTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733512B2C4CEA007BCC04 /* CNLivePickerSelectDateTools.swift */; }; | ||
| 64 | + 191733542B2C4D58007BCC04 /* CNLivePickerToolsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733532B2C4D58007BCC04 /* CNLivePickerToolsView.swift */; }; | ||
| 65 | + 191733562B2FE855007BCC04 /* CNLivePickerReusingModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733552B2FE855007BCC04 /* CNLivePickerReusingModel.swift */; }; | ||
| 66 | + 191733582B319552007BCC04 /* CNLiveCouponGoodsListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733572B319552007BCC04 /* CNLiveCouponGoodsListView.swift */; }; | ||
| 67 | + 1917335A2B3283A1007BCC04 /* CNLiveCouponGoodsSearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733592B3283A1007BCC04 /* CNLiveCouponGoodsSearchView.swift */; }; | ||
| 68 | + 1917335C2B3283FF007BCC04 /* CNLiveCouponGoodsListSearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917335B2B3283FF007BCC04 /* CNLiveCouponGoodsListSearchView.swift */; }; | ||
| 69 | + 1917335E2B328495007BCC04 /* CNLiveCouponListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917335D2B328495007BCC04 /* CNLiveCouponListTableViewCell.swift */; }; | ||
| 70 | + 191733602B352488007BCC04 /* CNLiveCouponGoodsListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1917335F2B352488007BCC04 /* CNLiveCouponGoodsListTableViewCell.swift */; }; | ||
| 71 | + 191733622B3538DC007BCC04 /* CNLiveShopCouponsManagerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733612B3538DC007BCC04 /* CNLiveShopCouponsManagerViewController.swift */; }; | ||
| 72 | + 191733642B392011007BCC04 /* CNLiveShopGoodsSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733632B392011007BCC04 /* CNLiveShopGoodsSearchViewController.swift */; }; | ||
| 73 | + 191733662B39237D007BCC04 /* CNLiveShopGoodsManageListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191733652B39237D007BCC04 /* CNLiveShopGoodsManageListTableViewCell.swift */; }; | ||
| 12 | 192336EB2AD9224300D47CD4 /* CNUpSlideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192336EA2AD9224300D47CD4 /* CNUpSlideViewController.swift */; }; | 74 | 192336EB2AD9224300D47CD4 /* CNUpSlideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192336EA2AD9224300D47CD4 /* CNUpSlideViewController.swift */; }; |
| 13 | 1926C28F2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1926C28E2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift */; }; | 75 | 1926C28F2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1926C28E2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift */; }; |
| 14 | 1926C2912AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1926C2902AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift */; }; | 76 | 1926C2912AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1926C2902AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift */; }; |
| 77 | + 1938BD172B3D6C7F00390A34 /* CNLiveAuthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD162B3D6C7F00390A34 /* CNLiveAuthViewController.swift */; }; | ||
| 78 | + 1938BD202B46799A00390A34 /* CNLivePlayletHomePageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD1F2B46799A00390A34 /* CNLivePlayletHomePageController.swift */; }; | ||
| 79 | + 1938BD222B467C1700390A34 /* CNLivePlayletHomePageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD212B467C1700390A34 /* CNLivePlayletHomePageCell.swift */; }; | ||
| 80 | + 1938BD242B468AC900390A34 /* CNLivePlayletHomePageHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD232B468AC900390A34 /* CNLivePlayletHomePageHeaderCell.swift */; }; | ||
| 81 | + 1938BD262B479D3400390A34 /* UILabel+FormattedText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD252B479D3400390A34 /* UILabel+FormattedText.swift */; }; | ||
| 82 | + 1938BD2A2B48014E00390A34 /* CNHomepageDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD292B48014E00390A34 /* CNHomepageDetailViewController.swift */; }; | ||
| 83 | + 1938BD2C2B4801A700390A34 /* CNHomePageAnimationTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD2B2B4801A700390A34 /* CNHomePageAnimationTransition.swift */; }; | ||
| 84 | + 1938BD2E2B48021E00390A34 /* CNHomePageBaseNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD2D2B48021E00390A34 /* CNHomePageBaseNavigationController.swift */; }; | ||
| 85 | + 1938BD302B4B8A3500390A34 /* CNLiveHomePageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD2F2B4B8A3500390A34 /* CNLiveHomePageViewModel.swift */; }; | ||
| 86 | + 1938BD322B4B8F0400390A34 /* CNLiveHomePageModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD312B4B8F0400390A34 /* CNLiveHomePageModel.swift */; }; | ||
| 87 | + 1938BD342B4B968300390A34 /* CNLiveHomePageDuanJuCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD332B4B968300390A34 /* CNLiveHomePageDuanJuCell.swift */; }; | ||
| 88 | + 1938BD362B4BCC7F00390A34 /* CNLiveAlbumModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD352B4BCC7F00390A34 /* CNLiveAlbumModel.swift */; }; | ||
| 89 | + 1938BD382B4BDC2500390A34 /* CNLiveAlbumImageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD372B4BDC2500390A34 /* CNLiveAlbumImageCell.swift */; }; | ||
| 90 | + 1938BD3D2B4BDD4B00390A34 /* CNLiveAlbumCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD3C2B4BDD4B00390A34 /* CNLiveAlbumCell.swift */; }; | ||
| 91 | + 1938BD3F2B4BE7C500390A34 /* CNLiveAlbumMsgModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD3E2B4BE7C500390A34 /* CNLiveAlbumMsgModel.swift */; }; | ||
| 92 | + 1938BD412B4BEC6900390A34 /* CNLiveAlbumListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD402B4BEC6900390A34 /* CNLiveAlbumListModel.swift */; }; | ||
| 15 | 19565EC02AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */; }; | 93 | 19565EC02AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */; }; |
| 16 | 19565EC22AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */; }; | 94 | 19565EC22AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */; }; |
| 17 | 19565EC52AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EC42AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift */; }; | 95 | 19565EC52AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EC42AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift */; }; |
| @@ -43,6 +121,8 @@ | @@ -43,6 +121,8 @@ | ||
| 43 | 19CC4D542ADD163D00308E2A /* CNUpSlideCardPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */; }; | 121 | 19CC4D542ADD163D00308E2A /* CNUpSlideCardPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */; }; |
| 44 | 19CC4D562ADD19C200308E2A /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D552ADD19C200308E2A /* String+Extension.swift */; }; | 122 | 19CC4D562ADD19C200308E2A /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D552ADD19C200308E2A /* String+Extension.swift */; }; |
| 45 | 19D2CE632AE8B65D00691757 /* CNLiveDownSlideTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19D2CE622AE8B65D00691757 /* CNLiveDownSlideTool.swift */; }; | 123 | 19D2CE632AE8B65D00691757 /* CNLiveDownSlideTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19D2CE622AE8B65D00691757 /* CNLiveDownSlideTool.swift */; }; |
| 124 | + 19E9D1602B3A98C200D0FB30 /* CNLiveShopAssociatedGoodsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19E9D15F2B3A98C200D0FB30 /* CNLiveShopAssociatedGoodsTableViewCell.swift */; }; | ||
| 125 | + 19E9D1622B3BBB2E00D0FB30 /* CNLiveFileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19E9D1612B3BBB2E00D0FB30 /* CNLiveFileManager.swift */; }; | ||
| 46 | 19F1C2332AB5728B0083D06C /* CNIDCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19F1C2322AB5728B0083D06C /* CNIDCardView.swift */; }; | 126 | 19F1C2332AB5728B0083D06C /* CNIDCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19F1C2322AB5728B0083D06C /* CNIDCardView.swift */; }; |
| 47 | 19FA20172AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19FA20162AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift */; }; | 127 | 19FA20172AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19FA20162AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift */; }; |
| 48 | 19FA20192AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19FA20182AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift */; }; | 128 | 19FA20192AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19FA20182AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift */; }; |
| @@ -190,9 +270,87 @@ | @@ -190,9 +270,87 @@ | ||
| 190 | 0EC910AB9EBD717B04432BC4 /* Pods-metaCode-metaCodeUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-metaCode-metaCodeUITests.debug.xcconfig"; path = "Target Support Files/Pods-metaCode-metaCodeUITests/Pods-metaCode-metaCodeUITests.debug.xcconfig"; sourceTree = "<group>"; }; | 270 | 0EC910AB9EBD717B04432BC4 /* Pods-metaCode-metaCodeUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-metaCode-metaCodeUITests.debug.xcconfig"; path = "Target Support Files/Pods-metaCode-metaCodeUITests/Pods-metaCode-metaCodeUITests.debug.xcconfig"; sourceTree = "<group>"; }; |
| 191 | 170BC5D0622EA2969D110A3B /* Pods-metaCode.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-metaCode.release.xcconfig"; path = "Target Support Files/Pods-metaCode/Pods-metaCode.release.xcconfig"; sourceTree = "<group>"; }; | 271 | 170BC5D0622EA2969D110A3B /* Pods-metaCode.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-metaCode.release.xcconfig"; path = "Target Support Files/Pods-metaCode/Pods-metaCode.release.xcconfig"; sourceTree = "<group>"; }; |
| 192 | 19123FC02ABC11170075C883 /* CNWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNWebViewController.swift; sourceTree = "<group>"; }; | 272 | 19123FC02ABC11170075C883 /* CNWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNWebViewController.swift; sourceTree = "<group>"; }; |
| 273 | + 1917328D2B032583007BCC04 /* CNLiveRoundedRectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveRoundedRectView.swift; sourceTree = "<group>"; }; | ||
| 274 | + 1917328F2B0348F6007BCC04 /* CNLiveSwitchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveSwitchView.swift; sourceTree = "<group>"; }; | ||
| 275 | + 191732CD2B04AACD007BCC04 /* CNLiveShopTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopTextView.swift; sourceTree = "<group>"; }; | ||
| 276 | + 191732E22B05F474007BCC04 /* CNLiveShopGoodsManageDetailsInputManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopGoodsManageDetailsInputManager.swift; sourceTree = "<group>"; }; | ||
| 277 | + 191732E42B05FFE8007BCC04 /* CNLiveModalPresentationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveModalPresentationViewController.swift; sourceTree = "<group>"; }; | ||
| 278 | + 191732E62B0615C1007BCC04 /* UIScrollView+CNLiveExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIScrollView+CNLiveExtensions.swift"; sourceTree = "<group>"; }; | ||
| 279 | + 191732E82B0706B3007BCC04 /* CNLiveShopClassifyCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopClassifyCell.swift; sourceTree = "<group>"; }; | ||
| 280 | + 191732EA2B070943007BCC04 /* CNLiveShopGoodsManageDetailsGoodsCategoryModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopGoodsManageDetailsGoodsCategoryModel.swift; sourceTree = "<group>"; }; | ||
| 281 | + 191732EC2B073C52007BCC04 /* CNLiveShopClassifyListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopClassifyListModel.swift; sourceTree = "<group>"; }; | ||
| 282 | + 191732EE2B075C3A007BCC04 /* CNLiveCreateShopClassifyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCreateShopClassifyViewController.swift; sourceTree = "<group>"; }; | ||
| 283 | + 191732F02B084822007BCC04 /* CNLiveShopClassifyInputTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopClassifyInputTableViewCell.swift; sourceTree = "<group>"; }; | ||
| 284 | + 191732F22B084DBC007BCC04 /* CNLiveShopClassifySwitchTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopClassifySwitchTableViewCell.swift; sourceTree = "<group>"; }; | ||
| 285 | + 191732F42B085BAE007BCC04 /* CNLiveShopClassilyIconTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopClassilyIconTableViewCell.swift; sourceTree = "<group>"; }; | ||
| 286 | + 191732F72B08AB9D007BCC04 /* CNLiveShopClassilyViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopClassilyViewModel.swift; sourceTree = "<group>"; }; | ||
| 287 | + 191732FA2B0AF34A007BCC04 /* CNLiveShopGoodsDetailsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopGoodsDetailsModel.swift; sourceTree = "<group>"; }; | ||
| 288 | + 191732FD2B0B3EBF007BCC04 /* CNLiveShopGoodsDetailsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopGoodsDetailsViewController.swift; sourceTree = "<group>"; }; | ||
| 289 | + 191732FF2B0B58E5007BCC04 /* CNLiveSelectUploadImageModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveSelectUploadImageModel.swift; sourceTree = "<group>"; }; | ||
| 290 | + 191733012B0C4EAB007BCC04 /* CNLiveSelUplSingleImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveSelUplSingleImageView.swift; sourceTree = "<group>"; }; | ||
| 291 | + 191733032B0F216E007BCC04 /* NSDictionary+CNLiveExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSDictionary+CNLiveExtensions.swift"; sourceTree = "<group>"; }; | ||
| 292 | + 191733092B10864F007BCC04 /* Array+CNLiveExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+CNLiveExtensions.swift"; sourceTree = "<group>"; }; | ||
| 293 | + 1917330C2B1096AB007BCC04 /* CNLivePlayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerViewController.swift; sourceTree = "<group>"; }; | ||
| 294 | + 1917330E2B10989C007BCC04 /* CNLivePlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerView.swift; sourceTree = "<group>"; }; | ||
| 295 | + 191733102B109EDC007BCC04 /* CNLivePlayerControlView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerControlView.swift; sourceTree = "<group>"; }; | ||
| 296 | + 191733122B109F7B007BCC04 /* CNLivePlayerGestureView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerGestureView.swift; sourceTree = "<group>"; }; | ||
| 297 | + 191733142B109FD7007BCC04 /* CNLivePlayerTopNaviView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerTopNaviView.swift; sourceTree = "<group>"; }; | ||
| 298 | + 191733162B10A017007BCC04 /* CNLivePlayerBottomNaviView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerBottomNaviView.swift; sourceTree = "<group>"; }; | ||
| 299 | + 191733182B10A05D007BCC04 /* CNLivePlayerProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerProgressView.swift; sourceTree = "<group>"; }; | ||
| 300 | + 1917331A2B10A0EF007BCC04 /* CNLivePlayerLoadingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerLoadingView.swift; sourceTree = "<group>"; }; | ||
| 301 | + 1917331C2B10A15A007BCC04 /* CNLivePlayerFailureView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerFailureView.swift; sourceTree = "<group>"; }; | ||
| 302 | + 1917331E2B10A1BE007BCC04 /* CNLivePlayerEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerEnum.swift; sourceTree = "<group>"; }; | ||
| 303 | + 191733202B143F3A007BCC04 /* CNLiveGradientView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveGradientView.swift; sourceTree = "<group>"; }; | ||
| 304 | + 191733222B14601A007BCC04 /* CNLivePlayerProgressSlider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerProgressSlider.swift; sourceTree = "<group>"; }; | ||
| 305 | + 191733242B146078007BCC04 /* CNLivePlayerSlider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerSlider.swift; sourceTree = "<group>"; }; | ||
| 306 | + 191733262B148BB1007BCC04 /* CNLivePlayerFastForwardPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerFastForwardPreviewView.swift; sourceTree = "<group>"; }; | ||
| 307 | + 191733282B148BF7007BCC04 /* CNLivePlayerVolumeBrightnessView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerVolumeBrightnessView.swift; sourceTree = "<group>"; }; | ||
| 308 | + 1917332A2B15CDC6007BCC04 /* CNLivePlayerLandscapeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerLandscapeViewController.swift; sourceTree = "<group>"; }; | ||
| 309 | + 1917332C2B15DB20007BCC04 /* CNLivePlayerKVOModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayerKVOModel.swift; sourceTree = "<group>"; }; | ||
| 310 | + 1917332E2B16C7C9007BCC04 /* CNLiveTimer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveTimer.swift; sourceTree = "<group>"; }; | ||
| 311 | + 191733302B170537007BCC04 /* CNLiveCommonManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCommonManager.swift; sourceTree = "<group>"; }; | ||
| 312 | + 191733352B27EFD3007BCC04 /* CNLiveShopClassilyManageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopClassilyManageViewController.swift; sourceTree = "<group>"; }; | ||
| 313 | + 191733372B27FD66007BCC04 /* CNLiveShopClassifySectionHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopClassifySectionHeaderView.swift; sourceTree = "<group>"; }; | ||
| 314 | + 191733392B27FDF3007BCC04 /* CNLiveShopClassilyManageTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopClassilyManageTableViewCell.swift; sourceTree = "<group>"; }; | ||
| 315 | + 1917333B2B27FE75007BCC04 /* CNLiveShopClassilyManageHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopClassilyManageHeaderView.swift; sourceTree = "<group>"; }; | ||
| 316 | + 1917333E2B284C93007BCC04 /* CNLiveShopCouponCreateViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopCouponCreateViewController.swift; sourceTree = "<group>"; }; | ||
| 317 | + 191733412B284D5E007BCC04 /* CNLiveShopCouponCreateBottomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopCouponCreateBottomView.swift; sourceTree = "<group>"; }; | ||
| 318 | + 191733442B284DCD007BCC04 /* CNLiveShopCouponListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopCouponListModel.swift; sourceTree = "<group>"; }; | ||
| 319 | + 191733472B2855E8007BCC04 /* CNLiveShopCouponViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopCouponViewModel.swift; sourceTree = "<group>"; }; | ||
| 320 | + 191733492B2BE746007BCC04 /* CNLiveCreateCouponTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCreateCouponTableViewCell.swift; sourceTree = "<group>"; }; | ||
| 321 | + 1917334B2B2BE9CA007BCC04 /* CNLiveCreateCouponTypeMoneyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCreateCouponTypeMoneyView.swift; sourceTree = "<group>"; }; | ||
| 322 | + 1917334D2B2C1A08007BCC04 /* CNLiveSelectCouponTapView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveSelectCouponTapView.swift; sourceTree = "<group>"; }; | ||
| 323 | + 1917334F2B2C3E1F007BCC04 /* CNLivePickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePickerView.swift; sourceTree = "<group>"; }; | ||
| 324 | + 191733512B2C4CEA007BCC04 /* CNLivePickerSelectDateTools.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePickerSelectDateTools.swift; sourceTree = "<group>"; }; | ||
| 325 | + 191733532B2C4D58007BCC04 /* CNLivePickerToolsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePickerToolsView.swift; sourceTree = "<group>"; }; | ||
| 326 | + 191733552B2FE855007BCC04 /* CNLivePickerReusingModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePickerReusingModel.swift; sourceTree = "<group>"; }; | ||
| 327 | + 191733572B319552007BCC04 /* CNLiveCouponGoodsListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCouponGoodsListView.swift; sourceTree = "<group>"; }; | ||
| 328 | + 191733592B3283A1007BCC04 /* CNLiveCouponGoodsSearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCouponGoodsSearchView.swift; sourceTree = "<group>"; }; | ||
| 329 | + 1917335B2B3283FF007BCC04 /* CNLiveCouponGoodsListSearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCouponGoodsListSearchView.swift; sourceTree = "<group>"; }; | ||
| 330 | + 1917335D2B328495007BCC04 /* CNLiveCouponListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCouponListTableViewCell.swift; sourceTree = "<group>"; }; | ||
| 331 | + 1917335F2B352488007BCC04 /* CNLiveCouponGoodsListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCouponGoodsListTableViewCell.swift; sourceTree = "<group>"; }; | ||
| 332 | + 191733612B3538DC007BCC04 /* CNLiveShopCouponsManagerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopCouponsManagerViewController.swift; sourceTree = "<group>"; }; | ||
| 333 | + 191733632B392011007BCC04 /* CNLiveShopGoodsSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopGoodsSearchViewController.swift; sourceTree = "<group>"; }; | ||
| 334 | + 191733652B39237D007BCC04 /* CNLiveShopGoodsManageListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopGoodsManageListTableViewCell.swift; sourceTree = "<group>"; }; | ||
| 193 | 192336EA2AD9224300D47CD4 /* CNUpSlideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNUpSlideViewController.swift; sourceTree = "<group>"; }; | 335 | 192336EA2AD9224300D47CD4 /* CNUpSlideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNUpSlideViewController.swift; sourceTree = "<group>"; }; |
| 194 | 1926C28E2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideViewModel.swift; sourceTree = "<group>"; }; | 336 | 1926C28E2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideViewModel.swift; sourceTree = "<group>"; }; |
| 195 | 1926C2902AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideModel.swift; sourceTree = "<group>"; }; | 337 | 1926C2902AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideModel.swift; sourceTree = "<group>"; }; |
| 338 | + 1938BD162B3D6C7F00390A34 /* CNLiveAuthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAuthViewController.swift; sourceTree = "<group>"; }; | ||
| 339 | + 1938BD1F2B46799A00390A34 /* CNLivePlayletHomePageController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayletHomePageController.swift; sourceTree = "<group>"; }; | ||
| 340 | + 1938BD212B467C1700390A34 /* CNLivePlayletHomePageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayletHomePageCell.swift; sourceTree = "<group>"; }; | ||
| 341 | + 1938BD232B468AC900390A34 /* CNLivePlayletHomePageHeaderCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayletHomePageHeaderCell.swift; sourceTree = "<group>"; }; | ||
| 342 | + 1938BD252B479D3400390A34 /* UILabel+FormattedText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UILabel+FormattedText.swift"; sourceTree = "<group>"; }; | ||
| 343 | + 1938BD292B48014E00390A34 /* CNHomepageDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNHomepageDetailViewController.swift; sourceTree = "<group>"; }; | ||
| 344 | + 1938BD2B2B4801A700390A34 /* CNHomePageAnimationTransition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNHomePageAnimationTransition.swift; sourceTree = "<group>"; }; | ||
| 345 | + 1938BD2D2B48021E00390A34 /* CNHomePageBaseNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNHomePageBaseNavigationController.swift; sourceTree = "<group>"; }; | ||
| 346 | + 1938BD2F2B4B8A3500390A34 /* CNLiveHomePageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveHomePageViewModel.swift; sourceTree = "<group>"; }; | ||
| 347 | + 1938BD312B4B8F0400390A34 /* CNLiveHomePageModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveHomePageModel.swift; sourceTree = "<group>"; }; | ||
| 348 | + 1938BD332B4B968300390A34 /* CNLiveHomePageDuanJuCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveHomePageDuanJuCell.swift; sourceTree = "<group>"; }; | ||
| 349 | + 1938BD352B4BCC7F00390A34 /* CNLiveAlbumModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAlbumModel.swift; sourceTree = "<group>"; }; | ||
| 350 | + 1938BD372B4BDC2500390A34 /* CNLiveAlbumImageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAlbumImageCell.swift; sourceTree = "<group>"; }; | ||
| 351 | + 1938BD3C2B4BDD4B00390A34 /* CNLiveAlbumCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAlbumCell.swift; sourceTree = "<group>"; }; | ||
| 352 | + 1938BD3E2B4BE7C500390A34 /* CNLiveAlbumMsgModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAlbumMsgModel.swift; sourceTree = "<group>"; }; | ||
| 353 | + 1938BD402B4BEC6900390A34 /* CNLiveAlbumListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAlbumListModel.swift; sourceTree = "<group>"; }; | ||
| 196 | 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailBtnsCell.swift; sourceTree = "<group>"; }; | 354 | 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailBtnsCell.swift; sourceTree = "<group>"; }; |
| 197 | 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailOrderAssetCell.swift; sourceTree = "<group>"; }; | 355 | 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailOrderAssetCell.swift; sourceTree = "<group>"; }; |
| 198 | 19565EC42AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopProductManagerController.swift; sourceTree = "<group>"; }; | 356 | 19565EC42AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopProductManagerController.swift; sourceTree = "<group>"; }; |
| @@ -224,6 +382,8 @@ | @@ -224,6 +382,8 @@ | ||
| 224 | 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNUpSlideCardPresentationController.swift; sourceTree = "<group>"; }; | 382 | 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNUpSlideCardPresentationController.swift; sourceTree = "<group>"; }; |
| 225 | 19CC4D552ADD19C200308E2A /* String+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = "<group>"; }; | 383 | 19CC4D552ADD19C200308E2A /* String+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = "<group>"; }; |
| 226 | 19D2CE622AE8B65D00691757 /* CNLiveDownSlideTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideTool.swift; sourceTree = "<group>"; }; | 384 | 19D2CE622AE8B65D00691757 /* CNLiveDownSlideTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideTool.swift; sourceTree = "<group>"; }; |
| 385 | + 19E9D15F2B3A98C200D0FB30 /* CNLiveShopAssociatedGoodsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopAssociatedGoodsTableViewCell.swift; sourceTree = "<group>"; }; | ||
| 386 | + 19E9D1612B3BBB2E00D0FB30 /* CNLiveFileManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveFileManager.swift; sourceTree = "<group>"; }; | ||
| 227 | 19F1C2322AB5728B0083D06C /* CNIDCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNIDCardView.swift; sourceTree = "<group>"; }; | 387 | 19F1C2322AB5728B0083D06C /* CNIDCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNIDCardView.swift; sourceTree = "<group>"; }; |
| 228 | 19FA20162AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideRecommendCell.swift; sourceTree = "<group>"; }; | 388 | 19FA20162AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideRecommendCell.swift; sourceTree = "<group>"; }; |
| 229 | 19FA20182AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideTodayRecommendCell.swift; sourceTree = "<group>"; }; | 389 | 19FA20182AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideTodayRecommendCell.swift; sourceTree = "<group>"; }; |
| @@ -389,12 +549,256 @@ | @@ -389,12 +549,256 @@ | ||
| 389 | /* End PBXFrameworksBuildPhase section */ | 549 | /* End PBXFrameworksBuildPhase section */ |
| 390 | 550 | ||
| 391 | /* Begin PBXGroup section */ | 551 | /* Begin PBXGroup section */ |
| 552 | + 191732F62B08AAD4007BCC04 /* ShopClassify */ = { | ||
| 553 | + isa = PBXGroup; | ||
| 554 | + children = ( | ||
| 555 | + 191732F72B08AB9D007BCC04 /* CNLiveShopClassilyViewModel.swift */, | ||
| 556 | + ); | ||
| 557 | + path = ShopClassify; | ||
| 558 | + sourceTree = "<group>"; | ||
| 559 | + }; | ||
| 560 | + 191732F92B0AF329007BCC04 /* GoodsDetail */ = { | ||
| 561 | + isa = PBXGroup; | ||
| 562 | + children = ( | ||
| 563 | + 191732FA2B0AF34A007BCC04 /* CNLiveShopGoodsDetailsModel.swift */, | ||
| 564 | + 191732FF2B0B58E5007BCC04 /* CNLiveSelectUploadImageModel.swift */, | ||
| 565 | + ); | ||
| 566 | + path = GoodsDetail; | ||
| 567 | + sourceTree = "<group>"; | ||
| 568 | + }; | ||
| 569 | + 191732FC2B0B3EB4007BCC04 /* GoodsDetail */ = { | ||
| 570 | + isa = PBXGroup; | ||
| 571 | + children = ( | ||
| 572 | + 191732FD2B0B3EBF007BCC04 /* CNLiveShopGoodsDetailsViewController.swift */, | ||
| 573 | + ); | ||
| 574 | + path = GoodsDetail; | ||
| 575 | + sourceTree = "<group>"; | ||
| 576 | + }; | ||
| 577 | + 1917330B2B109691007BCC04 /* CNLivePlayer */ = { | ||
| 578 | + isa = PBXGroup; | ||
| 579 | + children = ( | ||
| 580 | + 1917330C2B1096AB007BCC04 /* CNLivePlayerViewController.swift */, | ||
| 581 | + 1917330E2B10989C007BCC04 /* CNLivePlayerView.swift */, | ||
| 582 | + 191733102B109EDC007BCC04 /* CNLivePlayerControlView.swift */, | ||
| 583 | + 191733122B109F7B007BCC04 /* CNLivePlayerGestureView.swift */, | ||
| 584 | + 191733142B109FD7007BCC04 /* CNLivePlayerTopNaviView.swift */, | ||
| 585 | + 191733162B10A017007BCC04 /* CNLivePlayerBottomNaviView.swift */, | ||
| 586 | + 191733182B10A05D007BCC04 /* CNLivePlayerProgressView.swift */, | ||
| 587 | + 1917331A2B10A0EF007BCC04 /* CNLivePlayerLoadingView.swift */, | ||
| 588 | + 1917331C2B10A15A007BCC04 /* CNLivePlayerFailureView.swift */, | ||
| 589 | + 1917331E2B10A1BE007BCC04 /* CNLivePlayerEnum.swift */, | ||
| 590 | + 191733202B143F3A007BCC04 /* CNLiveGradientView.swift */, | ||
| 591 | + 191733222B14601A007BCC04 /* CNLivePlayerProgressSlider.swift */, | ||
| 592 | + 191733242B146078007BCC04 /* CNLivePlayerSlider.swift */, | ||
| 593 | + 191733262B148BB1007BCC04 /* CNLivePlayerFastForwardPreviewView.swift */, | ||
| 594 | + 191733282B148BF7007BCC04 /* CNLivePlayerVolumeBrightnessView.swift */, | ||
| 595 | + 1917332A2B15CDC6007BCC04 /* CNLivePlayerLandscapeViewController.swift */, | ||
| 596 | + 1917332C2B15DB20007BCC04 /* CNLivePlayerKVOModel.swift */, | ||
| 597 | + 1917332E2B16C7C9007BCC04 /* CNLiveTimer.swift */, | ||
| 598 | + ); | ||
| 599 | + path = CNLivePlayer; | ||
| 600 | + sourceTree = "<group>"; | ||
| 601 | + }; | ||
| 602 | + 1917333D2B284C6B007BCC04 /* ShopCoupon */ = { | ||
| 603 | + isa = PBXGroup; | ||
| 604 | + children = ( | ||
| 605 | + 1917333E2B284C93007BCC04 /* CNLiveShopCouponCreateViewController.swift */, | ||
| 606 | + 191733612B3538DC007BCC04 /* CNLiveShopCouponsManagerViewController.swift */, | ||
| 607 | + ); | ||
| 608 | + path = ShopCoupon; | ||
| 609 | + sourceTree = "<group>"; | ||
| 610 | + }; | ||
| 611 | + 191733402B284D4A007BCC04 /* ShopCoupon */ = { | ||
| 612 | + isa = PBXGroup; | ||
| 613 | + children = ( | ||
| 614 | + 191733412B284D5E007BCC04 /* CNLiveShopCouponCreateBottomView.swift */, | ||
| 615 | + 191733572B319552007BCC04 /* CNLiveCouponGoodsListView.swift */, | ||
| 616 | + 1917335F2B352488007BCC04 /* CNLiveCouponGoodsListTableViewCell.swift */, | ||
| 617 | + 191733592B3283A1007BCC04 /* CNLiveCouponGoodsSearchView.swift */, | ||
| 618 | + 1917335B2B3283FF007BCC04 /* CNLiveCouponGoodsListSearchView.swift */, | ||
| 619 | + 1917335D2B328495007BCC04 /* CNLiveCouponListTableViewCell.swift */, | ||
| 620 | + 191733492B2BE746007BCC04 /* CNLiveCreateCouponTableViewCell.swift */, | ||
| 621 | + 1917334B2B2BE9CA007BCC04 /* CNLiveCreateCouponTypeMoneyView.swift */, | ||
| 622 | + 1917334D2B2C1A08007BCC04 /* CNLiveSelectCouponTapView.swift */, | ||
| 623 | + 1917334F2B2C3E1F007BCC04 /* CNLivePickerView.swift */, | ||
| 624 | + 191733512B2C4CEA007BCC04 /* CNLivePickerSelectDateTools.swift */, | ||
| 625 | + 191733532B2C4D58007BCC04 /* CNLivePickerToolsView.swift */, | ||
| 626 | + ); | ||
| 627 | + path = ShopCoupon; | ||
| 628 | + sourceTree = "<group>"; | ||
| 629 | + }; | ||
| 630 | + 191733432B284DB9007BCC04 /* ShopCoupon */ = { | ||
| 631 | + isa = PBXGroup; | ||
| 632 | + children = ( | ||
| 633 | + 191733442B284DCD007BCC04 /* CNLiveShopCouponListModel.swift */, | ||
| 634 | + 191733552B2FE855007BCC04 /* CNLivePickerReusingModel.swift */, | ||
| 635 | + ); | ||
| 636 | + path = ShopCoupon; | ||
| 637 | + sourceTree = "<group>"; | ||
| 638 | + }; | ||
| 639 | + 191733462B2855D6007BCC04 /* ShopCoupon */ = { | ||
| 640 | + isa = PBXGroup; | ||
| 641 | + children = ( | ||
| 642 | + 191733472B2855E8007BCC04 /* CNLiveShopCouponViewModel.swift */, | ||
| 643 | + ); | ||
| 644 | + path = ShopCoupon; | ||
| 645 | + sourceTree = "<group>"; | ||
| 646 | + }; | ||
| 647 | + 1938BD112B3D6C0C00390A34 /* HomePages */ = { | ||
| 648 | + isa = PBXGroup; | ||
| 649 | + children = ( | ||
| 650 | + 1938BD152B3D6C6000390A34 /* Controller */, | ||
| 651 | + 1938BD142B3D6C5C00390A34 /* View */, | ||
| 652 | + 1938BD132B3D6C5700390A34 /* Model */, | ||
| 653 | + 1938BD122B3D6C4700390A34 /* ViewModel */, | ||
| 654 | + ); | ||
| 655 | + path = HomePages; | ||
| 656 | + sourceTree = "<group>"; | ||
| 657 | + }; | ||
| 658 | + 1938BD122B3D6C4700390A34 /* ViewModel */ = { | ||
| 659 | + isa = PBXGroup; | ||
| 660 | + children = ( | ||
| 661 | + 1938BD2F2B4B8A3500390A34 /* CNLiveHomePageViewModel.swift */, | ||
| 662 | + ); | ||
| 663 | + path = ViewModel; | ||
| 664 | + sourceTree = "<group>"; | ||
| 665 | + }; | ||
| 666 | + 1938BD132B3D6C5700390A34 /* Model */ = { | ||
| 667 | + isa = PBXGroup; | ||
| 668 | + children = ( | ||
| 669 | + 1938BD312B4B8F0400390A34 /* CNLiveHomePageModel.swift */, | ||
| 670 | + 1938BD352B4BCC7F00390A34 /* CNLiveAlbumModel.swift */, | ||
| 671 | + 1938BD3E2B4BE7C500390A34 /* CNLiveAlbumMsgModel.swift */, | ||
| 672 | + 1938BD402B4BEC6900390A34 /* CNLiveAlbumListModel.swift */, | ||
| 673 | + ); | ||
| 674 | + path = Model; | ||
| 675 | + sourceTree = "<group>"; | ||
| 676 | + }; | ||
| 677 | + 1938BD142B3D6C5C00390A34 /* View */ = { | ||
| 678 | + isa = PBXGroup; | ||
| 679 | + children = ( | ||
| 680 | + 1938BD3B2B4BDC5700390A34 /* PlayletHomePage */, | ||
| 681 | + 1938BD3A2B4BDC4200390A34 /* HomePage */, | ||
| 682 | + 1938BD392B4BDC2900390A34 /* HomepageDetail */, | ||
| 683 | + ); | ||
| 684 | + path = View; | ||
| 685 | + sourceTree = "<group>"; | ||
| 686 | + }; | ||
| 687 | + 1938BD152B3D6C6000390A34 /* Controller */ = { | ||
| 688 | + isa = PBXGroup; | ||
| 689 | + children = ( | ||
| 690 | + 1938BD272B48009600390A34 /* AuthController */, | ||
| 691 | + 1938BD1D2B46791400390A34 /* PlayletHomePage */, | ||
| 692 | + ); | ||
| 693 | + path = Controller; | ||
| 694 | + sourceTree = "<group>"; | ||
| 695 | + }; | ||
| 696 | + 1938BD182B454DB100390A34 /* ShopUpConsole */ = { | ||
| 697 | + isa = PBXGroup; | ||
| 698 | + children = ( | ||
| 699 | + 19BB1FE02AEB5C220094D962 /* CNLiveShopConsoleController.swift */, | ||
| 700 | + ); | ||
| 701 | + path = ShopUpConsole; | ||
| 702 | + sourceTree = "<group>"; | ||
| 703 | + }; | ||
| 704 | + 1938BD192B454E1500390A34 /* ShopDownDetail */ = { | ||
| 705 | + isa = PBXGroup; | ||
| 706 | + children = ( | ||
| 707 | + 19BB1FEB2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift */, | ||
| 708 | + ); | ||
| 709 | + path = ShopDownDetail; | ||
| 710 | + sourceTree = "<group>"; | ||
| 711 | + }; | ||
| 712 | + 1938BD1A2B4554A800390A34 /* AuthMainController */ = { | ||
| 713 | + isa = PBXGroup; | ||
| 714 | + children = ( | ||
| 715 | + 7CD6754E2A2840B9008354C1 /* CNMetaCodeHomePageController.swift */, | ||
| 716 | + ); | ||
| 717 | + path = AuthMainController; | ||
| 718 | + sourceTree = "<group>"; | ||
| 719 | + }; | ||
| 720 | + 1938BD1B2B45557700390A34 /* DownSlideController */ = { | ||
| 721 | + isa = PBXGroup; | ||
| 722 | + children = ( | ||
| 723 | + 19BB1FDE2AEA3A450094D962 /* CNSlideBaseNavigationController.swift */, | ||
| 724 | + 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */, | ||
| 725 | + 192336EA2AD9224300D47CD4 /* CNUpSlideViewController.swift */, | ||
| 726 | + 19CC4D4A2ADD086F00308E2A /* CNUpSlideDetailViewController.swift */, | ||
| 727 | + ); | ||
| 728 | + path = DownSlideController; | ||
| 729 | + sourceTree = "<group>"; | ||
| 730 | + }; | ||
| 731 | + 1938BD1C2B4555A000390A34 /* WebController */ = { | ||
| 732 | + isa = PBXGroup; | ||
| 733 | + children = ( | ||
| 734 | + 19123FC02ABC11170075C883 /* CNWebViewController.swift */, | ||
| 735 | + ); | ||
| 736 | + path = WebController; | ||
| 737 | + sourceTree = "<group>"; | ||
| 738 | + }; | ||
| 739 | + 1938BD1D2B46791400390A34 /* PlayletHomePage */ = { | ||
| 740 | + isa = PBXGroup; | ||
| 741 | + children = ( | ||
| 742 | + 1938BD1F2B46799A00390A34 /* CNLivePlayletHomePageController.swift */, | ||
| 743 | + ); | ||
| 744 | + path = PlayletHomePage; | ||
| 745 | + sourceTree = "<group>"; | ||
| 746 | + }; | ||
| 747 | + 1938BD272B48009600390A34 /* AuthController */ = { | ||
| 748 | + isa = PBXGroup; | ||
| 749 | + children = ( | ||
| 750 | + 1938BD282B4800E500390A34 /* push相关 */, | ||
| 751 | + 1938BD162B3D6C7F00390A34 /* CNLiveAuthViewController.swift */, | ||
| 752 | + ); | ||
| 753 | + path = AuthController; | ||
| 754 | + sourceTree = "<group>"; | ||
| 755 | + }; | ||
| 756 | + 1938BD282B4800E500390A34 /* push相关 */ = { | ||
| 757 | + isa = PBXGroup; | ||
| 758 | + children = ( | ||
| 759 | + 1938BD292B48014E00390A34 /* CNHomepageDetailViewController.swift */, | ||
| 760 | + 1938BD2B2B4801A700390A34 /* CNHomePageAnimationTransition.swift */, | ||
| 761 | + 1938BD2D2B48021E00390A34 /* CNHomePageBaseNavigationController.swift */, | ||
| 762 | + ); | ||
| 763 | + path = "push相关"; | ||
| 764 | + sourceTree = "<group>"; | ||
| 765 | + }; | ||
| 766 | + 1938BD392B4BDC2900390A34 /* HomepageDetail */ = { | ||
| 767 | + isa = PBXGroup; | ||
| 768 | + children = ( | ||
| 769 | + 1938BD372B4BDC2500390A34 /* CNLiveAlbumImageCell.swift */, | ||
| 770 | + 1938BD3C2B4BDD4B00390A34 /* CNLiveAlbumCell.swift */, | ||
| 771 | + ); | ||
| 772 | + path = HomepageDetail; | ||
| 773 | + sourceTree = "<group>"; | ||
| 774 | + }; | ||
| 775 | + 1938BD3A2B4BDC4200390A34 /* HomePage */ = { | ||
| 776 | + isa = PBXGroup; | ||
| 777 | + children = ( | ||
| 778 | + 1938BD332B4B968300390A34 /* CNLiveHomePageDuanJuCell.swift */, | ||
| 779 | + ); | ||
| 780 | + path = HomePage; | ||
| 781 | + sourceTree = "<group>"; | ||
| 782 | + }; | ||
| 783 | + 1938BD3B2B4BDC5700390A34 /* PlayletHomePage */ = { | ||
| 784 | + isa = PBXGroup; | ||
| 785 | + children = ( | ||
| 786 | + 1938BD212B467C1700390A34 /* CNLivePlayletHomePageCell.swift */, | ||
| 787 | + 1938BD232B468AC900390A34 /* CNLivePlayletHomePageHeaderCell.swift */, | ||
| 788 | + ); | ||
| 789 | + path = PlayletHomePage; | ||
| 790 | + sourceTree = "<group>"; | ||
| 791 | + }; | ||
| 392 | 19565EC32AF8ACC2007D6727 /* GoodsManager */ = { | 792 | 19565EC32AF8ACC2007D6727 /* GoodsManager */ = { |
| 393 | isa = PBXGroup; | 793 | isa = PBXGroup; |
| 394 | children = ( | 794 | children = ( |
| 395 | 19565EC42AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift */, | 795 | 19565EC42AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift */, |
| 396 | 19565EC62AF8AD38007D6727 /* CNLiveShopNewProductController.swift */, | 796 | 19565EC62AF8AD38007D6727 /* CNLiveShopNewProductController.swift */, |
| 797 | + 191733632B392011007BCC04 /* CNLiveShopGoodsSearchViewController.swift */, | ||
| 798 | + 191732E42B05FFE8007BCC04 /* CNLiveModalPresentationViewController.swift */, | ||
| 397 | 1965FA412AFB79EA00F0F435 /* CNLiveGoodsCategoryController.swift */, | 799 | 1965FA412AFB79EA00F0F435 /* CNLiveGoodsCategoryController.swift */, |
| 800 | + 191732EE2B075C3A007BCC04 /* CNLiveCreateShopClassifyViewController.swift */, | ||
| 801 | + 191733352B27EFD3007BCC04 /* CNLiveShopClassilyManageViewController.swift */, | ||
| 398 | ); | 802 | ); |
| 399 | path = GoodsManager; | 803 | path = GoodsManager; |
| 400 | sourceTree = "<group>"; | 804 | sourceTree = "<group>"; |
| @@ -404,8 +808,22 @@ | @@ -404,8 +808,22 @@ | ||
| 404 | children = ( | 808 | children = ( |
| 405 | 19565ECC2AF8D256007D6727 /* CNLiveShopGoodsListClassifyView.swift */, | 809 | 19565ECC2AF8D256007D6727 /* CNLiveShopGoodsListClassifyView.swift */, |
| 406 | 19565ECE2AF8D8F6007D6727 /* CNLiveShopGoodsListCell.swift */, | 810 | 19565ECE2AF8D8F6007D6727 /* CNLiveShopGoodsListCell.swift */, |
| 811 | + 191733652B39237D007BCC04 /* CNLiveShopGoodsManageListTableViewCell.swift */, | ||
| 812 | + 19E9D15F2B3A98C200D0FB30 /* CNLiveShopAssociatedGoodsTableViewCell.swift */, | ||
| 407 | 1965FA3D2AFB176E00F0F435 /* CNLiveShopAddGoodsSingleView.swift */, | 813 | 1965FA3D2AFB176E00F0F435 /* CNLiveShopAddGoodsSingleView.swift */, |
| 408 | 1965FA3F2AFB38AA00F0F435 /* CNLiveAddGoodsSelectUploadImageView.swift */, | 814 | 1965FA3F2AFB38AA00F0F435 /* CNLiveAddGoodsSelectUploadImageView.swift */, |
| 815 | + 191733012B0C4EAB007BCC04 /* CNLiveSelUplSingleImageView.swift */, | ||
| 816 | + 1917328D2B032583007BCC04 /* CNLiveRoundedRectView.swift */, | ||
| 817 | + 1917328F2B0348F6007BCC04 /* CNLiveSwitchView.swift */, | ||
| 818 | + 191732CD2B04AACD007BCC04 /* CNLiveShopTextView.swift */, | ||
| 819 | + 191732E22B05F474007BCC04 /* CNLiveShopGoodsManageDetailsInputManager.swift */, | ||
| 820 | + 191732E82B0706B3007BCC04 /* CNLiveShopClassifyCell.swift */, | ||
| 821 | + 191732F02B084822007BCC04 /* CNLiveShopClassifyInputTableViewCell.swift */, | ||
| 822 | + 191732F22B084DBC007BCC04 /* CNLiveShopClassifySwitchTableViewCell.swift */, | ||
| 823 | + 191732F42B085BAE007BCC04 /* CNLiveShopClassilyIconTableViewCell.swift */, | ||
| 824 | + 191733372B27FD66007BCC04 /* CNLiveShopClassifySectionHeaderView.swift */, | ||
| 825 | + 191733392B27FDF3007BCC04 /* CNLiveShopClassilyManageTableViewCell.swift */, | ||
| 826 | + 1917333B2B27FE75007BCC04 /* CNLiveShopClassilyManageHeaderView.swift */, | ||
| 409 | ); | 827 | ); |
| 410 | path = GoodsManager; | 828 | path = GoodsManager; |
| 411 | sourceTree = "<group>"; | 829 | sourceTree = "<group>"; |
| @@ -423,6 +841,8 @@ | @@ -423,6 +841,8 @@ | ||
| 423 | children = ( | 841 | children = ( |
| 424 | 19565ECA2AF8C59C007D6727 /* CNLiveShopGoodsListModel.swift */, | 842 | 19565ECA2AF8C59C007D6727 /* CNLiveShopGoodsListModel.swift */, |
| 425 | 19565ED32AF9FEB4007D6727 /* CNLiveShopAddEditGoodsModel.swift */, | 843 | 19565ED32AF9FEB4007D6727 /* CNLiveShopAddEditGoodsModel.swift */, |
| 844 | + 191732EA2B070943007BCC04 /* CNLiveShopGoodsManageDetailsGoodsCategoryModel.swift */, | ||
| 845 | + 191732EC2B073C52007BCC04 /* CNLiveShopClassifyListModel.swift */, | ||
| 426 | ); | 846 | ); |
| 427 | path = GoodsManager; | 847 | path = GoodsManager; |
| 428 | sourceTree = "<group>"; | 848 | sourceTree = "<group>"; |
| @@ -430,6 +850,8 @@ | @@ -430,6 +850,8 @@ | ||
| 430 | 19BB1FE42AEB93850094D962 /* Model */ = { | 850 | 19BB1FE42AEB93850094D962 /* Model */ = { |
| 431 | isa = PBXGroup; | 851 | isa = PBXGroup; |
| 432 | children = ( | 852 | children = ( |
| 853 | + 191733432B284DB9007BCC04 /* ShopCoupon */, | ||
| 854 | + 191732F92B0AF329007BCC04 /* GoodsDetail */, | ||
| 433 | 19565ED22AF9FE67007D6727 /* GoodsManager */, | 855 | 19565ED22AF9FE67007D6727 /* GoodsManager */, |
| 434 | 1926C2902AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift */, | 856 | 1926C2902AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift */, |
| 435 | 19BB1FE52AEB93B80094D962 /* CNLiveShopUserInfoModel.swift */, | 857 | 19BB1FE52AEB93B80094D962 /* CNLiveShopUserInfoModel.swift */, |
| @@ -442,10 +864,13 @@ | @@ -442,10 +864,13 @@ | ||
| 442 | 19CC4D502ADD126D00308E2A /* Util */ = { | 864 | 19CC4D502ADD126D00308E2A /* Util */ = { |
| 443 | isa = PBXGroup; | 865 | isa = PBXGroup; |
| 444 | children = ( | 866 | children = ( |
| 867 | + 1917330B2B109691007BCC04 /* CNLivePlayer */, | ||
| 445 | 19CC4D512ADD129800308E2A /* CNUpSlideAnimationTransition.swift */, | 868 | 19CC4D512ADD129800308E2A /* CNUpSlideAnimationTransition.swift */, |
| 446 | 19FA201A2AE60423001F7186 /* CNLiveDownSlideModelLayout.swift */, | 869 | 19FA201A2AE60423001F7186 /* CNLiveDownSlideModelLayout.swift */, |
| 447 | 19D2CE622AE8B65D00691757 /* CNLiveDownSlideTool.swift */, | 870 | 19D2CE622AE8B65D00691757 /* CNLiveDownSlideTool.swift */, |
| 448 | 19BB202A2AF382150094D962 /* CNLiveAdaptTool.swift */, | 871 | 19BB202A2AF382150094D962 /* CNLiveAdaptTool.swift */, |
| 872 | + 191733302B170537007BCC04 /* CNLiveCommonManager.swift */, | ||
| 873 | + 19E9D1612B3BBB2E00D0FB30 /* CNLiveFileManager.swift */, | ||
| 449 | ); | 874 | ); |
| 450 | path = Util; | 875 | path = Util; |
| 451 | sourceTree = "<group>"; | 876 | sourceTree = "<group>"; |
| @@ -479,6 +904,10 @@ | @@ -479,6 +904,10 @@ | ||
| 479 | 79E496E72AB9674300127BF8 /* NSMutableAttributedString+CNLiveExtensions.swift */, | 904 | 79E496E72AB9674300127BF8 /* NSMutableAttributedString+CNLiveExtensions.swift */, |
| 480 | 19CC4D482ADD06C500308E2A /* UITableView+Extension.swift */, | 905 | 19CC4D482ADD06C500308E2A /* UITableView+Extension.swift */, |
| 481 | 19CC4D552ADD19C200308E2A /* String+Extension.swift */, | 906 | 19CC4D552ADD19C200308E2A /* String+Extension.swift */, |
| 907 | + 191732E62B0615C1007BCC04 /* UIScrollView+CNLiveExtensions.swift */, | ||
| 908 | + 191733032B0F216E007BCC04 /* NSDictionary+CNLiveExtensions.swift */, | ||
| 909 | + 191733092B10864F007BCC04 /* Array+CNLiveExtensions.swift */, | ||
| 910 | + 1938BD252B479D3400390A34 /* UILabel+FormattedText.swift */, | ||
| 482 | ); | 911 | ); |
| 483 | path = Extensions; | 912 | path = Extensions; |
| 484 | sourceTree = "<group>"; | 913 | sourceTree = "<group>"; |
| @@ -681,10 +1110,11 @@ | @@ -681,10 +1110,11 @@ | ||
| 681 | isa = PBXGroup; | 1110 | isa = PBXGroup; |
| 682 | children = ( | 1111 | children = ( |
| 683 | 7939B06D2B47EB46005AE981 /* VideoPage */, | 1112 | 7939B06D2B47EB46005AE981 /* VideoPage */, |
| 1113 | + 1938BD112B3D6C0C00390A34 /* HomePages */, | ||
| 684 | 7991722C2AF08CF100DC01A8 /* ShopPage */, | 1114 | 7991722C2AF08CF100DC01A8 /* ShopPage */, |
| 685 | 790D01972A2DCAE400C5978D /* MinePage */, | 1115 | 790D01972A2DCAE400C5978D /* MinePage */, |
| 686 | 790D018C2A2D8C9A00C5978D /* LoginPage */, | 1116 | 790D018C2A2D8C9A00C5978D /* LoginPage */, |
| 687 | - 7CD675212A26F844008354C1 /* HomePage */, | 1117 | + 7CD675212A26F844008354C1 /* AuthPage */, |
| 688 | ); | 1118 | ); |
| 689 | path = Main; | 1119 | path = Main; |
| 690 | sourceTree = "<group>"; | 1120 | sourceTree = "<group>"; |
| @@ -717,8 +1147,8 @@ | @@ -717,8 +1147,8 @@ | ||
| 717 | 796398952A260C3700D045EB /* Supporting Files */ = { | 1147 | 796398952A260C3700D045EB /* Supporting Files */ = { |
| 718 | isa = PBXGroup; | 1148 | isa = PBXGroup; |
| 719 | children = ( | 1149 | children = ( |
| 720 | - 818163C12A25CFCC00579C86 /* Main.storyboard */, | ||
| 721 | 818163C42A25CFCF00579C86 /* Assets.xcassets */, | 1150 | 818163C42A25CFCF00579C86 /* Assets.xcassets */, |
| 1151 | + 818163C12A25CFCC00579C86 /* Main.storyboard */, | ||
| 722 | 818163C62A25CFCF00579C86 /* LaunchScreen.storyboard */, | 1152 | 818163C62A25CFCF00579C86 /* LaunchScreen.storyboard */, |
| 723 | ); | 1153 | ); |
| 724 | path = "Supporting Files"; | 1154 | path = "Supporting Files"; |
| @@ -854,6 +1284,8 @@ | @@ -854,6 +1284,8 @@ | ||
| 854 | 7C83B43C2A52B899004BF4A4 /* ViewModel */ = { | 1284 | 7C83B43C2A52B899004BF4A4 /* ViewModel */ = { |
| 855 | isa = PBXGroup; | 1285 | isa = PBXGroup; |
| 856 | children = ( | 1286 | children = ( |
| 1287 | + 191733462B2855D6007BCC04 /* ShopCoupon */, | ||
| 1288 | + 191732F62B08AAD4007BCC04 /* ShopClassify */, | ||
| 857 | 19565ED12AF9FE56007D6727 /* GoodsManager */, | 1289 | 19565ED12AF9FE56007D6727 /* GoodsManager */, |
| 858 | 1926C28E2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift */, | 1290 | 1926C28E2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift */, |
| 859 | 19BB1FE22AEB8B7C0094D962 /* CNLiveShopConsoleViewModel.swift */, | 1291 | 19BB1FE22AEB8B7C0094D962 /* CNLiveShopConsoleViewModel.swift */, |
| @@ -863,7 +1295,7 @@ | @@ -863,7 +1295,7 @@ | ||
| 863 | path = HomePage/ViewModel; | 1295 | path = HomePage/ViewModel; |
| 864 | sourceTree = "<group>"; | 1296 | sourceTree = "<group>"; |
| 865 | }; | 1297 | }; |
| 866 | - 7CD675212A26F844008354C1 /* HomePage */ = { | 1298 | + 7CD675212A26F844008354C1 /* AuthPage */ = { |
| 867 | isa = PBXGroup; | 1299 | isa = PBXGroup; |
| 868 | children = ( | 1300 | children = ( |
| 869 | 19CC4D502ADD126D00308E2A /* Util */, | 1301 | 19CC4D502ADD126D00308E2A /* Util */, |
| @@ -872,18 +1304,19 @@ | @@ -872,18 +1304,19 @@ | ||
| 872 | 7CD6754D2A2840B9008354C1 /* Controller */, | 1304 | 7CD6754D2A2840B9008354C1 /* Controller */, |
| 873 | 7CD675232A26F8F8008354C1 /* View */, | 1305 | 7CD675232A26F8F8008354C1 /* View */, |
| 874 | ); | 1306 | ); |
| 875 | - name = HomePage; | 1307 | + name = AuthPage; |
| 876 | sourceTree = "<group>"; | 1308 | sourceTree = "<group>"; |
| 877 | }; | 1309 | }; |
| 878 | 7CD675232A26F8F8008354C1 /* View */ = { | 1310 | 7CD675232A26F8F8008354C1 /* View */ = { |
| 879 | isa = PBXGroup; | 1311 | isa = PBXGroup; |
| 880 | children = ( | 1312 | children = ( |
| 1313 | + 191733402B284D4A007BCC04 /* ShopCoupon */, | ||
| 881 | 19565ED02AF8D904007D6727 /* GoodsManager */, | 1314 | 19565ED02AF8D904007D6727 /* GoodsManager */, |
| 882 | 7CD675372A2740B0008354C1 /* CNUpSlideViewRemindView.swift */, | 1315 | 7CD675372A2740B0008354C1 /* CNUpSlideViewRemindView.swift */, |
| 883 | 7CD6753B2A2740B0008354C1 /* CNDownSlideView.swift */, | 1316 | 7CD6753B2A2740B0008354C1 /* CNDownSlideView.swift */, |
| 884 | 7CD675382A2740B0008354C1 /* CNMainView.swift */, | 1317 | 7CD675382A2740B0008354C1 /* CNMainView.swift */, |
| 885 | - 7CD675392A2740B0008354C1 /* CNUpSlideView.swift */, | ||
| 886 | 7CD6753A2A2740B0008354C1 /* CNDownSlideViewRemindView.swift */, | 1318 | 7CD6753A2A2740B0008354C1 /* CNDownSlideViewRemindView.swift */, |
| 1319 | + 7CD675392A2740B0008354C1 /* CNUpSlideView.swift */, | ||
| 887 | 7CD675412A2740F8008354C1 /* CNCustomIndexView.swift */, | 1320 | 7CD675412A2740F8008354C1 /* CNCustomIndexView.swift */, |
| 888 | 7C4931302A2F142F000E44B4 /* CNHomePageBackgroupView.swift */, | 1321 | 7C4931302A2F142F000E44B4 /* CNHomePageBackgroupView.swift */, |
| 889 | 7C4931372A307BDB000E44B4 /* CNHomePageGuideView.swift */, | 1322 | 7C4931372A307BDB000E44B4 /* CNHomePageGuideView.swift */, |
| @@ -905,15 +1338,14 @@ | @@ -905,15 +1338,14 @@ | ||
| 905 | 7CD6754D2A2840B9008354C1 /* Controller */ = { | 1338 | 7CD6754D2A2840B9008354C1 /* Controller */ = { |
| 906 | isa = PBXGroup; | 1339 | isa = PBXGroup; |
| 907 | children = ( | 1340 | children = ( |
| 1341 | + 1938BD1A2B4554A800390A34 /* AuthMainController */, | ||
| 1342 | + 1938BD1C2B4555A000390A34 /* WebController */, | ||
| 1343 | + 1938BD1B2B45557700390A34 /* DownSlideController */, | ||
| 1344 | + 1938BD192B454E1500390A34 /* ShopDownDetail */, | ||
| 1345 | + 1938BD182B454DB100390A34 /* ShopUpConsole */, | ||
| 1346 | + 1917333D2B284C6B007BCC04 /* ShopCoupon */, | ||
| 1347 | + 191732FC2B0B3EB4007BCC04 /* GoodsDetail */, | ||
| 908 | 19565EC32AF8ACC2007D6727 /* GoodsManager */, | 1348 | 19565EC32AF8ACC2007D6727 /* GoodsManager */, |
| 909 | - 19BB1FDE2AEA3A450094D962 /* CNSlideBaseNavigationController.swift */, | ||
| 910 | - 7CD6754E2A2840B9008354C1 /* CNMetaCodeHomePageController.swift */, | ||
| 911 | - 19123FC02ABC11170075C883 /* CNWebViewController.swift */, | ||
| 912 | - 192336EA2AD9224300D47CD4 /* CNUpSlideViewController.swift */, | ||
| 913 | - 19CC4D4A2ADD086F00308E2A /* CNUpSlideDetailViewController.swift */, | ||
| 914 | - 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */, | ||
| 915 | - 19BB1FE02AEB5C220094D962 /* CNLiveShopConsoleController.swift */, | ||
| 916 | - 19BB1FEB2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift */, | ||
| 917 | ); | 1349 | ); |
| 918 | name = Controller; | 1350 | name = Controller; |
| 919 | path = HomePage/Controller; | 1351 | path = HomePage/Controller; |
| @@ -1260,67 +1692,107 @@ | @@ -1260,67 +1692,107 @@ | ||
| 1260 | 19565EC92AF8BEC6007D6727 /* CNLiveShopGoodListViewModel.swift in Sources */, | 1692 | 19565EC92AF8BEC6007D6727 /* CNLiveShopGoodListViewModel.swift in Sources */, |
| 1261 | 19BB1FE82AECAD060094D962 /* CNLiveShopConsoleModel.swift in Sources */, | 1693 | 19BB1FE82AECAD060094D962 /* CNLiveShopConsoleModel.swift in Sources */, |
| 1262 | 19BB1FEE2AF0E1EC0094D962 /* CNLiveShopDetailViewModel.swift in Sources */, | 1694 | 19BB1FEE2AF0E1EC0094D962 /* CNLiveShopDetailViewModel.swift in Sources */, |
| 1695 | + 1917334C2B2BE9CA007BCC04 /* CNLiveCreateCouponTypeMoneyView.swift in Sources */, | ||
| 1696 | + 191733002B0B58E5007BCC04 /* CNLiveSelectUploadImageModel.swift in Sources */, | ||
| 1263 | 19F1C2332AB5728B0083D06C /* CNIDCardView.swift in Sources */, | 1697 | 19F1C2332AB5728B0083D06C /* CNIDCardView.swift in Sources */, |
| 1698 | + 191732F32B084DBC007BCC04 /* CNLiveShopClassifySwitchTableViewCell.swift in Sources */, | ||
| 1699 | + 191732E72B0615C1007BCC04 /* UIScrollView+CNLiveExtensions.swift in Sources */, | ||
| 1700 | + 1917328E2B032583007BCC04 /* CNLiveRoundedRectView.swift in Sources */, | ||
| 1701 | + 1938BD2E2B48021E00390A34 /* CNHomePageBaseNavigationController.swift in Sources */, | ||
| 1702 | + 1917332F2B16C7C9007BCC04 /* CNLiveTimer.swift in Sources */, | ||
| 1264 | 7CD675292A270F6A008354C1 /* WJColorChange.m in Sources */, | 1703 | 7CD675292A270F6A008354C1 /* WJColorChange.m in Sources */, |
| 1704 | + 1938BD172B3D6C7F00390A34 /* CNLiveAuthViewController.swift in Sources */, | ||
| 1265 | 79F4B11C2A33036E00993C03 /* CNLiveMineInfoAlertView.swift in Sources */, | 1705 | 79F4B11C2A33036E00993C03 /* CNLiveMineInfoAlertView.swift in Sources */, |
| 1266 | 79BB96A82AF223FB00AEA4AC /* CNLiveConfigAlertManager.swift in Sources */, | 1706 | 79BB96A82AF223FB00AEA4AC /* CNLiveConfigAlertManager.swift in Sources */, |
| 1267 | 19BB1FF02AF0E5B30094D962 /* CNLiveShopDetailModel.swift in Sources */, | 1707 | 19BB1FF02AF0E5B30094D962 /* CNLiveShopDetailModel.swift in Sources */, |
| 1708 | + 1938BD382B4BDC2500390A34 /* CNLiveAlbumImageCell.swift in Sources */, | ||
| 1268 | 796398942A260C0100D045EB /* AppDelegate.swift in Sources */, | 1709 | 796398942A260C0100D045EB /* AppDelegate.swift in Sources */, |
| 1269 | 7939B0792B47FC33005AE981 /* CNLiveShortVideoCustomControlView.swift in Sources */, | 1710 | 7939B0792B47FC33005AE981 /* CNLiveShortVideoCustomControlView.swift in Sources */, |
| 1711 | + 1917330D2B1096AB007BCC04 /* CNLivePlayerViewController.swift in Sources */, | ||
| 1712 | + 1917330F2B10989C007BCC04 /* CNLivePlayerView.swift in Sources */, | ||
| 1270 | 7989B5C72A4BDC7200A19B10 /* CNLiveMineEarnListViewController.swift in Sources */, | 1713 | 7989B5C72A4BDC7200A19B10 /* CNLiveMineEarnListViewController.swift in Sources */, |
| 1714 | + 191733502B2C3E1F007BCC04 /* CNLivePickerView.swift in Sources */, | ||
| 1715 | + 191733622B3538DC007BCC04 /* CNLiveShopCouponsManagerViewController.swift in Sources */, | ||
| 1716 | + 191732902B0348F6007BCC04 /* CNLiveSwitchView.swift in Sources */, | ||
| 1271 | 792B53282AFCD7640009AB49 /* CNLiveShopOrderExpressDetailViewController.swift in Sources */, | 1717 | 792B53282AFCD7640009AB49 /* CNLiveShopOrderExpressDetailViewController.swift in Sources */, |
| 1272 | 79396EF12A31C21B0053E1AF /* CNLiveInfoShowViewController.swift in Sources */, | 1718 | 79396EF12A31C21B0053E1AF /* CNLiveInfoShowViewController.swift in Sources */, |
| 1719 | + 191733422B284D5E007BCC04 /* CNLiveShopCouponCreateBottomView.swift in Sources */, | ||
| 1273 | 192336EB2AD9224300D47CD4 /* CNUpSlideViewController.swift in Sources */, | 1720 | 192336EB2AD9224300D47CD4 /* CNUpSlideViewController.swift in Sources */, |
| 1274 | 19565ECB2AF8C59C007D6727 /* CNLiveShopGoodsListModel.swift in Sources */, | 1721 | 19565ECB2AF8C59C007D6727 /* CNLiveShopGoodsListModel.swift in Sources */, |
| 1275 | 7963989D2A260E6200D045EB /* CNLiveBaseViewController.swift in Sources */, | 1722 | 7963989D2A260E6200D045EB /* CNLiveBaseViewController.swift in Sources */, |
| 1276 | 798A44FB2A30999900815935 /* CNLiveAlertTool.swift in Sources */, | 1723 | 798A44FB2A30999900815935 /* CNLiveAlertTool.swift in Sources */, |
| 1724 | + 191732EB2B070943007BCC04 /* CNLiveShopGoodsManageDetailsGoodsCategoryModel.swift in Sources */, | ||
| 1277 | 19565EC02AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift in Sources */, | 1725 | 19565EC02AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift in Sources */, |
| 1726 | + 191732E92B0706B3007BCC04 /* CNLiveShopClassifyCell.swift in Sources */, | ||
| 1278 | 790D01A52A2DF65E00C5978D /* CNLiveLoginPickerView.swift in Sources */, | 1727 | 790D01A52A2DF65E00C5978D /* CNLiveLoginPickerView.swift in Sources */, |
| 1728 | + 191733042B0F216E007BCC04 /* NSDictionary+CNLiveExtensions.swift in Sources */, | ||
| 1279 | 79BA085D2AB18E8300D01875 /* CNLiveSaveAuthDB.swift in Sources */, | 1729 | 79BA085D2AB18E8300D01875 /* CNLiveSaveAuthDB.swift in Sources */, |
| 1280 | 79282A3C2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift in Sources */, | 1730 | 79282A3C2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift in Sources */, |
| 1281 | 19D2CE632AE8B65D00691757 /* CNLiveDownSlideTool.swift in Sources */, | 1731 | 19D2CE632AE8B65D00691757 /* CNLiveDownSlideTool.swift in Sources */, |
| 1282 | 790B1FB82A41B6A60074CF00 /* CNLiveMineMessageViewController.swift in Sources */, | 1732 | 790B1FB82A41B6A60074CF00 /* CNLiveMineMessageViewController.swift in Sources */, |
| 1733 | + 1917333C2B27FE75007BCC04 /* CNLiveShopClassilyManageHeaderView.swift in Sources */, | ||
| 1734 | + 191733252B146078007BCC04 /* CNLivePlayerSlider.swift in Sources */, | ||
| 1283 | 19BB202B2AF382150094D962 /* CNLiveAdaptTool.swift in Sources */, | 1735 | 19BB202B2AF382150094D962 /* CNLiveAdaptTool.swift in Sources */, |
| 1284 | 79E672032AFDFA9C00F2F768 /* CNLiveMineSignOutViewController.swift in Sources */, | 1736 | 79E672032AFDFA9C00F2F768 /* CNLiveMineSignOutViewController.swift in Sources */, |
| 1285 | 19565ECD2AF8D256007D6727 /* CNLiveShopGoodsListClassifyView.swift in Sources */, | 1737 | 19565ECD2AF8D256007D6727 /* CNLiveShopGoodsListClassifyView.swift in Sources */, |
| 1738 | + 1938BD322B4B8F0400390A34 /* CNLiveHomePageModel.swift in Sources */, | ||
| 1739 | + 191732EF2B075C3A007BCC04 /* CNLiveCreateShopClassifyViewController.swift in Sources */, | ||
| 1740 | + 1938BD302B4B8A3500390A34 /* CNLiveHomePageViewModel.swift in Sources */, | ||
| 1286 | 798A44F22A30674200815935 /* CNLiveMineSubBodyListView.swift in Sources */, | 1741 | 798A44F22A30674200815935 /* CNLiveMineSubBodyListView.swift in Sources */, |
| 1287 | 799172382AF090CD00DC01A8 /* CNLiveShopBodyListView.swift in Sources */, | 1742 | 799172382AF090CD00DC01A8 /* CNLiveShopBodyListView.swift in Sources */, |
| 1288 | 19565ED42AF9FEB4007D6727 /* CNLiveShopAddEditGoodsModel.swift in Sources */, | 1743 | 19565ED42AF9FEB4007D6727 /* CNLiveShopAddEditGoodsModel.swift in Sources */, |
| 1289 | 790D01822A2D88FC00C5978D /* CNLiveConfigMacro.swift in Sources */, | 1744 | 790D01822A2D88FC00C5978D /* CNLiveConfigMacro.swift in Sources */, |
| 1290 | 19CC4D4B2ADD086F00308E2A /* CNUpSlideDetailViewController.swift in Sources */, | 1745 | 19CC4D4B2ADD086F00308E2A /* CNUpSlideDetailViewController.swift in Sources */, |
| 1746 | + 1938BD362B4BCC7F00390A34 /* CNLiveAlbumModel.swift in Sources */, | ||
| 1291 | 7C83B4402A52BB2B004BF4A4 /* CNGlobalEnum.swift in Sources */, | 1747 | 7C83B4402A52BB2B004BF4A4 /* CNGlobalEnum.swift in Sources */, |
| 1292 | 7C83B4442A541F36004BF4A4 /* NSDate+CNLiveExtensions.swift in Sources */, | 1748 | 7C83B4442A541F36004BF4A4 /* NSDate+CNLiveExtensions.swift in Sources */, |
| 1749 | + 1917332B2B15CDC6007BCC04 /* CNLivePlayerLandscapeViewController.swift in Sources */, | ||
| 1293 | 798916F12B0491A400D08302 /* CNLiveShopBodyTransListView.swift in Sources */, | 1750 | 798916F12B0491A400D08302 /* CNLiveShopBodyTransListView.swift in Sources */, |
| 1294 | 7CD675482A274167008354C1 /* PGIndexBannerSubiew.m in Sources */, | 1751 | 7CD675482A274167008354C1 /* PGIndexBannerSubiew.m in Sources */, |
| 1752 | + 191733562B2FE855007BCC04 /* CNLivePickerReusingModel.swift in Sources */, | ||
| 1295 | 790D019F2A2DD66E00C5978D /* CNLiveLoginViewModel.swift in Sources */, | 1753 | 790D019F2A2DD66E00C5978D /* CNLiveLoginViewModel.swift in Sources */, |
| 1296 | 1926C2912AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift in Sources */, | 1754 | 1926C2912AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift in Sources */, |
| 1297 | 7C7C62F62A4D72E9007A912E /* CNLiveIdentityDB.swift in Sources */, | 1755 | 7C7C62F62A4D72E9007A912E /* CNLiveIdentityDB.swift in Sources */, |
| 1298 | 19CC4D4F2ADD0FC200308E2A /* CNUpSlideDetailScrollView.swift in Sources */, | 1756 | 19CC4D4F2ADD0FC200308E2A /* CNUpSlideDetailScrollView.swift in Sources */, |
| 1757 | + 191733642B392011007BCC04 /* CNLiveShopGoodsSearchViewController.swift in Sources */, | ||
| 1299 | 79EABB892AB4497700F3A4E2 /* CNLiveSaveStandDB.swift in Sources */, | 1758 | 79EABB892AB4497700F3A4E2 /* CNLiveSaveStandDB.swift in Sources */, |
| 1300 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, | 1759 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, |
| 1301 | 7939B0732B47F12F005AE981 /* CNLiveShortVideoViewController.swift in Sources */, | 1760 | 7939B0732B47F12F005AE981 /* CNLiveShortVideoViewController.swift in Sources */, |
| 1302 | 19BB1FEA2AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift in Sources */, | 1761 | 19BB1FEA2AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift in Sources */, |
| 1762 | + 191733132B109F7B007BCC04 /* CNLivePlayerGestureView.swift in Sources */, | ||
| 1763 | + 1938BD202B46799A00390A34 /* CNLivePlayletHomePageController.swift in Sources */, | ||
| 1303 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, | 1764 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, |
| 1304 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, | 1765 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, |
| 1766 | + 191732F82B08AB9D007BCC04 /* CNLiveShopClassilyViewModel.swift in Sources */, | ||
| 1305 | 79BB1C162B05C62900C5720C /* CNLiveShopBodyCouponView.swift in Sources */, | 1767 | 79BB1C162B05C62900C5720C /* CNLiveShopBodyCouponView.swift in Sources */, |
| 1306 | 798916E92B04532D00D08302 /* CNLiveSavePointDB.swift in Sources */, | 1768 | 798916E92B04532D00D08302 /* CNLiveSavePointDB.swift in Sources */, |
| 1769 | + 1938BD242B468AC900390A34 /* CNLivePlayletHomePageHeaderCell.swift in Sources */, | ||
| 1307 | 19FA20172AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift in Sources */, | 1770 | 19FA20172AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift in Sources */, |
| 1308 | 19123FC12ABC11170075C883 /* CNWebViewController.swift in Sources */, | 1771 | 19123FC12ABC11170075C883 /* CNWebViewController.swift in Sources */, |
| 1309 | 1926C28F2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift in Sources */, | 1772 | 1926C28F2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift in Sources */, |
| 1310 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, | 1773 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, |
| 1311 | 7C7C62F62A4D72E9007A912E /* CNLiveIdentityDB.swift in Sources */, | 1774 | 7C7C62F62A4D72E9007A912E /* CNLiveIdentityDB.swift in Sources */, |
| 1775 | + 191732E52B05FFE8007BCC04 /* CNLiveModalPresentationViewController.swift in Sources */, | ||
| 1312 | 799172342AF08D3200DC01A8 /* CNLiveShopViewModel.swift in Sources */, | 1776 | 799172342AF08D3200DC01A8 /* CNLiveShopViewModel.swift in Sources */, |
| 1313 | 799172362AF08D4500DC01A8 /* CNLiveShopBaseModel.swift in Sources */, | 1777 | 799172362AF08D4500DC01A8 /* CNLiveShopBaseModel.swift in Sources */, |
| 1314 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, | 1778 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, |
| 1315 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, | 1779 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, |
| 1780 | + 1938BD3D2B4BDD4B00390A34 /* CNLiveAlbumCell.swift in Sources */, | ||
| 1781 | + 19E9D1622B3BBB2E00D0FB30 /* CNLiveFileManager.swift in Sources */, | ||
| 1316 | 79E496E82AB9674300127BF8 /* NSMutableAttributedString+CNLiveExtensions.swift in Sources */, | 1782 | 79E496E82AB9674300127BF8 /* NSMutableAttributedString+CNLiveExtensions.swift in Sources */, |
| 1317 | 19CC4D472ADD006600308E2A /* CNDownSlideSingleCourseCell.swift in Sources */, | 1783 | 19CC4D472ADD006600308E2A /* CNDownSlideSingleCourseCell.swift in Sources */, |
| 1784 | + 191733232B14601A007BCC04 /* CNLivePlayerProgressSlider.swift in Sources */, | ||
| 1785 | + 1917334A2B2BE746007BCC04 /* CNLiveCreateCouponTableViewCell.swift in Sources */, | ||
| 1786 | + 191732FE2B0B3EBF007BCC04 /* CNLiveShopGoodsDetailsViewController.swift in Sources */, | ||
| 1318 | 79E496E32AB9357000127BF8 /* UITableViewCell+CNLiveExtension.swift in Sources */, | 1787 | 79E496E32AB9357000127BF8 /* UITableViewCell+CNLiveExtension.swift in Sources */, |
| 1319 | 7C83B4422A541EBF004BF4A4 /* CALayer+CNLiveExtensions.swift in Sources */, | 1788 | 7C83B4422A541EBF004BF4A4 /* CALayer+CNLiveExtensions.swift in Sources */, |
| 1320 | 19565EC72AF8AD38007D6727 /* CNLiveShopNewProductController.swift in Sources */, | 1789 | 19565EC72AF8AD38007D6727 /* CNLiveShopNewProductController.swift in Sources */, |
| 1321 | 798A44F72A3077ED00815935 /* CNLiveHotButton.swift in Sources */, | 1790 | 798A44F72A3077ED00815935 /* CNLiveHotButton.swift in Sources */, |
| 1322 | 7CD6753D2A2740B0008354C1 /* CNMainView.swift in Sources */, | 1791 | 7CD6753D2A2740B0008354C1 /* CNMainView.swift in Sources */, |
| 1792 | + 191733662B39237D007BCC04 /* CNLiveShopGoodsManageListTableViewCell.swift in Sources */, | ||
| 1323 | 793CAF522A58FCA200882EF4 /* CNLiveMineExchangeViewController.swift in Sources */, | 1793 | 793CAF522A58FCA200882EF4 /* CNLiveMineExchangeViewController.swift in Sources */, |
| 1794 | + 1917334E2B2C1A08007BCC04 /* CNLiveSelectCouponTapView.swift in Sources */, | ||
| 1795 | + 191733272B148BB1007BCC04 /* CNLivePlayerFastForwardPreviewView.swift in Sources */, | ||
| 1324 | 7CD675522A29C04B008354C1 /* CNLiveConfigstant.swift in Sources */, | 1796 | 7CD675522A29C04B008354C1 /* CNLiveConfigstant.swift in Sources */, |
| 1325 | 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */, | 1797 | 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */, |
| 1326 | 1965FA402AFB38AA00F0F435 /* CNLiveAddGoodsSelectUploadImageView.swift in Sources */, | 1798 | 1965FA402AFB38AA00F0F435 /* CNLiveAddGoodsSelectUploadImageView.swift in Sources */, |
| @@ -1328,30 +1800,48 @@ | @@ -1328,30 +1800,48 @@ | ||
| 1328 | 19BB1FE12AEB5C220094D962 /* CNLiveShopConsoleController.swift in Sources */, | 1800 | 19BB1FE12AEB5C220094D962 /* CNLiveShopConsoleController.swift in Sources */, |
| 1329 | 7C4931382A307BDB000E44B4 /* CNHomePageGuideView.swift in Sources */, | 1801 | 7C4931382A307BDB000E44B4 /* CNHomePageGuideView.swift in Sources */, |
| 1330 | 7CD6753E2A2740B0008354C1 /* CNUpSlideView.swift in Sources */, | 1802 | 7CD6753E2A2740B0008354C1 /* CNUpSlideView.swift in Sources */, |
| 1803 | + 191733582B319552007BCC04 /* CNLiveCouponGoodsListView.swift in Sources */, | ||
| 1331 | 7CD675402A2740B0008354C1 /* CNDownSlideView.swift in Sources */, | 1804 | 7CD675402A2740B0008354C1 /* CNDownSlideView.swift in Sources */, |
| 1332 | 19BB1FE32AEB8B7C0094D962 /* CNLiveShopConsoleViewModel.swift in Sources */, | 1805 | 19BB1FE32AEB8B7C0094D962 /* CNLiveShopConsoleViewModel.swift in Sources */, |
| 1806 | + 1938BD2A2B48014E00390A34 /* CNHomepageDetailViewController.swift in Sources */, | ||
| 1333 | 1965FA422AFB79EA00F0F435 /* CNLiveGoodsCategoryController.swift in Sources */, | 1807 | 1965FA422AFB79EA00F0F435 /* CNLiveGoodsCategoryController.swift in Sources */, |
| 1334 | 792E57D92A3AA2F2005834DB /* CNLiveCommonBaseModel.swift in Sources */, | 1808 | 792E57D92A3AA2F2005834DB /* CNLiveCommonBaseModel.swift in Sources */, |
| 1335 | 791C1C862AFB2EB4003E6362 /* CNLiveShopOrderExpressViewController.swift in Sources */, | 1809 | 791C1C862AFB2EB4003E6362 /* CNLiveShopOrderExpressViewController.swift in Sources */, |
| 1336 | 7CD6753E2A2740B0008354C1 /* CNUpSlideView.swift in Sources */, | 1810 | 7CD6753E2A2740B0008354C1 /* CNUpSlideView.swift in Sources */, |
| 1811 | + 191733312B170537007BCC04 /* CNLiveCommonManager.swift in Sources */, | ||
| 1337 | 7CD675402A2740B0008354C1 /* CNDownSlideView.swift in Sources */, | 1812 | 7CD675402A2740B0008354C1 /* CNDownSlideView.swift in Sources */, |
| 1813 | + 191732F52B085BAE007BCC04 /* CNLiveShopClassilyIconTableViewCell.swift in Sources */, | ||
| 1814 | + 191732E32B05F474007BCC04 /* CNLiveShopGoodsManageDetailsInputManager.swift in Sources */, | ||
| 1338 | 79B2E3602AF39191002A8524 /* NSObject+CNLiveConfigModuleInline.swift in Sources */, | 1815 | 79B2E3602AF39191002A8524 /* NSObject+CNLiveConfigModuleInline.swift in Sources */, |
| 1339 | 79A212C02B0B5C5400BFA8E3 /* CNLiveShopCouponManagerViewController.swift in Sources */, | 1816 | 79A212C02B0B5C5400BFA8E3 /* CNLiveShopCouponManagerViewController.swift in Sources */, |
| 1340 | 7C2703362A3AFD3A0061EC50 /* CNLiveEnvironment.swift in Sources */, | 1817 | 7C2703362A3AFD3A0061EC50 /* CNLiveEnvironment.swift in Sources */, |
| 1341 | 798A44FD2A309EBA00815935 /* CNLiveTypeFeedBackViewController.swift in Sources */, | 1818 | 798A44FD2A309EBA00815935 /* CNLiveTypeFeedBackViewController.swift in Sources */, |
| 1342 | 79656E382AAEBA8E00119A61 /* CNLiveMineInputViewController.swift in Sources */, | 1819 | 79656E382AAEBA8E00119A61 /* CNLiveMineInputViewController.swift in Sources */, |
| 1343 | 19CC4D522ADD129800308E2A /* CNUpSlideAnimationTransition.swift in Sources */, | 1820 | 19CC4D522ADD129800308E2A /* CNUpSlideAnimationTransition.swift in Sources */, |
| 1821 | + 1917331D2B10A15A007BCC04 /* CNLivePlayerFailureView.swift in Sources */, | ||
| 1344 | 7CD6754F2A2840B9008354C1 /* CNMetaCodeHomePageController.swift in Sources */, | 1822 | 7CD6754F2A2840B9008354C1 /* CNMetaCodeHomePageController.swift in Sources */, |
| 1345 | 79D094DC2B0765DD008CB1F3 /* CNLiveShopBodyCouponGoodsListView.swift in Sources */, | 1823 | 79D094DC2B0765DD008CB1F3 /* CNLiveShopBodyCouponGoodsListView.swift in Sources */, |
| 1346 | 798916EF2B048EC800D08302 /* CNLiveShopTransListViewController.swift in Sources */, | 1824 | 798916EF2B048EC800D08302 /* CNLiveShopTransListViewController.swift in Sources */, |
| 1347 | 7989B5C52A4BDC6000A19B10 /* CNLiveMineEarnViewController.swift in Sources */, | 1825 | 7989B5C52A4BDC6000A19B10 /* CNLiveMineEarnViewController.swift in Sources */, |
| 1348 | 792E57DB2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift in Sources */, | 1826 | 792E57DB2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift in Sources */, |
| 1827 | + 191732F12B084822007BCC04 /* CNLiveShopClassifyInputTableViewCell.swift in Sources */, | ||
| 1828 | + 191733212B143F3A007BCC04 /* CNLiveGradientView.swift in Sources */, | ||
| 1349 | 19BB1FE62AEB93B80094D962 /* CNLiveShopUserInfoModel.swift in Sources */, | 1829 | 19BB1FE62AEB93B80094D962 /* CNLiveShopUserInfoModel.swift in Sources */, |
| 1350 | 7CD675472A274167008354C1 /* NewPagedFlowView.m in Sources */, | 1830 | 7CD675472A274167008354C1 /* NewPagedFlowView.m in Sources */, |
| 1831 | + 191732ED2B073C52007BCC04 /* CNLiveShopClassifyListModel.swift in Sources */, | ||
| 1832 | + 191733482B2855E8007BCC04 /* CNLiveShopCouponViewModel.swift in Sources */, | ||
| 1351 | 79F4B11A2A32F21400993C03 /* CNLiveMineNickViewController.swift in Sources */, | 1833 | 79F4B11A2A32F21400993C03 /* CNLiveMineNickViewController.swift in Sources */, |
| 1834 | + 191733542B2C4D58007BCC04 /* CNLivePickerToolsView.swift in Sources */, | ||
| 1835 | + 191733112B109EDC007BCC04 /* CNLivePlayerControlView.swift in Sources */, | ||
| 1836 | + 1917331F2B10A1BE007BCC04 /* CNLivePlayerEnum.swift in Sources */, | ||
| 1837 | + 191733382B27FD66007BCC04 /* CNLiveShopClassifySectionHeaderView.swift in Sources */, | ||
| 1838 | + 1938BD222B467C1700390A34 /* CNLivePlayletHomePageCell.swift in Sources */, | ||
| 1839 | + 1938BD3F2B4BE7C500390A34 /* CNLiveAlbumMsgModel.swift in Sources */, | ||
| 1352 | 798A44FF2A30A0A800815935 /* CNLiveInputFeedBackViewController.swift in Sources */, | 1840 | 798A44FF2A30A0A800815935 /* CNLiveInputFeedBackViewController.swift in Sources */, |
| 1353 | 79282A442A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift in Sources */, | 1841 | 79282A442A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift in Sources */, |
| 1354 | 79BB96A62AF21E2800AEA4AC /* CNLiveShopOrderDetailViewController.swift in Sources */, | 1842 | 79BB96A62AF21E2800AEA4AC /* CNLiveShopOrderDetailViewController.swift in Sources */, |
| 1843 | + 1938BD2C2B4801A700390A34 /* CNHomePageAnimationTransition.swift in Sources */, | ||
| 1844 | + 191733452B284DCD007BCC04 /* CNLiveShopCouponListModel.swift in Sources */, | ||
| 1355 | 7C2703302A36CBE30061EC50 /* CNCertificationView.swift in Sources */, | 1845 | 7C2703302A36CBE30061EC50 /* CNCertificationView.swift in Sources */, |
| 1356 | 796308752B4B90700090D22A /* CNLiveShortVideoHomeModel.swift in Sources */, | 1846 | 796308752B4B90700090D22A /* CNLiveShortVideoHomeModel.swift in Sources */, |
| 1357 | 19CC4D542ADD163D00308E2A /* CNUpSlideCardPresentationController.swift in Sources */, | 1847 | 19CC4D542ADD163D00308E2A /* CNUpSlideCardPresentationController.swift in Sources */, |
| @@ -1361,15 +1851,24 @@ | @@ -1361,15 +1851,24 @@ | ||
| 1361 | 19565EC52AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift in Sources */, | 1851 | 19565EC52AF8AD1F007D6727 /* CNLiveShopProductManagerController.swift in Sources */, |
| 1362 | 19CC4D492ADD06C500308E2A /* UITableView+Extension.swift in Sources */, | 1852 | 19CC4D492ADD06C500308E2A /* UITableView+Extension.swift in Sources */, |
| 1363 | 796308732B4B8EB80090D22A /* CNLiveShortVideoViewModel.swift in Sources */, | 1853 | 796308732B4B8EB80090D22A /* CNLiveShortVideoViewModel.swift in Sources */, |
| 1854 | + 19E9D1602B3A98C200D0FB30 /* CNLiveShopAssociatedGoodsTableViewCell.swift in Sources */, | ||
| 1855 | + 191732CE2B04AACD007BCC04 /* CNLiveShopTextView.swift in Sources */, | ||
| 1364 | 7C2703332A36CC660061EC50 /* CNLiveGlobalBlock.swift in Sources */, | 1856 | 7C2703332A36CC660061EC50 /* CNLiveGlobalBlock.swift in Sources */, |
| 1365 | 7987BF3D2A497644000A1ABC /* CNLiveMineQuestViewController.swift in Sources */, | 1857 | 7987BF3D2A497644000A1ABC /* CNLiveMineQuestViewController.swift in Sources */, |
| 1366 | 798A44EA2A30135D00815935 /* CNLiveMineBodyListView.swift in Sources */, | 1858 | 798A44EA2A30135D00815935 /* CNLiveMineBodyListView.swift in Sources */, |
| 1859 | + 1917335A2B3283A1007BCC04 /* CNLiveCouponGoodsSearchView.swift in Sources */, | ||
| 1860 | + 191733362B27EFD4007BCC04 /* CNLiveShopClassilyManageViewController.swift in Sources */, | ||
| 1367 | 799172322AF08D1B00DC01A8 /* CNLiveShopOrderViewController.swift in Sources */, | 1861 | 799172322AF08D1B00DC01A8 /* CNLiveShopOrderViewController.swift in Sources */, |
| 1862 | + 1917332D2B15DB20007BCC04 /* CNLivePlayerKVOModel.swift in Sources */, | ||
| 1863 | + 1917333F2B284C93007BCC04 /* CNLiveShopCouponCreateViewController.swift in Sources */, | ||
| 1864 | + 1917335C2B3283FF007BCC04 /* CNLiveCouponGoodsListSearchView.swift in Sources */, | ||
| 1368 | 798A44F92A30835400815935 /* CNLiveHelpFeedBackViewController.swift in Sources */, | 1865 | 798A44F92A30835400815935 /* CNLiveHelpFeedBackViewController.swift in Sources */, |
| 1369 | 79A68C4A2A26E6CE00DC3B43 /* (null) in Sources */, | 1866 | 79A68C4A2A26E6CE00DC3B43 /* (null) in Sources */, |
| 1867 | + 1938BD262B479D3400390A34 /* UILabel+FormattedText.swift in Sources */, | ||
| 1370 | 790D01852A2D89E100C5978D /* UIColor+CNLiveExtensions.swift in Sources */, | 1868 | 790D01852A2D89E100C5978D /* UIColor+CNLiveExtensions.swift in Sources */, |
| 1371 | 794FF1092B02131300385E85 /* CNLiveSaveSearchDB.swift in Sources */, | 1869 | 794FF1092B02131300385E85 /* CNLiveSaveSearchDB.swift in Sources */, |
| 1372 | 79396EED2A319F220053E1AF /* NSObject+CNLiveExtensions.swift in Sources */, | 1870 | 79396EED2A319F220053E1AF /* NSObject+CNLiveExtensions.swift in Sources */, |
| 1871 | + 1917331B2B10A0EF007BCC04 /* CNLivePlayerLoadingView.swift in Sources */, | ||
| 1373 | 19FA201B2AE60423001F7186 /* CNLiveDownSlideModelLayout.swift in Sources */, | 1872 | 19FA201B2AE60423001F7186 /* CNLiveDownSlideModelLayout.swift in Sources */, |
| 1374 | 7C4931312A2F142F000E44B4 /* CNHomePageBackgroupView.swift in Sources */, | 1873 | 7C4931312A2F142F000E44B4 /* CNHomePageBackgroupView.swift in Sources */, |
| 1375 | 19BB1FF22AF21A950094D962 /* CNLliveShopDetailBannerCell.swift in Sources */, | 1874 | 19BB1FF22AF21A950094D962 /* CNLliveShopDetailBannerCell.swift in Sources */, |
| @@ -1377,6 +1876,9 @@ | @@ -1377,6 +1876,9 @@ | ||
| 1377 | 19CC4D562ADD19C200308E2A /* String+Extension.swift in Sources */, | 1876 | 19CC4D562ADD19C200308E2A /* String+Extension.swift in Sources */, |
| 1378 | 7905BB492AB0588B0089BC50 /* CNLiveMineAuthResultViewController.swift in Sources */, | 1877 | 7905BB492AB0588B0089BC50 /* CNLiveMineAuthResultViewController.swift in Sources */, |
| 1379 | 19565EC22AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift in Sources */, | 1878 | 19565EC22AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift in Sources */, |
| 1879 | + 1917330A2B10864F007BCC04 /* Array+CNLiveExtensions.swift in Sources */, | ||
| 1880 | + 191732FB2B0AF34A007BCC04 /* CNLiveShopGoodsDetailsModel.swift in Sources */, | ||
| 1881 | + 191733152B109FD7007BCC04 /* CNLivePlayerTopNaviView.swift in Sources */, | ||
| 1380 | 794FF1052B01FC8800385E85 /* CNLiveShopOrderSearchViewController.swift in Sources */, | 1882 | 794FF1052B01FC8800385E85 /* CNLiveShopOrderSearchViewController.swift in Sources */, |
| 1381 | 798A44EC2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift in Sources */, | 1883 | 798A44EC2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift in Sources */, |
| 1382 | 791C1C882AFB6FD7003E6362 /* CNLiveShopOrderExpressFirmViewController.swift in Sources */, | 1884 | 791C1C882AFB6FD7003E6362 /* CNLiveShopOrderExpressFirmViewController.swift in Sources */, |
| @@ -1388,8 +1890,11 @@ | @@ -1388,8 +1890,11 @@ | ||
| 1388 | 19FA20192AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift in Sources */, | 1890 | 19FA20192AE22D98001F7186 /* CNLiveDownSlideTodayRecommendCell.swift in Sources */, |
| 1389 | 790B1FB42A4153E90074CF00 /* CNLiveMineBaseModel.swift in Sources */, | 1891 | 790B1FB42A4153E90074CF00 /* CNLiveMineBaseModel.swift in Sources */, |
| 1390 | 7978A8432A396632007C86B8 /* CNLiveMineViewModel.swift in Sources */, | 1892 | 7978A8432A396632007C86B8 /* CNLiveMineViewModel.swift in Sources */, |
| 1893 | + 191733022B0C4EAB007BCC04 /* CNLiveSelUplSingleImageView.swift in Sources */, | ||
| 1391 | 798A44EE2A305AAC00815935 /* CNLiveBaseNavigationController.swift in Sources */, | 1894 | 798A44EE2A305AAC00815935 /* CNLiveBaseNavigationController.swift in Sources */, |
| 1895 | + 1938BD412B4BEC6900390A34 /* CNLiveAlbumListModel.swift in Sources */, | ||
| 1392 | 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */, | 1896 | 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */, |
| 1897 | + 191733292B148BF7007BCC04 /* CNLivePlayerVolumeBrightnessView.swift in Sources */, | ||
| 1393 | 7C4931292A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift in Sources */, | 1898 | 7C4931292A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift in Sources */, |
| 1394 | 79F4B1162A32B96B00993C03 /* CNLiveMineInfoViewController.swift in Sources */, | 1899 | 79F4B1162A32B96B00993C03 /* CNLiveMineInfoViewController.swift in Sources */, |
| 1395 | 791C1C8A2AFB84EE003E6362 /* CNLiveShopOrderExpressListViewController.swift in Sources */, | 1900 | 791C1C8A2AFB84EE003E6362 /* CNLiveShopOrderExpressListViewController.swift in Sources */, |
| @@ -1398,22 +1903,29 @@ | @@ -1398,22 +1903,29 @@ | ||
| 1398 | 1965FA3E2AFB176E00F0F435 /* CNLiveShopAddGoodsSingleView.swift in Sources */, | 1903 | 1965FA3E2AFB176E00F0F435 /* CNLiveShopAddGoodsSingleView.swift in Sources */, |
| 1399 | 7CD6753C2A2740B0008354C1 /* CNUpSlideViewRemindView.swift in Sources */, | 1904 | 7CD6753C2A2740B0008354C1 /* CNUpSlideViewRemindView.swift in Sources */, |
| 1400 | 7939B0772B47F88A005AE981 /* CNLiveShortVideoControlView.swift in Sources */, | 1905 | 7939B0772B47F88A005AE981 /* CNLiveShortVideoControlView.swift in Sources */, |
| 1906 | + 191733602B352488007BCC04 /* CNLiveCouponGoodsListTableViewCell.swift in Sources */, | ||
| 1401 | 79BB1C142B05C51900C5720C /* CNLiveShopCouponViewController.swift in Sources */, | 1907 | 79BB1C142B05C51900C5720C /* CNLiveShopCouponViewController.swift in Sources */, |
| 1402 | 798916ED2B048E8200D08302 /* CNLiveShopTransViewController.swift in Sources */, | 1908 | 798916ED2B048E8200D08302 /* CNLiveShopTransViewController.swift in Sources */, |
| 1909 | + 191733172B10A017007BCC04 /* CNLivePlayerBottomNaviView.swift in Sources */, | ||
| 1403 | 19BB1FEC2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift in Sources */, | 1910 | 19BB1FEC2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift in Sources */, |
| 1404 | 79A212C22B0B5D0700BFA8E3 /* CNLiveShopBodyCouponManagerView.swift in Sources */, | 1911 | 79A212C22B0B5D0700BFA8E3 /* CNLiveShopBodyCouponManagerView.swift in Sources */, |
| 1405 | 794FF1072B01FC9800385E85 /* CNLiveShopOrderSearchListViewController.swift in Sources */, | 1912 | 794FF1072B01FC9800385E85 /* CNLiveShopOrderSearchListViewController.swift in Sources */, |
| 1406 | 798A44E82A30134400815935 /* CNLiveMineHeaderView.swift in Sources */, | 1913 | 798A44E82A30134400815935 /* CNLiveMineHeaderView.swift in Sources */, |
| 1407 | 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNLiveExtensions.swift in Sources */, | 1914 | 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNLiveExtensions.swift in Sources */, |
| 1408 | 79A267832AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift in Sources */, | 1915 | 79A267832AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift in Sources */, |
| 1916 | + 1917335E2B328495007BCC04 /* CNLiveCouponListTableViewCell.swift in Sources */, | ||
| 1409 | 791C1C8C2AFB85F8003E6362 /* CNLiveShopBodyExpressView.swift in Sources */, | 1917 | 791C1C8C2AFB85F8003E6362 /* CNLiveShopBodyExpressView.swift in Sources */, |
| 1410 | 790D019A2A2DCAE400C5978D /* CNLiveViewController.swift in Sources */, | 1918 | 790D019A2A2DCAE400C5978D /* CNLiveViewController.swift in Sources */, |
| 1919 | + 191733192B10A05D007BCC04 /* CNLivePlayerProgressView.swift in Sources */, | ||
| 1411 | 79803E272AD68D3100F05F68 /* CNLiveMineShopViewController.swift in Sources */, | 1920 | 79803E272AD68D3100F05F68 /* CNLiveMineShopViewController.swift in Sources */, |
| 1412 | 79A68C4C2A26EA6000DC3B43 /* (null) in Sources */, | 1921 | 79A68C4C2A26EA6000DC3B43 /* (null) in Sources */, |
| 1413 | 79803E292AD6991200F05F68 /* CNLiveMineInputMessageView.swift in Sources */, | 1922 | 79803E292AD6991200F05F68 /* CNLiveMineInputMessageView.swift in Sources */, |
| 1414 | 79282A462A2F457D00B5F8CF /* CNLiveMineViewController.swift in Sources */, | 1923 | 79282A462A2F457D00B5F8CF /* CNLiveMineViewController.swift in Sources */, |
| 1415 | 7991723A2AF091E100DC01A8 /* CNLiveShopOrderListViewController.swift in Sources */, | 1924 | 7991723A2AF091E100DC01A8 /* CNLiveShopOrderListViewController.swift in Sources */, |
| 1416 | 798A44F02A305BC200815935 /* UIButton+CNLiveExtensions.swift in Sources */, | 1925 | 798A44F02A305BC200815935 /* UIButton+CNLiveExtensions.swift in Sources */, |
| 1926 | + 1938BD342B4B968300390A34 /* CNLiveHomePageDuanJuCell.swift in Sources */, | ||
| 1927 | + 191733522B2C4CEA007BCC04 /* CNLivePickerSelectDateTools.swift in Sources */, | ||
| 1928 | + 1917333A2B27FDF3007BCC04 /* CNLiveShopClassilyManageTableViewCell.swift in Sources */, | ||
| 1417 | ); | 1929 | ); |
| 1418 | runOnlyForDeploymentPostprocessing = 0; | 1930 | runOnlyForDeploymentPostprocessing = 0; |
| 1419 | }; | 1931 | }; |
| @@ -1591,7 +2103,7 @@ | @@ -1591,7 +2103,7 @@ | ||
| 1591 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; | 2103 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| 1592 | CLANG_ENABLE_MODULES = YES; | 2104 | CLANG_ENABLE_MODULES = YES; |
| 1593 | CODE_SIGN_STYLE = Automatic; | 2105 | CODE_SIGN_STYLE = Automatic; |
| 1594 | - CURRENT_PROJECT_VERSION = 1.0.1.23.11.13.10; | 2106 | + CURRENT_PROJECT_VERSION = 1.0.3.24.01.03.11; |
| 1595 | DEVELOPMENT_TEAM = 94X49GG3ZW; | 2107 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 1596 | EXCLUDED_ARCHS = ""; | 2108 | EXCLUDED_ARCHS = ""; |
| 1597 | GENERATE_INFOPLIST_FILE = YES; | 2109 | GENERATE_INFOPLIST_FILE = YES; |
| @@ -1614,7 +2126,7 @@ | @@ -1614,7 +2126,7 @@ | ||
| 1614 | "$(inherited)", | 2126 | "$(inherited)", |
| 1615 | "@executable_path/Frameworks", | 2127 | "@executable_path/Frameworks", |
| 1616 | ); | 2128 | ); |
| 1617 | - MARKETING_VERSION = 1.0.1; | 2129 | + MARKETING_VERSION = 1.0.3; |
| 1618 | PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.metaCode; | 2130 | PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.metaCode; |
| 1619 | PRODUCT_NAME = "$(TARGET_NAME)"; | 2131 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 1620 | SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; | 2132 | SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; |
| @@ -1636,7 +2148,7 @@ | @@ -1636,7 +2148,7 @@ | ||
| 1636 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; | 2148 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| 1637 | CLANG_ENABLE_MODULES = YES; | 2149 | CLANG_ENABLE_MODULES = YES; |
| 1638 | CODE_SIGN_STYLE = Automatic; | 2150 | CODE_SIGN_STYLE = Automatic; |
| 1639 | - CURRENT_PROJECT_VERSION = 1.0.1.23.11.13.10; | 2151 | + CURRENT_PROJECT_VERSION = 1.0.3.24.01.03.11; |
| 1640 | DEVELOPMENT_TEAM = 94X49GG3ZW; | 2152 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 1641 | EXCLUDED_ARCHS = ""; | 2153 | EXCLUDED_ARCHS = ""; |
| 1642 | GENERATE_INFOPLIST_FILE = YES; | 2154 | GENERATE_INFOPLIST_FILE = YES; |
| @@ -1659,7 +2171,7 @@ | @@ -1659,7 +2171,7 @@ | ||
| 1659 | "$(inherited)", | 2171 | "$(inherited)", |
| 1660 | "@executable_path/Frameworks", | 2172 | "@executable_path/Frameworks", |
| 1661 | ); | 2173 | ); |
| 1662 | - MARKETING_VERSION = 1.0.1; | 2174 | + MARKETING_VERSION = 1.0.3; |
| 1663 | PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.metaCode; | 2175 | PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.metaCode; |
| 1664 | PRODUCT_NAME = "$(TARGET_NAME)"; | 2176 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 1665 | SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; | 2177 | SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; |
metaCode/Classes/Common/Base/CNLiveBaseNavigationController.swift
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | 7 | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | 9 | ||
| 10 | -class CNLiveBaseNavigationController : UINavigationController, UIGestureRecognizerDelegate { | 10 | +class CNLiveBaseNavigationController : UINavigationController,UINavigationControllerDelegate { |
| 11 | 11 | ||
| 12 | override func viewDidLoad() { | 12 | override func viewDidLoad() { |
| 13 | super.viewDidLoad() | 13 | super.viewDidLoad() |
| @@ -20,15 +20,28 @@ class CNLiveBaseNavigationController : UINavigationController, UIGestureRecogniz | @@ -20,15 +20,28 @@ class CNLiveBaseNavigationController : UINavigationController, UIGestureRecogniz | ||
| 20 | view.addGestureRecognizer(panges) | 20 | view.addGestureRecognizer(panges) |
| 21 | 21 | ||
| 22 | self.interactivePopGestureRecognizer?.delegate = self //侧滑返回 | 22 | self.interactivePopGestureRecognizer?.delegate = self //侧滑返回 |
| 23 | + self.delegate = self as UINavigationControllerDelegate | ||
| 23 | } | 24 | } |
| 24 | 25 | ||
| 25 | // MARK: - <UIGestureRecognizerDelegate> | 26 | // MARK: - <UIGestureRecognizerDelegate> |
| 26 | // 什么时候调用:每次触发手势之前都会询问下代理,是否触发。 | 27 | // 什么时候调用:每次触发手势之前都会询问下代理,是否触发。 |
| 27 | // 作用:拦截手势触发,手势识别器对象会调用这个代理方法来决定手势是否有效 | 28 | // 作用:拦截手势触发,手势识别器对象会调用这个代理方法来决定手势是否有效 |
| 28 | - func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { | 29 | + override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { |
| 30 | + | ||
| 29 | return viewControllers.count > 1 | 31 | return viewControllers.count > 1 |
| 30 | } | 32 | } |
| 31 | 33 | ||
| 34 | + func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) { | ||
| 35 | + | ||
| 36 | + } | ||
| 37 | + func navigationController(_ navigationController: UINavigationController, didShow viewController: UIViewController, animated: Bool) { | ||
| 38 | + | ||
| 39 | + if navigationController.viewControllers.count > 1 { | ||
| 40 | + self.interactivePopGestureRecognizer?.isEnabled = true | ||
| 41 | + }else { | ||
| 42 | + self.interactivePopGestureRecognizer?.isEnabled = false | ||
| 43 | + } | ||
| 44 | + } | ||
| 32 | 45 | ||
| 33 | /// 重写push方法的目的 : 拦截所有push进来的子控制器 | 46 | /// 重写push方法的目的 : 拦截所有push进来的子控制器 |
| 34 | override func pushViewController(_ viewController: UIViewController, animated: Bool) { | 47 | override func pushViewController(_ viewController: UIViewController, animated: Bool) { |
metaCode/Classes/Common/Base/CNLiveBaseTabBarViewController.swift
| @@ -58,22 +58,23 @@ class CNLiveBaseTabBarViewController: UITabBarController | @@ -58,22 +58,23 @@ class CNLiveBaseTabBarViewController: UITabBarController | ||
| 58 | // MARK: - 控制器的信息 | 58 | // MARK: - 控制器的信息 |
| 59 | func setUpTabBar() { | 59 | func setUpTabBar() { |
| 60 | 60 | ||
| 61 | - let homeVC = CNMetaCodeHomePageController() | 61 | + let homeVC = CNLiveAuthViewController() |
| 62 | + let authVC = CNMetaCodeHomePageController() | ||
| 62 | let mineVC = CNLiveMineViewController() | 63 | let mineVC = CNLiveMineViewController() |
| 63 | 64 | ||
| 64 | creatTabbarView(viewController: homeVC, image: "tabbar_hoem_icon_default", selectImage: "tabbar_hoem_icon_selected", title: "首页") | 65 | creatTabbarView(viewController: homeVC, image: "tabbar_hoem_icon_default", selectImage: "tabbar_hoem_icon_selected", title: "首页") |
| 65 | 66 | ||
| 67 | + creatTabbarView(viewController: authVC, image: "tabbar_hoem_icon_default", selectImage: "tabbar_hoem_icon_selected", title: "认证") | ||
| 68 | + | ||
| 66 | creatTabbarView(viewController: mineVC, image: "tabbar_mine_icon_default", selectImage: "tabbar_mine_icon_selected", title: "我的") | 69 | creatTabbarView(viewController: mineVC, image: "tabbar_mine_icon_default", selectImage: "tabbar_mine_icon_selected", title: "我的") |
| 67 | 70 | ||
| 68 | self.tabBar.tintColor = UIColor("#0066FE") | 71 | self.tabBar.tintColor = UIColor("#0066FE") |
| 69 | self.tabBar.isTranslucent = false | 72 | self.tabBar.isTranslucent = false |
| 70 | 73 | ||
| 71 | self.viewControllers = [ | 74 | self.viewControllers = [ |
| 72 | - CNLiveBaseNavigationController(rootViewController: homeVC), | 75 | + CNLiveBaseNavigationController(rootViewController: homeVC),CNLiveBaseNavigationController(rootViewController: authVC), |
| 73 | CNLiveBaseNavigationController(rootViewController: mineVC), | 76 | CNLiveBaseNavigationController(rootViewController: mineVC), |
| 74 | ]; | 77 | ]; |
| 75 | - | ||
| 76 | - | ||
| 77 | } | 78 | } |
| 78 | 79 | ||
| 79 | // MARK: - Tabar 背景图 | 80 | // MARK: - Tabar 背景图 |
metaCode/Classes/Common/Base/CNLiveBaseViewController.swift
| @@ -116,6 +116,11 @@ class CNLiveBaseViewController: UIViewController { | @@ -116,6 +116,11 @@ class CNLiveBaseViewController: UIViewController { | ||
| 116 | private var leftNavSpace: CGFloat = 0.0 | 116 | private var leftNavSpace: CGFloat = 0.0 |
| 117 | private var rightNavSpace: CGFloat = 0.0 | 117 | private var rightNavSpace: CGFloat = 0.0 |
| 118 | 118 | ||
| 119 | + /** | ||
| 120 | + 是否禁止右滑返回 | ||
| 121 | + */ | ||
| 122 | + var popGestureRecognizerEnable:Bool = false | ||
| 123 | + | ||
| 119 | deinit { | 124 | deinit { |
| 120 | log("主界面已销毁") | 125 | log("主界面已销毁") |
| 121 | } | 126 | } |
| @@ -139,7 +144,7 @@ class CNLiveBaseViewController: UIViewController { | @@ -139,7 +144,7 @@ class CNLiveBaseViewController: UIViewController { | ||
| 139 | 144 | ||
| 140 | override func viewWillLayoutSubviews() { | 145 | override func viewWillLayoutSubviews() { |
| 141 | super.viewWillLayoutSubviews() | 146 | super.viewWillLayoutSubviews() |
| 142 | - topNavView.frame = CGRect(x: 0, y: 0, width: view.width, height: topNavViewHeight + get_system_statusBar_height()) | 147 | + topNavView.frame = CGRect(x: 0, y: 0, width: view.width, height:topNavViewHeight)// topNavViewHeight + get_system_statusBar_height()) |
| 143 | let lrSpace = leftNavSpace > rightNavSpace ? leftNavSpace : rightNavSpace | 148 | let lrSpace = leftNavSpace > rightNavSpace ? leftNavSpace : rightNavSpace |
| 144 | titleLabel.frame = CGRect(x: CGFloat(Int(lrSpace)) , y: topNavViewHeight - get_system_nav_ui_height() - topNavViewSubUIContentOffsetY, width: topNavView.width - (lrSpace * 2), height: get_system_nav_ui_height()) | 149 | titleLabel.frame = CGRect(x: CGFloat(Int(lrSpace)) , y: topNavViewHeight - get_system_nav_ui_height() - topNavViewSubUIContentOffsetY, width: topNavView.width - (lrSpace * 2), height: get_system_nav_ui_height()) |
| 145 | leftNavBtns.forEach { currentBtn in | 150 | leftNavBtns.forEach { currentBtn in |
| @@ -218,9 +223,15 @@ class CNLiveBaseViewController: UIViewController { | @@ -218,9 +223,15 @@ class CNLiveBaseViewController: UIViewController { | ||
| 218 | 223 | ||
| 219 | @objc func ClickBackBtn() { | 224 | @objc func ClickBackBtn() { |
| 220 | let viewControllers = self.navigationController?.viewControllers | 225 | let viewControllers = self.navigationController?.viewControllers |
| 221 | - if viewControllers!.count > 1 { | 226 | + if viewControllers?.count ?? 0 > 1 { |
| 222 | if viewControllers?.last == self { | 227 | if viewControllers?.last == self { |
| 223 | self.navigationController!.popViewController(animated: true) | 228 | self.navigationController!.popViewController(animated: true) |
| 229 | + }else{ | ||
| 230 | + viewControllers?.last?.children.forEach({ vc in | ||
| 231 | + if vc == self{ | ||
| 232 | + self.navigationController!.popViewController(animated: true) | ||
| 233 | + } | ||
| 234 | + }) | ||
| 224 | } | 235 | } |
| 225 | }else{ | 236 | }else{ |
| 226 | if (self.presentingViewController != nil) { | 237 | if (self.presentingViewController != nil) { |
metaCode/Classes/Common/Util/CNLiveCommonQiniuTool.swift
| @@ -11,6 +11,7 @@ import CNLiveRequestBastKit | @@ -11,6 +11,7 @@ import CNLiveRequestBastKit | ||
| 11 | 11 | ||
| 12 | typealias ProgressBlcok = (_ key: String,_ percent: CGFloat) -> Void | 12 | typealias ProgressBlcok = (_ key: String,_ percent: CGFloat) -> Void |
| 13 | typealias SuccessBlock = (_ key: String,_ url: String) -> Void | 13 | typealias SuccessBlock = (_ key: String,_ url: String) -> Void |
| 14 | + | ||
| 14 | class UploadManager: NSObject { | 15 | class UploadManager: NSObject { |
| 15 | 16 | ||
| 16 | var uploadModels = NSMutableArray() | 17 | var uploadModels = NSMutableArray() |
| @@ -34,9 +35,10 @@ class UploadManager: NSObject { | @@ -34,9 +35,10 @@ class UploadManager: NSObject { | ||
| 34 | /// - imageData: 图片数据 | 35 | /// - imageData: 图片数据 |
| 35 | /// - progressBlock: 进度回调 | 36 | /// - progressBlock: 进度回调 |
| 36 | /// - successBlock: 成功回调 | 37 | /// - successBlock: 成功回调 |
| 37 | - static func uploadImage(imageData: NSData, progressBlock:@escaping ProgressBlcok, successBlock: @escaping SuccessBlock) { | 38 | + static func uploadImage(imageData: NSData, progressBlock:@escaping ProgressBlcok, successBlock: @escaping SuccessBlock) -> String { |
| 38 | let key = UploadManager.createImageFileName() | 39 | let key = UploadManager.createImageFileName() |
| 39 | UploadManager.uploadData(madiaData: imageData, key: key, progress: progressBlock, success: successBlock) | 40 | UploadManager.uploadData(madiaData: imageData, key: key, progress: progressBlock, success: successBlock) |
| 41 | + return key | ||
| 40 | } | 42 | } |
| 41 | 43 | ||
| 42 | /// 上传视频 | 44 | /// 上传视频 |
| @@ -44,12 +46,41 @@ class UploadManager: NSObject { | @@ -44,12 +46,41 @@ class UploadManager: NSObject { | ||
| 44 | /// - imageData: 视频数据 | 46 | /// - imageData: 视频数据 |
| 45 | /// - progressBlock: 进度回调 | 47 | /// - progressBlock: 进度回调 |
| 46 | /// - successBlock: 成功回调 | 48 | /// - successBlock: 成功回调 |
| 47 | - static func uploadVideo(videoData: NSData, progressBlock:@escaping ProgressBlcok, successBlock: @escaping SuccessBlock) { | 49 | + static func uploadVideo(videoData: NSData, progressBlock:@escaping ProgressBlcok, successBlock: @escaping SuccessBlock) -> String { |
| 48 | let key = UploadManager.createVideoFileName() | 50 | let key = UploadManager.createVideoFileName() |
| 49 | UploadManager.uploadData(madiaData: videoData, key: key, progress: progressBlock, success: successBlock) | 51 | UploadManager.uploadData(madiaData: videoData, key: key, progress: progressBlock, success: successBlock) |
| 52 | + return key | ||
| 50 | } | 53 | } |
| 51 | 54 | ||
| 52 | - | 55 | + // MARK: - 取消上传 |
| 56 | + func cancelUploadKey(key:String){ | ||
| 57 | + for (_,obj) in self.uploadModels.enumerated() { | ||
| 58 | + let model = obj as! QiNiuUploadModel | ||
| 59 | + if model.key == key{ | ||
| 60 | + model.isCancel = true | ||
| 61 | + break | ||
| 62 | + } | ||
| 63 | + } | ||
| 64 | + } | ||
| 65 | + // MARK: - 删除云中图片 | ||
| 66 | + func requestQiNiuDeleteImageUrl(imageUrl:String,resultBlock:@escaping downSlideResultBlock){ | ||
| 67 | + | ||
| 68 | + let param = NSMutableDictionary() | ||
| 69 | + param.setValue(imageUrl, forKey: "img") | ||
| 70 | + showLoading(message: "处理中...") | ||
| 71 | + CNLiveNetworking.setAllowRequestDefaultArgument(true) | ||
| 72 | + CNLiveNetworking.setupShowDataResult(false) | ||
| 73 | + CNLiveNetworking.setupDSRequest(true) | ||
| 74 | + CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/Api/v1/delQiniuImg", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | ||
| 75 | + hiddenLoading() | ||
| 76 | + if (error == nil) { | ||
| 77 | + resultBlock(result as Any,.success) | ||
| 78 | + }else{ | ||
| 79 | + resultBlock(NSNull(),.failed) | ||
| 80 | + } | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + } | ||
| 53 | 84 | ||
| 54 | /// 上传到七牛 | 85 | /// 上传到七牛 |
| 55 | /// - Parameters: | 86 | /// - Parameters: |
| @@ -63,13 +94,14 @@ class UploadManager: NSObject { | @@ -63,13 +94,14 @@ class UploadManager: NSObject { | ||
| 63 | param.setValue("POST", forKey: "verb") | 94 | param.setValue("POST", forKey: "verb") |
| 64 | param.setValue("2", forKey: "storageType") | 95 | param.setValue("2", forKey: "storageType") |
| 65 | param.setValue(kBucketName_QN, forKey: "bucket") | 96 | param.setValue(kBucketName_QN, forKey: "bucket") |
| 66 | - showLoading(message: "上传处理中...") | ||
| 67 | CNLiveNetworking.setupShowResult(true) | 97 | CNLiveNetworking.setupShowResult(true) |
| 68 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 98 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 69 | CNLiveNetworking.setupShowDataResult(false) | 99 | CNLiveNetworking.setupShowDataResult(false) |
| 70 | - CNLiveNetworking.setupSignRequestKey(APPKey_wjj) | 100 | + CNLiveNetworking.setupSignRequestKey(APPKey)//APPKey_wjj APPKey |
| 101 | + | ||
| 71 | CNLiveNetworking.requestNetwork(with: .POST, urlString: "\(CNLiveEnvironmentManager.shared.img_token_url)/vod_epg/getUploadAuthForApp", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 102 | CNLiveNetworking.requestNetwork(with: .POST, urlString: "\(CNLiveEnvironmentManager.shared.img_token_url)/vod_epg/getUploadAuthForApp", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 72 | hiddenLoading() | 103 | hiddenLoading() |
| 104 | + | ||
| 73 | if (error == nil) { | 105 | if (error == nil) { |
| 74 | let resp = result as! NSDictionary | 106 | let resp = result as! NSDictionary |
| 75 | let errorCode = "\(resp["errorCode"] ?? 0)" | 107 | let errorCode = "\(resp["errorCode"] ?? 0)" |
| @@ -112,7 +144,7 @@ class UploadManager: NSObject { | @@ -112,7 +144,7 @@ class UploadManager: NSObject { | ||
| 112 | showMessage(message: resp["errorMessage"] as! String) | 144 | showMessage(message: resp["errorMessage"] as! String) |
| 113 | } | 145 | } |
| 114 | } else { | 146 | } else { |
| 115 | - showMessage(message: error!.localizedDescription) | 147 | + showMessage(message: error?.localizedDescription ?? "上传失败") |
| 116 | } | 148 | } |
| 117 | } | 149 | } |
| 118 | } | 150 | } |
metaCode/Classes/Config/CNLiveConfigManager.swift
| @@ -73,4 +73,14 @@ extension Notification.Name { | @@ -73,4 +73,14 @@ extension Notification.Name { | ||
| 73 | //发货成功通知 | 73 | //发货成功通知 |
| 74 | public static let CNLiveShopOrderSendExpressNotification = Notification.Name("CNLiveShopOrderSendExpressNotification") | 74 | public static let CNLiveShopOrderSendExpressNotification = Notification.Name("CNLiveShopOrderSendExpressNotification") |
| 75 | } | 75 | } |
| 76 | + struct ShopGoodsManage { | ||
| 77 | + //新增商品通知 | ||
| 78 | + public static let kDSGoodsManageAddNotification = Notification.Name("kDSGoodsManageAddNotification") | ||
| 79 | + //编辑商品通知 | ||
| 80 | + public static let kDSGoodsManageEditNotification = Notification.Name("kDSGoodsManageEditNotification") | ||
| 81 | + //删除商品通知 | ||
| 82 | + public static let kDSGoodsManageDeleteNotification = Notification.Name("kDSGoodsManageDeleteNotification") | ||
| 83 | + //搜索确认处理 | ||
| 84 | + public static let kDSSelectGoodsNotification = Notification.Name("kDSSelectGoodsNotification") | ||
| 85 | + } | ||
| 76 | } | 86 | } |
metaCode/Classes/Config/CNLiveConfigstant.swift
| @@ -18,6 +18,14 @@ let KStatusBarHeight:CGFloat = UIApplication.shared.statusBarFrame.height; | @@ -18,6 +18,14 @@ let KStatusBarHeight:CGFloat = UIApplication.shared.statusBarFrame.height; | ||
| 18 | let KNavigationHeight:CGFloat = (KStatusBarHeight + 44) | 18 | let KNavigationHeight:CGFloat = (KStatusBarHeight + 44) |
| 19 | ///tabbar高度 | 19 | ///tabbar高度 |
| 20 | let KTabBarHeight:CGFloat = (KStatusBarHeight == 44 ? 83 : 49) | 20 | let KTabBarHeight:CGFloat = (KStatusBarHeight == 44 ? 83 : 49) |
| 21 | +/** | ||
| 22 | + 获取系统tabbarUI高度 | ||
| 23 | + */ | ||
| 24 | +let KTabBar_UIHeight:CGFloat = 49 | ||
| 25 | +/** | ||
| 26 | + 获取系统tabbarUI增加的高度 (因iPhoneX系列底部有安全区域增加的高度) | ||
| 27 | + */ | ||
| 28 | +let KTabBar_UI_OffsetHeight:CGFloat = KTabBarHeight - KTabBar_UIHeight | ||
| 21 | 29 | ||
| 22 | //MARK: - 常用三方key | 30 | //MARK: - 常用三方key |
| 23 | let kBucketName_QN:String = "mam-wjjtest-802" | 31 | let kBucketName_QN:String = "mam-wjjtest-802" |
| @@ -26,33 +34,21 @@ let kBucketName_QN:String = "mam-wjjtest-802" | @@ -26,33 +34,21 @@ let kBucketName_QN:String = "mam-wjjtest-802" | ||
| 26 | ///控制器背景色 | 34 | ///控制器背景色 |
| 27 | let KVCBackgroupColor = UIColor("#F9F9F9") | 35 | let KVCBackgroupColor = UIColor("#F9F9F9") |
| 28 | 36 | ||
| 29 | -/** | ||
| 30 | - 判断是否是iPhone X系列 | ||
| 31 | - */ | ||
| 32 | -public func is_iPhoneX_series() -> Bool { | ||
| 33 | - var iPhoneXSeries: Bool = false | ||
| 34 | - if (UIDevice.current.userInterfaceIdiom != .phone) { | ||
| 35 | - return iPhoneXSeries | ||
| 36 | - } | ||
| 37 | - let window = UIApplication.shared.delegate?.window!! | ||
| 38 | - if (window?.safeAreaInsets.bottom ?? 0.0 > 0.0) { | ||
| 39 | - iPhoneXSeries = true; | ||
| 40 | - } | ||
| 41 | - return iPhoneXSeries; | ||
| 42 | -} | 37 | +///控制器push动画Bool |
| 38 | +let pushAnimated = false | ||
| 43 | 39 | ||
| 44 | /** | 40 | /** |
| 45 | 获取系统状态栏高度 | 41 | 获取系统状态栏高度 |
| 46 | */ | 42 | */ |
| 47 | public func get_system_statusBar_height() -> CGFloat { | 43 | public func get_system_statusBar_height() -> CGFloat { |
| 48 | - return is_iPhoneX_series() ? 44 : 20; | 44 | + return isiPhoneXSeries ? 44 : 20; |
| 49 | } | 45 | } |
| 50 | 46 | ||
| 51 | /** | 47 | /** |
| 52 | 获取系统导航高度 | 48 | 获取系统导航高度 |
| 53 | */ | 49 | */ |
| 54 | public func get_system_nav_height() -> CGFloat { | 50 | public func get_system_nav_height() -> CGFloat { |
| 55 | - return is_iPhoneX_series() ? (44.0 + 44.0) : 64; | 51 | + return isiPhoneXSeries ? (44.0 + 44.0) : 64; |
| 56 | } | 52 | } |
| 57 | 53 | ||
| 58 | /** | 54 | /** |
| @@ -66,28 +62,28 @@ public func get_system_nav_ui_height() -> CGFloat { | @@ -66,28 +62,28 @@ public func get_system_nav_ui_height() -> CGFloat { | ||
| 66 | 获取iPhoneX顶部高度 | 62 | 获取iPhoneX顶部高度 |
| 67 | */ | 63 | */ |
| 68 | public func get_system_nav_top_height() -> CGFloat { | 64 | public func get_system_nav_top_height() -> CGFloat { |
| 69 | - return is_iPhoneX_series() ? KStatusBarHeight - 64.0 : 0.0 | 65 | + return isiPhoneXSeries ? KStatusBarHeight - 64.0 : 0.0 |
| 70 | } | 66 | } |
| 71 | 67 | ||
| 72 | /** | 68 | /** |
| 73 | 获取系统tabbar高度 | 69 | 获取系统tabbar高度 |
| 74 | */ | 70 | */ |
| 75 | public func get_system_tabbar_height() -> CGFloat { | 71 | public func get_system_tabbar_height() -> CGFloat { |
| 76 | - return is_iPhoneX_series() ? 83.0 : 49.0; | 72 | + return isiPhoneXSeries ? 83.0 : 49.0 |
| 77 | } | 73 | } |
| 78 | 74 | ||
| 79 | /** | 75 | /** |
| 80 | 获取系统tabbarUI高度 | 76 | 获取系统tabbarUI高度 |
| 81 | */ | 77 | */ |
| 82 | public func get_system_tabbar_ui_height() -> CGFloat { | 78 | public func get_system_tabbar_ui_height() -> CGFloat { |
| 83 | - return 49.0; | 79 | + return 49.0 |
| 84 | } | 80 | } |
| 85 | 81 | ||
| 86 | /** | 82 | /** |
| 87 | 获取系统tabbarUI增加的高度 (因iPhoneX系列底部有安全区域增加的高度) | 83 | 获取系统tabbarUI增加的高度 (因iPhoneX系列底部有安全区域增加的高度) |
| 88 | */ | 84 | */ |
| 89 | public func get_system_tabbar_ui_offsetHeight() -> CGFloat { | 85 | public func get_system_tabbar_ui_offsetHeight() -> CGFloat { |
| 90 | - return get_system_tabbar_height() - get_system_tabbar_ui_height(); | 86 | + return get_system_tabbar_height() - get_system_tabbar_ui_height() |
| 91 | } | 87 | } |
| 92 | 88 | ||
| 93 | 89 |
metaCode/Classes/Config/NSObject+CNLiveConfigModuleInline.swift
| @@ -39,7 +39,7 @@ var getSystemNavUiHeight: CGFloat { | @@ -39,7 +39,7 @@ var getSystemNavUiHeight: CGFloat { | ||
| 39 | 39 | ||
| 40 | /**获取系统tabbar高度*/ | 40 | /**获取系统tabbar高度*/ |
| 41 | var getSystemTabbarHeight: CGFloat { | 41 | var getSystemTabbarHeight: CGFloat { |
| 42 | - return is_iPhoneX_series() ? 83 : 49 | 42 | + return isiPhoneXSeries ? 83 : 49 |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | /**获取系统tabbarUI高度*/ | 45 | /**获取系统tabbarUI高度*/ |
metaCode/Classes/CustomView/CNLiveAlertTool.swift
| @@ -21,7 +21,7 @@ class AlertTool: NSObject { | @@ -21,7 +21,7 @@ class AlertTool: NSObject { | ||
| 21 | static func showSystemAlert(title:String?, message:String?, actionTitles:Array<String>, cancelTitle:String="", style:UIAlertController.Style, actionStyles:Array<UIAlertAction.Style>=[], completion: @escaping ((_ index: Int) -> ())) { | 21 | static func showSystemAlert(title:String?, message:String?, actionTitles:Array<String>, cancelTitle:String="", style:UIAlertController.Style, actionStyles:Array<UIAlertAction.Style>=[], completion: @escaping ((_ index: Int) -> ())) { |
| 22 | 22 | ||
| 23 | let vc = UIApplication.shared.keyWindow?.rootViewController | 23 | let vc = UIApplication.shared.keyWindow?.rootViewController |
| 24 | - vc?.dismiss(animated: false) | 24 | + vc?.dismiss(animated: true) |
| 25 | 25 | ||
| 26 | DispatchQueue.main.async { | 26 | DispatchQueue.main.async { |
| 27 | let alertController = UIAlertController(title: title, message: message, preferredStyle: style) | 27 | let alertController = UIAlertController(title: title, message: message, preferredStyle: style) |
metaCode/Classes/Extensions/Array+CNLiveExtensions.swift
0 → 100644
| 1 | +// | ||
| 2 | +// Array+CNLiveExtensions.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2023/11/24. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +extension Array where Element: Equatable { | ||
| 11 | + | ||
| 12 | + // Remove first collection element that is equal to the given `object`: | ||
| 13 | + mutating func remove(_ object: Element) { | ||
| 14 | + if let index = firstIndex(of: object) { | ||
| 15 | + remove(at: index) | ||
| 16 | + } | ||
| 17 | + } | ||
| 18 | +} |
metaCode/Classes/Extensions/NSDate+CNLiveExtensions.swift
metaCode/Classes/Extensions/NSDictionary+CNLiveExtensions.swift
0 → 100644
| 1 | +// | ||
| 2 | +// NSDictionary+CNLiveExtensions.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2023/11/23. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +extension NSDictionary { | ||
| 11 | + func stringValueForKey(key:NSString) -> NSString { | ||
| 12 | + let value = self[key] | ||
| 13 | + if value == nil || value as! NSObject == NSNull(){ | ||
| 14 | + return "" | ||
| 15 | + } | ||
| 16 | + if let newValue = value as? NSString { | ||
| 17 | + return newValue | ||
| 18 | + } else if let newValue = value as? NSNumber { | ||
| 19 | + return newValue.description as NSString | ||
| 20 | + } else { | ||
| 21 | + return "" | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + } | ||
| 25 | +} |
metaCode/Classes/Extensions/NSObject+CNLiveExtensions.swift
| @@ -9,6 +9,16 @@ import Foundation | @@ -9,6 +9,16 @@ import Foundation | ||
| 9 | import MBProgressHUD | 9 | import MBProgressHUD |
| 10 | import HandyJSON | 10 | import HandyJSON |
| 11 | 11 | ||
| 12 | +//func currentIfChildViewController() -> (UIViewController?){ | ||
| 13 | +// let vc = currentViewController() | ||
| 14 | +// if vc != nil && vc?.children.count ?? 0 > 0{ | ||
| 15 | +// //有children , 用last | ||
| 16 | +// return vc?.children.last | ||
| 17 | +// }else{ | ||
| 18 | +// return vc | ||
| 19 | +// } | ||
| 20 | +//} | ||
| 21 | + | ||
| 12 | func currentViewController() -> (UIViewController?) { | 22 | func currentViewController() -> (UIViewController?) { |
| 13 | var window = UIApplication.shared.keyWindow | 23 | var window = UIApplication.shared.keyWindow |
| 14 | if window?.windowLevel != UIWindow.Level.normal{ | 24 | if window?.windowLevel != UIWindow.Level.normal{ |
| @@ -20,8 +30,9 @@ func currentViewController() -> (UIViewController?) { | @@ -20,8 +30,9 @@ func currentViewController() -> (UIViewController?) { | ||
| 20 | } | 30 | } |
| 21 | } | 31 | } |
| 22 | } | 32 | } |
| 23 | - let vc = window?.rootViewController | ||
| 24 | - return currentVC(vc) | 33 | + let vc = window?.rootViewController |
| 34 | + let retVC = currentVC(vc) | ||
| 35 | + return retVC | ||
| 25 | } | 36 | } |
| 26 | 37 | ||
| 27 | private func currentVC(_ vc :UIViewController?) -> UIViewController? { | 38 | private func currentVC(_ vc :UIViewController?) -> UIViewController? { |
| @@ -41,10 +52,46 @@ private func currentVC(_ vc :UIViewController?) -> UIViewController? { | @@ -41,10 +52,46 @@ private func currentVC(_ vc :UIViewController?) -> UIViewController? { | ||
| 41 | return currentVC(naiVC.visibleViewController) | 52 | return currentVC(naiVC.visibleViewController) |
| 42 | } | 53 | } |
| 43 | else { | 54 | else { |
| 44 | - return vc | 55 | + return vc |
| 45 | } | 56 | } |
| 46 | } | 57 | } |
| 47 | 58 | ||
| 59 | + // 获取当前活动的navigationcontroller | ||
| 60 | + func navigationViewController() -> UINavigationController{ | ||
| 61 | + var window = UIApplication.shared.keyWindow | ||
| 62 | + if window?.windowLevel != UIWindow.Level.normal{ | ||
| 63 | + let windows = UIApplication.shared.windows | ||
| 64 | + for windowTemp in windows{ | ||
| 65 | + if windowTemp.windowLevel == UIWindow.Level.normal{ | ||
| 66 | + window = windowTemp | ||
| 67 | + break | ||
| 68 | + } | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | + if let isNav = window!.rootViewController?.isKind(of: UINavigationController.self){ | ||
| 72 | + if isNav{ | ||
| 73 | + let nav = window?.rootViewController as! UINavigationController | ||
| 74 | + return nav | ||
| 75 | + }else{ | ||
| 76 | + if let isTabbar = window!.rootViewController?.isKind(of: UITabBarController.self){ | ||
| 77 | + if isTabbar{ | ||
| 78 | + let tabbar = window?.rootViewController as! UITabBarController | ||
| 79 | + let selectVc = tabbar.selectedViewController | ||
| 80 | + if let isNavi = selectVc?.isKind(of: UINavigationController.self){ | ||
| 81 | + if isNavi{ | ||
| 82 | + let nav = selectVc as! UINavigationController | ||
| 83 | + return nav | ||
| 84 | + } | ||
| 85 | + } | ||
| 86 | + }else{ | ||
| 87 | + | ||
| 88 | + } | ||
| 89 | + } | ||
| 90 | + } | ||
| 91 | + } | ||
| 92 | + return UINavigationController() | ||
| 93 | + } | ||
| 94 | + | ||
| 48 | /// 弹框提示 | 95 | /// 弹框提示 |
| 49 | /// - Parameter message: 内容提示 | 96 | /// - Parameter message: 内容提示 |
| 50 | func showMessage(message: String) { | 97 | func showMessage(message: String) { |
metaCode/Classes/Extensions/NSString+CNLiveExtensions.swift
| @@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
| 6 | // | 6 | // |
| 7 | 7 | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | +import UIKit | ||
| 9 | 10 | ||
| 10 | extension NSString { | 11 | extension NSString { |
| 11 | 12 | ||
| @@ -113,4 +114,29 @@ extension NSString { | @@ -113,4 +114,29 @@ extension NSString { | ||
| 113 | let filtered = filtered_array.componentsJoined(by: "") | 114 | let filtered = filtered_array.componentsJoined(by: "") |
| 114 | return self as String == filtered | 115 | return self as String == filtered |
| 115 | } | 116 | } |
| 117 | + | ||
| 118 | + /** | ||
| 119 | + 保留2位小数 | ||
| 120 | + */ | ||
| 121 | + func keepTwoDecimalPlaces() -> NSString{ | ||
| 122 | + var mSelf = NSMutableString(string: self) | ||
| 123 | + if self.contains("."){ | ||
| 124 | + let decimalLocation = mSelf.range(of: ".").location | ||
| 125 | + var lastDecimalLocationLength = mSelf.length - decimalLocation - 1 | ||
| 126 | + if lastDecimalLocationLength > 2{ | ||
| 127 | + while lastDecimalLocationLength != 2 { | ||
| 128 | + mSelf.deleteCharacters(in: NSRange(location: mSelf.length-1, length: 1)) | ||
| 129 | + lastDecimalLocationLength -= lastDecimalLocationLength | ||
| 130 | + } | ||
| 131 | + }else if (lastDecimalLocationLength < 2) { | ||
| 132 | + while (lastDecimalLocationLength != 0) { | ||
| 133 | + mSelf.append("0") | ||
| 134 | + lastDecimalLocationLength -= 1 | ||
| 135 | + } | ||
| 136 | + } | ||
| 137 | + }else { | ||
| 138 | + mSelf.append(".00") | ||
| 139 | + } | ||
| 140 | + return mSelf | ||
| 141 | + } | ||
| 116 | } | 142 | } |
metaCode/Classes/Extensions/String+Extension.swift
| @@ -17,4 +17,13 @@ extension String { | @@ -17,4 +17,13 @@ extension String { | ||
| 17 | let option = NSStringDrawingOptions.usesLineFragmentOrigin | 17 | let option = NSStringDrawingOptions.usesLineFragmentOrigin |
| 18 | return self.boundingRect(with: (maxSize), options: option, attributes: attr, context: nil).size.height | 18 | return self.boundingRect(with: (maxSize), options: option, attributes: attr, context: nil).size.height |
| 19 | } | 19 | } |
| 20 | + | ||
| 21 | + //截取子字符串,eg "123456" start:2为第三位,length:3为长度是3,substring:345 | ||
| 22 | + func subString(start: Int, length: Int) -> String { | ||
| 23 | + let startIndex = self.index(self.startIndex, offsetBy: start) | ||
| 24 | + let endIndex = self.index(startIndex, offsetBy: length) | ||
| 25 | + let substring = self[startIndex..<endIndex] | ||
| 26 | + return String(substring) | ||
| 27 | + } | ||
| 28 | + | ||
| 20 | } | 29 | } |
metaCode/Classes/Extensions/UILabel+FormattedText.swift
0 → 100644
| 1 | +// | ||
| 2 | +// UILabel+FormattedText.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/1/5. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +extension UILabel { | ||
| 11 | + //计算label的行数 | ||
| 12 | + func getRealLabelTextLines() -> Int { | ||
| 13 | + guard let labelText = text else { | ||
| 14 | + return 0 | ||
| 15 | + } | ||
| 16 | + //计算理论上显示所有文字需要的尺寸 | ||
| 17 | + let rect = CGSize(width: self.bounds.width, height: CGFloat.greatestFiniteMagnitude) | ||
| 18 | + let labelTextSize = (labelText as NSString) | ||
| 19 | + .boundingRect(with: rect, options:.usesLineFragmentOrigin,attributes: [NSAttributedString.Key.font: self.font!], context: nil) | ||
| 20 | + | ||
| 21 | + //计算理论上需要的行数 | ||
| 22 | + let labelTextLines = Int(ceil(CGFloat(labelTextSize.height) / self.font.lineHeight)) | ||
| 23 | + return labelTextLines | ||
| 24 | + } | ||
| 25 | +} |
metaCode/Classes/Extensions/UIScrollView+CNLiveExtensions.swift
0 → 100644
| 1 | +// | ||
| 2 | +// UIScrollView+CNLiveExtensions.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2023/11/16. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +extension UIScrollView { | ||
| 11 | + func scrollToBottom() { | ||
| 12 | + let bottomOffset = CGPoint(x: 0, y: contentSize.height - bounds.size.height + contentInset.bottom) | ||
| 13 | + setContentOffset(bottomOffset, animated: true) | ||
| 14 | + } | ||
| 15 | +} |
metaCode/Classes/Main/HomePage/Controller/CNMetaCodeHomePageController.swift renamed to metaCode/Classes/Main/HomePage/Controller/AuthMainController/CNMetaCodeHomePageController.swift
| @@ -572,7 +572,8 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | @@ -572,7 +572,8 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | ||
| 572 | if(navigationAction.navigationType == .linkActivated){ | 572 | if(navigationAction.navigationType == .linkActivated){ |
| 573 | let webVC = CNWebViewController() | 573 | let webVC = CNWebViewController() |
| 574 | webVC.url = URL(string: url) | 574 | webVC.url = URL(string: url) |
| 575 | - currentViewController()?.navigationController?.pushViewController(webVC, animated: true) | 575 | + navigationViewController().pushViewController(webVC, animated: pushAnimated) |
| 576 | +// currentViewController()?.navigationController?.pushViewController(webVC, animated: pushAnimated) | ||
| 576 | decisionHandler(.cancel, preferences) | 577 | decisionHandler(.cancel, preferences) |
| 577 | return | 578 | return |
| 578 | }else if(navigationAction.navigationType == .other){ | 579 | }else if(navigationAction.navigationType == .other){ |
| @@ -592,7 +593,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | @@ -592,7 +593,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | ||
| 592 | //MARK: - 网络请求获取身份列表 | 593 | //MARK: - 网络请求获取身份列表 |
| 593 | func getUserIdentityApi() | 594 | func getUserIdentityApi() |
| 594 | { | 595 | { |
| 595 | - showLoading(message: "") | 596 | +// showLoading(message: "") |
| 596 | CNLiveMineViewModel.requestAuthStandList(page: 1) | 597 | CNLiveMineViewModel.requestAuthStandList(page: 1) |
| 597 | { result, respStatue in | 598 | { result, respStatue in |
| 598 | 599 |
metaCode/Classes/Main/HomePage/Controller/CNSlideBaseNavigationController.swift renamed to metaCode/Classes/Main/HomePage/Controller/DownSlideController/CNSlideBaseNavigationController.swift
metaCode/Classes/Main/HomePage/Controller/CNUpSlideCardPresentationController.swift renamed to metaCode/Classes/Main/HomePage/Controller/DownSlideController/CNUpSlideCardPresentationController.swift
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | // metaCode | 3 | // metaCode |
| 4 | // | 4 | // |
| 5 | // Created by zx on 2023/10/16. | 5 | // Created by zx on 2023/10/16. |
| 6 | -// | 6 | +// 下滑页原生页-push毛玻璃中间页 |
| 7 | 7 | ||
| 8 | import UIKit | 8 | import UIKit |
| 9 | 9 | ||
| @@ -22,7 +22,7 @@ class CNUpSlideCardPresentationController: UIPresentationController { | @@ -22,7 +22,7 @@ class CNUpSlideCardPresentationController: UIPresentationController { | ||
| 22 | blurView.edges(to: container) | 22 | blurView.edges(to: container) |
| 23 | blurView.alpha = 0.0 | 23 | blurView.alpha = 0.0 |
| 24 | 24 | ||
| 25 | - presentingViewController.beginAppearanceTransition(false, animated: false) | 25 | + presentingViewController.beginAppearanceTransition(false, animated: true) |
| 26 | presentedViewController.transitionCoordinator!.animate(alongsideTransition: { (ctx) in | 26 | presentedViewController.transitionCoordinator!.animate(alongsideTransition: { (ctx) in |
| 27 | self.blurView.effect = UIBlurEffect(style: .light) | 27 | self.blurView.effect = UIBlurEffect(style: .light) |
| 28 | self.blurView.alpha = 1 | 28 | self.blurView.alpha = 1 |
metaCode/Classes/Main/HomePage/Controller/CNUpSlideDetailViewController.swift renamed to metaCode/Classes/Main/HomePage/Controller/DownSlideController/CNUpSlideDetailViewController.swift
metaCode/Classes/Main/HomePage/Controller/CNUpSlideViewController.swift renamed to metaCode/Classes/Main/HomePage/Controller/DownSlideController/CNUpSlideViewController.swift
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | // metaCode | 3 | // metaCode |
| 4 | // | 4 | // |
| 5 | // Created by zx on 2023/10/13. | 5 | // Created by zx on 2023/10/13. |
| 6 | -// | 6 | +// 下滑页原生页-首页 |
| 7 | 7 | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | import UIKit | 9 | import UIKit |
| @@ -205,7 +205,7 @@ class CNUpSlideViewController: CNLiveBaseViewController,UITableViewDelegate,UITa | @@ -205,7 +205,7 @@ class CNUpSlideViewController: CNLiveBaseViewController,UITableViewDelegate,UITa | ||
| 205 | //MARK: - 网络请求获取详情页 | 205 | //MARK: - 网络请求获取详情页 |
| 206 | func getPageApi() | 206 | func getPageApi() |
| 207 | { | 207 | { |
| 208 | - showLoading(message: "") | 208 | +// showLoading(message: "") |
| 209 | CNLiveDownSlideViewModel.requestGetPage(pageId: _downPath! as NSString) { result, status in | 209 | CNLiveDownSlideViewModel.requestGetPage(pageId: _downPath! as NSString) { result, status in |
| 210 | hiddenLoading() | 210 | hiddenLoading() |
| 211 | 211 |
metaCode/Classes/Main/HomePage/Controller/GoodsDetail/CNLiveShopGoodsDetailsViewController.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveShopGoodsDetailsViewController.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2023/11/20. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +///分类类型 | ||
| 11 | +enum CNLiveShopGoodsDetailsVCType:Int { | ||
| 12 | + ///正常 | ||
| 13 | + case normal | ||
| 14 | + ///预览 | ||
| 15 | + case preview | ||
| 16 | +} | ||
| 17 | + | ||
| 18 | +class CNLiveShopGoodsDetailsViewController:CNLiveBaseViewController{ | ||
| 19 | + /// 格式 | ||
| 20 | + var type:CNLiveShopGoodsDetailsVCType? | ||
| 21 | + /// 商品id | ||
| 22 | + var goodsId:String? | ||
| 23 | + /// 编辑商品预览使用 | ||
| 24 | + var detailsModel:CNLiveShopGoodsDetailsModel? | ||
| 25 | + | ||
| 26 | + override func viewDidLoad() { | ||
| 27 | + super.viewDidLoad() | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | +} |
metaCode/Classes/Main/HomePage/Controller/GoodsManager/CNLiveCreateShopClassifyViewController.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveCreateShopClassifyViewController.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2023/11/17. | ||
| 6 | +// 创建/编辑 店铺分类控制器 | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +///分类类型 | ||
| 11 | +enum CNLiveCreateType:Int { | ||
| 12 | + ///一级分类 | ||
| 13 | + case oneLevelClassify | ||
| 14 | + ///二级分类 | ||
| 15 | + case twoLevelClassify | ||
| 16 | +} | ||
| 17 | + | ||
| 18 | +class CNLiveCreateShopClassifyViewController:CNLiveBaseViewController, UITableViewDataSource, UITableViewDelegate{ | ||
| 19 | + | ||
| 20 | + | ||
| 21 | + /// 分类类型,是一级还是二级 | ||
| 22 | + var classifyType:CNLiveCreateType? | ||
| 23 | + /// 当创建二级分类时,需要传上一级分类的id | ||
| 24 | + var superClassifyId:String = "" | ||
| 25 | + /// 添加/编辑/删除 成功回调 | ||
| 26 | + var successCompleteBlock:successComplete? | ||
| 27 | + | ||
| 28 | + let kCNLiveShopClassifyInputTitelCellID = "kCNLiveShopClassifyInputTitelCellID" | ||
| 29 | + let kCNLiveShopClassifyInputSortCellID = "kCNLiveShopClassifyInputSortCellID" | ||
| 30 | + let kCNLiveShopClassifySwitchTableViewCellID = "kCNLiveShopClassifySwitchTableViewCellID" | ||
| 31 | + let kCNLiveShopClassilyIconTableViewCellID = "kCNLiveShopClassilyIconTableViewCellID" | ||
| 32 | + | ||
| 33 | + /// 编辑状态 | ||
| 34 | + var isEdite:Bool = false | ||
| 35 | + /// 编辑的数据 | ||
| 36 | + var shopClassifyModel:CNLiveShopClassifyModel? | ||
| 37 | + /// 表 | ||
| 38 | + // MARK: - lazy | ||
| 39 | + lazy var tableView : UITableView = { | ||
| 40 | + let tableView = UITableView(frame: CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: KSreenHeight-KNavigationHeight-KTabBarHeight), style: .plain) | ||
| 41 | + tableView.backgroundColor = HexColor("#F6F6F6") | ||
| 42 | + tableView.dataSource = self | ||
| 43 | + tableView.delegate = self | ||
| 44 | + tableView.tableFooterView = UIView() | ||
| 45 | + tableView.separatorStyle = .none | ||
| 46 | + tableView.tableFooterView = UIView.init() | ||
| 47 | + tableView.register(CNLiveShopClassifyInputTitleCell.self, forCellReuseIdentifier:kCNLiveShopClassifyInputTitelCellID ) | ||
| 48 | + tableView.register(CNLiveShopClassifyInputSortCell.self, forCellReuseIdentifier:kCNLiveShopClassifyInputSortCellID ) | ||
| 49 | + tableView.register(CNLiveShopClassifySwitchTableViewCell.self, forCellReuseIdentifier: kCNLiveShopClassifySwitchTableViewCellID) | ||
| 50 | + tableView.register(CNLiveShopClassilyIconTableViewCell.self, forCellReuseIdentifier: kCNLiveShopClassilyIconTableViewCellID) | ||
| 51 | + return tableView | ||
| 52 | + }() | ||
| 53 | + lazy var bottomNavView :UIView = { | ||
| 54 | + let bottomNavView = UIView(frame: CGRect(x: 0, y: self.view.height - KTabBarHeight, width: self.view.width, height: KTabBarHeight)) | ||
| 55 | + bottomNavView.backgroundColor = HexColor("F2F2F2") | ||
| 56 | + return bottomNavView | ||
| 57 | + }() | ||
| 58 | + | ||
| 59 | + | ||
| 60 | + var titleField:UITextField? | ||
| 61 | + var sortField:UITextField? | ||
| 62 | + var uploadImageView:CNLiveAddGoodsSelectUploadImageView? | ||
| 63 | + | ||
| 64 | + override func viewDidLoad() { | ||
| 65 | + super.viewDidLoad() | ||
| 66 | + self.initUI() | ||
| 67 | + } | ||
| 68 | + // MARK: - 初始化UI | ||
| 69 | + /// 初始化方法 | ||
| 70 | + /// @param model 要编辑的分类数据,当isEdite为YES,才需要传 | ||
| 71 | + /// @param isEdite 是否是编辑 YES:是 NO:不是 | ||
| 72 | + init(model:CNLiveShopClassifyModel,isEdite:Bool){ | ||
| 73 | + super.init(nibName: nil, bundle: nil) | ||
| 74 | + self.shopClassifyModel = model | ||
| 75 | + //设置店铺id | ||
| 76 | + self.shopClassifyModel?.shop_id = DSUserInfoManager.shared.dsUserInfo.id | ||
| 77 | + self.isEdite = isEdite | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + convenience init(){ | ||
| 81 | + self.init(model: CNLiveShopClassifyModel(), isEdite: false) | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + required init?(coder: NSCoder) { | ||
| 85 | + fatalError("init(coder:) has not been implemented") | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + | ||
| 89 | + func initUI(){ | ||
| 90 | + self.view.addSubview(self.tableView) | ||
| 91 | + self.initTopNav() | ||
| 92 | + self.initBottomNav() | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + func initTopNav(){ | ||
| 96 | + navigationBarHidden = false | ||
| 97 | + if self.isEdite == true{ | ||
| 98 | + titleName = "编辑店铺分类" | ||
| 99 | + let deleteNavBtn = UIButton(type: .custom) | ||
| 100 | + deleteNavBtn.frame = CGRect(x: 0, y: KStatusBarHeight, width: KNavigationHeight-KStatusBarHeight, height: KNavigationHeight-KStatusBarHeight) | ||
| 101 | + deleteNavBtn.backgroundColor = .clear | ||
| 102 | + deleteNavBtn.setTitle("删除", for: .normal) | ||
| 103 | + deleteNavBtn.setTitleColor(HexColor("#666666"), for: .normal) | ||
| 104 | + deleteNavBtn.addTarget(self, action: #selector(deleteNavBtnClick), for: .touchUpInside) | ||
| 105 | + self.rightNavBtns = [deleteNavBtn] | ||
| 106 | + }else{ | ||
| 107 | + titleName = "创建店铺分类" | ||
| 108 | + | ||
| 109 | + //初始化model,赋值一些默认数据 | ||
| 110 | + self.shopClassifyModel = CNLiveShopClassifyModel() | ||
| 111 | + self.shopClassifyModel?.title = "" | ||
| 112 | + self.shopClassifyModel?.simg = "" | ||
| 113 | + self.shopClassifyModel?.shop_id = DSUserInfoManager.shared.dsUserInfo.id | ||
| 114 | + self.shopClassifyModel?.state = "2" | ||
| 115 | + self.shopClassifyModel?.isnav = "2" | ||
| 116 | + if self.classifyType == .twoLevelClassify{ | ||
| 117 | + self.shopClassifyModel?.pid = self.superClassifyId | ||
| 118 | + } | ||
| 119 | + } | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + func initBottomNav(){ | ||
| 123 | + self.bottomNavView.backgroundColor = .white | ||
| 124 | + self.view.addSubview(self.bottomNavView) | ||
| 125 | + | ||
| 126 | + let cancelBtn = UIButton(type: .custom) | ||
| 127 | + cancelBtn.frame = CGRect(x: 0, y: 0, width: 130, height: KTabBarHeight) | ||
| 128 | + cancelBtn.setTitle("取消", for: .normal) | ||
| 129 | + cancelBtn.setTitleColor(HexColor("#3A3A3A"), for: .normal) | ||
| 130 | + cancelBtn.titleLabel?.font = Font_15 | ||
| 131 | + cancelBtn.addTarget(self, action: #selector(cancelBtnClick), for: .touchUpInside) | ||
| 132 | + self.bottomNavView.addSubview(cancelBtn) | ||
| 133 | + | ||
| 134 | + let saveBtn = UIButton(type: .custom) | ||
| 135 | + saveBtn.frame = CGRect(x: cancelBtn.right, y: 0, width: self.view.width - cancelBtn.right, height: KTabBarHeight) | ||
| 136 | + saveBtn.setTitle("保存", for: .normal) | ||
| 137 | + saveBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal) | ||
| 138 | + saveBtn.titleLabel?.font = Font_15 | ||
| 139 | + saveBtn.addTarget(self, action: #selector(saveBtnClick), for: .touchUpInside) | ||
| 140 | + saveBtn.backgroundColor = UIColor(hue:0.31, saturation:0.39, brightness:0.77, alpha:1.00) | ||
| 141 | + self.bottomNavView.addSubview(saveBtn) | ||
| 142 | + | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + // MARK: - UITableViewDelegate | ||
| 146 | + | ||
| 147 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
| 148 | + return 1 | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + func numberOfSections(in tableView: UITableView) -> Int { | ||
| 152 | + return 5 | ||
| 153 | + } | ||
| 154 | + | ||
| 155 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
| 156 | + if indexPath.section == 0{ | ||
| 157 | + | ||
| 158 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveShopClassifyInputTitelCellID) as? CNLiveShopClassifyInputTitleCell | ||
| 159 | + else { | ||
| 160 | + let cell = CNLiveShopClassifyInputTitleCell() | ||
| 161 | + return cell | ||
| 162 | + } | ||
| 163 | + self.titleField = cell.textFiled | ||
| 164 | + if self.isEdite == true{ | ||
| 165 | + cell.textFiled.text = self.shopClassifyModel?.title | ||
| 166 | + } | ||
| 167 | + return cell | ||
| 168 | + }else if (indexPath.section == 1){ | ||
| 169 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveShopClassilyIconTableViewCellID) as? CNLiveShopClassilyIconTableViewCell | ||
| 170 | + else { | ||
| 171 | + let cell = CNLiveShopClassifyInputTitleCell() | ||
| 172 | + return cell | ||
| 173 | + } | ||
| 174 | + self.uploadImageView = cell.selectUploadImageView | ||
| 175 | + cell.uploadImageSuceessBlock = {imageUrl in | ||
| 176 | + self.shopClassifyModel?.simg = imageUrl | ||
| 177 | + } | ||
| 178 | + if self.isEdite{ | ||
| 179 | + if self.shopClassifyModel?.simg?.count ?? 0 > 0{ | ||
| 180 | + cell.selectUploadImageView?.networkImageArr = [self.shopClassifyModel?.simg ?? ""] | ||
| 181 | + } | ||
| 182 | + } | ||
| 183 | + return cell | ||
| 184 | + }else if (indexPath.section == 2){ | ||
| 185 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveShopClassifyInputSortCellID) as? CNLiveShopClassifyInputSortCell | ||
| 186 | + else { | ||
| 187 | + let cell = CNLiveShopClassifyInputSortCell() | ||
| 188 | + return cell | ||
| 189 | + } | ||
| 190 | + self.sortField = cell.textFiled | ||
| 191 | + if (self.isEdite ?? false) { | ||
| 192 | + cell.textFiled.text = self.shopClassifyModel?.ord | ||
| 193 | + } | ||
| 194 | + return cell | ||
| 195 | + }else if (indexPath.section == 3){ | ||
| 196 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveShopClassifySwitchTableViewCellID) as? CNLiveShopClassifySwitchTableViewCell | ||
| 197 | + else { | ||
| 198 | + let cell = CNLiveShopClassifySwitchTableViewCell() | ||
| 199 | + return cell | ||
| 200 | + } | ||
| 201 | + cell.titlelab.text = "是否显示" | ||
| 202 | + cell.switchType = .classify | ||
| 203 | + if self.shopClassifyModel?.state == "2"{ | ||
| 204 | + cell.rightSwitch.isOn = true | ||
| 205 | + }else{ | ||
| 206 | + cell.rightSwitch.isOn = false | ||
| 207 | + } | ||
| 208 | + cell.switchClickBlock = {on,type in | ||
| 209 | + self.shopClassifyModel?.state = on ? "2" : "1" | ||
| 210 | + let idxPath = IndexPath(row: 0, section: 3) | ||
| 211 | + self.tableView.reloadRows(at: [idxPath], with: .none) | ||
| 212 | + } | ||
| 213 | + return cell | ||
| 214 | + }else if (indexPath.section == 4){ | ||
| 215 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveShopClassifySwitchTableViewCellID) as? CNLiveShopClassifySwitchTableViewCell | ||
| 216 | + else { | ||
| 217 | + let cell = CNLiveShopClassifySwitchTableViewCell() | ||
| 218 | + return cell | ||
| 219 | + } | ||
| 220 | + cell.titlelab.text = "是否显示店铺导航栏" | ||
| 221 | + cell.switchType = .nav | ||
| 222 | + if self.shopClassifyModel?.isnav == "2"{ | ||
| 223 | + cell.rightSwitch.isOn = true | ||
| 224 | + }else{ | ||
| 225 | + cell.rightSwitch.isOn = false | ||
| 226 | + } | ||
| 227 | + cell.switchClickBlock = {on,type in | ||
| 228 | + self.shopClassifyModel?.isnav = on ? "2" : "1" | ||
| 229 | + let idxPath = IndexPath(row: 0, section: 4) | ||
| 230 | + self.tableView.reloadRows(at: [idxPath], with: .none) | ||
| 231 | + } | ||
| 232 | + return cell | ||
| 233 | + } | ||
| 234 | + return UITableViewCell() | ||
| 235 | + } | ||
| 236 | + | ||
| 237 | + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
| 238 | + if indexPath.section == 0 || indexPath.section == 2{ | ||
| 239 | + return 50 | ||
| 240 | + }else if (indexPath.section == 1){ | ||
| 241 | + return 155 | ||
| 242 | + }else if (indexPath.section == 3 || indexPath.section == 4){ | ||
| 243 | + return 50 | ||
| 244 | + } | ||
| 245 | + return 44 | ||
| 246 | + } | ||
| 247 | + | ||
| 248 | + func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { | ||
| 249 | + self.view.endEditing(true) | ||
| 250 | + } | ||
| 251 | + // MARK: - response method | ||
| 252 | + ///删除 | ||
| 253 | + @objc func deleteNavBtnClick(){ | ||
| 254 | + if self.shopClassifyModel?.id?.isEmpty == true{ | ||
| 255 | + showMessage(message: "分类id不存在") | ||
| 256 | + return | ||
| 257 | + } | ||
| 258 | + AlertTool.showSystemAlert(title: "是否要删除该分类?", message: nil, actionTitles: ["取消","确定"], style: .alert, actionStyles:[.cancel,.default] ) { index in | ||
| 259 | + if index == 2{ | ||
| 260 | + self.deleteClassify() | ||
| 261 | + } | ||
| 262 | + } | ||
| 263 | + } | ||
| 264 | + | ||
| 265 | + ///取消 | ||
| 266 | + @objc func cancelBtnClick(){ | ||
| 267 | + self.navigationController?.popViewController(animated: true) | ||
| 268 | + } | ||
| 269 | + | ||
| 270 | + /// 保存 | ||
| 271 | + @objc func saveBtnClick(){ | ||
| 272 | + self.view.endEditing(true) | ||
| 273 | + if self.uploadImageView?.getCurrentSelectImageUrls().count ?? 0 > 0{ | ||
| 274 | + self.shopClassifyModel?.simg = self.uploadImageView?.getCurrentSelectImageUrls().first | ||
| 275 | + }else{ | ||
| 276 | + self.shopClassifyModel?.simg = "" | ||
| 277 | + } | ||
| 278 | + | ||
| 279 | + if self.titleField?.text?.isEmpty == true{ | ||
| 280 | + showMessage(message: "请输入分类名称") | ||
| 281 | + return | ||
| 282 | + } | ||
| 283 | + if self.titleField?.text?.count ?? 0 > 8{ | ||
| 284 | + showMessage(message: "分类名称最多只能输入8个字,请重新输入") | ||
| 285 | + return | ||
| 286 | + } | ||
| 287 | + if self.shopClassifyModel?.simg?.isEmpty == true{ | ||
| 288 | + showMessage(message: "请选择图标") | ||
| 289 | + return | ||
| 290 | + } | ||
| 291 | + if self.sortField?.text?.isEmpty == true { | ||
| 292 | + showMessage(message: "请输入排序") | ||
| 293 | + return | ||
| 294 | + } | ||
| 295 | + if self.sortField?.text?.isPurnInt() == false{ | ||
| 296 | + showMessage(message: "排序内容只能输入数字") | ||
| 297 | + return | ||
| 298 | + } | ||
| 299 | + | ||
| 300 | + if Int(self.sortField?.text ?? "0") ?? 0 >= 10000{ | ||
| 301 | + showMessage(message: "排序不能大于等于10000") | ||
| 302 | + return | ||
| 303 | + } | ||
| 304 | + if Int(self.sortField?.text ?? "0") ?? 0 == 0{ | ||
| 305 | + showMessage(message: "排序不能等于0") | ||
| 306 | + return | ||
| 307 | + } | ||
| 308 | + self.shopClassifyModel?.title = self.titleField?.text | ||
| 309 | + self.shopClassifyModel?.ord = self.sortField?.text | ||
| 310 | + if self.isEdite == true{ | ||
| 311 | + self.editClassify() | ||
| 312 | + }else{ | ||
| 313 | + self.addClassify() | ||
| 314 | + } | ||
| 315 | + | ||
| 316 | + } | ||
| 317 | + | ||
| 318 | + // MARK: - 网络请求 | ||
| 319 | + ///添加分类 | ||
| 320 | + func addClassify(){ | ||
| 321 | + showLoading(message: "") | ||
| 322 | + CNLiveShopClassilyViewModel.postAddCateRequestWithModel(model: self.shopClassifyModel!) { result, status in | ||
| 323 | + hiddenLoading() | ||
| 324 | + if status == .success{ | ||
| 325 | + showMessage(message: "保存成功") | ||
| 326 | + self.navigationController?.popViewController(animated: true) | ||
| 327 | + if (self.successCompleteBlock?()) != nil{ | ||
| 328 | + self.successCompleteBlock!() | ||
| 329 | + } | ||
| 330 | + }else{ | ||
| 331 | + showMessage(message: "保存失败") | ||
| 332 | + } | ||
| 333 | + } | ||
| 334 | + } | ||
| 335 | + ///编辑分类 | ||
| 336 | + func editClassify(){ | ||
| 337 | + showLoading(message: "") | ||
| 338 | + CNLiveShopClassilyViewModel.postEditCateRequestWithModel(model: self.shopClassifyModel!) { result, status in | ||
| 339 | + hiddenLoading() | ||
| 340 | + if status == .success{ | ||
| 341 | + showMessage(message: "保存成功") | ||
| 342 | + self.navigationController?.popViewController(animated: true) | ||
| 343 | + self.successCompleteBlock!() | ||
| 344 | + }else{ | ||
| 345 | + showMessage(message: "保存失败") | ||
| 346 | + } | ||
| 347 | + } | ||
| 348 | + } | ||
| 349 | + ///删除分类 | ||
| 350 | + func deleteClassify(){ | ||
| 351 | + showLoading(message: "") | ||
| 352 | + CNLiveShopClassilyViewModel.postDeleteCateRequestWithModel(model: self.shopClassifyModel!) { result, status in | ||
| 353 | + hiddenLoading() | ||
| 354 | + if status == .success{ | ||
| 355 | + showMessage(message: "删除成功") | ||
| 356 | + self.navigationController?.popViewController(animated: true) | ||
| 357 | + self.successCompleteBlock!() | ||
| 358 | + }else{ | ||
| 359 | + showMessage(message: "删除失败") | ||
| 360 | + } | ||
| 361 | + } | ||
| 362 | + } | ||
| 363 | +} |
metaCode/Classes/Main/HomePage/Controller/GoodsManager/CNLiveGoodsCategoryController.swift
| @@ -3,14 +3,604 @@ | @@ -3,14 +3,604 @@ | ||
| 3 | // metaCode | 3 | // metaCode |
| 4 | // | 4 | // |
| 5 | // Created by zx on 2023/11/8. | 5 | // Created by zx on 2023/11/8. |
| 6 | -// | 6 | +// 商品分类/店铺分类 |
| 7 | 7 | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | +import QMUIKit | ||
| 10 | +///分类类型 | ||
| 11 | +enum CNLiveGoodsCategoryType:Int { | ||
| 12 | + ///商品分类 | ||
| 13 | + case goods | ||
| 14 | + ///店铺分类 | ||
| 15 | + case shop | ||
| 16 | +} | ||
| 17 | + | ||
| 18 | +typealias finishSelectCategoryCallBack = ()->Void | ||
| 19 | + | ||
| 20 | +typealias successComplete = ()->Void | ||
| 21 | + | ||
| 22 | +class CNLiveGoodsCategoryController: CNLiveBaseViewController, UITableViewDataSource, UITableViewDelegate { | ||
| 23 | + | ||
| 24 | + let kCNLiveShopClassifyCellIdentifier = "kCNLiveShopClassifyCellIdentifier" | ||
| 9 | 25 | ||
| 10 | -class CNLiveGoodsCategoryController: CNLiveBaseViewController { | 26 | + // MARK: - 属性 |
| 27 | + //开始输入前的文本 | ||
| 28 | + var firCategoryId:Int = 0 | ||
| 29 | + var secCategoryId:Int = 0 | ||
| 30 | + var thiCategoryId:Int = 0 | ||
| 31 | + var firCategoryName:String? | ||
| 32 | + var secCategoryName:String? | ||
| 33 | + var thiCategoryName:String? | ||
| 34 | + ///分类类型,现在有商品分类,店铺分类 | ||
| 35 | + var categoryType:CNLiveGoodsCategoryType? | ||
| 36 | + //完成回调 | ||
| 37 | + var finishBlock:finishSelectCategoryCallBack? | ||
| 11 | 38 | ||
| 39 | + var shadowView:UIView? | ||
| 40 | + var contentView:UIView? | ||
| 41 | + var line:UIImageView?//DSImageView | ||
| 42 | + var firCategoryBtn:UIButton? | ||
| 43 | + var secCategoryBtn:UIButton? | ||
| 44 | + var thiCategoryBtn:UIButton? | ||
| 45 | + var selectImageView:UIImageView?//DSImageView | ||
| 46 | + lazy var tableView : UITableView = { | ||
| 47 | + let tableView = UITableView(frame:CGRect(x: 0, y: self.line!.bottom, width: self.contentView!.width, height: self.contentView!.height - self.line!.bottom), style: .plain) | ||
| 48 | + tableView.dataSource = self | ||
| 49 | + tableView.delegate = self | ||
| 50 | + tableView.rowHeight = 40 | ||
| 51 | + tableView.showsVerticalScrollIndicator = false | ||
| 52 | + tableView.backgroundColor = .white | ||
| 53 | + tableView.separatorStyle = .none | ||
| 54 | + let headerView = UIView(frame: CGRect(x: 0, y: 0, width: self.contentView!.width, height: 5)) | ||
| 55 | + tableView.tableHeaderView = headerView | ||
| 56 | + tableView.register(CNLiveShopClassifyCell.self, forCellReuseIdentifier: kCNLiveShopClassifyCellIdentifier) | ||
| 57 | + return tableView | ||
| 58 | + }() | ||
| 59 | + | ||
| 60 | + lazy var firCategoryDataArr: NSMutableArray = { | ||
| 61 | + var firCategoryDataArr = NSMutableArray() | ||
| 62 | + return firCategoryDataArr | ||
| 63 | + }() | ||
| 64 | + lazy var secCategoryDataArr: NSMutableArray = { | ||
| 65 | + var secCategoryDataArr = NSMutableArray() | ||
| 66 | + return secCategoryDataArr | ||
| 67 | + }() | ||
| 68 | + lazy var thiCategoryDataArr: NSMutableArray = { | ||
| 69 | + var thiCategoryDataArr = NSMutableArray() | ||
| 70 | + return thiCategoryDataArr | ||
| 71 | + }() | ||
| 72 | + | ||
| 73 | + /// 创建店铺分类按钮,没创建过店铺分类时展示 | ||
| 74 | + lazy var addShopCalssifyBtn: UIButton = { | ||
| 75 | + let addShopCalssifyBtn = UIButton(type: .custom) | ||
| 76 | + addShopCalssifyBtn.frame = CGRect(x: 0, y: self.contentView!.height/2, width: KSreenWidth, height: 40) | ||
| 77 | + addShopCalssifyBtn.setTitle("创建店铺分类", for: .normal) | ||
| 78 | + addShopCalssifyBtn.setImage(UIImage(named: "DS_WB_CJDP"), for: .normal) | ||
| 79 | + addShopCalssifyBtn.setupButtonImageAndTitlePossitionWith(padding: 8, style: .left) | ||
| 80 | + addShopCalssifyBtn.setTitleColor(HexColor("FD862E"), for: .normal) | ||
| 81 | + addShopCalssifyBtn.titleLabel?.font = Font_15 | ||
| 82 | + addShopCalssifyBtn.addTarget(self, action: #selector(createBtnClick), for: .touchUpInside) | ||
| 83 | + return addShopCalssifyBtn | ||
| 84 | + }() | ||
| 85 | + | ||
| 86 | + var _displayLevel:Int = 0 | ||
| 87 | + var displayLevel:Int { | ||
| 88 | + get{ | ||
| 89 | + _displayLevel | ||
| 90 | + } | ||
| 91 | + set{ | ||
| 92 | + _displayLevel = newValue | ||
| 93 | + UIView.animate(withDuration: 0.2) { | ||
| 94 | + if self.displayLevel == 2{ | ||
| 95 | + self.selectImageView?.centerX = self.secCategoryBtn!.centerX | ||
| 96 | + self.secCategoryBtn?.setTitleColor(HexColor("333333"), for: .normal) | ||
| 97 | + }else if self.displayLevel == 3{ | ||
| 98 | + self.selectImageView?.centerX = self.thiCategoryBtn!.centerX | ||
| 99 | + self.thiCategoryBtn?.setTitleColor(HexColor("333333"), for: .normal) | ||
| 100 | + }else{ | ||
| 101 | + self.selectImageView?.centerX = self.firCategoryBtn!.centerX | ||
| 102 | + } | ||
| 103 | + } | ||
| 104 | + } | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + //临时选中一级分类 | ||
| 108 | + var _temp_selectFirCategoryModel :CNLiveShopClassifyModel? | ||
| 109 | + var temp_selectFirCategoryModel :CNLiveShopClassifyModel?{ | ||
| 110 | + get{ | ||
| 111 | + _temp_selectFirCategoryModel | ||
| 112 | + } | ||
| 113 | + set{ | ||
| 114 | + if newValue != nil{ | ||
| 115 | + _temp_selectFirCategoryModel = newValue! | ||
| 116 | + }else{ | ||
| 117 | + return | ||
| 118 | + } | ||
| 119 | + if Int(_temp_selectFirCategoryModel?.id ?? "0")! > 0{ | ||
| 120 | + self.firCategoryBtn?.setTitle(_temp_selectFirCategoryModel?.title, for: .normal) | ||
| 121 | + }else{ | ||
| 122 | + self.firCategoryBtn?.setTitle("请选择", for: .normal) | ||
| 123 | + } | ||
| 124 | + } | ||
| 125 | + } | ||
| 126 | + //临时选中二级分类 | ||
| 127 | + var _temp_selectSecCategoryModel :CNLiveShopClassifyModel? | ||
| 128 | + var temp_selectSecCategoryModel :CNLiveShopClassifyModel?{ | ||
| 129 | + get{ | ||
| 130 | + _temp_selectSecCategoryModel | ||
| 131 | + } | ||
| 132 | + set{ | ||
| 133 | + if newValue != nil{ | ||
| 134 | + _temp_selectSecCategoryModel = newValue! | ||
| 135 | + }else{ | ||
| 136 | + return | ||
| 137 | + } | ||
| 138 | + if Int(_temp_selectSecCategoryModel?.id ?? "0")! > 0{ | ||
| 139 | + self.secCategoryBtn?.setTitle(_temp_selectSecCategoryModel?.title, for: .normal) | ||
| 140 | + self.secCategoryBtn?.setTitleColor(HexColor("#333333"), for: .normal) | ||
| 141 | + }else{ | ||
| 142 | + self.secCategoryBtn?.setTitle("请选择", for: .normal) | ||
| 143 | + if self.displayLevel == 2{ | ||
| 144 | + self.secCategoryBtn?.setTitleColor(HexColor("#333333"), for: .normal) | ||
| 145 | + }else{ | ||
| 146 | + self.secCategoryBtn?.setTitleColor(HexColor("#999999"), for: .normal) | ||
| 147 | + } | ||
| 148 | + } | ||
| 149 | + } | ||
| 150 | + } | ||
| 151 | + //临时选中三级分类 | ||
| 152 | + var _temp_selectThiCategoryModel :CNLiveShopClassifyModel? | ||
| 153 | + var temp_selectThiCategoryModel :CNLiveShopClassifyModel?{ | ||
| 154 | + get{ | ||
| 155 | + _temp_selectThiCategoryModel | ||
| 156 | + } | ||
| 157 | + set{ | ||
| 158 | + if newValue != nil{ | ||
| 159 | + _temp_selectThiCategoryModel = newValue! | ||
| 160 | + }else{ | ||
| 161 | + return | ||
| 162 | + } | ||
| 163 | + if Int(_temp_selectThiCategoryModel!.id ?? "0")! > 0{ | ||
| 164 | + self.thiCategoryBtn?.setTitle(_temp_selectThiCategoryModel?.title, for: .normal) | ||
| 165 | + self.thiCategoryBtn?.setTitleColor(HexColor("#333333"), for: .normal) | ||
| 166 | + }else{ | ||
| 167 | + self.thiCategoryBtn?.setTitle("请选择", for: .normal) | ||
| 168 | + if self.displayLevel == 3{ | ||
| 169 | + self.thiCategoryBtn?.setTitleColor(HexColor("#333333"), for: .normal) | ||
| 170 | + }else{ | ||
| 171 | + self.thiCategoryBtn?.setTitleColor(HexColor("#999999"), for: .normal) | ||
| 172 | + } | ||
| 173 | + } | ||
| 174 | + } | ||
| 175 | + } | ||
| 176 | + | ||
| 12 | override func viewDidLoad() { | 177 | override func viewDidLoad() { |
| 13 | super.viewDidLoad() | 178 | super.viewDidLoad() |
| 179 | + navigationBarHidden = false | ||
| 180 | + self.view.backgroundColor = .clear | ||
| 181 | + self.initUI() | ||
| 182 | + if self.firCategoryId == 0{ | ||
| 183 | + self.secCategoryId = 0 | ||
| 184 | + self.thiCategoryId = 0 | ||
| 185 | + }else if self.secCategoryId == 0 || self.secCategoryId == 0{ | ||
| 186 | + self.thiCategoryId = 0 | ||
| 187 | + } | ||
| 188 | + if self.categoryType == .goods{ | ||
| 189 | + self.postDataWithPid(pid: "0", level: 1) { | ||
| 190 | + if self.secCategoryId > 0{ | ||
| 191 | + self.postDataWithPid(pid:String(format: "%d", self.firCategoryId), level: 2) { | ||
| 192 | + if self.thiCategoryId > 0{ | ||
| 193 | + self.postDataWithPid(pid:String(format: "%d",self.secCategoryId), level: 3) { | ||
| 194 | + } | ||
| 195 | + } | ||
| 196 | + } | ||
| 197 | + } | ||
| 198 | + } | ||
| 199 | + }else if self.categoryType == .shop{ | ||
| 200 | + self.postShopClassify() | ||
| 201 | + } | ||
| 202 | + } | ||
| 203 | + | ||
| 204 | + func initTitleName(name:String){ | ||
| 205 | + titleName = name | ||
| 206 | + } | ||
| 207 | + | ||
| 208 | + // MARK: - initUI | ||
| 209 | + func initUI(){ | ||
| 210 | + self.shadowView = UIView(frame: CGRect(x: 0, y: self.topNavView.height, width: self.view.width, height: self.view.height - self.topNavView.height)) | ||
| 211 | + self.shadowView?.backgroundColor = UIColor(white: 0, alpha: 0.26) | ||
| 212 | + self.shadowView?.isHidden = true | ||
| 213 | + self.view.addSubview(self.shadowView!) | ||
| 214 | + let shadowViewTap = UITapGestureRecognizer(target: self, action: #selector(shadowViewTap)) | ||
| 215 | + self.shadowView?.addGestureRecognizer(shadowViewTap) | ||
| 216 | + | ||
| 217 | + self.contentView = UIView(frame: CGRect(x: 0, y: self.view.height, width: self.view.width, height: 400)) | ||
| 218 | + self.contentView?.backgroundColor = .white | ||
| 219 | + self.view.addSubview(self.contentView!) | ||
| 220 | + | ||
| 221 | + self.line = UIImageView(frame: CGRect(x: 0, y: 49-DS_RRV_ONE_PIXEL, width: self.view.width, height: DS_RRV_ONE_PIXEL)) | ||
| 222 | + self.line!.clipsToBounds = true | ||
| 223 | + self.line!.contentMode = .scaleAspectFit | ||
| 224 | + self.line!.backgroundColor = HexColor("#EBE9EA") | ||
| 225 | + self.contentView?.addSubview(self.line!) | ||
| 226 | + | ||
| 227 | + self.firCategoryBtn = UIButton(type: .custom) | ||
| 228 | + self.firCategoryBtn?.frame = CGRect(x: 5, y: 0, width: 59, height: 49) | ||
| 229 | + self.firCategoryBtn?.setTitle("请选择", for: .normal) | ||
| 230 | + self.firCategoryBtn?.setTitleColor(HexColor("#333333"), for: .normal) | ||
| 231 | + self.firCategoryBtn?.clipsToBounds = true | ||
| 232 | + self.firCategoryBtn?.titleLabel?.font = Font_13 | ||
| 233 | + self.firCategoryBtn?.titleLabel?.lineBreakMode = .byTruncatingTail | ||
| 234 | + self.firCategoryBtn?.addTarget(self, action: #selector(firCategoryBtnClick), for: .touchUpInside) | ||
| 235 | + self.contentView?.addSubview(self.firCategoryBtn!) | ||
| 14 | 236 | ||
| 237 | + self.secCategoryBtn = UIButton(type: .custom) | ||
| 238 | + self.secCategoryBtn?.frame = CGRect(x: self.firCategoryBtn!.right+5, y: 0, width: 59, height: 49) | ||
| 239 | + self.secCategoryBtn?.setTitle("请选择", for: .normal) | ||
| 240 | + self.secCategoryBtn?.setTitleColor(HexColor("#999999"), for: .normal) | ||
| 241 | + self.secCategoryBtn?.clipsToBounds = true | ||
| 242 | + self.secCategoryBtn?.titleLabel?.font = Font_13 | ||
| 243 | + self.secCategoryBtn?.titleLabel?.lineBreakMode = .byTruncatingTail | ||
| 244 | + self.secCategoryBtn?.addTarget(self, action: #selector(secCategoryBtnClick), for: .touchUpInside) | ||
| 245 | + self.contentView?.addSubview(self.secCategoryBtn!) | ||
| 246 | + | ||
| 247 | + self.thiCategoryBtn = UIButton(type: .custom) | ||
| 248 | + self.thiCategoryBtn?.frame = CGRect(x: self.secCategoryBtn!.right+5, y: 0, width: 59, height: 49) | ||
| 249 | + self.thiCategoryBtn?.setTitle("请选择", for: .normal) | ||
| 250 | + self.thiCategoryBtn?.setTitleColor(HexColor("#999999"), for: .normal) | ||
| 251 | + self.thiCategoryBtn?.clipsToBounds = true | ||
| 252 | + self.thiCategoryBtn?.titleLabel?.font = Font_13 | ||
| 253 | + self.thiCategoryBtn?.titleLabel?.lineBreakMode = .byTruncatingTail | ||
| 254 | + self.thiCategoryBtn?.addTarget(self, action: #selector(thiCategoryBtnClick), for: .touchUpInside) | ||
| 255 | + self.contentView?.addSubview(self.thiCategoryBtn!) | ||
| 256 | + | ||
| 257 | + if self.categoryType == .goods{ | ||
| 258 | + ///商品分类三级 | ||
| 259 | + self.thiCategoryBtn?.isHidden = false | ||
| 260 | + }else if self.categoryType == .shop{ | ||
| 261 | + ///店铺分类二级 | ||
| 262 | + self.thiCategoryBtn?.isHidden = true | ||
| 263 | + } | ||
| 264 | + self.selectImageView = UIImageView(frame: CGRect(x: 0, y: self.line!.bottom - 2, width: 39, height: 2)) | ||
| 265 | + self.selectImageView!.clipsToBounds = true | ||
| 266 | + self.selectImageView!.contentMode = .scaleAspectFit | ||
| 267 | + self.selectImageView!.backgroundColor = HexColor("#FC1541") | ||
| 268 | + self.contentView?.addSubview(self.selectImageView!) | ||
| 269 | + self.selectImageView!.centerX = self.firCategoryBtn!.centerX | ||
| 270 | + | ||
| 271 | + | ||
| 272 | + let confirmBtn = UIButton(type: .custom) | ||
| 273 | + confirmBtn.frame = CGRect(x: self.contentView!.width-49, y: 0, width: 49, height: 49) | ||
| 274 | + confirmBtn.setTitle("确定", for: .normal) | ||
| 275 | + confirmBtn.setTitleColor(HexColor("#333333"), for: .normal) | ||
| 276 | + confirmBtn.titleLabel?.font = Font_13 | ||
| 277 | + confirmBtn.addTarget(self, action: #selector(confirmBtnClick), for: .touchUpInside) | ||
| 278 | + self.contentView?.addSubview(confirmBtn) | ||
| 279 | + | ||
| 280 | + self.contentView?.addSubview(self.tableView) | ||
| 281 | + } | ||
| 282 | + deinit { | ||
| 283 | + print("CNLiveGoodsCategoryController销毁") | ||
| 15 | } | 284 | } |
| 285 | + | ||
| 286 | + // MARK: - 显示/隐藏方法 | ||
| 287 | + public func display(){ | ||
| 288 | + | ||
| 289 | + self.view.isUserInteractionEnabled = true | ||
| 290 | + UIView.animate(withDuration: 0.2) { | ||
| 291 | + self.shadowView?.isHidden = false | ||
| 292 | + self.contentView!.top = self.view.height-400 | ||
| 293 | + } | ||
| 294 | + } | ||
| 295 | + public func hide(){ | ||
| 296 | + let vc = self.view.superview?.qmui_viewController?.qmui_visibleViewControllerIfExist() as! CNLiveShopNewProductController | ||
| 297 | + if self.categoryType == .goods{ | ||
| 298 | + vc.isShowGoodsCategory = false | ||
| 299 | + }else{ | ||
| 300 | + vc.isShowShopCategory = false | ||
| 301 | + } | ||
| 302 | + UIView.animate(withDuration: 0.2) { | ||
| 303 | + self.shadowView?.isHidden = true | ||
| 304 | + self.contentView!.top = self.view.height | ||
| 305 | + self.view.removeFromSuperview() | ||
| 306 | + }completion: { finished in | ||
| 307 | + self.view.isUserInteractionEnabled = false | ||
| 308 | + } | ||
| 309 | + } | ||
| 310 | + public func hideView(){ | ||
| 311 | + self.shadowView?.isHidden = true | ||
| 312 | + self.contentView!.top = self.view.height | ||
| 313 | + self.view.isUserInteractionEnabled = false | ||
| 314 | + } | ||
| 315 | + | ||
| 316 | + // MARK: - UITableViewDelegate | ||
| 317 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
| 318 | + if (self.displayLevel == 1) { | ||
| 319 | + return self.firCategoryDataArr.count | ||
| 320 | + }else if (self.displayLevel == 2) { | ||
| 321 | + return self.secCategoryDataArr.count | ||
| 322 | + }else if (self.displayLevel == 3) { | ||
| 323 | + return self.thiCategoryDataArr.count | ||
| 324 | + }else { | ||
| 325 | + return 0 | ||
| 326 | + } | ||
| 327 | + } | ||
| 328 | + | ||
| 329 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
| 330 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveShopClassifyCellIdentifier) as? CNLiveShopClassifyCell | ||
| 331 | + else { | ||
| 332 | + let cell = CNLiveShopClassifyCell() | ||
| 333 | + return cell | ||
| 334 | + } | ||
| 335 | + if self.displayLevel == 1{ | ||
| 336 | + let model = self.firCategoryDataArr[indexPath.row] as! CNLiveShopClassifyModel | ||
| 337 | + | ||
| 338 | + cell.titleLabel.text = model.title | ||
| 339 | + if model.id == self.temp_selectFirCategoryModel?.id{ | ||
| 340 | + cell.titleLabel.textColor = HexColor("#FC1541") | ||
| 341 | + }else{ | ||
| 342 | + cell.titleLabel.textColor = HexColor("#666666") | ||
| 343 | + } | ||
| 344 | + }else if (self.displayLevel == 2) { | ||
| 345 | + let model = self.secCategoryDataArr[indexPath.row] as! CNLiveShopClassifyModel | ||
| 346 | + | ||
| 347 | + cell.titleLabel.text = model.title | ||
| 348 | + if model.id == self.temp_selectSecCategoryModel?.id{ | ||
| 349 | + cell.titleLabel.textColor = HexColor("#FC1541") | ||
| 350 | + }else{ | ||
| 351 | + cell.titleLabel.textColor = HexColor("#666666") | ||
| 352 | + } | ||
| 353 | + }else if (self.displayLevel == 3) { | ||
| 354 | + let model = self.thiCategoryDataArr[indexPath.row] as! CNLiveShopClassifyModel | ||
| 355 | + cell.titleLabel.text = model.title | ||
| 356 | + if model.id == self.temp_selectThiCategoryModel?.id{ | ||
| 357 | + cell.titleLabel.textColor = HexColor("#FC1541") | ||
| 358 | + }else{ | ||
| 359 | + cell.titleLabel.textColor = HexColor("#666666") | ||
| 360 | + } | ||
| 361 | + }else{ | ||
| 362 | + cell.titleLabel.text = "" | ||
| 363 | + } | ||
| 364 | + return cell | ||
| 365 | + } | ||
| 366 | + | ||
| 367 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
| 368 | + if self.categoryType == .goods{ | ||
| 369 | + if self.displayLevel == 1{ | ||
| 370 | + let model = self.firCategoryDataArr[indexPath.row] as! CNLiveShopClassifyModel | ||
| 371 | + self.postDataWithPid(pid: model.id ?? "", level: 2) { | ||
| 372 | +// self.postDataWithPid(pid: String(format: "%d", model.id), level: 2) { | ||
| 373 | + self.temp_selectFirCategoryModel = model | ||
| 374 | + self.temp_selectSecCategoryModel = nil | ||
| 375 | + self.temp_selectThiCategoryModel = nil | ||
| 376 | + } | ||
| 377 | + }else if (self.displayLevel == 2) { | ||
| 378 | + let model = self.secCategoryDataArr[indexPath.row] as! CNLiveShopClassifyModel | ||
| 379 | + self.postDataWithPid(pid: model.id ?? "", level: 3) { | ||
| 380 | +// self.postDataWithPid(pid: String(format: "%d", model.id), level: 3) { | ||
| 381 | + self.temp_selectSecCategoryModel = model | ||
| 382 | + self.temp_selectThiCategoryModel = nil | ||
| 383 | + } | ||
| 384 | + }else if (self.displayLevel == 3) { | ||
| 385 | + let model = self.thiCategoryDataArr[indexPath.row] as! CNLiveShopClassifyModel | ||
| 386 | + self.temp_selectThiCategoryModel = model | ||
| 387 | + self.tableView.reloadData() | ||
| 388 | + } | ||
| 389 | + }else if self.categoryType == .shop{ | ||
| 390 | + if (self.displayLevel == 1) { | ||
| 391 | + let model = self.firCategoryDataArr[indexPath.row] as! CNLiveShopClassifyModel | ||
| 392 | + self.temp_selectFirCategoryModel = model | ||
| 393 | + self.temp_selectSecCategoryModel = nil | ||
| 394 | + if (model.child.count == 0) { | ||
| 395 | + self.tableView.reloadData() | ||
| 396 | + return | ||
| 397 | + } | ||
| 398 | + self.displayLevel = 2 | ||
| 399 | + self.secCategoryDataArr = NSMutableArray(array: model.child) | ||
| 400 | + self.tableView.reloadData() | ||
| 401 | + }else if (self.displayLevel == 2){ | ||
| 402 | + let model = self.secCategoryDataArr[indexPath.row] as! CNLiveShopClassifyModel | ||
| 403 | + self.temp_selectSecCategoryModel = model | ||
| 404 | + self.tableView.reloadData() | ||
| 405 | + } | ||
| 406 | + } | ||
| 407 | + } | ||
| 408 | + | ||
| 409 | + // MARK: - 触发事件 | ||
| 410 | + @objc func shadowViewTap(){ | ||
| 411 | + self.hide() | ||
| 412 | + } | ||
| 413 | + | ||
| 414 | + @objc func confirmBtnClick(){ | ||
| 415 | + if self.categoryType == .goods{ | ||
| 416 | + if (self.temp_selectFirCategoryModel == nil) || (self.temp_selectSecCategoryModel == nil) || (self.temp_selectThiCategoryModel == nil){ | ||
| 417 | + showMessage(message: "未选择三级分类") | ||
| 418 | + return | ||
| 419 | + } | ||
| 420 | + }else if self.categoryType == .shop{ | ||
| 421 | + if (self.temp_selectFirCategoryModel == nil && self.temp_selectSecCategoryModel == nil){ | ||
| 422 | + showMessage(message: "请选择级分类") | ||
| 423 | + return | ||
| 424 | + } | ||
| 425 | + if let classModel = self.temp_selectFirCategoryModel{ | ||
| 426 | + if classModel.child.count > 0 && self.temp_selectSecCategoryModel == nil{ | ||
| 427 | + showMessage(message: "未选择二级分类") | ||
| 428 | + return | ||
| 429 | + } | ||
| 430 | + } | ||
| 431 | + } | ||
| 432 | + | ||
| 433 | + self.firCategoryId = Int(self.temp_selectFirCategoryModel?.id ?? "0")! | ||
| 434 | + self.firCategoryName = self.temp_selectFirCategoryModel?.title | ||
| 435 | + self.secCategoryId = Int(self.temp_selectSecCategoryModel?.id ?? "0")! | ||
| 436 | + self.secCategoryName = self.temp_selectSecCategoryModel?.title | ||
| 437 | + self.thiCategoryId = Int(self.temp_selectThiCategoryModel?.id ?? "0")! | ||
| 438 | + self.thiCategoryName = self.temp_selectThiCategoryModel?.title | ||
| 439 | + self.finishBlock!() | ||
| 440 | + self.hide() | ||
| 441 | + } | ||
| 442 | + | ||
| 443 | + @objc func firCategoryBtnClick(){ | ||
| 444 | + self.displayLevel = 1 | ||
| 445 | + self.tableView.reloadData() | ||
| 446 | + self.tableView.setContentOffset(CGPointZero, animated: true) | ||
| 447 | + if self.temp_selectSecCategoryModel != nil{ | ||
| 448 | + self.secCategoryBtn?.setTitleColor(HexColor("#333333"), for: .normal) | ||
| 449 | + if self.temp_selectThiCategoryModel != nil{ | ||
| 450 | + self.thiCategoryBtn?.setTitleColor(HexColor("#333333"), for: .normal) | ||
| 451 | + }else{ | ||
| 452 | + self.thiCategoryBtn?.setTitleColor(HexColor("#999999"), for: .normal) | ||
| 453 | + } | ||
| 454 | + }else{ | ||
| 455 | + self.secCategoryBtn?.setTitleColor(HexColor("#999999"), for: .normal) | ||
| 456 | + self.thiCategoryBtn?.setTitleColor(HexColor("#999999"), for: .normal) | ||
| 457 | + } | ||
| 458 | + } | ||
| 459 | + | ||
| 460 | + @objc func secCategoryBtnClick(){ | ||
| 461 | + if self.categoryType == .shop{ | ||
| 462 | + let model = self.temp_selectFirCategoryModel | ||
| 463 | + if model?.child.count == 0 { | ||
| 464 | + showMessage(message: "该分类暂没有添加子分类") | ||
| 465 | + return | ||
| 466 | + } | ||
| 467 | + } | ||
| 468 | + if self.temp_selectFirCategoryModel == nil{ | ||
| 469 | + return | ||
| 470 | + } | ||
| 471 | + self.displayLevel = 2 | ||
| 472 | + self.tableView.reloadData() | ||
| 473 | + self.tableView.setContentOffset(CGPointZero, animated: true) | ||
| 474 | + if self.temp_selectThiCategoryModel != nil{ | ||
| 475 | + self.thiCategoryBtn?.setTitleColor(HexColor("#333333"), for: .normal) | ||
| 476 | + }else{ | ||
| 477 | + self.thiCategoryBtn?.setTitleColor(HexColor("#999999"), for: .normal) | ||
| 478 | + } | ||
| 479 | + } | ||
| 480 | + @objc func thiCategoryBtnClick(){ | ||
| 481 | + if self.temp_selectSecCategoryModel == nil{ | ||
| 482 | + return | ||
| 483 | + } | ||
| 484 | + self.displayLevel = 3 | ||
| 485 | + self.tableView.reloadData() | ||
| 486 | + self.tableView.setContentOffset(CGPointZero, animated: true) | ||
| 487 | + } | ||
| 488 | + | ||
| 489 | + ///创建店铺分类 | ||
| 490 | + @objc func createBtnClick(){ | ||
| 491 | + let vc = CNLiveCreateShopClassifyViewController() | ||
| 492 | + vc.classifyType = .oneLevelClassify | ||
| 493 | + vc.successCompleteBlock = { | ||
| 494 | + self.postShopClassify() | ||
| 495 | + } | ||
| 496 | + if self.navigationController == nil{ | ||
| 497 | + print("self nil") | ||
| 498 | + } | ||
| 499 | + navigationViewController().pushViewController(vc, animated: pushAnimated) | ||
| 500 | +// currentViewController()?.navigationController?.pushViewController(vc, animated: pushAnimated) | ||
| 501 | + } | ||
| 502 | + | ||
| 503 | + // MARK: - 数据请求 | ||
| 504 | + /** | ||
| 505 | + 商品分类数据请求 | ||
| 506 | + | ||
| 507 | + @param pid 父级id | ||
| 508 | + @param level 第几级 | ||
| 509 | + */ | ||
| 510 | + func postDataWithPid(pid:String,level:Int,successCompleteBlock:@escaping successComplete){ | ||
| 511 | + showLoading(message: "") | ||
| 512 | + CNLiveShopGoodListViewModel.getGetGroupWithUid(uid: DSUserInfoManager.shared.dsUserInfo.uid!, pid: pid) { result, status in | ||
| 513 | + hiddenLoading() | ||
| 514 | + if status == .success{ | ||
| 515 | + | ||
| 516 | + let dataArr = result as! [CNLiveShopClassifyModel] | ||
| 517 | + self.displayLevel = level | ||
| 518 | + if level == 1{ | ||
| 519 | + self.firCategoryDataArr = NSMutableArray(array: dataArr) | ||
| 520 | + self.temp_selectSecCategoryModel = nil | ||
| 521 | + self.temp_selectThiCategoryModel = nil | ||
| 522 | + self.secCategoryDataArr.removeAllObjects() | ||
| 523 | + self.thiCategoryDataArr.removeAllObjects() | ||
| 524 | + if self.firCategoryId > 0{ | ||
| 525 | + | ||
| 526 | + let tempDataArr = Array(self.firCategoryDataArr) | ||
| 527 | + for (_,mdl) in tempDataArr.enumerated() { | ||
| 528 | + let model = mdl as! CNLiveShopClassifyModel | ||
| 529 | + if Int(model.id ?? "0")! == self.firCategoryId{ | ||
| 530 | + self.temp_selectFirCategoryModel = model | ||
| 531 | + break | ||
| 532 | + } | ||
| 533 | + } | ||
| 534 | + } | ||
| 535 | + }else if (level == 2){ | ||
| 536 | + self.secCategoryDataArr = NSMutableArray(array: dataArr) | ||
| 537 | + self.temp_selectSecCategoryModel = nil | ||
| 538 | + self.temp_selectThiCategoryModel = nil | ||
| 539 | + self.thiCategoryDataArr.removeAllObjects() | ||
| 540 | + if self.secCategoryId > 0{ | ||
| 541 | + let tempDataArr = Array(self.thiCategoryDataArr) | ||
| 542 | + for (_,mdl) in tempDataArr.enumerated() { | ||
| 543 | + let model = mdl as! CNLiveShopClassifyModel | ||
| 544 | + if Int(model.id ?? "0")! == self.secCategoryId{ | ||
| 545 | + self.temp_selectSecCategoryModel = model | ||
| 546 | + break | ||
| 547 | + } | ||
| 548 | + } | ||
| 549 | + }else { | ||
| 550 | + self.secCategoryBtn?.setTitle("请选择", for: .normal) | ||
| 551 | + } | ||
| 552 | + }else if (level == 3) { | ||
| 553 | + self.thiCategoryDataArr = NSMutableArray(array: dataArr) | ||
| 554 | + self.temp_selectThiCategoryModel = nil | ||
| 555 | + if self.thiCategoryId > 0{ | ||
| 556 | + let tempDataArr = Array(self.thiCategoryDataArr) | ||
| 557 | + for (_,mdl) in tempDataArr.enumerated() { | ||
| 558 | + let model = mdl as! CNLiveShopClassifyModel | ||
| 559 | + if Int(model.id ?? "0")! == self.thiCategoryId{ | ||
| 560 | + self.temp_selectThiCategoryModel = model | ||
| 561 | + break | ||
| 562 | + } | ||
| 563 | + } | ||
| 564 | + }else { | ||
| 565 | + self.thiCategoryBtn?.setTitle("请选择", for: .normal) | ||
| 566 | + } | ||
| 567 | + } | ||
| 568 | + self.tableView.reloadData() | ||
| 569 | + self.tableView.setContentOffset(CGPointZero, animated: true) | ||
| 570 | + successCompleteBlock() | ||
| 571 | + | ||
| 572 | + }else if (status == .failed){ | ||
| 573 | +// self.network_type = .failed | ||
| 574 | + }else if (status == .noNetwork){ | ||
| 575 | +// self.network_type = .noNetwork | ||
| 576 | + } | ||
| 577 | + } | ||
| 578 | + } | ||
| 579 | + | ||
| 580 | + ///店铺分类数据请求 | ||
| 581 | + func postShopClassify(){ | ||
| 582 | + showLoading(message: "") | ||
| 583 | + CNLiveShopGoodListViewModel.getCateListWithShopId(shopId: DSUserInfoManager.shared.dsUserInfo.id!) { result, status in | ||
| 584 | + hiddenLoading() | ||
| 585 | + if status == .success{ | ||
| 586 | + let classifyListModel = result as! CNLiveShopClassifyListModel | ||
| 587 | + self.firCategoryDataArr = NSMutableArray(array: classifyListModel.list) | ||
| 588 | + self.displayLevel = 1 | ||
| 589 | + self.tableView.reloadData() | ||
| 590 | + | ||
| 591 | + if (self.firCategoryDataArr.count == 0) { | ||
| 592 | + self.contentView?.addSubview(self.addShopCalssifyBtn) | ||
| 593 | + } | ||
| 594 | + else{ | ||
| 595 | + self.addShopCalssifyBtn.removeFromSuperview() | ||
| 596 | + } | ||
| 597 | + }else if (status == .failed){ | ||
| 598 | + //self.network_type = .failed | ||
| 599 | + | ||
| 600 | + }else if (status == .noNetwork){ | ||
| 601 | + //self.network_type = .noNetwork | ||
| 602 | + } | ||
| 603 | + } | ||
| 604 | + } | ||
| 605 | + | ||
| 16 | } | 606 | } |
metaCode/Classes/Main/HomePage/Controller/GoodsManager/CNLiveModalPresentationViewController.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveModalPresentationViewController.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2023/11/16. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +typealias completionBlock = (_ finished:Bool)->Void | ||
| 11 | +typealias confirmActionBlock = ()->Void | ||
| 12 | + | ||
| 13 | +class CNLiveModalPresentationViewController:UIViewController{ | ||
| 14 | + | ||
| 15 | + var confirmBlock:confirmActionBlock? | ||
| 16 | + lazy var contentView :UIView = { | ||
| 17 | + let contentView = UIView(frame: CGRect(x: 0, y: 0, width: 200, height: 200)) | ||
| 18 | + return contentView | ||
| 19 | + }() | ||
| 20 | + | ||
| 21 | + lazy var bgView :UIView = { | ||
| 22 | + let bgView = UIView(frame: CGRect(x: 0, y: 0, width: self.view.width, height: self.view.height)) | ||
| 23 | + bgView.backgroundColor = .black | ||
| 24 | + bgView.alpha = 0.2 | ||
| 25 | + return bgView | ||
| 26 | + }() | ||
| 27 | + | ||
| 28 | + override func viewDidLoad() { | ||
| 29 | + super.viewDidLoad() | ||
| 30 | + self.view.backgroundColor = .clear | ||
| 31 | + self.view.addSubview(self.bgView) | ||
| 32 | + self.view.addSubview(self.contentView) | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + @objc func cancelButtonAction(){ | ||
| 36 | + self.hidingAnimationWithCompletion { finished in | ||
| 37 | + | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | + @objc func confirmButtonAction(){ | ||
| 41 | + if ((self.confirmBlock?()) != nil){ | ||
| 42 | + self.confirmBlock!() | ||
| 43 | + } | ||
| 44 | + } | ||
| 45 | + func showingAnimationWithCompletion(completion:@escaping completionBlock){ | ||
| 46 | + | ||
| 47 | + UIView.animate(withDuration: 0.3, delay: 0.0, options: .curveEaseOut) { | ||
| 48 | + self.contentView.top = (self.view.height-self.contentView.height)/2 | ||
| 49 | + } completion: { finished in | ||
| 50 | + completion(finished) | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + func hidingAnimationWithCompletion(completion:@escaping completionBlock){ | ||
| 55 | + UIView.animate(withDuration: 0.3, delay: 0.0, options: .curveEaseOut) { | ||
| 56 | + self.contentView.top = self.view.height | ||
| 57 | + } completion: { finished in | ||
| 58 | + completion(finished) | ||
| 59 | + self.view.removeFromSuperview() | ||
| 60 | + } | ||
| 61 | + } | ||
| 62 | +} |
metaCode/Classes/Main/HomePage/Controller/GoodsManager/CNLiveShopClassilyManageViewController.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveShopClassilyManageViewController.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2023/12/12. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +///区头id | ||
| 11 | +let kCNLiveShopClassifySectionHeaderViewID = "kCNLiveShopClassifySectionHeaderViewID" | ||
| 12 | +///cell ID | ||
| 13 | +let kCNLiveShopClassilyManageTableViewCellID = "kCNLiveShopClassilyManageTableViewCellID" | ||
| 14 | + | ||
| 15 | +class CNLiveShopClassilyManageViewController:CNLiveBaseViewController, UITableViewDataSource, UITableViewDelegate{ | ||
| 16 | + | ||
| 17 | + // MARK: - lazy | ||
| 18 | + lazy var tableView : UITableView = { | ||
| 19 | + let tableView = UITableView(frame: CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: KSreenHeight-KNavigationHeight-KTabBarHeight), style: .plain) | ||
| 20 | + tableView.backgroundColor = HexColor("#F6F6F6") | ||
| 21 | + tableView.dataSource = self | ||
| 22 | + tableView.delegate = self | ||
| 23 | + tableView.tableFooterView = UIView() | ||
| 24 | + tableView.separatorStyle = .none | ||
| 25 | + tableView.tableFooterView = UIView.init() | ||
| 26 | + tableView.tableHeaderView = self.headerView | ||
| 27 | + tableView.register(CNLiveShopClassifySectionHeaderView.self, forHeaderFooterViewReuseIdentifier: kCNLiveShopClassifySectionHeaderViewID) | ||
| 28 | + | ||
| 29 | + tableView.register(CNLiveShopClassilyManageTableViewCell.self, forCellReuseIdentifier:kCNLiveShopClassilyManageTableViewCellID ) | ||
| 30 | + return tableView | ||
| 31 | + }() | ||
| 32 | + | ||
| 33 | + ///表头 | ||
| 34 | + lazy var headerView :CNLiveShopClassilyManageHeaderView = { | ||
| 35 | + let headerView = CNLiveShopClassilyManageHeaderView(frame: CGRect(x: 0, y: 0, width: KSreenWidth, height: 114)) | ||
| 36 | + return headerView | ||
| 37 | + }() | ||
| 38 | + | ||
| 39 | + lazy var bottomNavView :UIView = { | ||
| 40 | + let bottomNavView = UIView(frame: CGRect(x: 0, y: KSreenHeight-KTabBarHeight, width: KSreenWidth, height: KTabBarHeight)) | ||
| 41 | + bottomNavView.backgroundColor = .white | ||
| 42 | + return bottomNavView | ||
| 43 | + }() | ||
| 44 | + | ||
| 45 | + | ||
| 46 | + ///分类列表详情数据 | ||
| 47 | + var classifyListModel:CNLiveShopClassifyListModel? | ||
| 48 | + | ||
| 49 | + ///一级分类数据源,一级分类里面包含了二级分类 | ||
| 50 | + var listArray:[CNLiveShopClassifyModel]? | ||
| 51 | + | ||
| 52 | + override func viewDidLoad() { | ||
| 53 | + super.viewDidLoad() | ||
| 54 | + self.initUI() | ||
| 55 | + self.loadData() | ||
| 56 | + } | ||
| 57 | + // MARK: - 初始化UI | ||
| 58 | + func initUI(){ | ||
| 59 | + self.view.addSubview(self.tableView) | ||
| 60 | + self.initTopNav() | ||
| 61 | + self.initBottomNav() | ||
| 62 | + } | ||
| 63 | + func initTopNav(){ | ||
| 64 | + navigationBarHidden = false | ||
| 65 | + titleName = "店铺分类管理" | ||
| 66 | + } | ||
| 67 | + func initBottomNav(){ | ||
| 68 | + self.view.addSubview(self.bottomNavView) | ||
| 69 | + | ||
| 70 | + let createBtn = UIButton(type: .custom) | ||
| 71 | + createBtn.frame = CGRect(x: 0, y: 0, width: KSreenWidth, height: KTabBar_UIHeight) | ||
| 72 | + createBtn.setTitle("创建店铺分类", for: .normal) | ||
| 73 | + createBtn.setImage(UIImage(named: "DS_WB_CJDP"), for: .normal) | ||
| 74 | + createBtn.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 8) | ||
| 75 | + createBtn.setTitleColor(HexColor("#FD862E"), for: .normal) | ||
| 76 | + createBtn.titleLabel?.font = Font_15 | ||
| 77 | + createBtn.addTarget(self, action: #selector(createBtnClick), for: .touchUpInside) | ||
| 78 | + self.bottomNavView.addSubview(createBtn) | ||
| 79 | + | ||
| 80 | + } | ||
| 81 | + // MARK: - load data | ||
| 82 | + func loadData(){ | ||
| 83 | + showLoading(message: "") | ||
| 84 | + CNLiveShopClassilyViewModel.getCateListWithShopId(shopId: DSUserInfoManager.shared.dsUserInfo.id!) { result, status in | ||
| 85 | + hiddenLoading() | ||
| 86 | + if status == .success{ | ||
| 87 | + let model = result as! CNLiveShopClassifyListModel | ||
| 88 | + self.listArray = Array(model.list) | ||
| 89 | + self.headerView.classifyModel = model | ||
| 90 | + self.tableView.reloadData() | ||
| 91 | + }else{ | ||
| 92 | + showMessage(message: "获取分类失败") | ||
| 93 | + } | ||
| 94 | + } | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + // MARK: - UITableViewDelegate,UITableViewDataSource | ||
| 98 | + func numberOfSections(in tableView: UITableView) -> Int { | ||
| 99 | + return self.listArray?.count ?? 0 | ||
| 100 | + } | ||
| 101 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
| 102 | + if self.listArray != nil{ | ||
| 103 | + let model = self.listArray![section] | ||
| 104 | + if model.showChild{ | ||
| 105 | + return model.child.count | ||
| 106 | + } | ||
| 107 | + } | ||
| 108 | + return 0 | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
| 112 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveShopClassilyManageTableViewCellID, for: indexPath) as? CNLiveShopClassilyManageTableViewCell | ||
| 113 | + else { | ||
| 114 | + let cell = CNLiveShopClassilyManageTableViewCell() | ||
| 115 | + return cell | ||
| 116 | + } | ||
| 117 | + let model = self.listArray![indexPath.section] | ||
| 118 | + cell.classifyModel = model.child[indexPath.row] | ||
| 119 | + cell.editBtnBlock = { [weak self] classifyModel in | ||
| 120 | + self!.editBtnActionWithMModel(classifyModel: classifyModel, type: .twoLevelClassify) | ||
| 121 | + } | ||
| 122 | + return cell | ||
| 123 | + } | ||
| 124 | + func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { | ||
| 125 | + let sectionHeaderView = tableView.dequeueReusableHeaderFooterView(withIdentifier: kCNLiveShopClassifySectionHeaderViewID) as! CNLiveShopClassifySectionHeaderView | ||
| 126 | + sectionHeaderView.classifyModel = self.listArray![section] | ||
| 127 | + sectionHeaderView.section = section | ||
| 128 | + sectionHeaderView.showChildCalssifyBlock = { [weak self] section,classifyModel in | ||
| 129 | + self?.showChildCalssifyAction(section: section, classifyModel: classifyModel) | ||
| 130 | + } | ||
| 131 | + sectionHeaderView.addSubClassifyBtnBlock = { [weak self] classifyModel in | ||
| 132 | + self?.addSubClassifyBtnActionWithModel(classifyModel: classifyModel) | ||
| 133 | + } | ||
| 134 | + sectionHeaderView.editBtnBlock = { [weak self] classifyModel in | ||
| 135 | + self?.editBtnActionWithMModel(classifyModel: classifyModel, type: .oneLevelClassify) | ||
| 136 | + } | ||
| 137 | + return sectionHeaderView | ||
| 138 | + } | ||
| 139 | + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
| 140 | + return 50 | ||
| 141 | + } | ||
| 142 | + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { | ||
| 143 | + return 50 | ||
| 144 | + } | ||
| 145 | + // MARK: - response method | ||
| 146 | + @objc func createBtnClick(){ | ||
| 147 | + let vc = CNLiveCreateShopClassifyViewController() | ||
| 148 | + vc.classifyType = .oneLevelClassify | ||
| 149 | + vc.successCompleteBlock = {[weak self] in | ||
| 150 | + self!.loadData() | ||
| 151 | + } | ||
| 152 | + navigationViewController().pushViewController(vc, animated: pushAnimated) | ||
| 153 | +// currentViewController()?.navigationController?.pushViewController(vc, animated: pushAnimated) | ||
| 154 | + } | ||
| 155 | + ///显示/隐藏子分类 | ||
| 156 | + func showChildCalssifyAction(section:Int,classifyModel:CNLiveShopClassifyModel){ | ||
| 157 | + if classifyModel.child.count == 0{ | ||
| 158 | + showMessage(message: "当前分类没有子分类") | ||
| 159 | + return | ||
| 160 | + } | ||
| 161 | + classifyModel.showChild = !classifyModel.showChild | ||
| 162 | + self.tableView.reloadSections([section], with: .fade) | ||
| 163 | + } | ||
| 164 | + ///添加子分类 | ||
| 165 | + func addSubClassifyBtnActionWithModel(classifyModel:CNLiveShopClassifyModel){ | ||
| 166 | + let vc = CNLiveCreateShopClassifyViewController() | ||
| 167 | + vc.classifyType = .twoLevelClassify | ||
| 168 | + vc.superClassifyId = classifyModel.id! | ||
| 169 | + vc.successCompleteBlock = {[weak self] in | ||
| 170 | + self!.loadData() | ||
| 171 | + } | ||
| 172 | + navigationViewController().pushViewController(vc, animated: pushAnimated) | ||
| 173 | +// currentViewController()?.navigationController?.pushViewController(vc, animated: pushAnimated) | ||
| 174 | + } | ||
| 175 | + func editBtnActionWithMModel(classifyModel:CNLiveShopClassifyModel,type:CNLiveCreateType){ | ||
| 176 | + let data = modelToDictionary(classifyModel) | ||
| 177 | + ///重新拷贝一个对象 | ||
| 178 | + var copyClassifyModel = newDictionaryToModel(data, CNLiveShopClassifyModel.self) as! CNLiveShopClassifyModel | ||
| 179 | + let vc = CNLiveCreateShopClassifyViewController(model: copyClassifyModel, isEdite: true) | ||
| 180 | + vc.classifyType = type | ||
| 181 | + vc.successCompleteBlock = {[weak self] in | ||
| 182 | + self!.loadData() | ||
| 183 | + } | ||
| 184 | + currentViewController()?.navigationController?.pushViewController(vc, animated: true) | ||
| 185 | + } | ||
| 186 | +} |
metaCode/Classes/Main/HomePage/Controller/GoodsManager/CNLiveShopGoodsSearchViewController.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveShopGoodsSearchViewController.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2023/12/25. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | +import MJRefresh | ||
| 10 | +import QMUIKit | ||
| 11 | +enum CNSearchType{ | ||
| 12 | + | ||
| 13 | + /// 搜索普通商品类型 | ||
| 14 | + case defaultGoods | ||
| 15 | + /// 搜索关联商品类型 | ||
| 16 | + case associateGoods | ||
| 17 | +} | ||
| 18 | + | ||
| 19 | +class CNLiveShopGoodsSearchViewController:CNLiveBaseViewController,UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate{ | ||
| 20 | + | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + /// 搜索历史最大缓存数量 | ||
| 24 | + let kCNLiveMaxCacheSearchKeywordKey = 30 | ||
| 25 | + /// 历史记录本地缓存key | ||
| 26 | + let kDSSaveShopSearchHistroyData = "kDSSaveShopSearchHistroyData" | ||
| 27 | + /// 搜索关键字 | ||
| 28 | + var keyWord:String? | ||
| 29 | + var rightNavBtn:UIButton? | ||
| 30 | + | ||
| 31 | + lazy var tableView : UITableView = { | ||
| 32 | + let tableView = UITableView(frame: CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: KSreenHeight-KNavigationHeight), style: .plain) | ||
| 33 | + tableView.dataSource = self | ||
| 34 | + tableView.delegate = self | ||
| 35 | + tableView.backgroundColor = .white | ||
| 36 | + tableView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom:getSystemTabbarUiOffsetHeight , right: 0) | ||
| 37 | +// tableView.emptyDataSetSource = self | ||
| 38 | +// tableView.emptyDataSetDelegate = self | ||
| 39 | + tableView.separatorStyle = .none | ||
| 40 | + tableView.tableFooterView = UIView.init() | ||
| 41 | + tableView.tableHeaderView = self.cn_tableHeaderView() | ||
| 42 | + tableView.mj_footer = MJRefreshAutoNormalFooter.init(refreshingBlock: {[weak self] in | ||
| 43 | + self!.loadMoreAction() | ||
| 44 | + }) | ||
| 45 | + tableView.mj_footer?.isHidden = true | ||
| 46 | + tableView.register(CNLiveShopGoodsManageListTableViewCell.self, forCellReuseIdentifier: kDSShopGoodsManageListTableViewCellID) | ||
| 47 | + tableView.register(CNLiveShopAssociatedGoodsTableViewCell.self, forCellReuseIdentifier: kDSShopAssociatedGoodsTableViewCellID) | ||
| 48 | + return tableView | ||
| 49 | + }() | ||
| 50 | + /// 搜索结果数据源 | ||
| 51 | + lazy var dataArr: NSMutableArray = { | ||
| 52 | + return NSMutableArray() | ||
| 53 | + }() | ||
| 54 | + /// 历史记录数据 | ||
| 55 | + lazy var hisDataArr = { | ||
| 56 | + return NSMutableArray() | ||
| 57 | + }() | ||
| 58 | + var searchTextField:UITextField? | ||
| 59 | + /// 页码 | ||
| 60 | + var page:Int = 0 | ||
| 61 | + var searchType:CNSearchType = .defaultGoods | ||
| 62 | + | ||
| 63 | + /// 选中的关联商品 | ||
| 64 | + var selectAssociatedGoodsModel:ShopOrderAssociatedGoodsModel? | ||
| 65 | + | ||
| 66 | + init(searchType:CNSearchType) { | ||
| 67 | + super.init(nibName: nil, bundle: nil) | ||
| 68 | + self.searchType = searchType | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + required init?(coder: NSCoder) { | ||
| 72 | + fatalError("init(coder:) has not been implemented") | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + override func viewDidLoad() { | ||
| 76 | + super.viewDidLoad() | ||
| 77 | + self.view.backgroundColor = .white | ||
| 78 | + navigationBarHidden = false | ||
| 79 | + self.initTopNav() | ||
| 80 | + self.view.addSubview(self.tableView) | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + override func viewDidAppear(_ animated: Bool) { | ||
| 84 | + super.viewDidAppear(animated) | ||
| 85 | + self.searchTextField?.becomeFirstResponder() | ||
| 86 | + self.popGestureRecognizerEnable = false | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + override func viewDidDisappear(_ animated: Bool) { | ||
| 90 | + super.viewDidDisappear(animated) | ||
| 91 | + self.popGestureRecognizerEnable = true | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + override func viewWillLayoutSubviews() { | ||
| 95 | + super.viewWillLayoutSubviews() | ||
| 96 | + self.tableView.frame = CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: self.view.height-KNavigationHeight) | ||
| 97 | + | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + // MARK: - initTopNav | ||
| 101 | + func initTopNav(){ | ||
| 102 | + let searchBgView = CNLiveRoundedRectView(frame: CGRect(x: 52, y: get_system_statusBar_height()+(get_system_nav_ui_height()-30)/2, width: self.topNavView.width-52*2, height: 30)) | ||
| 103 | + searchBgView.fillColor = HexColor("#F2F2F2") | ||
| 104 | + searchBgView.radius = searchBgView.height/2 | ||
| 105 | + self.topNavView.addSubview(searchBgView) | ||
| 106 | + | ||
| 107 | + let searchImageView = UIImageView(frame: CGRect(x: 15, y: (searchBgView.height-16)/2, width: 16, height: 16)) | ||
| 108 | + searchImageView.clipsToBounds = true | ||
| 109 | + searchImageView.contentMode = .scaleAspectFit | ||
| 110 | + searchImageView.image = UIImage(named: "DS_goods_search_icon") | ||
| 111 | + searchBgView.addSubview(searchImageView) | ||
| 112 | + | ||
| 113 | + let searchLine = UIImageView(frame: CGRect(x: searchImageView.right+10, y: (searchBgView.height-11)/2, width: DS_RRV_ONE_PIXEL, height: 11)) | ||
| 114 | + searchLine.backgroundColor = HexColor("#999999") | ||
| 115 | + searchBgView.addSubview(searchLine) | ||
| 116 | + | ||
| 117 | + let searchTextField = UITextField(frame: CGRect(x: searchLine.right+10, y: 0, width: searchBgView.width-(searchLine.right+10+15), height: searchBgView.height)) | ||
| 118 | + searchTextField.attributedPlaceholder = NSAttributedString(string: "请输你要搜索的商品", attributes: [.foregroundColor: HexColor("#D2D2D2")!]) | ||
| 119 | + searchTextField.textColor = HexColor("#333333") | ||
| 120 | + searchTextField.font = Font_13 | ||
| 121 | + searchTextField.delegate = self | ||
| 122 | + searchTextField.returnKeyType = .search | ||
| 123 | + searchTextField.clearButtonMode = .whileEditing | ||
| 124 | + searchBgView.addSubview(searchTextField) | ||
| 125 | + self.searchTextField = searchTextField | ||
| 126 | + searchTextField.addTarget(self, action: #selector(textFieldDidOnClearAndBecomeFirstResponder), for: .editingChanged) | ||
| 127 | + | ||
| 128 | + self.rightNavBtn = UIButton(type: .custom) | ||
| 129 | + self.rightNavBtn?.setTitle("取消", for: .normal) | ||
| 130 | + self.rightNavBtn?.frame = CGRect(x: 0, y: KStatusBarHeight, width: KNavigationHeight-KStatusBarHeight, height: KNavigationHeight-KStatusBarHeight) | ||
| 131 | + self.rightNavBtn?.setTitleColor(HexColor("#ff725c"), for: .normal) | ||
| 132 | + self.rightNavBtn?.addTarget(self, action: #selector(cancelNavBtnAction), for: .touchUpInside) | ||
| 133 | + self.rightNavBtns = [self.rightNavBtn!] | ||
| 134 | + | ||
| 135 | + let leftNavBtn = UIButton(type: .custom) | ||
| 136 | + leftNavBtn.setImage(UIImage(named: "DS_goods_search_back_icon"), for: .normal) | ||
| 137 | + leftNavBtn.addTarget(self, action: #selector(rightNavBtnAction), for: .touchUpInside) | ||
| 138 | + self.leftNavBtns = [leftNavBtn] | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + // MARK: - UITableView 代理 | ||
| 142 | + func numberOfSections(in tableView: UITableView) -> Int { | ||
| 143 | + if (self.dataArr.count == 0) { | ||
| 144 | + return 0 | ||
| 145 | + } | ||
| 146 | + return 1 | ||
| 147 | + } | ||
| 148 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
| 149 | + return self.dataArr.count | ||
| 150 | + } | ||
| 151 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
| 152 | + if self.searchType == .associateGoods{ | ||
| 153 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kDSShopAssociatedGoodsTableViewCellID) as? CNLiveShopAssociatedGoodsTableViewCell | ||
| 154 | + else { | ||
| 155 | + let cell = CNLiveShopAssociatedGoodsTableViewCell() | ||
| 156 | + return cell | ||
| 157 | + } | ||
| 158 | + let goodsModel = self.dataArr[indexPath.row] as! ShopOrderAssociatedGoodsModel | ||
| 159 | + var isSelect = false | ||
| 160 | + if goodsModel.id == self.selectAssociatedGoodsModel!.id{ | ||
| 161 | + isSelect = true | ||
| 162 | + } | ||
| 163 | + cell.setModel(model: goodsModel, isSelect: isSelect, keyword: self.keyWord!) | ||
| 164 | + return cell | ||
| 165 | + }else{ | ||
| 166 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kDSShopGoodsManageListTableViewCellID) as? CNLiveShopGoodsManageListTableViewCell | ||
| 167 | + else { | ||
| 168 | + let cell = CNLiveShopGoodsManageListTableViewCell() | ||
| 169 | + return cell | ||
| 170 | + } | ||
| 171 | + cell.editCallBack = { model in | ||
| 172 | + self.editGoodsModel(goodsModel: model) | ||
| 173 | + } | ||
| 174 | + cell.operStateCallBack = { model ,state in | ||
| 175 | + self.operStateWithGoodsModel(goodsModel: model, state: state) | ||
| 176 | + } | ||
| 177 | + cell.editCountCallBack = { model in | ||
| 178 | + self.editGoodsCountModel(goodsModel: model) | ||
| 179 | + } | ||
| 180 | + let model = self.dataArr[indexPath.row] as! ShopOrderAssociatedGoodsModel | ||
| 181 | + cell.setSearchModel(model: model, keyWork: self.keyWord!) | ||
| 182 | + return cell | ||
| 183 | + } | ||
| 184 | + } | ||
| 185 | + func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { | ||
| 186 | + let tempView = UIView(frame: CGRect(x: 0, y: 0, width: KSreenWidth, height: 50)) | ||
| 187 | + tempView.backgroundColor = .white | ||
| 188 | + if section == 1{ | ||
| 189 | + tempView.height = 60 | ||
| 190 | + let topView = UIView(frame: CGRect(x: 0, y: 0, width: KSreenWidth, height: 10)) | ||
| 191 | + topView.backgroundColor = HexColor("#F9F9F9") | ||
| 192 | + tempView.addSubview(topView) | ||
| 193 | + } | ||
| 194 | + | ||
| 195 | + let nameLabel = UILabel(frame: CGRect(x: 10, y: 12 + (section == 1 ? 10 : 0), width: KSreenWidth - 90, height: 26)) | ||
| 196 | + nameLabel.textColor = HexColor("#333333") | ||
| 197 | + nameLabel.font = UIFont.boldSystemFont(ofSize: 16) | ||
| 198 | + nameLabel.lineBreakMode = .byTruncatingTail | ||
| 199 | + nameLabel.numberOfLines = 1 | ||
| 200 | + nameLabel.text = String(format: "%@-商品", self.keyWord!) | ||
| 201 | + tempView.addSubview(nameLabel) | ||
| 202 | + | ||
| 203 | + let lineLabel = UILabel(frame: CGRect(x: 10, y: 49 + (section == 1 ? 10 : 0), width: KSreenWidth - 20, height: DS_RRV_ONE_PIXEL)) | ||
| 204 | + lineLabel.backgroundColor = HexColor("#F2F2F2") | ||
| 205 | + tempView.addSubview(lineLabel) | ||
| 206 | + | ||
| 207 | + return tempView | ||
| 208 | + } | ||
| 209 | + | ||
| 210 | + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
| 211 | + switch self.searchType { | ||
| 212 | + case .defaultGoods: | ||
| 213 | + return 167//100 | ||
| 214 | + case .associateGoods: | ||
| 215 | + return 167 | ||
| 216 | + } | ||
| 217 | + } | ||
| 218 | + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { | ||
| 219 | + return 50 | ||
| 220 | + } | ||
| 221 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
| 222 | + let goodsModel = self.dataArr[indexPath.row] as! ShopOrderAssociatedGoodsModel | ||
| 223 | + switch self.searchType { | ||
| 224 | + case .defaultGoods: | ||
| 225 | + let vc = CNLiveShopGoodsDetailsViewController() | ||
| 226 | + vc.goodsId = goodsModel.id | ||
| 227 | +// navigationViewController().pushViewController(vc, animated: pushAnimated) | ||
| 228 | + break | ||
| 229 | + case .associateGoods: | ||
| 230 | + self.selectAssociatedGoodsModel = goodsModel | ||
| 231 | + self.rightNavBtn?.setTitle("确认", for: .normal) | ||
| 232 | + self.tableView.reloadData() | ||
| 233 | + } | ||
| 234 | + } | ||
| 235 | + // MARK: - UIScrollViewDelegate | ||
| 236 | + func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { | ||
| 237 | + self.view.endEditing(true) | ||
| 238 | + } | ||
| 239 | + | ||
| 240 | + // MARK: - UITextFieldDelegate | ||
| 241 | + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { | ||
| 242 | + if textField.tag == 666{ | ||
| 243 | + let isAllow = (string as NSString).allowWriteString(string: "0123456789") | ||
| 244 | + return !isAllow | ||
| 245 | + } | ||
| 246 | + return true | ||
| 247 | + } | ||
| 248 | + func textFieldDidEndEditing(_ textField: UITextField) { | ||
| 249 | + if textField.text?.count ?? 0 > 20{ | ||
| 250 | + textField.text = (textField.text! as NSString).substring(to: 20) | ||
| 251 | + } | ||
| 252 | + } | ||
| 253 | + | ||
| 254 | + func textFieldShouldReturn(_ textField: UITextField) -> Bool { | ||
| 255 | + self.cn_skipGoodsListWithSearchKeyword(searchKeyword: textField.text ?? "") | ||
| 256 | + return true | ||
| 257 | + } | ||
| 258 | + | ||
| 259 | + @objc func textFieldShouldClear(_ textField: UITextField) -> Bool { | ||
| 260 | + self.textFieldDidOnClearAndBecomeFirstResponder(textField: textField) | ||
| 261 | + return true | ||
| 262 | + } | ||
| 263 | + @objc func textFieldDidOnClearAndBecomeFirstResponder(textField:UITextField){ | ||
| 264 | + if textField.text?.count == 0{ | ||
| 265 | + self.rightNavBtn?.setTitle("取消", for: .normal) | ||
| 266 | + self.dataArr.removeAllObjects() | ||
| 267 | + self.tableView.mj_footer?.isHidden = true | ||
| 268 | + self.searchTextField?.text = "" | ||
| 269 | + self.tableView.tableHeaderView = self.cn_tableHeaderView() | ||
| 270 | + self.tableView.reloadData() | ||
| 271 | + self.searchTextField?.becomeFirstResponder() | ||
| 272 | + } | ||
| 273 | + if textField.text?.count ?? 0 > 20{ | ||
| 274 | + showMessage(message: "最长20个字!超出部分会在输入完成时自动删除") | ||
| 275 | + } | ||
| 276 | + } | ||
| 277 | + // MARK: - response method | ||
| 278 | + /// 点击历史记录 | ||
| 279 | + /// @param button | ||
| 280 | + @objc func hisBtnClick(_ button:UIButton){ | ||
| 281 | + self.searchTextField?.text = button.titleLabel?.text | ||
| 282 | + self.cn_skipGoodsListWithSearchKeyword(searchKeyword: button.titleLabel?.text ?? "") | ||
| 283 | + } | ||
| 284 | + | ||
| 285 | + /// 删除历史记录 | ||
| 286 | + @objc func deleteAllData(){ | ||
| 287 | + CNLiveFileManager.shared.deleteKey(resetKey: kDSSaveShopSearchHistroyData) | ||
| 288 | + self.tableView.tableHeaderView = self.cn_tableHeaderView() | ||
| 289 | + self.tableView.reloadData() | ||
| 290 | + | ||
| 291 | + } | ||
| 292 | + | ||
| 293 | + /// 返回事件 | ||
| 294 | + /// @param button 戳发按钮 | ||
| 295 | + @objc func rightNavBtnAction(_ button:UIButton){ | ||
| 296 | + navigationViewController().popViewController(animated: false) | ||
| 297 | + } | ||
| 298 | + | ||
| 299 | + /// 取消或确认选中的搜索商品 事件 | ||
| 300 | + /// @param button 戳发按钮 | ||
| 301 | + @objc func cancelNavBtnAction(_ button:UIButton){ | ||
| 302 | + if self.searchType == .associateGoods && self.selectAssociatedGoodsModel != nil{ | ||
| 303 | + // 搜索确认处理 | ||
| 304 | + NotificationCenter.default.post(name: Notification.Name.ShopGoodsManage.kDSSelectGoodsNotification, object: self.selectAssociatedGoodsModel) | ||
| 305 | + let vcArray = self.navigationController?.viewControllers | ||
| 306 | + for vc in vcArray!{ | ||
| 307 | +// if vc.isKind(of: CNDSDarenReleaseDynamicViewController.self){ | ||
| 308 | +// navigationViewController().popToViewController(vc, animated: true) | ||
| 309 | +// return | ||
| 310 | +// } | ||
| 311 | + } | ||
| 312 | + }else{ | ||
| 313 | + self.navigationController?.popViewController(animated: true) | ||
| 314 | + } | ||
| 315 | + } | ||
| 316 | + | ||
| 317 | + func loadMoreAction(){ | ||
| 318 | + self.page += 1 | ||
| 319 | + self.requestSearchWordDataWithKeyword(keyword: self.keyWord!, page: self.page) | ||
| 320 | + } | ||
| 321 | + /// 编辑商品 | ||
| 322 | + /// @param goodsModel 商品数据 | ||
| 323 | + func editGoodsModel(goodsModel:ShopOrderAssociatedGoodsModel){ | ||
| 324 | + let vc = CNLiveShopNewProductController() | ||
| 325 | + vc.type = .edit | ||
| 326 | + vc.goodsId = goodsModel.id! | ||
| 327 | + navigationViewController().pushViewController(vc, animated: true) | ||
| 328 | + } | ||
| 329 | + | ||
| 330 | + /// 编辑商品库存 | ||
| 331 | + /// @param goodsModel 商品数据 | ||
| 332 | + func editGoodsCountModel(goodsModel:ShopOrderAssociatedGoodsModel){ | ||
| 333 | + let alert = UIAlertController(title: "编辑商品库存", message: "请输入库存数量", preferredStyle: .alert) | ||
| 334 | + alert.addTextField { textField in | ||
| 335 | + textField.delegate = self | ||
| 336 | + textField.keyboardType = .numberPad | ||
| 337 | + textField.returnKeyType = .done | ||
| 338 | + textField.tag = 666 | ||
| 339 | + } | ||
| 340 | + alert.addAction(UIAlertAction(title: "取消", style: .cancel, handler: nil)) | ||
| 341 | + | ||
| 342 | + alert.addAction(UIAlertAction(title: "修改", style: .default, handler: { action in | ||
| 343 | + self.view.endEditing(true) | ||
| 344 | + let textField = alert.textFields?.first | ||
| 345 | + if textField?.text?.count == 0 || textField?.text?.count ?? 0 >= 6{ | ||
| 346 | + showMessage(message: "请输入有效的商品库存数量") | ||
| 347 | + return | ||
| 348 | + } | ||
| 349 | + self.requsetEditGoodsCount(count: textField?.text ?? "", goodsModel: goodsModel) | ||
| 350 | + })) | ||
| 351 | + present(alert, animated: true, completion: nil) | ||
| 352 | + } | ||
| 353 | + | ||
| 354 | + /// 编辑商品上下架状态 | ||
| 355 | + /// @param goodsModel 商品数据 | ||
| 356 | + /// @param state 1:上架 2:下架 | ||
| 357 | + func operStateWithGoodsModel(goodsModel:ShopOrderAssociatedGoodsModel,state:Int){ | ||
| 358 | + var message = "" | ||
| 359 | + if (state == 2) { | ||
| 360 | + message = "确认下架?" | ||
| 361 | + }else { | ||
| 362 | + message = "确认上架?" | ||
| 363 | + } | ||
| 364 | + ConfigAlertManager.shared.presentAlert(title: "", message: message, actionTitles: ["取消","确认"]) { index in | ||
| 365 | + if index == 1 { | ||
| 366 | + showLoading(message: "") | ||
| 367 | + CNLiveShopGoodListViewModel.postChangeGoodsStateWithGoodsId(goodsId: goodsModel.id!, state: "") { result, status in | ||
| 368 | + if status == .success{ | ||
| 369 | + for (_,obj) in self.dataArr.enumerated(){ | ||
| 370 | + let model = obj as! ShopOrderAssociatedGoodsModel | ||
| 371 | + if model.id == goodsModel.id{ | ||
| 372 | + if (model.state == "2") { | ||
| 373 | + model.state = "1" | ||
| 374 | + }else { | ||
| 375 | + model.state = "2" | ||
| 376 | + } | ||
| 377 | + self.tableView.reloadData() | ||
| 378 | + } | ||
| 379 | + } | ||
| 380 | + }else{ | ||
| 381 | + showMessage(message: "失败") | ||
| 382 | + return | ||
| 383 | + } | ||
| 384 | + } | ||
| 385 | + } | ||
| 386 | + } | ||
| 387 | + } | ||
| 388 | + // MARK: - 网络请求 | ||
| 389 | + /// 搜索接口 | ||
| 390 | + /// @param keyword 关键字 | ||
| 391 | + func requestSearchWordDataWithKeyword(keyword:String,page:Int){ | ||
| 392 | + showLoading(message: "") | ||
| 393 | + CNLiveShopGoodListViewModel.getGetGoodsListWithShopId(shopId: DSUserInfoManager.shared.dsUserInfo.id, sortType: "1", state: 0, categoryId: nil, keyword: keyword, page: page) { result, status in | ||
| 394 | + hiddenLoading() | ||
| 395 | + if status == .success{ | ||
| 396 | + let dataArr = result as! [ShopOrderAssociatedGoodsModel] | ||
| 397 | + if (self.page == 1 && dataArr.count == 0) { | ||
| 398 | + showMessage(message: "未搜索到相关结果") | ||
| 399 | + self.dataArr.removeAllObjects() | ||
| 400 | + self.tableView.tableHeaderView = self.cn_tableHeaderView() | ||
| 401 | + self.tableView.reloadData() | ||
| 402 | + self.rightNavBtn?.setTitle("取消", for: .normal) | ||
| 403 | + self.searchTextField?.becomeFirstResponder() | ||
| 404 | + }else{ | ||
| 405 | + if (page == 1) { | ||
| 406 | + self.dataArr.removeAllObjects() | ||
| 407 | + self.tableView.mj_footer?.isHidden = false | ||
| 408 | + } | ||
| 409 | + | ||
| 410 | + /**没有更多数据判断依据为:每页数据默认为20条,如果当前获取的这页数据小于20条,说明没有下页数据*/ | ||
| 411 | + if (dataArr.count < 20) { | ||
| 412 | + self.tableView.mj_footer?.isHidden = true | ||
| 413 | + } | ||
| 414 | + self.dataArr.addObjects(from: dataArr) | ||
| 415 | + self.tableView.tableHeaderView = UIView() | ||
| 416 | + self.tableView.reloadData() | ||
| 417 | + } | ||
| 418 | + }else{ | ||
| 419 | + showMessage(message: "搜索失败") | ||
| 420 | + } | ||
| 421 | + } | ||
| 422 | + } | ||
| 423 | + /// 设置库存数 | ||
| 424 | + /// @param count 库存数 | ||
| 425 | + /// @param goodsModel 商品数据 | ||
| 426 | + func requsetEditGoodsCount(count:String,goodsModel:ShopOrderAssociatedGoodsModel){ | ||
| 427 | + showLoading(message: "") | ||
| 428 | + CNLiveShopGoodListViewModel.postGoodsEditAttrWithShopId(shopId: DSUserInfoManager.shared.dsUserInfo.id!, goodsId: goodsModel.id!, type: 1, value: count) { result, status in | ||
| 429 | + if status == .success{ | ||
| 430 | + goodsModel.count = count | ||
| 431 | + self.tableView.reloadData() | ||
| 432 | + }else{ | ||
| 433 | + showMessage(message: "操作失败") | ||
| 434 | + } | ||
| 435 | + } | ||
| 436 | + } | ||
| 437 | + | ||
| 438 | + func cn_tableHeaderView() -> UIView{ | ||
| 439 | + let headerView = UIView(frame: CGRect(x: 0, y: 0, width: KSreenWidth, height: 0)) | ||
| 440 | + let whiteView = UIView(frame: CGRect(x: 0, y: 0, width: KSreenWidth, height: 0)) | ||
| 441 | + whiteView.backgroundColor = .white | ||
| 442 | + headerView.addSubview(whiteView) | ||
| 443 | + | ||
| 444 | + let markLab = UILabel(frame: CGRect(x: 25, y: 10, width: KSreenWidth-50, height: 30)) | ||
| 445 | + markLab.textColor = HexColor("#898989") | ||
| 446 | + markLab.text = "历史搜索" | ||
| 447 | + markLab.font = Font_15 | ||
| 448 | + whiteView.addSubview(markLab) | ||
| 449 | + | ||
| 450 | + self.hisDataArr.removeAllObjects() | ||
| 451 | + if (CNLiveFileManager.shared.takeDataKey(key: kDSSaveShopSearchHistroyData)) != nil { | ||
| 452 | + let arr = CNLiveFileManager.shared.takeDataKey(key: kDSSaveShopSearchHistroyData)! | ||
| 453 | + self.hisDataArr.addObjects(from: arr) | ||
| 454 | + } | ||
| 455 | + if self.hisDataArr.count == 0{ | ||
| 456 | + whiteView.height = markLab.bottom | ||
| 457 | + headerView.height = whiteView.bottom + 5 | ||
| 458 | + return whiteView | ||
| 459 | + } | ||
| 460 | + | ||
| 461 | + let floatLayoutView = QMUIFloatLayoutView() | ||
| 462 | + floatLayoutView.padding = UIEdgeInsets(top: 12, left: 12, bottom: 12, right: 12) | ||
| 463 | + floatLayoutView.itemMargins = UIEdgeInsets(top: 0, left: 0, bottom: 10, right: 10) | ||
| 464 | + floatLayoutView.minimumItemSize = CGSizeMake(40, 29)// 以2个字的按钮作为最小宽度 | ||
| 465 | + whiteView.addSubview(floatLayoutView) | ||
| 466 | + | ||
| 467 | + for i in 0..<self.hisDataArr.count{ | ||
| 468 | + let button = UIButton(type: .custom) | ||
| 469 | + button.backgroundColor = HexColor("#F9F9F9") | ||
| 470 | + button.setTitleColor(HexColor("#666666"), for: .normal) | ||
| 471 | + button.layer.cornerRadius = 5 | ||
| 472 | + button.titleLabel?.lineBreakMode = .byTruncatingTail | ||
| 473 | + button.setTitle(self.hisDataArr[i] as? String, for: .normal) | ||
| 474 | + button.titleLabel?.font = Font_13 | ||
| 475 | + button.contentEdgeInsets = UIEdgeInsets(top: 6, left: 10, bottom: 6, right: 10) | ||
| 476 | + button.addTarget(self, action: #selector(hisBtnClick), for: .touchUpInside) | ||
| 477 | + floatLayoutView.addSubview(button) | ||
| 478 | + } | ||
| 479 | + let padding = UIEdgeInsets(top: markLab.bottom, left: 10, bottom: 100, right: 10) | ||
| 480 | + let contentWidth = whiteView.width - UIEdgeInsetsGetHorizontalValue(padding) | ||
| 481 | + let floatLayoutViewSize = floatLayoutView.sizeThatFits(CGSize(width: contentWidth, height: CGFLOAT_MAX)) | ||
| 482 | + floatLayoutView.frame = CGRect(x: padding.left, y: padding.top, width: contentWidth, height: floatLayoutViewSize.height) | ||
| 483 | + | ||
| 484 | + let lineView = UIView(frame: CGRect(x: 10, y: floatLayoutView.bottom, width: KSreenWidth-20, height: DS_RRV_ONE_PIXEL)) | ||
| 485 | + lineView.backgroundColor = HexColor("#F2F2F2") | ||
| 486 | + whiteView.addSubview(lineView) | ||
| 487 | + | ||
| 488 | + let deleteAllBtn = UIButton(type: .custom) | ||
| 489 | + deleteAllBtn.frame = CGRect(x: 10, y: lineView.bottom+10, width: KSreenWidth-20, height: 30) | ||
| 490 | + deleteAllBtn.addTarget(self, action: #selector(deleteAllData), for: .touchUpInside) | ||
| 491 | + deleteAllBtn.titleLabel?.font = Font_15 | ||
| 492 | + deleteAllBtn.setTitleColor(HexColor("#f5a623"), for: .normal) | ||
| 493 | + deleteAllBtn.setTitle("清除搜索历史", for: .normal) | ||
| 494 | + whiteView.addSubview(deleteAllBtn) | ||
| 495 | + whiteView.height = deleteAllBtn.bottom+10 | ||
| 496 | + headerView.height = whiteView.bottom+5 | ||
| 497 | + return headerView | ||
| 498 | + } | ||
| 499 | + func cn_skipGoodsListWithSearchKeyword(searchKeyword:String){ | ||
| 500 | + var searchKeywordStr = searchKeyword | ||
| 501 | + let text = searchKeywordStr.replacingOccurrences(of: "\u{FFFC}", with: "") | ||
| 502 | + //去除掉首尾的空白字符和换行字符 | ||
| 503 | + searchKeywordStr = searchKeywordStr.trimmingCharacters(in: .whitespacesAndNewlines) | ||
| 504 | + if (searchKeywordStr.isEmpty) { | ||
| 505 | + showMessage(message: "搜索关键字不能为空") | ||
| 506 | + return | ||
| 507 | + } | ||
| 508 | + self.view.endEditing(true) | ||
| 509 | + if self.hisDataArr.contains(searchKeywordStr){ | ||
| 510 | + self.hisDataArr.remove(searchKeywordStr) | ||
| 511 | + } | ||
| 512 | + self.hisDataArr.insert(searchKeyword, at: 0) | ||
| 513 | + if self.hisDataArr.count > kCNLiveMaxCacheSearchKeywordKey{ | ||
| 514 | + self.hisDataArr.removeObjects(in: NSMakeRange(kCNLiveMaxCacheSearchKeywordKey - 1, self.hisDataArr.count - (kCNLiveMaxCacheSearchKeywordKey - 1) - 1)) | ||
| 515 | + } | ||
| 516 | + CNLiveFileManager.shared.saveData(object: Array(self.hisDataArr), key: kDSSaveShopSearchHistroyData) | ||
| 517 | + self.page = 1 | ||
| 518 | + self.keyWord = searchKeywordStr | ||
| 519 | + self.requestSearchWordDataWithKeyword(keyword: self.keyWord!, page: self.page) | ||
| 520 | + | ||
| 521 | + } | ||
| 522 | +} |
metaCode/Classes/Main/HomePage/Controller/GoodsManager/CNLiveShopNewProductController.swift
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | // 新增商品 | 6 | // 新增商品 |
| 7 | 7 | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | - | 9 | +import HandyJSON |
| 10 | /// | 10 | /// |
| 11 | enum CNLiveShopGoodsAddEditType{ | 11 | enum CNLiveShopGoodsAddEditType{ |
| 12 | 12 | ||
| @@ -19,8 +19,14 @@ enum CNLiveShopGoodsAddEditType{ | @@ -19,8 +19,14 @@ enum CNLiveShopGoodsAddEditType{ | ||
| 19 | class CNLiveShopNewProductController:CNLiveBaseViewController{ | 19 | class CNLiveShopNewProductController:CNLiveBaseViewController{ |
| 20 | 20 | ||
| 21 | var type:CNLiveShopGoodsAddEditType = .add | 21 | var type:CNLiveShopGoodsAddEditType = .add |
| 22 | + | ||
| 23 | + ///最大价格 | ||
| 24 | + let kCNLiveShopMaxPrice = 10000000 | ||
| 25 | + var goodsId = "" | ||
| 26 | + var isRequestAdd:Bool = false | ||
| 27 | + | ||
| 22 | lazy var bgScrollView :UIScrollView = { | 28 | lazy var bgScrollView :UIScrollView = { |
| 23 | - let bgScrollView = UIScrollView(frame: CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: KSreenHeight-KNavigationHeight-KTabBarHeight)) | 29 | + let bgScrollView = UIScrollView(frame: CGRect(x: 0, y: self.topNavView.height, width: KSreenWidth, height: KSreenHeight-self.topNavView.height-KTabBarHeight)) |
| 24 | bgScrollView.showsVerticalScrollIndicator = false | 30 | bgScrollView.showsVerticalScrollIndicator = false |
| 25 | return bgScrollView | 31 | return bgScrollView |
| 26 | }() | 32 | }() |
| @@ -29,20 +35,103 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -29,20 +35,103 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 29 | let dataModel = CNLiveShopAddEditGoodsModel() | 35 | let dataModel = CNLiveShopAddEditGoodsModel() |
| 30 | return dataModel | 36 | return dataModel |
| 31 | }() | 37 | }() |
| 38 | + lazy var shopGoodsDetailsModel: CNLiveShopGoodsDetailsModel = { | ||
| 39 | + let shopGoodsDetailsModel = CNLiveShopGoodsDetailsModel() | ||
| 40 | + return shopGoodsDetailsModel | ||
| 41 | + }() | ||
| 42 | + | ||
| 43 | + var _selectCategoryVC:CNLiveGoodsCategoryController? | ||
| 44 | + var selectCategoryVC:CNLiveGoodsCategoryController?{ | ||
| 45 | + get{ | ||
| 46 | + if _selectCategoryVC == nil{ | ||
| 47 | + let vc = CNLiveGoodsCategoryController() | ||
| 48 | + vc.categoryType = .goods | ||
| 49 | + if self.shopGoodsDetailsModel.id?.count ?? 0 > 0{ | ||
| 50 | + vc.firCategoryId = self.shopGoodsDetailsModel.groupid | ||
| 51 | + vc.secCategoryId = self.shopGoodsDetailsModel.groupid2 | ||
| 52 | + vc.thiCategoryId = self.shopGoodsDetailsModel.groupid3 | ||
| 53 | + } | ||
| 54 | + vc.finishBlock = { | ||
| 55 | + //商品分类 | ||
| 56 | + let singleView1 = self.bgScrollView.viewWithTag(1) as! CNLiveShopAddGoodsSingleView | ||
| 57 | + singleView1.contentTextField.text = "\(self.selectCategoryVC?.firCategoryName ?? "") \(self.selectCategoryVC?.secCategoryName ?? "")" | ||
| 58 | + singleView1.layoutSubviews() | ||
| 59 | + } | ||
| 60 | + self.addChild(vc) | ||
| 61 | + vc.view.frame = CGRect(x: 0, y: 0, width: self.view.width, height: self.view.height) | ||
| 62 | + vc.didMove(toParent: self) | ||
| 63 | + self.view.addSubview(vc.view) | ||
| 64 | + _selectCategoryVC = vc | ||
| 65 | + } | ||
| 66 | + if _selectCategoryVC!.view.superview == nil && self.isShowGoodsCategory == true{ | ||
| 67 | + self.view.addSubview(_selectCategoryVC!.view) | ||
| 68 | + } | ||
| 69 | + return _selectCategoryVC | ||
| 70 | + } | ||
| 71 | + set{ | ||
| 72 | + | ||
| 73 | + _selectCategoryVC = newValue | ||
| 74 | + | ||
| 75 | + } | ||
| 76 | + } | ||
| 32 | 77 | ||
| 33 | - var selectCategoryVC = CNLiveGoodsCategoryController() | 78 | + var _selectShopClassifyVC:CNLiveGoodsCategoryController? |
| 79 | + var selectShopClassifyVC:CNLiveGoodsCategoryController?{ | ||
| 80 | + get{ | ||
| 81 | + if _selectShopClassifyVC == nil{ | ||
| 82 | + let vc = CNLiveGoodsCategoryController() | ||
| 83 | + | ||
| 84 | + vc.categoryType = .shop | ||
| 85 | + if self.shopGoodsDetailsModel.id?.count ?? 0 > 0{ | ||
| 86 | + vc.firCategoryId = self.shopGoodsDetailsModel.category_id | ||
| 87 | + vc.secCategoryId = self.shopGoodsDetailsModel.category_id2 | ||
| 88 | + } | ||
| 89 | + vc.finishBlock = { | ||
| 90 | + let singleView = self.getShopClassifyView() | ||
| 91 | + singleView?.contentTextField.text = "\(self.selectShopClassifyVC!.firCategoryName ?? "") \(self.selectShopClassifyVC!.secCategoryName ?? "")" | ||
| 92 | + singleView?.layoutSubviews() | ||
| 93 | + } | ||
| 94 | + self.addChild(vc) | ||
| 95 | + vc.view.frame = CGRect(x: 0, y: 0, width: self.view.width, height: self.view.height) | ||
| 96 | + self.view.addSubview(vc.view) | ||
| 97 | + vc.didMove(toParent: self) | ||
| 98 | + _selectShopClassifyVC = vc | ||
| 99 | + _selectShopClassifyVC!.hideView() | ||
| 100 | + if (self.type == .add) { | ||
| 101 | + _selectShopClassifyVC!.initTitleName(name: "新增商品") | ||
| 102 | + }else { | ||
| 103 | + _selectShopClassifyVC!.initTitleName(name: "编辑商品") | ||
| 104 | + } | ||
| 105 | + } | ||
| 106 | + if _selectShopClassifyVC!.view.superview == nil && self.isShowShopCategory == true{ | ||
| 107 | + self.view.addSubview(_selectShopClassifyVC!.view) | ||
| 108 | + } | ||
| 109 | + return _selectShopClassifyVC | ||
| 110 | + } | ||
| 111 | + set{ | ||
| 112 | + _selectShopClassifyVC = newValue | ||
| 113 | + } | ||
| 114 | + } | ||
| 115 | + | ||
| 34 | lazy var bottomNavView :UIView = { | 116 | lazy var bottomNavView :UIView = { |
| 35 | let bottomNavView = UIView(frame: CGRect(x: 0, y: KSreenHeight-KTabBarHeight, width: self.view.width, height: KTabBarHeight)) | 117 | let bottomNavView = UIView(frame: CGRect(x: 0, y: KSreenHeight-KTabBarHeight, width: self.view.width, height: KTabBarHeight)) |
| 36 | bottomNavView.backgroundColor = HexColor("F2F2F2") | 118 | bottomNavView.backgroundColor = HexColor("F2F2F2") |
| 37 | return bottomNavView | 119 | return bottomNavView |
| 38 | }() | 120 | }() |
| 39 | 121 | ||
| 122 | + var isShowGoodsCategory = false | ||
| 123 | + var isShowShopCategory = false | ||
| 124 | + | ||
| 40 | override func viewDidLoad() { | 125 | override func viewDidLoad() { |
| 41 | super.viewDidLoad() | 126 | super.viewDidLoad() |
| 127 | + navigationBarHidden = false | ||
| 42 | self.setUI() | 128 | self.setUI() |
| 43 | self.bgScrollView.backgroundColor = .white | 129 | self.bgScrollView.backgroundColor = .white |
| 44 | self.view.addSubview(self.bgScrollView) | 130 | self.view.addSubview(self.bgScrollView) |
| 45 | self.initBgScrollViewContentView() | 131 | self.initBgScrollViewContentView() |
| 132 | + if (self.type == .edit) { | ||
| 133 | + self.requestGoodsData() | ||
| 134 | + } | ||
| 46 | } | 135 | } |
| 47 | 136 | ||
| 48 | override func viewWillLayoutSubviews() { | 137 | override func viewWillLayoutSubviews() { |
| @@ -50,20 +139,41 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -50,20 +139,41 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 50 | self.bgScrollView.frame = CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: KSreenHeight-KNavigationHeight-KTabBarHeight) | 139 | self.bgScrollView.frame = CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: KSreenHeight-KNavigationHeight-KTabBarHeight) |
| 51 | var lastView:UIView? = nil | 140 | var lastView:UIView? = nil |
| 52 | for i in 0..<self.dataModel.list.count{ | 141 | for i in 0..<self.dataModel.list.count{ |
| 53 | - let singleView = self.view.viewWithTag(i+1) as! CNLiveShopAddGoodsSingleView | ||
| 54 | - singleView.frame = CGRect(x: 0, y: lastView?.bottom ?? 0, width: self.bgScrollView.width, height: singleView.height) | ||
| 55 | - if i+1 == 15{ | ||
| 56 | - singleView.frame = CGRect(x: 0, y: lastView?.bottom ?? 0, width: self.bgScrollView.width, height: 0.001) | ||
| 57 | - } | ||
| 58 | - lastView = singleView | 142 | + let singleView = self.bgScrollView.viewWithTag(i+1) as! CNLiveShopAddGoodsSingleView |
| 143 | + singleView.frame = CGRect(x: 0, y: lastView?.bottom ?? 0, width: self.bgScrollView.width, height: singleView.height) | ||
| 144 | + if i+1 == 15{ | ||
| 145 | + singleView.frame = CGRect(x: 0, y: lastView?.bottom ?? 0, width: self.bgScrollView.width, height: 0.001) | ||
| 146 | + } | ||
| 147 | + lastView = singleView | ||
| 148 | + | ||
| 59 | } | 149 | } |
| 60 | self.bgScrollView.contentSize = CGSize(width: self.bgScrollView.width, height: lastView?.bottom ?? 0) | 150 | self.bgScrollView.contentSize = CGSize(width: self.bgScrollView.width, height: lastView?.bottom ?? 0) |
| 61 | - self.selectCategoryVC.view.frame = CGRect(x: 0, y: 0, width: self.view.width, height: self.view.height) | 151 | + self.selectCategoryVC!.view.frame = CGRect(x: 0, y: 0, width: self.view.width, height: self.view.height) |
| 62 | } | 152 | } |
| 63 | 153 | ||
| 154 | + deinit { | ||
| 155 | + for i in 0..<self.dataModel.list.count{ | ||
| 156 | + let singleView = self.bgScrollView.viewWithTag(i+1) as! CNLiveShopAddGoodsSingleView | ||
| 157 | + if singleView.addEditGoodsListModel?.style == "3"{ | ||
| 158 | + singleView.uploadImageView.deleteUploadImageUrlAfterCancelUploadThings() | ||
| 159 | + } | ||
| 160 | + } | ||
| 161 | + } | ||
| 64 | func setUI(){ | 162 | func setUI(){ |
| 65 | - navigationBarHidden = false | ||
| 66 | titleName = "新增商品" | 163 | titleName = "新增商品" |
| 164 | + if (self.type == .add) { | ||
| 165 | + self.selectCategoryVC?.initTitleName(name: "新增商品") | ||
| 166 | + }else { | ||
| 167 | + self.selectCategoryVC?.initTitleName(name: "编辑商品") | ||
| 168 | + let deleteNavBtn = UIButton(type: .custom) | ||
| 169 | + deleteNavBtn.frame = CGRect(x: 0, y: KStatusBarHeight, width: KNavigationHeight-KStatusBarHeight, height: KNavigationHeight-KStatusBarHeight) | ||
| 170 | + deleteNavBtn.backgroundColor = .clear | ||
| 171 | + deleteNavBtn.setTitle("删除", for: .normal) | ||
| 172 | + deleteNavBtn.setTitleColor(HexColor("#FC1541"), for: .normal) | ||
| 173 | + deleteNavBtn.addTarget(self, action: #selector(deleteNavBtnClick), for: .touchUpInside) | ||
| 174 | + self.rightNavBtns = [deleteNavBtn] | ||
| 175 | + } | ||
| 176 | + | ||
| 67 | self.initBottomView() | 177 | self.initBottomView() |
| 68 | } | 178 | } |
| 69 | func initBottomView(){ | 179 | func initBottomView(){ |
| @@ -75,7 +185,7 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -75,7 +185,7 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 75 | previewBtn.setTitleColor(HexColor("#3A3A3A"), for: .normal) | 185 | previewBtn.setTitleColor(HexColor("#3A3A3A"), for: .normal) |
| 76 | previewBtn.titleLabel?.font = Font_15 | 186 | previewBtn.titleLabel?.font = Font_15 |
| 77 | previewBtn.addTarget(self, action: #selector(previewBtnClick), for: .touchUpInside) | 187 | previewBtn.addTarget(self, action: #selector(previewBtnClick), for: .touchUpInside) |
| 78 | - self.bottomNavView.addSubview(previewBtn) | 188 | +// self.bottomNavView.addSubview(previewBtn) |
| 79 | 189 | ||
| 80 | let saveBtn = UIButton(type: .custom) | 190 | let saveBtn = UIButton(type: .custom) |
| 81 | saveBtn.frame = CGRect(x: previewBtn.right, y: 0, width: self.view.width - previewBtn.right, height: KTabBarHeight) | 191 | saveBtn.frame = CGRect(x: previewBtn.right, y: 0, width: self.view.width - previewBtn.right, height: KTabBarHeight) |
| @@ -88,14 +198,19 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -88,14 +198,19 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 88 | } | 198 | } |
| 89 | 199 | ||
| 90 | func initBgScrollViewContentView(){ | 200 | func initBgScrollViewContentView(){ |
| 201 | + | ||
| 202 | + self.dataModel.initDataSource() | ||
| 91 | if self.type == .edit{ | 203 | if self.type == .edit{ |
| 92 | - | 204 | + if self.dataModel.list.count > 3{ |
| 205 | + var tempArray = Array(self.dataModel.list) | ||
| 206 | + tempArray.removeSubrange(Range(NSRange(location: self.dataModel.list.count - 3, length: 3))!) | ||
| 207 | + self.dataModel.list = tempArray | ||
| 208 | + } | ||
| 93 | } | 209 | } |
| 94 | - self.dataModel.initDataSource() | ||
| 95 | for i in 0..<self.dataModel.list.count { | 210 | for i in 0..<self.dataModel.list.count { |
| 96 | let model = self.dataModel.list[i] | 211 | let model = self.dataModel.list[i] |
| 97 | - let singleView = CNLiveShopAddGoodsSingleView.init(frame: CGRect(x: 0, y: 0, width: KSreenWidth, height: 50)) | ||
| 98 | - singleView.addEditGoodsListModel = model | 212 | + let singleView = CNLiveShopAddGoodsSingleView.init(frame: CGRect(x: 0, y: 0, width: KSreenWidth, height: 50), model: model) |
| 213 | +// singleView.addEditGoodsListModel = model | ||
| 99 | singleView.tag = i+1 | 214 | singleView.tag = i+1 |
| 100 | //完成frame更新通知 | 215 | //完成frame更新通知 |
| 101 | singleView.updateFrameBlock = { | 216 | singleView.updateFrameBlock = { |
| @@ -103,29 +218,156 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -103,29 +218,156 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 103 | } | 218 | } |
| 104 | singleView.tapBlock = { single in | 219 | singleView.tapBlock = { single in |
| 105 | // TODO: | 220 | // TODO: |
| 106 | -// if (single.tag == 1) { | ||
| 107 | -// //点击了商品分类 | ||
| 108 | -// | ||
| 109 | -// if (self.type == DSShopGoodsManageDetailsVCTypeEdit) { | ||
| 110 | -// DS_showMessage(@"商品分类不能修改"); | ||
| 111 | -// return; | ||
| 112 | -// } | ||
| 113 | -// [weakSelf displaySelectCategoryVC]; | ||
| 114 | -// } | ||
| 115 | -// else if([single.addEditGoodsListModel.title isEqualToString:@"店铺分类"]) | ||
| 116 | -// { | ||
| 117 | -// //点击了店铺分类 | ||
| 118 | -// [weakSelf displaySelectShopClassifyVC]; | ||
| 119 | -// } | 221 | + if (single.tag == 1) { |
| 222 | + //点击了商品分类 | ||
| 223 | + | ||
| 224 | + if (self.type == .edit) { | ||
| 225 | + showMessage(message: "商品分类不能修改") | ||
| 226 | + return | ||
| 227 | + } | ||
| 228 | + self.displaySelectCategoryVC() | ||
| 229 | + } | ||
| 230 | + else if single.addEditGoodsListModel!.title == "店铺分类" | ||
| 231 | + { | ||
| 232 | + //点击了店铺分类 | ||
| 233 | + self.displaySelectShopClassifyVC() | ||
| 234 | + } | ||
| 235 | + } | ||
| 236 | + singleView.changeFrameBlock = { | ||
| 237 | + isDelect,model,singleView in | ||
| 238 | + if isDelect{ | ||
| 239 | + let tempArray = NSMutableArray(array: self.dataModel.list) | ||
| 240 | + tempArray.remove(model) | ||
| 241 | + self.dataModel.list = tempArray as! [CNLiveShopAddEditGoodsListModel] | ||
| 242 | + self.reloadRemoveBgScrollViewContentView(singleView: singleView) | ||
| 243 | + }else{ | ||
| 244 | + CNLiveShopGoodsManageDetailsInputManager().showCustomParamAlertWithCompleterBlock { k, v in | ||
| 245 | + let paramDict = ["style":1,"isHaveTo":false,"title":k,"contentTextFieldkeyboardType":1,"isDisplayLine":true,"contentType":1,"isDelect":true,"content":v] | ||
| 246 | + let listModel = newDictionaryToModel(paramDict, CNLiveShopAddEditGoodsListModel.self) as! CNLiveShopAddEditGoodsListModel | ||
| 247 | + self.reloadBgScrollViewContentViewModel(model: listModel, index: self.dataModel.list.count+1, isScrollToBottom: true) | ||
| 248 | + self.dataModel.list.append(listModel) | ||
| 249 | + } | ||
| 250 | + } | ||
| 120 | } | 251 | } |
| 121 | - | ||
| 122 | self.bgScrollView.addSubview(singleView) | 252 | self.bgScrollView.addSubview(singleView) |
| 123 | } | 253 | } |
| 124 | } | 254 | } |
| 125 | 255 | ||
| 256 | + func reloadBgScrollViewContentViewModel(model:CNLiveShopAddEditGoodsListModel,index:Int,isScrollToBottom:Bool){ | ||
| 257 | + let singleView = CNLiveShopAddGoodsSingleView(frame: CGRect(x: 0, y: self.bgScrollView.height, width: self.bgScrollView.width, height: 50), model: model) | ||
| 258 | + singleView.tag = index | ||
| 259 | + singleView.updateFrameBlock = { | ||
| 260 | + self.viewWillLayoutSubviews() | ||
| 261 | + } | ||
| 262 | + singleView.tapBlock = {singleView in | ||
| 263 | + if singleView.tag == 1{ | ||
| 264 | + if self.type == .edit{ | ||
| 265 | + showMessage(message: "商品分类不能修改") | ||
| 266 | + return | ||
| 267 | + } | ||
| 268 | + self.displaySelectCategoryVC() | ||
| 269 | + }else if singleView.addEditGoodsListModel?.title == "店铺分类"{ | ||
| 270 | + //点击了店铺分类 | ||
| 271 | + self.displaySelectShopClassifyVC() | ||
| 272 | + } | ||
| 273 | + } | ||
| 274 | + singleView.changeFrameBlock = {isDelect,model,singleView in | ||
| 275 | + | ||
| 276 | + if (isDelect) { | ||
| 277 | + | ||
| 278 | + let tempArray = NSMutableArray(array: self.dataModel.list) | ||
| 279 | + tempArray.remove(model) | ||
| 280 | + self.dataModel.list = tempArray as! [CNLiveShopAddEditGoodsListModel] | ||
| 281 | + self.reloadRemoveBgScrollViewContentView(singleView: singleView) | ||
| 282 | + } | ||
| 283 | + } | ||
| 284 | + self.bgScrollView.addSubview(singleView) | ||
| 285 | + | ||
| 286 | + self.bgScrollView.contentSize = CGSize(width: self.bgScrollView.width, height: self.bgScrollView.contentSize.height+50) | ||
| 287 | + if (isScrollToBottom) { | ||
| 288 | + self.bgScrollView.scrollToBottom() | ||
| 289 | + } | ||
| 290 | + } | ||
| 291 | + | ||
| 292 | + func reloadRemoveBgScrollViewContentView(singleView:CNLiveShopAddGoodsSingleView){ | ||
| 293 | + var tempViews = Array(self.bgScrollView.subviews) | ||
| 294 | + if (tempViews.firstIndex(of: singleView) == tempViews.count - 1){ | ||
| 295 | + //是最后一个 直接移除 | ||
| 296 | + let singView = self.view.viewWithTag(singleView.tag-1) as! CNLiveShopAddGoodsSingleView | ||
| 297 | + singleView.removeFromSuperview() | ||
| 298 | + self.bgScrollView.contentSize = CGSize(width: self.bgScrollView.width, height: singView.bottom) | ||
| 299 | + }else | ||
| 300 | + { | ||
| 301 | + let i = tempViews.firstIndex(of: singleView) | ||
| 302 | + tempViews.removeSubrange(0...i!) | ||
| 303 | + singleView.removeFromSuperview() | ||
| 304 | + if (tempViews.last!.isKind(of: UIImage.self)){ | ||
| 305 | + tempViews.removeLast() | ||
| 306 | + } | ||
| 307 | + for subView in tempViews { | ||
| 308 | + subView.top = subView.top - 50 | ||
| 309 | + } | ||
| 310 | + let lastView = tempViews.last | ||
| 311 | + self.bgScrollView.contentSize = CGSize(width: self.bgScrollView.width, height: lastView!.bottom) | ||
| 312 | + | ||
| 313 | + } | ||
| 314 | + self.bgScrollView.scrollToBottom() | ||
| 315 | + } | ||
| 316 | + | ||
| 317 | + // MARK: - 显示选取分类界面 | ||
| 318 | + func displaySelectCategoryVC(){ | ||
| 319 | + self.isShowGoodsCategory = true | ||
| 320 | + self.view.bringSubviewToFront(self.selectCategoryVC!.view) | ||
| 321 | + self.selectCategoryVC!.display() | ||
| 322 | + } | ||
| 323 | + | ||
| 324 | + // MARK: - 获取店铺分类view | ||
| 325 | + func getShopClassifyView()->CNLiveShopAddGoodsSingleView?{ | ||
| 326 | + for singleView in self.bgScrollView.subviews { | ||
| 327 | + if singleView.isKind(of: CNLiveShopAddGoodsSingleView.self){ | ||
| 328 | + let single = singleView as! CNLiveShopAddGoodsSingleView | ||
| 329 | + if single.addEditGoodsListModel?.title == "店铺分类"{ | ||
| 330 | + return single | ||
| 331 | + } | ||
| 332 | + } | ||
| 333 | + } | ||
| 334 | + return nil | ||
| 335 | + } | ||
| 336 | + // MARK: - 显示选取店铺分类界面 | ||
| 337 | + func displaySelectShopClassifyVC(){ | ||
| 338 | + self.isShowShopCategory = true | ||
| 339 | + self.selectShopClassifyVC!.display() | ||
| 340 | + } | ||
| 341 | + | ||
| 342 | + // MARK: - 字符串trim处理 | ||
| 343 | + func strimStr(str:String)->String{ | ||
| 344 | + var strimStr = str | ||
| 345 | + strimStr = strimStr.replacingOccurrences(of: " ", with: "") | ||
| 346 | + strimStr = strimStr.replacingOccurrences(of: "\n", with: "") | ||
| 347 | + return strimStr | ||
| 348 | + } | ||
| 349 | + | ||
| 126 | // MARK: - BtnAction | 350 | // MARK: - BtnAction |
| 351 | + @objc func deleteNavBtnClick(){ | ||
| 352 | + AlertTool.showSystemAlert(title: "确认删除?", message: nil, actionTitles: ["取消","确定"], style: .alert, actionStyles:[.cancel,.default] ) { index in | ||
| 353 | + //1取消 2确定 | ||
| 354 | + if (index == 2) { | ||
| 355 | + showLoading(message: "") | ||
| 356 | + CNLiveShopGoodListViewModel.postChangeGoodsStateWithGoodsId(goodsId: self.goodsId, state: "3") { result, status in | ||
| 357 | + hiddenLoading() | ||
| 358 | + if status == .success{ | ||
| 359 | + showMessage(message: "删除成功") | ||
| 360 | + NotificationCenter.default.post(name: Notification.Name.ShopGoodsManage.kDSGoodsManageDeleteNotification, object: nil, userInfo: ["goodsId":self.goodsId ]) | ||
| 361 | + self.navigationController?.popViewController(animated: true) | ||
| 362 | + }else{ | ||
| 363 | + showMessage(message: "删除失败") | ||
| 364 | + } | ||
| 365 | + } | ||
| 366 | + } | ||
| 367 | + } | ||
| 368 | + } | ||
| 127 | @objc func previewBtnClick(){ | 369 | @objc func previewBtnClick(){ |
| 128 | - /* | 370 | + |
| 129 | //商品轮播 | 371 | //商品轮播 |
| 130 | let singleView4 = self.bgScrollView.viewWithTag(4) as! CNLiveShopAddGoodsSingleView | 372 | let singleView4 = self.bgScrollView.viewWithTag(4) as! CNLiveShopAddGoodsSingleView |
| 131 | //商品名称 | 373 | //商品名称 |
| @@ -146,10 +388,10 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -146,10 +388,10 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 146 | let singleView20 = self.bgScrollView.viewWithTag(20) as! CNLiveShopAddGoodsSingleView | 388 | let singleView20 = self.bgScrollView.viewWithTag(20) as! CNLiveShopAddGoodsSingleView |
| 147 | //发货时效 | 389 | //发货时效 |
| 148 | let singleView21 = self.bgScrollView.viewWithTag(21) as! CNLiveShopAddGoodsSingleView | 390 | let singleView21 = self.bgScrollView.viewWithTag(21) as! CNLiveShopAddGoodsSingleView |
| 149 | -// let bannersSelectImageUrls = singleView4.uploadImageView.getCurrentSelectImageUrls | ||
| 150 | -// let bannersSelectImageUrls = singleView4.uploadImageView.getCurrentSelectVideoUrl | ||
| 151 | -// let bannerSelectVideoImage = singleView4.uploadImageView.getCurrentSelectLocalVideoUrlFirstImage | ||
| 152 | -// let contentDetailsSelectImageUrls = singleView13.uploadImageView.getCurrentSelectImageUrls | 391 | + let bannersSelectImageUrls = singleView4.uploadImageView.getCurrentSelectImageUrls() |
| 392 | + let bannerSelectVideoUrl = singleView4.uploadImageView.getCurrentSelectVideoUrl() | ||
| 393 | + let bannerSelectVideoImage = singleView4.uploadImageView.getCurrentSelectLocalVideoUrlFirstImage() | ||
| 394 | + let contentDetailsSelectImageUrls = singleView13.uploadImageView.getCurrentSelectImageUrls() | ||
| 153 | 395 | ||
| 154 | if (bannersSelectImageUrls.count == 0 && bannerSelectVideoUrl.count == 0) { | 396 | if (bannersSelectImageUrls.count == 0 && bannerSelectVideoUrl.count == 0) { |
| 155 | showMessage(message: "请选择商品轮播") | 397 | showMessage(message: "请选择商品轮播") |
| @@ -164,299 +406,453 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -164,299 +406,453 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 164 | showMessage(message: "请选择商品详情图") | 406 | showMessage(message: "请选择商品详情图") |
| 165 | return | 407 | return |
| 166 | } | 408 | } |
| 167 | - else if (self.selectShopClassifyVC.firCategoryId.count == 0) { | 409 | + else if (self.selectShopClassifyVC!.firCategoryId == 0) { |
| 168 | showMessage(message: "请选择店铺分类") | 410 | showMessage(message: "请选择店铺分类") |
| 169 | return | 411 | return |
| 170 | } | 412 | } |
| 171 | 413 | ||
| 172 | - BKShopGoodsDetailsModel * goodsDetailsModel = [[BKShopGoodsDetailsModel alloc] init]; | ||
| 173 | - NSMutableArray * bannerImage = [NSMutableArray array]; | ||
| 174 | - for (NSString * imageUrl in bannersSelectImageUrls) { | ||
| 175 | - BKGoodsDetailsImageModel * model = [[BKGoodsDetailsImageModel alloc] init]; | ||
| 176 | - model.simg = imageUrl; | ||
| 177 | - [bannerImage addObject:model]; | ||
| 178 | - } | ||
| 179 | - goodsDetailsModel.image = [bannerImage copy]; | ||
| 180 | - DSGoodsDetailsBannerVideosModel * banner_video = [[DSGoodsDetailsBannerVideosModel alloc] init]; | ||
| 181 | - if (bannerSelectVideoImage) { | ||
| 182 | - banner_video.video_image = bannerSelectVideoImage; | ||
| 183 | - }else { | ||
| 184 | - banner_video.video_img = self.shopGoodsDetailsModel.video.video_img; | ||
| 185 | - } | ||
| 186 | - banner_video.video_url = bannerSelectVideoUrl; | ||
| 187 | - goodsDetailsModel.video = banner_video; | ||
| 188 | - goodsDetailsModel.title = singleView5.contentTextField.text; | ||
| 189 | - goodsDetailsModel.ads = singleView6.contentTextView.text; | ||
| 190 | - goodsDetailsModel.price = singleView7.contentTextField.text; | ||
| 191 | - goodsDetailsModel.prices = singleView8.contentTextField.text; | ||
| 192 | - goodsDetailsModel.category_id = self.selectShopClassifyVC.firCategoryId; | ||
| 193 | - goodsDetailsModel.category_id2 = self.selectShopClassifyVC.secCategoryId; | ||
| 194 | - | ||
| 195 | - NSMutableArray * contentDetailsImage = [NSMutableArray array]; | ||
| 196 | - for (NSString * imageUrl in contentDetailsSelectImageUrls) { | ||
| 197 | - BKGoodsDetailsContentModel * model = [[BKGoodsDetailsContentModel alloc] init]; | ||
| 198 | - model.simg = imageUrl; | ||
| 199 | - [contentDetailsImage addObject:model]; | 414 | + let goodsDetailsModel = CNLiveShopGoodsDetailsModel() |
| 415 | + let bannerImage = NSMutableArray() | ||
| 416 | + for imageUrl in bannersSelectImageUrls { | ||
| 417 | + let model = CNLiveGoodsDetailsImageModel() | ||
| 418 | + model.simg = imageUrl | ||
| 419 | + bannerImage.add(model) | ||
| 200 | } | 420 | } |
| 201 | - goodsDetailsModel.detail_img = [contentDetailsImage copy]; | ||
| 202 | - | ||
| 203 | - NSMutableArray * kvArray = [[NSMutableArray alloc] init]; | ||
| 204 | - [kvArray addObject:@{@"k":@"品名",@"v":singleView18.contentTextField.text}]; | ||
| 205 | - [kvArray addObject:@{@"k":@"规格",@"v":singleView19.contentTextField.text}]; | ||
| 206 | - [kvArray addObject:@{@"k":@"寄送区域",@"v":singleView20.contentTextView.text}]; | ||
| 207 | - [kvArray addObject:@{@"k":@"发货时效",@"v":singleView21.contentTextField.text}]; | 421 | + goodsDetailsModel.image = Array(bannerImage) as! [CNLiveGoodsDetailsImageModel] |
| 422 | + let banner_video = CNLiveGoodsDetailsBannerVideosModel() | ||
| 423 | + if (bannerSelectVideoImage != nil){ | ||
| 424 | + banner_video.video_image = bannerSelectVideoImage | ||
| 425 | + }else{ | ||
| 426 | + banner_video.video_img = self.shopGoodsDetailsModel.video?.video_img | ||
| 427 | + } | ||
| 428 | + banner_video.video_url = bannerSelectVideoUrl | ||
| 429 | + goodsDetailsModel.video = banner_video | ||
| 430 | + goodsDetailsModel.title = singleView5.contentTextField.text | ||
| 431 | + goodsDetailsModel.ads = singleView6.contentTextView.text | ||
| 432 | + goodsDetailsModel.price = singleView7.contentTextField.text | ||
| 433 | + goodsDetailsModel.prices = singleView8.contentTextField.text | ||
| 434 | + goodsDetailsModel.category_id = self.selectShopClassifyVC!.firCategoryId | ||
| 435 | + goodsDetailsModel.category_id2 = self.selectShopClassifyVC!.secCategoryId | ||
| 436 | + let contentDetailsImage = NSMutableArray() | ||
| 437 | + for imageUrl in contentDetailsSelectImageUrls{ | ||
| 438 | + let model = CNLiveGoodsDetailsContentModel() | ||
| 439 | + model.simg = imageUrl | ||
| 440 | + contentDetailsImage.add(model) | ||
| 441 | + } | ||
| 442 | + goodsDetailsModel.detail_img = Array(contentDetailsImage) as! [CNLiveGoodsDetailsContentModel] | ||
| 443 | + let kvArray = NSMutableArray() | ||
| 444 | + kvArray.add(["k":"品名","v":singleView18.contentTextField.text]) | ||
| 445 | + kvArray.add(["k":"规格","v":singleView19.contentTextField.text]) | ||
| 446 | + kvArray.add(["k":"寄送区域","v":singleView20.contentTextField.text]) | ||
| 447 | + kvArray.add(["k":"发货时效","v":singleView21.contentTextField.text]) | ||
| 448 | + let tempArray = NSMutableArray(array: self.bgScrollView.subviews) | ||
| 208 | 449 | ||
| 209 | - NSMutableArray * tempArray = [self.bgScrollView.subviews mutableCopy]; | ||
| 210 | - [tempArray removeObjectsInRange:NSMakeRange(0, [tempArray indexOfObject:singleView19])]; | ||
| 211 | - if (tempArray.count > 2) { | ||
| 212 | - for (DSShopGoodsManageDetailsSingleView * singleView in tempArray) { | ||
| 213 | - if ([singleView isKindOfClass:DSShopGoodsManageDetailsSingleView.class]) { | ||
| 214 | - if (singleView.contentTextField.text.length > 0 && ![kvArray containsObject:@{@"k":singleView.model.title,@"v":singleView.contentTextField.text}]) { | ||
| 215 | - [kvArray addObject:@{@"k":singleView.model.title,@"v":singleView.contentTextField.text}]; | 450 | + let subArr = tempArray.subarray(with: NSRange(location: 0, length: tempArray.index(of: singleView19))) |
| 451 | + tempArray.removeObjects(in: subArr) | ||
| 452 | + if tempArray.count > 2{ | ||
| 453 | + for singleView in tempArray{ | ||
| 454 | + if (singleView as AnyObject).isKind(of: CNLiveShopAddGoodsSingleView.self){ | ||
| 455 | + let single = singleView as! CNLiveShopAddGoodsSingleView | ||
| 456 | + if single.contentTextField.text!.count > 0 && kvArray.contains(["k":single.addEditGoodsListModel!.title,"v":single.contentTextField.text]){ | ||
| 457 | + kvArray.add(["k":single.addEditGoodsListModel!.title,"v":single.contentTextField.text]) | ||
| 216 | } | 458 | } |
| 217 | } | 459 | } |
| 218 | } | 460 | } |
| 219 | } | 461 | } |
| 220 | - goodsDetailsModel.attrArray = kvArray; | ||
| 221 | - | ||
| 222 | - BKShopGoodsDetailsViewController * vc = [[BKShopGoodsDetailsViewController alloc] init]; | ||
| 223 | - vc.type = BKShopGoodsDetailsVCTypePreview; | ||
| 224 | - vc.detailsModel = goodsDetailsModel; | ||
| 225 | - vc.goodsId = self.goodsId; | ||
| 226 | - [self dsPushViewController:vc animated:YES]; | ||
| 227 | - */ | 462 | + goodsDetailsModel.attrArray = kvArray as! [Dictionary<String, Any>] |
| 463 | + let vc = CNLiveShopGoodsDetailsViewController() | ||
| 464 | + vc.type = .preview | ||
| 465 | + vc.detailsModel = goodsDetailsModel | ||
| 466 | + vc.goodsId = self.goodsId | ||
| 467 | + self.navigationController?.pushViewController(vc, animated: true) | ||
| 228 | } | 468 | } |
| 229 | @objc func saveBtnClick(){ | 469 | @objc func saveBtnClick(){ |
| 230 | - /* | ||
| 231 | - DSShopGoodsManageDetailsSingleView * singleView4 = [self.bgScrollView viewWithTag:4];//商品轮播 | ||
| 232 | - DSShopGoodsManageDetailsSingleView * singleView5 = [self.bgScrollView viewWithTag:5];//商品名称 | ||
| 233 | - DSShopGoodsManageDetailsSingleView * singleView6 = [self.bgScrollView viewWithTag:6];//商品副标题 | ||
| 234 | - DSShopGoodsManageDetailsSingleView * singleView7 = [self.bgScrollView viewWithTag:7];//本店售价 | ||
| 235 | - DSShopGoodsManageDetailsSingleView * singleView8 = [self.bgScrollView viewWithTag:8];//市场售价 | ||
| 236 | - DSShopGoodsManageDetailsSingleView * singleView9 = [self.bgScrollView viewWithTag:9];//商品重量 | ||
| 237 | - DSShopGoodsManageDetailsSingleView * singleView10 = [self.bgScrollView viewWithTag:10];//最低起售 | ||
| 238 | - DSShopGoodsManageDetailsSingleView * singleView11 = [self.bgScrollView viewWithTag:11];//上架 | ||
| 239 | - | ||
| 240 | - DSShopGoodsManageDetailsSingleView * singleView13 = [self.bgScrollView viewWithTag:13];//商品详情图 | ||
| 241 | - DSShopGoodsManageDetailsSingleView * singleView14 = [self.bgScrollView viewWithTag:14];//商品运费 | ||
| 242 | - DSShopGoodsManageDetailsSingleView * singleView15 = [self.bgScrollView viewWithTag:15];//是否支持退货 | ||
| 243 | - DSShopGoodsManageDetailsSingleView * singleView16 = [self.bgScrollView viewWithTag:16];//商品单位 | ||
| 244 | - | ||
| 245 | - DSShopGoodsManageDetailsSingleView * singleView18 = [self.bgScrollView viewWithTag:18];//品名 | ||
| 246 | - DSShopGoodsManageDetailsSingleView * singleView19 = [self.bgScrollView viewWithTag:19];//规格 | ||
| 247 | - DSShopGoodsManageDetailsSingleView * singleView20 = [self.bgScrollView viewWithTag:20];//寄送区域 | ||
| 248 | - DSShopGoodsManageDetailsSingleView * singleView21 = [self.bgScrollView viewWithTag:21];//发货时效 | ||
| 249 | - | ||
| 250 | - | ||
| 251 | - NSArray * bannersSelectImageUrls = [singleView4.uploadImageView getCurrentSelectImageUrls]; | ||
| 252 | - NSMutableArray * bannerImage = [NSMutableArray array]; | ||
| 253 | - for (NSString * imageUrl in bannersSelectImageUrls) { | ||
| 254 | - [bannerImage addObject:@{@"img":imageUrl, @"ord":@"99"}]; | ||
| 255 | - } | ||
| 256 | - NSData * bannerImageData = [NSJSONSerialization dataWithJSONObject:bannerImage options:NSJSONWritingPrettyPrinted error:nil]; | ||
| 257 | - NSString * bannerImageStr = [[NSString alloc] initWithData:bannerImageData encoding:NSUTF8StringEncoding]; | ||
| 258 | - bannerImageStr = [bannerImageStr stringByReplacingOccurrencesOfString:@"\\n" withString:@""]; | ||
| 259 | - bannerImageStr = [bannerImageStr stringByReplacingOccurrencesOfString:@"\n" withString:@""]; | ||
| 260 | - bannerImageStr = [bannerImageStr stringByReplacingOccurrencesOfString:@"\\" withString:@""]; | ||
| 261 | - bannerImageStr = [bannerImageStr stringByReplacingOccurrencesOfString:@" " withString:@""]; | ||
| 262 | - | ||
| 263 | - NSString * bannerSelectVideoUrl = [singleView4.uploadImageView getCurrentSelectVideoUrl]; | ||
| 264 | - | ||
| 265 | - NSArray * contentDetailsSelectImageUrls = [singleView13.uploadImageView getCurrentSelectImageUrls]; | ||
| 266 | - NSMutableArray * contentDetailsImage = [NSMutableArray array]; | ||
| 267 | - for (NSString * imageUrl in contentDetailsSelectImageUrls) { | ||
| 268 | - [contentDetailsImage addObject:@{@"img":imageUrl, @"ord":@"99"}]; | ||
| 269 | - } | ||
| 270 | - NSData * contentDetailsImageData = [NSJSONSerialization dataWithJSONObject:contentDetailsImage options:NSJSONWritingPrettyPrinted error:nil]; | ||
| 271 | - NSString * contentDetailsImageStr = [[NSString alloc] initWithData:contentDetailsImageData encoding:NSUTF8StringEncoding]; | ||
| 272 | - contentDetailsImageStr = [contentDetailsImageStr stringByReplacingOccurrencesOfString:@"\\n" withString:@""]; | ||
| 273 | - contentDetailsImageStr = [contentDetailsImageStr stringByReplacingOccurrencesOfString:@"\n" withString:@""]; | ||
| 274 | - contentDetailsImageStr = [contentDetailsImageStr stringByReplacingOccurrencesOfString:@"\\" withString:@""]; | ||
| 275 | - contentDetailsImageStr = [contentDetailsImageStr stringByReplacingOccurrencesOfString:@" " withString:@""]; | 470 | + //商品轮播 |
| 471 | + let singleView4 = self.bgScrollView.viewWithTag(4) as! CNLiveShopAddGoodsSingleView | ||
| 472 | + //商品名称 | ||
| 473 | + let singleView5 = self.bgScrollView.viewWithTag(5) as! CNLiveShopAddGoodsSingleView | ||
| 474 | + //商品副标题 | ||
| 475 | + let singleView6 = self.bgScrollView.viewWithTag(6) as! CNLiveShopAddGoodsSingleView | ||
| 476 | + //本店售价 | ||
| 477 | + let singleView7 = self.bgScrollView.viewWithTag(7) as! CNLiveShopAddGoodsSingleView | ||
| 478 | + //市场售价 | ||
| 479 | + let singleView8 = self.bgScrollView.viewWithTag(8) as! CNLiveShopAddGoodsSingleView | ||
| 480 | + //商品重量 | ||
| 481 | + let singleView9 = self.bgScrollView.viewWithTag(9) as! CNLiveShopAddGoodsSingleView | ||
| 482 | + //最低起售 | ||
| 483 | + let singleView10 = self.bgScrollView.viewWithTag(10) as! CNLiveShopAddGoodsSingleView | ||
| 484 | + //上架 | ||
| 485 | + let singleView11 = self.bgScrollView.viewWithTag(11) as! CNLiveShopAddGoodsSingleView | ||
| 486 | + //商品详情图 | ||
| 487 | + let singleView13 = self.bgScrollView.viewWithTag(13) as! CNLiveShopAddGoodsSingleView | ||
| 488 | + //商品运费 | ||
| 489 | + let singleView14 = self.bgScrollView.viewWithTag(14) as! CNLiveShopAddGoodsSingleView | ||
| 490 | + //是否支持退货 | ||
| 491 | + let singleView15 = self.bgScrollView.viewWithTag(15) as! CNLiveShopAddGoodsSingleView | ||
| 492 | + //商品单位 | ||
| 493 | + let singleView16 = self.bgScrollView.viewWithTag(16) as! CNLiveShopAddGoodsSingleView | ||
| 494 | + //品名 | ||
| 495 | + let singleView18 = self.bgScrollView.viewWithTag(18) as! CNLiveShopAddGoodsSingleView | ||
| 496 | + //规格 | ||
| 497 | + let singleView19 = self.bgScrollView.viewWithTag(19) as! CNLiveShopAddGoodsSingleView | ||
| 498 | + //寄送区域 | ||
| 499 | + let singleView20 = self.bgScrollView.viewWithTag(20) as! CNLiveShopAddGoodsSingleView | ||
| 500 | + //发货时效 | ||
| 501 | + let singleView21 = self.bgScrollView.viewWithTag(21) as! CNLiveShopAddGoodsSingleView | ||
| 502 | + let bannersSelectImageUrls = singleView4.uploadImageView.getCurrentSelectImageUrls() | ||
| 276 | 503 | ||
| 277 | - if (self.type == DSShopGoodsManageDetailsVCTypeAdd && [self.selectCategoryVC.thiCategoryId length] == 0) { | ||
| 278 | - DS_showMessage(@"请选择商品分类"); | ||
| 279 | - return; | ||
| 280 | - } | ||
| 281 | - else if (!self.selectShopClassifyVC.firCategoryId ||[DS_ToString(self.selectShopClassifyVC.firCategoryId) length] == 0 | ||
| 282 | - || [DS_ToString(self.selectShopClassifyVC.firCategoryId) isEqualToString:@"0"]) { | ||
| 283 | - DS_showMessage(@"请选择店铺分类"); | ||
| 284 | - return; | ||
| 285 | - } | ||
| 286 | - else if ([bannersSelectImageUrls count] == 0 && [bannerSelectVideoUrl length] == 0) { | ||
| 287 | - DS_showMessage(@"请选择商品轮播"); | ||
| 288 | - return; | ||
| 289 | - }else if ([[self strimStr:singleView5.contentTextField.text] length] == 0) { | ||
| 290 | - DS_showMessage(@"请输入商品名称"); | ||
| 291 | - return; | ||
| 292 | - } | ||
| 293 | - else if ([singleView5.contentTextField.text length] > 50) { | ||
| 294 | - DS_showMessage(@"商品名称最多支持50个字"); | ||
| 295 | - return; | ||
| 296 | - } | ||
| 297 | - else if ([singleView6.contentTextView.text length] > 30) | ||
| 298 | - { | ||
| 299 | - DS_showMessage(@"副商品名称最多支持30个字"); | ||
| 300 | - return; | ||
| 301 | - }else if ([singleView7.contentTextField.text length] == 0) { | ||
| 302 | - DS_showMessage(@"请输入本店售价"); | ||
| 303 | - return; | ||
| 304 | - }else if ([singleView7.contentTextField.text onlyNumber] && [singleView7.contentTextField.text length] >= DSMaxPrice) { | ||
| 305 | - DS_showMessage(@"请输入正确的售价"); | ||
| 306 | - return; | ||
| 307 | - }else if ([singleView8.contentTextField.text onlyNumber] && [singleView8.contentTextField.text length] >= DSMaxPrice) { | ||
| 308 | - DS_showMessage(@"请输入正确的市场售价"); | ||
| 309 | - return; | ||
| 310 | - }else if ([singleView8.contentTextField.text length] == 0) { | ||
| 311 | - DS_showMessage(@"请输入的市场售价"); | ||
| 312 | - return; | ||
| 313 | - }else if ([singleView10.countTF.text length] >= 5) { | ||
| 314 | - DS_showMessage(@"请输入正确的起售件数"); | ||
| 315 | - return; | ||
| 316 | - }else if ([contentDetailsSelectImageUrls count] == 0) { | ||
| 317 | - DS_showMessage(@"请选择商品详情图"); | ||
| 318 | - return; | ||
| 319 | - }else if ([[self strimStr:singleView18.contentTextField.text] length] == 0) { | ||
| 320 | - DS_showMessage(@"请输入品名"); | ||
| 321 | - return; | ||
| 322 | - }else if ([[self strimStr:singleView19.contentTextField.text] length] == 0) { | ||
| 323 | - DS_showMessage(@"请输入规格"); | ||
| 324 | - return; | ||
| 325 | - }else if ([[self strimStr:singleView20.contentTextView.text] length] == 0) { | ||
| 326 | - DS_showMessage(@"请输入寄送区域"); | ||
| 327 | - return; | ||
| 328 | - }else if ([singleView21.contentTextField.text length] == 0) { | ||
| 329 | - DS_showMessage(@"请输入发货时效"); | ||
| 330 | - return; | 504 | + let bannerImage = NSMutableArray() |
| 505 | + for imageUrl in bannersSelectImageUrls{ | ||
| 506 | + bannerImage.add(["img":imageUrl,"ord":"99"]) | ||
| 331 | } | 507 | } |
| 508 | + var bannerImageStr = "" | ||
| 509 | + do { | ||
| 510 | + let bannerImageData = try JSONSerialization.data(withJSONObject: bannerImage, options: .prettyPrinted) | ||
| 511 | + bannerImageStr = String(data: bannerImageData, encoding: .utf8) ?? "" | ||
| 512 | + bannerImageStr = bannerImageStr.replacingOccurrences(of: "\\n", with: "") | ||
| 513 | + bannerImageStr = bannerImageStr.replacingOccurrences(of: "\n", with: "") | ||
| 514 | + bannerImageStr = bannerImageStr.replacingOccurrences(of: "\\", with: "") | ||
| 515 | + bannerImageStr = bannerImageStr.replacingOccurrences(of: " ", with: "") | ||
| 516 | + } catch _ {} | ||
| 332 | 517 | ||
| 333 | - | ||
| 334 | - NSMutableArray * kvArray = [[NSMutableArray alloc] init]; | ||
| 335 | - [kvArray addObject:@{@"k":@"品名",@"v":singleView18.contentTextField.text}]; | ||
| 336 | - [kvArray addObject:@{@"k":@"规格",@"v":singleView19.contentTextField.text}]; | ||
| 337 | - [kvArray addObject:@{@"k":@"寄送区域",@"v":singleView20.contentTextView.text}]; | ||
| 338 | - [kvArray addObject:@{@"k":@"发货时效",@"v":singleView21.contentTextField.text}]; | ||
| 339 | - | ||
| 340 | - NSMutableArray * tempArray = [self.bgScrollView.subviews mutableCopy]; | ||
| 341 | - [tempArray removeObjectsInRange:NSMakeRange(0, [tempArray indexOfObject:singleView21])]; | ||
| 342 | - if (tempArray.count > 2) { | ||
| 343 | - for (DSShopGoodsManageDetailsSingleView * singleView in tempArray) { | ||
| 344 | - if ([singleView isKindOfClass:DSShopGoodsManageDetailsSingleView.class]) { | ||
| 345 | - if (singleView.contentTextField.text.length > 0 && ![kvArray containsObject:@{@"k":singleView.model.title,@"v":singleView.contentTextField.text}]) { | ||
| 346 | - [kvArray addObject:@{@"k":singleView.model.title,@"v":singleView.contentTextField.text}]; | 518 | + let bannerSelectVideoUrl = singleView4.uploadImageView.getCurrentSelectVideoUrl() |
| 519 | + let contentDetailsSelectImageUrls = singleView13.uploadImageView.getCurrentSelectImageUrls() | ||
| 520 | + let contentDetailsImage = NSMutableArray() | ||
| 521 | + for imageUrl in contentDetailsSelectImageUrls{ | ||
| 522 | + contentDetailsImage.add(["img":imageUrl,"ord":"99"]) | ||
| 523 | + } | ||
| 524 | + var contentDetailsImageStr = "" | ||
| 525 | + do { | ||
| 526 | + let contentDetailsImageData = try JSONSerialization.data(withJSONObject: contentDetailsImage, options: .prettyPrinted) | ||
| 527 | + contentDetailsImageStr = String(data: contentDetailsImageData, encoding: .utf8)! | ||
| 528 | + contentDetailsImageStr = contentDetailsImageStr.replacingOccurrences(of: "\\n", with: "") | ||
| 529 | + contentDetailsImageStr = contentDetailsImageStr.replacingOccurrences(of: "\n", with: "") | ||
| 530 | + contentDetailsImageStr = contentDetailsImageStr.replacingOccurrences(of: "\\", with: "") | ||
| 531 | + contentDetailsImageStr = contentDetailsImageStr.replacingOccurrences(of: " ", with: "") | ||
| 532 | + } catch _ {} | ||
| 533 | + if self.type == .add && self.selectCategoryVC!.thiCategoryId == 0{ | ||
| 534 | + showMessage(message: "请选择商品分类") | ||
| 535 | + return | ||
| 536 | + }else if self.selectShopClassifyVC!.firCategoryId == 0{ | ||
| 537 | + showMessage(message: "请选择店铺分类") | ||
| 538 | + return | ||
| 539 | + }else if bannersSelectImageUrls.count == 0 && bannerSelectVideoUrl.count == 0{ | ||
| 540 | + showMessage(message: "请选择商品轮播") | ||
| 541 | + return | ||
| 542 | + }else if self.strimStr(str: singleView5.contentTextField.text!).count == 0{ | ||
| 543 | + showMessage(message: "请输入商品名称") | ||
| 544 | + return | ||
| 545 | + }else if singleView5.contentTextField.text?.count ?? 0 > 50{ | ||
| 546 | + showMessage(message: "商品名称最多支持50个字") | ||
| 547 | + return | ||
| 548 | + }else if singleView6.contentTextView.text.count > 30{ | ||
| 549 | + showMessage(message: "副商品名称最多支持30个字") | ||
| 550 | + return | ||
| 551 | + }else if singleView7.contentTextField.text?.count == 0{ | ||
| 552 | + showMessage(message: "请输入本店售价") | ||
| 553 | + return | ||
| 554 | + }else if singleView7.contentTextField.text?.isPurnInt() == true && singleView7.contentTextField.text!.count >= kCNLiveShopMaxPrice{ | ||
| 555 | + showMessage(message: "请输入正确的售价") | ||
| 556 | + return | ||
| 557 | + }else if singleView8.contentTextField.text?.isPurnInt() == true && singleView8.contentTextField.text!.count >= kCNLiveShopMaxPrice{ | ||
| 558 | + showMessage(message: "请输入正确的市场售价") | ||
| 559 | + return | ||
| 560 | + }else if singleView8.contentTextField.text?.count == 0{ | ||
| 561 | + showMessage(message: "请输入的市场售价") | ||
| 562 | + return | ||
| 563 | + }else if singleView10.countTF.text?.count ?? 0 >= 5{ | ||
| 564 | + showMessage(message: "请输入正确的起售件数") | ||
| 565 | + return | ||
| 566 | + }else if contentDetailsSelectImageUrls.count == 0{ | ||
| 567 | + showMessage(message: "请选择商品详情图") | ||
| 568 | + return | ||
| 569 | + }else if self.strimStr(str: singleView18.contentTextField.text ?? "").count == 0{ | ||
| 570 | + showMessage(message: "请输入品名") | ||
| 571 | + return | ||
| 572 | + }else if self.strimStr(str: singleView19.contentTextField.text ?? "").count == 0{ | ||
| 573 | + showMessage(message: "请输入规格") | ||
| 574 | + return | ||
| 575 | + }else if self.strimStr(str: singleView20.contentTextView.text ?? "").count == 0{ | ||
| 576 | + showMessage(message: "请输入寄送区域") | ||
| 577 | + return | ||
| 578 | + }else if self.strimStr(str: singleView21.contentTextField.text ?? "").count == 0{ | ||
| 579 | + showMessage(message: "请输入发货时效") | ||
| 580 | + return | ||
| 581 | + } | ||
| 582 | + var kvArray = Array<Dictionary<String, String>>() | ||
| 583 | + kvArray.append(["k":"品名","v":singleView18.contentTextField.text!]) | ||
| 584 | + kvArray.append(["k":"规格","v":singleView19.contentTextField.text!]) | ||
| 585 | + kvArray.append(["k":"寄送区域","v":singleView20.contentTextView.text!]) | ||
| 586 | + kvArray.append(["k":"发货时效","v":singleView21.contentTextField.text!]) | ||
| 587 | + let tempArray = NSMutableArray(array: self.bgScrollView.subviews) | ||
| 588 | + tempArray.subarray(with: NSRange(location: 0, length: tempArray.index(of: singleView21))) | ||
| 589 | + if tempArray.count > 2{ | ||
| 590 | + for singleView in tempArray { | ||
| 591 | + if (singleView as AnyObject).isKind(of: CNLiveShopAddGoodsSingleView.self){ | ||
| 592 | + | ||
| 593 | + if (singleView as! CNLiveShopAddGoodsSingleView).contentTextField.text?.count ?? 0 > 0 && !kvArray.contains(["k":(singleView as! CNLiveShopAddGoodsSingleView).addEditGoodsListModel?.title ?? "","v":(singleView as! CNLiveShopAddGoodsSingleView).contentTextField.text!]){ | ||
| 594 | + kvArray.append(["k":(singleView as! CNLiveShopAddGoodsSingleView).addEditGoodsListModel?.title ?? "","v":(singleView as! CNLiveShopAddGoodsSingleView).contentTextField.text!]) | ||
| 347 | } | 595 | } |
| 348 | } | 596 | } |
| 349 | } | 597 | } |
| 350 | } | 598 | } |
| 351 | - | ||
| 352 | - for (int i = 4; i < 20; i ++) { | ||
| 353 | - if (i == 11 || i == 16) continue; | ||
| 354 | - DSShopGoodsManageDetailsSingleView * singleView = [self.bgScrollView viewWithTag:i]; | ||
| 355 | - NSString * content = [singleView.contentTextField.text isNotBlank] ? singleView.contentTextField.text : singleView.contentTextView.text; | ||
| 356 | - if ([self stringContainsEmoji:content]) { | ||
| 357 | - DS_showMessage(@"参数不能添加表情"); | ||
| 358 | - return; | 599 | + for i in 4..<20 { |
| 600 | + if i == 11 || i == 16{ | ||
| 601 | + continue | ||
| 602 | + } | ||
| 603 | + let singleView = self.bgScrollView.viewWithTag(i) as! CNLiveShopAddGoodsSingleView | ||
| 604 | + let content = (singleView.contentTextField.text?.isEmpty == true ? singleView.contentTextField.text : singleView.contentTextView.text) ?? "" | ||
| 605 | + if self.stringContainsEmoji(string: content){ | ||
| 606 | + showMessage(message: "参数不能添加表情") | ||
| 607 | + return | ||
| 359 | } | 608 | } |
| 360 | } | 609 | } |
| 361 | - | ||
| 362 | - | ||
| 363 | - for (NSDictionary * subDict in kvArray) { | ||
| 364 | - if ([self stringContainsEmoji:[subDict objectForKey:@"k"]]) { | ||
| 365 | - DS_showMessage(@"规格参数不能添加表情"); | ||
| 366 | - return; | 610 | + |
| 611 | + for sub in kvArray{ | ||
| 612 | + let subDict = sub as NSDictionary | ||
| 613 | + if self.stringContainsEmoji(string: subDict.object(forKey: "k") as! String){ | ||
| 614 | + showMessage(message: "规格参数不能添加表情") | ||
| 615 | + return | ||
| 367 | } | 616 | } |
| 368 | - if ([self stringContainsEmoji:[subDict objectForKey:@"v"]]) { | ||
| 369 | - DS_showMessage(@"规格参数不能添加表情"); | ||
| 370 | - return; | 617 | + if self.stringContainsEmoji(string: subDict.object(forKey: "v") as! String){ |
| 618 | + showMessage(message: "规格参数不能添加表情") | ||
| 619 | + return | ||
| 371 | } | 620 | } |
| 372 | } | 621 | } |
| 373 | - | ||
| 374 | - NSString *category_id = @""; | ||
| 375 | - if (![NSString isEmpty:self.selectShopClassifyVC.secCategoryId]) { | ||
| 376 | - category_id = self.selectShopClassifyVC.secCategoryId; | 622 | + var category_id = 0 |
| 623 | + if self.selectShopClassifyVC!.secCategoryId != 0 { | ||
| 624 | + category_id = self.selectShopClassifyVC!.secCategoryId | ||
| 625 | + }else{ | ||
| 626 | + category_id = self.selectShopClassifyVC!.firCategoryId | ||
| 377 | } | 627 | } |
| 378 | - else | ||
| 379 | - { | ||
| 380 | - category_id = self.selectShopClassifyVC.firCategoryId; | 628 | + showLoading(message: "") |
| 629 | + if self.type == .add{ | ||
| 630 | + CNLiveShopGoodListViewModel.postGoodsAddWithUid(uid: DSUserInfoManager.shared.dsUserInfo.uid!, groupid3: self.selectCategoryVC!.thiCategoryId != 0 ? String(format: "%d", self.selectCategoryVC!.thiCategoryId ) : "", bannerImg: bannerImageStr, simg: bannersSelectImageUrls.first!, video: bannerSelectVideoUrl, title: singleView5.contentTextField.text ?? "", ads: singleView6.contentTextView.text, price: singleView7.contentTextField.text ?? "", prices: singleView8.contentTextField.text ?? "", kg: singleView9.contentTextField.text ?? "", unit: singleView16.contentTextField.text ?? "", state: singleView11.contentSwitch.isOn ? "2" : "1", storage:self.dicArrayToJson(kvArray as [Dictionary<String, Any>]), infoImg: contentDetailsImageStr, yunfei: singleView14.contentTextField.text ?? "", min_count: singleView10.countTF.text ?? "", isRefund: "0", category_id: String(format: "%d", category_id)) { result, status in | ||
| 631 | + hiddenLoading() | ||
| 632 | + if status == .failed{ | ||
| 633 | + showMessage(message: "发布失败") | ||
| 634 | + return | ||
| 635 | + } | ||
| 636 | + if status == .success{ | ||
| 637 | + showMessage(message: "发布成功") | ||
| 638 | + NotificationCenter.default.post(name: NSNotification.Name.ShopGoodsManage.kDSGoodsManageAddNotification, object: nil) | ||
| 639 | + for i in 0..<self.dataModel.list.count{ | ||
| 640 | + let singleView = self.bgScrollView.viewWithTag(i+1) as! CNLiveShopAddGoodsSingleView | ||
| 641 | + if singleView.addEditGoodsListModel?.style == "3"{ | ||
| 642 | + singleView.uploadImageView.deleteReplaceImageUrlAfterSuccessUploadThings() | ||
| 643 | + } | ||
| 644 | + } | ||
| 645 | + self.navigationController?.popViewController(animated: true) | ||
| 646 | + } | ||
| 647 | + } | ||
| 648 | + }else{ | ||
| 649 | + //编辑 | ||
| 650 | + var kvArrayJSONStr = "" | ||
| 651 | + do { | ||
| 652 | + let jsonData = try JSONSerialization.data(withJSONObject: kvArray) // 将数组转换为JSON格式的NSData对象 | ||
| 653 | + | ||
| 654 | + if let jsonString = String(data: jsonData, encoding: .utf8) { | ||
| 655 | + print("转换后的JSON字符串:\n\(jsonString)") | ||
| 656 | + kvArrayJSONStr = jsonString | ||
| 657 | + } else { | ||
| 658 | + print("无法将JSON数据转换为字符串") | ||
| 659 | + } | ||
| 660 | + } catch { | ||
| 661 | + print("发生错误:\(error)") | ||
| 662 | + } | ||
| 663 | + CNLiveShopGoodListViewModel.postGoodsEditWithGoodsId(goodsId: self.goodsId, uid: DSUserInfoManager.shared.dsUserInfo.uid!, bannerImg: bannerImageStr, simg: bannersSelectImageUrls.first!, video: bannerSelectVideoUrl, title: singleView5.contentTextField.text ?? "", ads: singleView6.contentTextView.text ?? "", price: singleView7.contentTextField.text ?? "", prices: singleView8.contentTextField.text ?? "", kg: singleView9.contentTextField.text ?? "", unit: singleView16.contentTextField.text ?? "", state: singleView11.contentSwitch.isOn ? "2" : "1", storage: kvArrayJSONStr, infoImg: contentDetailsImageStr, yunfei: singleView14.contentTextField.text ?? "", min_count: singleView10.countTF.text ?? "", isRefund: "0", category_id: String(format: "%d", category_id)) { result, status in | ||
| 664 | + if status == .failed{ | ||
| 665 | + showMessage(message: "修改失败") | ||
| 666 | + return | ||
| 667 | + } | ||
| 668 | + if status == .success{ | ||
| 669 | + showMessage(message: "修改成功") | ||
| 670 | + NotificationCenter.default.post(name: NSNotification.Name.ShopGoodsManage.kDSGoodsManageEditNotification, object: nil, userInfo: (result as! Dictionary)) | ||
| 671 | + for i in 0..<self.dataModel.list.count{ | ||
| 672 | + let singleView = self.bgScrollView.viewWithTag(i+1) as! CNLiveShopAddGoodsSingleView | ||
| 673 | + if singleView.addEditGoodsListModel?.style == "3"{ | ||
| 674 | + singleView.uploadImageView.deleteReplaceImageUrlAfterSuccessUploadThings() | ||
| 675 | + } | ||
| 676 | + | ||
| 677 | + } | ||
| 678 | + self.navigationController?.popViewController(animated: true) | ||
| 679 | + } | ||
| 680 | + } | ||
| 681 | + } | ||
| 682 | + } | ||
| 683 | + func dicArrayToJson(_ dicArray:[Dictionary<String, Any>])->String{ | ||
| 684 | + //首先判断能不能转换 | ||
| 685 | + if (!JSONSerialization.isValidJSONObject(dicArray)) { | ||
| 686 | + //print("is not a valid json object") | ||
| 687 | + return "" | ||
| 381 | } | 688 | } |
| 382 | 689 | ||
| 383 | - | ||
| 384 | - [self.view showLoading]; | ||
| 385 | - if (self.type == DSShopGoodsManageDetailsVCTypeAdd) { | ||
| 386 | - [DSShopRequest postGoodsAddWithUid:DS_USER_MODEL.uid | ||
| 387 | - groupid3:self.selectCategoryVC.thiCategoryId | ||
| 388 | - bannerImg:bannerImageStr | ||
| 389 | - simg:[bannersSelectImageUrls firstObject] | ||
| 390 | - video:bannerSelectVideoUrl | ||
| 391 | - title:singleView5.contentTextField.text | ||
| 392 | - ads:singleView6.contentTextView.text | ||
| 393 | - price:singleView7.contentTextField.text | ||
| 394 | - prices:singleView8.contentTextField.text | ||
| 395 | - kg:singleView9.contentTextField.text | ||
| 396 | - unit:singleView16.contentTextField.text | ||
| 397 | - state:singleView11.contentSwitch.on ? @"2" : @"1" | ||
| 398 | - storage:[kvArray mj_JSONString] | ||
| 399 | - infoImg:contentDetailsImageStr | ||
| 400 | - yunfei:singleView14.contentTextField.text | ||
| 401 | - min_count:singleView10.countTF.text | ||
| 402 | - isRefund:@"0"//singleView15.contentSwitch.on ? @"0" : @"1" | ||
| 403 | - category_id:category_id | ||
| 404 | - result:^(NSDictionary * _Nonnull jsonData, NSString * _Nonnull errorMessage) { | ||
| 405 | - [self.view hideLoading]; | ||
| 406 | - if (errorMessage) { | ||
| 407 | - DS_showMessage(errorMessage); | ||
| 408 | - return; | ||
| 409 | - } | ||
| 410 | - DS_showMessage(@"发布成功"); | ||
| 411 | - [[NSNotificationCenter defaultCenter] postNotificationName:kDSGoodsManageAddNotification object:nil]; | 690 | + //利用OC的json库转换成OC的NSData, |
| 691 | + //如果设置options为NSJSONWritingOptions.PrettyPrinted,则打印格式更好阅读 | ||
| 692 | + let data : Data! = try? JSONSerialization.data(withJSONObject: dicArray, options: []) | ||
| 693 | + //NSData转换成NSString打印输出 | ||
| 694 | + let str = NSString(data:data, encoding: String.Encoding.utf8.rawValue) | ||
| 695 | + //输出json字符串 | ||
| 696 | + return str! as String | ||
| 697 | + } | ||
| 698 | + // MARK: - 是否包含表情 | ||
| 699 | + func stringContainsEmoji(string:String) -> Bool { | ||
| 700 | + for scalar in string.unicodeScalars { | ||
| 701 | + switch scalar.value { | ||
| 702 | + case 0x1F600...0x1F64F, // Emoticons | ||
| 703 | + 0x1F300...0x1F5FF, // Misc Symbols and Pictographs | ||
| 704 | + 0x1F680...0x1F6FF, // Transport and Map | ||
| 705 | + 0x1F1E6...0x1F1FF, // Regional country flags | ||
| 706 | + 0x2600...0x26FF, // Misc symbols | ||
| 707 | + 0x2700...0x27BF, // Dingbats | ||
| 708 | + 0xFE00...0xFE0F, // Variation Selectors | ||
| 709 | + 0x1F900...0x1F9FF, // Supplemental Symbols and Pictographs | ||
| 710 | + 127000...127600, // Various asian characters | ||
| 711 | + 65024...65039, // Variation selector | ||
| 712 | + 9100...9300, // Misc items | ||
| 713 | + 8400...8447: // Combining Diacritical Marks for Symbols | ||
| 714 | + return true | ||
| 715 | + default: | ||
| 716 | + continue | ||
| 717 | + } | ||
| 718 | + } | ||
| 719 | + return false | ||
| 720 | + } | ||
| 721 | + | ||
| 722 | + // MARK: - 获取商品数据 | ||
| 723 | + func requestGoodsData(){ | ||
| 724 | + showLoading(message: "") | ||
| 725 | + CNLiveShopGoodListViewModel.getGoodsInfoWithGoodsId(goodsId: self.goodsId) { result, status in | ||
| 726 | + hiddenLoading() | ||
| 727 | + if status == .failed{ | ||
| 728 | + showMessage(message: "获取失败") | ||
| 729 | + return | ||
| 730 | + } | ||
| 731 | + if status == .success{ | ||
| 732 | + let model = result as! CNLiveShopGoodsDetailsModel | ||
| 733 | + self.shopGoodsDetailsModel = model | ||
| 734 | + let thiCategoryId = self.selectCategoryVC!.thiCategoryId | ||
| 735 | + //商品分类 | ||
| 736 | + let singleView1 = self.bgScrollView.viewWithTag(1) as! CNLiveShopAddGoodsSingleView | ||
| 737 | + //店铺分类 | ||
| 738 | + let singleView2 = self.bgScrollView.viewWithTag(2) as! CNLiveShopAddGoodsSingleView | ||
| 739 | + //商品轮播 | ||
| 740 | + let singleView4 = self.bgScrollView.viewWithTag(4) as! CNLiveShopAddGoodsSingleView | ||
| 741 | + //商品名称 | ||
| 742 | + let singleView5 = self.bgScrollView.viewWithTag(5) as! CNLiveShopAddGoodsSingleView | ||
| 743 | + //商品副标题 | ||
| 744 | + let singleView6 = self.bgScrollView.viewWithTag(6) as! CNLiveShopAddGoodsSingleView | ||
| 745 | + //本店售价 | ||
| 746 | + let singleView7 = self.bgScrollView.viewWithTag(7) as! CNLiveShopAddGoodsSingleView | ||
| 747 | + //市场售价 | ||
| 748 | + let singleView8 = self.bgScrollView.viewWithTag(8) as! CNLiveShopAddGoodsSingleView | ||
| 749 | + //商品重量 | ||
| 750 | + let singleView9 = self.bgScrollView.viewWithTag(9) as! CNLiveShopAddGoodsSingleView | ||
| 751 | + //最低起售 | ||
| 752 | + let singleView10 = self.bgScrollView.viewWithTag(10) as! CNLiveShopAddGoodsSingleView | ||
| 753 | + //上架 | ||
| 754 | + let singleView11 = self.bgScrollView.viewWithTag(11) as! CNLiveShopAddGoodsSingleView | ||
| 755 | + //商品详情图 | ||
| 756 | + let singleView13 = self.bgScrollView.viewWithTag(13) as! CNLiveShopAddGoodsSingleView | ||
| 757 | + //商品运费 | ||
| 758 | + let singleView14 = self.bgScrollView.viewWithTag(14) as! CNLiveShopAddGoodsSingleView | ||
| 759 | + //是否支持退货 | ||
| 760 | + let singleView15 = self.bgScrollView.viewWithTag(15) as! CNLiveShopAddGoodsSingleView | ||
| 761 | + //商品单位 | ||
| 762 | + let singleView16 = self.bgScrollView.viewWithTag(16) as! CNLiveShopAddGoodsSingleView | ||
| 763 | + //品名 | ||
| 764 | + let singleView18 = self.bgScrollView.viewWithTag(18) as! CNLiveShopAddGoodsSingleView | ||
| 765 | + //规格 | ||
| 766 | + let singleView19 = self.bgScrollView.viewWithTag(19) as! CNLiveShopAddGoodsSingleView | ||
| 767 | + //寄送区域 | ||
| 768 | + let singleView20 = self.bgScrollView.viewWithTag(20) as! CNLiveShopAddGoodsSingleView | ||
| 769 | + //发货时效 | ||
| 770 | + let singleView21 = self.bgScrollView.viewWithTag(21) as! CNLiveShopAddGoodsSingleView | ||
| 412 | 771 | ||
| 413 | - for (int i = 0; i < [self.disposeDataModel.list count]; i++) { | ||
| 414 | - DSShopGoodsManageDetailsSingleView * singleView = (DSShopGoodsManageDetailsSingleView*)[self.view viewWithTag:i+1]; | ||
| 415 | - if (singleView.model.style == 3) { | ||
| 416 | - [singleView.uploadImageView deleteReplaceImageUrlAfterSuccessUploadThings]; | 772 | + let tempArray = NSMutableArray() |
| 773 | + for mdl in self.shopGoodsDetailsModel.storage_arr{ | ||
| 774 | + let dic = modelToDictionary(mdl) | ||
| 775 | + tempArray.add(dic) | ||
| 776 | + } | ||
| 777 | + | ||
| 778 | + self.shopGoodsDetailsModel.storageArray = tempArray as! [Dictionary<String, Any>] | ||
| 779 | + for dic in self.shopGoodsDetailsModel.storageArray{ | ||
| 780 | + let dict = dic as NSDictionary | ||
| 781 | + if dict.object(forKey: "k") as! String == "品名"{ | ||
| 782 | + let str = dict.stringValueForKey(key: "v") as String | ||
| 783 | + singleView18.contentTextField.text = str | ||
| 784 | + tempArray.remove(dict) | ||
| 785 | + } | ||
| 786 | + if dict.object(forKey: "k") as! String == "规格"{ | ||
| 787 | + let str = dict.stringValueForKey(key: "v") as String | ||
| 788 | + singleView19.contentTextField.text = str | ||
| 789 | + tempArray.remove(dict) | ||
| 790 | + } | ||
| 791 | + if dict.object(forKey: "k") as! String == "寄送区域"{ | ||
| 792 | + let str = dict.stringValueForKey(key: "v") as String | ||
| 793 | + singleView20.contentTextView.text = str | ||
| 794 | + tempArray.remove(dict) | ||
| 795 | + } | ||
| 796 | + if dict.object(forKey: "k") as! String == "发货时效"{ | ||
| 797 | + let str = dict.stringValueForKey(key: "v") as String | ||
| 798 | + singleView21.contentTextField.text = str | ||
| 799 | + tempArray.remove(dict) | ||
| 417 | } | 800 | } |
| 418 | } | 801 | } |
| 802 | + singleView1.contentTextField.text = self.shopGoodsDetailsModel.group_name | ||
| 803 | + singleView1.layoutSubviews() | ||
| 419 | 804 | ||
| 420 | - [self dsPopViewControllerAnimated:YES]; | ||
| 421 | - }]; | ||
| 422 | - }else { | ||
| 423 | - [DSShopRequest postGoodsEditWithGoodsId:self.goodsId | ||
| 424 | - uid:DS_USER_MODEL.uid | ||
| 425 | - bannerImg:bannerImageStr | ||
| 426 | - simg:[bannersSelectImageUrls firstObject] | ||
| 427 | - video:bannerSelectVideoUrl | ||
| 428 | - title:singleView5.contentTextField.text | ||
| 429 | - ads:singleView6.contentTextView.text | ||
| 430 | - price:singleView7.contentTextField.text | ||
| 431 | - prices:singleView8.contentTextField.text | ||
| 432 | - kg:singleView9.contentTextField.text | ||
| 433 | - unit:singleView16.contentTextField.text | ||
| 434 | - state:singleView11.contentSwitch.on ? @"2" : @"1" | ||
| 435 | - storage:[kvArray mj_JSONString] | ||
| 436 | - infoImg:contentDetailsImageStr | ||
| 437 | - yunfei:singleView14.contentTextField.text | ||
| 438 | - min_count:singleView10.countTF.text | ||
| 439 | - isRefund:@"0"//singleView15.contentSwitch.on ? @"0" : @"1" | ||
| 440 | - category_id:category_id | ||
| 441 | - result:^(NSDictionary * _Nonnull jsonData, NSString * _Nonnull errorMessage) { | ||
| 442 | - [self.view hideLoading]; | ||
| 443 | - if (errorMessage) { | ||
| 444 | - DS_showMessage(errorMessage); | ||
| 445 | - return; | 805 | + singleView2.contentTextField.text = self.shopGoodsDetailsModel.cate_name |
| 806 | + singleView2.layoutSubviews() | ||
| 807 | + | ||
| 808 | + let bannerImageUrls = NSMutableArray() | ||
| 809 | + for model in self.shopGoodsDetailsModel.image{ | ||
| 810 | + bannerImageUrls.add(model.simg ?? "") | ||
| 446 | } | 811 | } |
| 447 | - DS_showMessage(@"修改成功"); | ||
| 448 | - [[NSNotificationCenter defaultCenter] postNotificationName:kDSGoodsManageEditNotification object:nil userInfo:jsonData]; | 812 | + if let array = bannerImageUrls as? [String] { |
| 813 | + singleView4.uploadImageView.networkImageArr = array | ||
| 814 | + } | ||
| 815 | + singleView4.uploadImageView.setNetworkVideoUrl(networkVideoUrl: self.shopGoodsDetailsModel.video?.video_url ?? "", networkVideoImageUrl: self.shopGoodsDetailsModel.video?.video_img ?? "") | ||
| 816 | + | ||
| 817 | + singleView5.contentTextField.text = self.shopGoodsDetailsModel.title | ||
| 818 | + singleView6.contentTextView.text = self.shopGoodsDetailsModel.ads | ||
| 819 | + singleView7.contentTextField.text = self.shopGoodsDetailsModel.price?.keepTwoDecimalPlaces() | ||
| 820 | + singleView8.contentTextField.text = self.shopGoodsDetailsModel.prices?.keepTwoDecimalPlaces() | ||
| 821 | + singleView9.contentTextField.text = self.shopGoodsDetailsModel.kg | ||
| 822 | + singleView10.countTF.text = self.shopGoodsDetailsModel.min_buy_num | ||
| 823 | + singleView11.contentSwitch.isOn = self.shopGoodsDetailsModel.state == 2 ? true : false | ||
| 824 | + singleView10.subtractBtn.setImage(UIImage(named: Int(self.shopGoodsDetailsModel.min_buy_num ?? "0")! > 1 ? "DS_main_unadd_count" : "DS_main_unadd_count_n"), for: .normal) | ||
| 449 | 825 | ||
| 450 | - for (int i = 0; i < [self.disposeDataModel.list count]; i++) { | ||
| 451 | - DSShopGoodsManageDetailsSingleView * singleView = (DSShopGoodsManageDetailsSingleView*)[self.view viewWithTag:i+1]; | ||
| 452 | - if (singleView.model.style == 3) { | ||
| 453 | - [singleView.uploadImageView deleteReplaceImageUrlAfterSuccessUploadThings]; | 826 | + let contentDetailsImageUrls = NSMutableArray() |
| 827 | + for model in self.shopGoodsDetailsModel.detail_img{ | ||
| 828 | + contentDetailsImageUrls.add(model.simg as Any) | ||
| 829 | + } | ||
| 830 | + singleView13.uploadImageView.networkImageArr = contentDetailsImageUrls as! Array<String> | ||
| 831 | + if let array = contentDetailsImageUrls as? [String] { | ||
| 832 | + singleView13.uploadImageView.networkImageArr = array | ||
| 833 | + } | ||
| 834 | + singleView14.contentTextField.text = self.shopGoodsDetailsModel.yunfei?.keepTwoDecimalPlaces() | ||
| 835 | + singleView15.contentSwitch.isOn = self.shopGoodsDetailsModel.is_refund == 0 ? true : false | ||
| 836 | + singleView16.contentTextField.text = self.shopGoodsDetailsModel.unit | ||
| 837 | + singleView4.uploadImageView.deleteImage = UIImage.imageWithColor(color: .clear, size: singleView4.uploadImageView.size) | ||
| 838 | + singleView13.uploadImageView.deleteImage = UIImage.imageWithColor(color: .clear, size: singleView13.uploadImageView.size) | ||
| 839 | + if tempArray.count > 0{ | ||
| 840 | + var array = Array(self.dataModel.list) | ||
| 841 | + | ||
| 842 | + for i in 0..<tempArray.count{ | ||
| 843 | + let dict = tempArray.object(at: i) as! NSDictionary | ||
| 844 | + let paramDict = ["style":1,"isHaveTo":false,"title":dict.object(forKey: "k"),"contentTextFieldkeyboardType":1,"isDisplayLine":true,"contentType":1,"isDelect":true,"content":dict.object(forKey: "v")] | ||
| 845 | + let listModel = newDictionaryToModel(paramDict as [String : Any], CNLiveShopAddEditGoodsListModel.self) as! CNLiveShopAddEditGoodsListModel | ||
| 846 | + array.append(listModel) | ||
| 847 | + self.reloadBgScrollViewContentViewModel(model: listModel, index: self.dataModel.list.count+1+i, isScrollToBottom: false) | ||
| 848 | + if tempArray.count-1 == i{ | ||
| 849 | + self.dataModel.list = array | ||
| 850 | + self.viewWillLayoutSubviews() | ||
| 851 | + } | ||
| 454 | } | 852 | } |
| 455 | } | 853 | } |
| 456 | - | ||
| 457 | - [self dsPopViewControllerAnimated:YES]; | ||
| 458 | - }]; | ||
| 459 | - }*/ | 854 | + } |
| 855 | + } | ||
| 460 | } | 856 | } |
| 461 | } | 857 | } |
| 462 | 858 |
metaCode/Classes/Main/HomePage/Controller/GoodsManager/CNLiveShopProductManagerController.swift
| @@ -6,12 +6,22 @@ | @@ -6,12 +6,22 @@ | ||
| 6 | // 商品管理 | 6 | // 商品管理 |
| 7 | 7 | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | +import MJRefresh | ||
| 10 | +import EmptyDataSet_Swift | ||
| 9 | 11 | ||
| 10 | -class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDataSource, UITableViewDelegate{ | 12 | +///商品管理通知 |
| 13 | +let kDSGoodsManageAddNotification = "kDSGoodsManageAddNotification" | ||
| 14 | +let kDSGoodsManageEditNotification = "kDSGoodsManageEditNotification" | ||
| 15 | +let kDSGoodsManageDeleteNotification = "kDSGoodsManageDeleteNotification" | ||
| 16 | + | ||
| 17 | +class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDataSource, UITableViewDelegate, CNLiveGoodsManagerClassifyViewDelegate, EmptyDataSetSource, EmptyDataSetDelegate, UITextFieldDelegate{ | ||
| 11 | 18 | ||
| 12 | let kCNLiveShopGoodsListCellIdentifier = "kCNLiveShopGoodsListCellIdentifier" | 19 | let kCNLiveShopGoodsListCellIdentifier = "kCNLiveShopGoodsListCellIdentifier" |
| 13 | 20 | ||
| 14 | - | 21 | + ///排序类型 1新品 2价格从底到高 3 价格从高到底 |
| 22 | + var sortType = "1" | ||
| 23 | + var network_type: CNLiveMineResponseType! | ||
| 24 | + var pageNum: NSInteger = 0 | ||
| 15 | // MARK: - 懒加载 | 25 | // MARK: - 懒加载 |
| 16 | ///数据源 | 26 | ///数据源 |
| 17 | lazy var dataArray: NSMutableArray = { | 27 | lazy var dataArray: NSMutableArray = { |
| @@ -20,8 +30,12 @@ class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDa | @@ -20,8 +30,12 @@ class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDa | ||
| 20 | }() | 30 | }() |
| 21 | 31 | ||
| 22 | lazy var classifyView: CNLiveShopGoodsListClassifyView = { | 32 | lazy var classifyView: CNLiveShopGoodsListClassifyView = { |
| 23 | - let classifyView = CNLiveShopGoodsListClassifyView(frame: CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: 44)) | 33 | + let itemA = CNLiveClassifyItem.init(itemTitle: "最新", itemImage: nil) |
| 34 | + let itemB = CNLiveClassifyItem.init(itemTitle: "价格", itemImage: UIImage(named: "DS_goods_manager_pirce_default")) | ||
| 35 | + | ||
| 36 | + let classifyView = CNLiveShopGoodsListClassifyView(frame: CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: 44), itemArray: [itemA,itemB]) | ||
| 24 | classifyView.backgroundColor = .white | 37 | classifyView.backgroundColor = .white |
| 38 | + classifyView.delegate = self | ||
| 25 | return classifyView | 39 | return classifyView |
| 26 | }() | 40 | }() |
| 27 | lazy var addBtn: UIButton = { | 41 | lazy var addBtn: UIButton = { |
| @@ -36,7 +50,10 @@ class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDa | @@ -36,7 +50,10 @@ class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDa | ||
| 36 | let tableView = UITableView(frame: .zero, style: .plain) | 50 | let tableView = UITableView(frame: .zero, style: .plain) |
| 37 | tableView.dataSource = self | 51 | tableView.dataSource = self |
| 38 | tableView.delegate = self | 52 | tableView.delegate = self |
| 53 | + tableView.emptyDataSetSource = self | ||
| 54 | + tableView.emptyDataSetDelegate = self | ||
| 39 | tableView.separatorStyle = .none | 55 | tableView.separatorStyle = .none |
| 56 | + tableView.tableFooterView = UIView.init() | ||
| 40 | tableView.rowHeight = 167 | 57 | tableView.rowHeight = 167 |
| 41 | tableView.register(CNLiveShopGoodsListCell.self, forCellReuseIdentifier: kCNLiveShopGoodsListCellIdentifier) | 58 | tableView.register(CNLiveShopGoodsListCell.self, forCellReuseIdentifier: kCNLiveShopGoodsListCellIdentifier) |
| 42 | return tableView | 59 | return tableView |
| @@ -52,16 +69,44 @@ class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDa | @@ -52,16 +69,44 @@ class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDa | ||
| 52 | emptyLabel.adjustsFontSizeToFitWidth=true | 69 | emptyLabel.adjustsFontSizeToFitWidth=true |
| 53 | return emptyLabel | 70 | return emptyLabel |
| 54 | }() | 71 | }() |
| 55 | - | 72 | + |
| 56 | override func viewDidLoad() { | 73 | override func viewDidLoad() { |
| 57 | super.viewDidLoad() | 74 | super.viewDidLoad() |
| 58 | self.setUI() | 75 | self.setUI() |
| 59 | - self.getGoodsListApi(page: "1") | 76 | + self.getGoodsListApi(page: 1) |
| 77 | + | ||
| 78 | + NotificationCenter.default.addObserver(self, selector: #selector(goodsManageAddNotification), name: Notification.Name.ShopGoodsManage.kDSGoodsManageAddNotification, object: nil) | ||
| 79 | + NotificationCenter.default.addObserver(self, selector: #selector(goodsManageEditNotification), name: Notification.Name.ShopGoodsManage.kDSGoodsManageEditNotification, object: nil) | ||
| 80 | + NotificationCenter.default.addObserver(self, selector: #selector(goodsManageDeleteNotification), name: Notification.Name.ShopGoodsManage.kDSGoodsManageDeleteNotification, object: nil) | ||
| 81 | + } | ||
| 82 | + deinit { | ||
| 83 | + NotificationCenter.default.removeObserver(self, name: Notification.Name.ShopGoodsManage.kDSGoodsManageAddNotification, object: nil) | ||
| 84 | + NotificationCenter.default.removeObserver(self, name: Notification.Name.ShopGoodsManage.kDSGoodsManageEditNotification, object: nil) | ||
| 85 | + NotificationCenter.default.removeObserver(self, name: Notification.Name.ShopGoodsManage.kDSGoodsManageDeleteNotification, object: nil) | ||
| 60 | } | 86 | } |
| 87 | + | ||
| 61 | func setUI(){ | 88 | func setUI(){ |
| 62 | navigationBarHidden = false | 89 | navigationBarHidden = false |
| 63 | titleName = "商品管理" | 90 | titleName = "商品管理" |
| 64 | -// rightNavBtns = [self.addBtn] | 91 | + rightNavBtns = [self.addBtn] |
| 92 | + | ||
| 93 | + let leftNavBtn = UIButton(type: .custom) | ||
| 94 | + leftNavBtn.setImage(UIImage(named: "DS_goods_search_back_icon"), for: .normal) | ||
| 95 | + leftNavBtn.addTarget(self, action: #selector(changeCancelAction), for: .touchUpInside) | ||
| 96 | + leftNavBtn.width = 44 | ||
| 97 | + leftNavBtn.height = 44 | ||
| 98 | + | ||
| 99 | + let leftSearchNavBtn = UIButton(type: .custom) | ||
| 100 | + leftSearchNavBtn.setImage(UIImage(named: "DS_goods_manager_searchNav"), for: .normal) | ||
| 101 | + leftSearchNavBtn.addTarget(self, action: #selector(searchBtnClick), for: .touchUpInside) | ||
| 102 | + leftSearchNavBtn.width = 44 | ||
| 103 | + leftSearchNavBtn.height = 44 | ||
| 104 | + for btn in self.leftNavBtns{ | ||
| 105 | + btn.removeFromSuperview() | ||
| 106 | + } | ||
| 107 | + self.leftNavBtns = [leftNavBtn,leftSearchNavBtn] | ||
| 108 | + | ||
| 109 | + self.pageNum = 1 | ||
| 65 | self.view.addSubview(self.classifyView) | 110 | self.view.addSubview(self.classifyView) |
| 66 | self.view.addSubview(tableView) | 111 | self.view.addSubview(tableView) |
| 67 | self.view.addSubview(self.emptyLabel) | 112 | self.view.addSubview(self.emptyLabel) |
| @@ -69,6 +114,18 @@ class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDa | @@ -69,6 +114,18 @@ class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDa | ||
| 69 | tableView.frame = CGRect(x: 0, y:self.classifyView.bottom , width: KSreenWidth, height: KSreenHeight - self.classifyView.bottom) | 114 | tableView.frame = CGRect(x: 0, y:self.classifyView.bottom , width: KSreenWidth, height: KSreenHeight - self.classifyView.bottom) |
| 70 | } | 115 | } |
| 71 | 116 | ||
| 117 | + func addRefreshView() { | ||
| 118 | + tableView.mj_header = MJRefreshNormalHeader.init(refreshingBlock: {[weak self] in | ||
| 119 | + self!.pageNum = 1 | ||
| 120 | + self?.getGoodsListApi(page: 1) | ||
| 121 | + }) | ||
| 122 | + | ||
| 123 | + tableView.mj_footer = MJRefreshAutoNormalFooter.init(refreshingBlock: {[weak self] in | ||
| 124 | + self!.pageNum = self!.pageNum + 1 | ||
| 125 | + self?.getGoodsListApi(page: self!.pageNum) | ||
| 126 | + }) | ||
| 127 | + } | ||
| 128 | + | ||
| 72 | // MARK: - UITableViewDelegate | 129 | // MARK: - UITableViewDelegate |
| 73 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | 130 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { |
| 74 | return self.dataArray.count | 131 | return self.dataArray.count |
| @@ -84,6 +141,17 @@ class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDa | @@ -84,6 +141,17 @@ class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDa | ||
| 84 | } | 141 | } |
| 85 | 142 | ||
| 86 | cell.goodsModel = goodsModel | 143 | cell.goodsModel = goodsModel |
| 144 | + cell.editBlock = { mdl in | ||
| 145 | + let model = mdl | ||
| 146 | + self.editGoodsModel(goodsModel: model) | ||
| 147 | + } | ||
| 148 | + cell.editCountBlock = { mdl in | ||
| 149 | + let model = mdl | ||
| 150 | + self.editGoodsCountModel(goodsModel: model) | ||
| 151 | + } | ||
| 152 | + cell.operStateBlock = { model,state in | ||
| 153 | + self.operStateWithGoodsModel(goodsModel: model, state: state) | ||
| 154 | + } | ||
| 87 | return cell | 155 | return cell |
| 88 | } | 156 | } |
| 89 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | 157 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
| @@ -95,47 +163,239 @@ class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDa | @@ -95,47 +163,239 @@ class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDa | ||
| 95 | return 167 | 163 | return 167 |
| 96 | } | 164 | } |
| 97 | 165 | ||
| 166 | + func title(forEmptyDataSet scrollView: UIScrollView) -> NSAttributedString? { | ||
| 167 | + var defult_string = "" | ||
| 168 | + if network_type == .failed || network_type == .unkonw { | ||
| 169 | + defult_string = "接口请求错误,刷新试试~" | ||
| 170 | + } | ||
| 171 | + if network_type == .noNetwork { | ||
| 172 | + defult_string = "网络开小差了,刷新试试~" | ||
| 173 | + } | ||
| 174 | + if dataArray.count == 0 { | ||
| 175 | + defult_string = "暂时没有数据~" | ||
| 176 | + } | ||
| 177 | + return NSAttributedString(string: defult_string, attributes: [.font: Font_17,.foregroundColor: HexColor("#666666")!]) | ||
| 178 | + } | ||
| 179 | + | ||
| 180 | + func buttonTitle(forEmptyDataSet scrollView: UIScrollView, for state: UIControl.State) -> NSAttributedString? { | ||
| 181 | + if network_type == .failed || network_type == .noNetwork { | ||
| 182 | + let attributes = [NSAttributedString.Key.font:Font_16_Fit, | ||
| 183 | + NSAttributedString.Key.foregroundColor: HexColor("#609BFF")] | ||
| 184 | + return NSAttributedString(string: "刷一刷", attributes: attributes as [NSAttributedString.Key : Any]) | ||
| 185 | + } | ||
| 186 | + return nil | ||
| 187 | + } | ||
| 188 | + | ||
| 189 | + func emptyDataSet(_ scrollView: UIScrollView, didTapView view: UIView) { | ||
| 190 | + if network_type == .failed || network_type == .noNetwork { | ||
| 191 | + getGoodsListApi(page: 1) | ||
| 192 | + } | ||
| 193 | + } | ||
| 194 | + | ||
| 195 | + // MARK: - 编辑商品 | ||
| 196 | + func editGoodsModel(goodsModel:CNLiveShopGoodsListModel){ | ||
| 197 | + let vc = CNLiveShopNewProductController.init() | ||
| 198 | + vc.type = .edit | ||
| 199 | + vc.goodsId = goodsModel.id! | ||
| 200 | + self.navigationController?.pushViewController(vc, animated: true) | ||
| 201 | + } | ||
| 202 | + | ||
| 203 | + // MARK: - 编辑商品库存 | ||
| 204 | + func editGoodsCountModel(goodsModel:CNLiveShopGoodsListModel){ | ||
| 205 | + let alertController = UIAlertController(title: "编辑商品库存", message: "请输入库存数量", preferredStyle: .alert) | ||
| 206 | + alertController.addTextField { textField in | ||
| 207 | + textField.delegate = self | ||
| 208 | + textField.keyboardType = .numberPad | ||
| 209 | + textField.returnKeyType = .done | ||
| 210 | + textField.tag = 666 | ||
| 211 | + } | ||
| 212 | + let cancel = UIAlertAction(title: "取消", style: .cancel) { action in | ||
| 213 | + } | ||
| 214 | + alertController.addAction(cancel) | ||
| 215 | + let confirm = UIAlertAction(title: "修改", style: .default) { action in | ||
| 216 | + self.view.endEditing(true) | ||
| 217 | + let textField = alertController.textFields?.first | ||
| 218 | + if (textField!.text?.count ?? 0 > 0 && (textField!.text?.isPurnInt() == false)) { | ||
| 219 | + showMessage(message: "只能输入数字") | ||
| 220 | + return | ||
| 221 | + } | ||
| 222 | + if (textField!.text?.count == 0 || textField!.text?.count ?? 0 >= 6){ | ||
| 223 | + showMessage(message: "请输入1~99999范围内的数量") | ||
| 224 | + return | ||
| 225 | + } | ||
| 226 | + self.requsetEditGoodsCount(count: textField!.text ?? "", goodsModel: goodsModel) | ||
| 227 | + } | ||
| 228 | + alertController.addAction(confirm) | ||
| 229 | + self.present(alertController, animated: true) | ||
| 230 | + | ||
| 231 | + } | ||
| 232 | + | ||
| 233 | + func requsetEditGoodsCount(count:String,goodsModel:CNLiveShopGoodsListModel){ | ||
| 234 | + showLoading(message: "") | ||
| 235 | + CNLiveShopGoodListViewModel.postGoodsEditAttrWithShopId(shopId: DSUserInfoManager.shared.dsUserInfo.id!, goodsId: goodsModel.id!, type: 1, value: count) { result, status in | ||
| 236 | + if status == .success{ | ||
| 237 | + showMessage(message: "操作成功") | ||
| 238 | + let dataArr = Array(self.dataArray) | ||
| 239 | + for (idx,mdl) in dataArr.enumerated() { | ||
| 240 | + let model = mdl as! CNLiveShopGoodsListModel | ||
| 241 | + if model.id == goodsModel.id { | ||
| 242 | + model.count = count | ||
| 243 | + self.dataArray.replaceObject(at: idx, with: model) | ||
| 244 | + self.tableView.reloadData() | ||
| 245 | + break | ||
| 246 | + } | ||
| 247 | + } | ||
| 248 | + }else{ | ||
| 249 | + showMessage(message: "操作失败") | ||
| 250 | + } | ||
| 251 | + } | ||
| 252 | + } | ||
| 253 | + | ||
| 254 | + // MARK: - 编辑商品上下架状态 | ||
| 255 | + func operStateWithGoodsModel(goodsModel:CNLiveShopGoodsListModel,state:Int){ | ||
| 256 | + var message = "" | ||
| 257 | + if state == 2{ | ||
| 258 | + message = "确认下架?" | ||
| 259 | + }else{ | ||
| 260 | + message = "确认上架?" | ||
| 261 | + } | ||
| 262 | + AlertTool.showSystemAlert(title: message, message: nil, actionTitles: ["取消","确定"], style: .alert, actionStyles:[.cancel,.default] ) { index in | ||
| 263 | + if (index == 2) { | ||
| 264 | + showLoading(message: "") | ||
| 265 | + CNLiveShopGoodListViewModel.postChangeGoodsStateWithGoodsId(goodsId: goodsModel.id!, state: "") { result, status in | ||
| 266 | + if status == .success{ | ||
| 267 | + showMessage(message: "操作成功") | ||
| 268 | + let dataArr = Array(self.dataArray) | ||
| 269 | + for (idx,mdl) in dataArr.enumerated() { | ||
| 270 | + let model = mdl as! CNLiveShopGoodsListModel | ||
| 271 | + if model.id == goodsModel.id { | ||
| 272 | + if (model.state == 2) { | ||
| 273 | + model.state = 1 | ||
| 274 | + }else { | ||
| 275 | + model.state = 2 | ||
| 276 | + } | ||
| 277 | + self.dataArray.replaceObject(at: idx, with: model) | ||
| 278 | + | ||
| 279 | + self.tableView.reloadData() | ||
| 280 | + break | ||
| 281 | + } | ||
| 282 | + } | ||
| 283 | + }else if (status == .failed){ | ||
| 284 | + self.network_type = .failed | ||
| 285 | + showMessage(message: "操作失败") | ||
| 286 | + }else if (status == .noNetwork){ | ||
| 287 | + self.network_type = .noNetwork | ||
| 288 | + showMessage(message: "操作失败") | ||
| 289 | + } | ||
| 290 | + } | ||
| 291 | + } | ||
| 292 | + } | ||
| 293 | + } | ||
| 294 | + | ||
| 295 | + | ||
| 296 | + // MARK: -CNLiveGoodsManagerClassifyViewDelegate | ||
| 297 | + func shopGoodsManagerClassifyViewDidSeleted(type: CNLiveGoodsManagerClassifyType) { | ||
| 298 | + switch (type) { | ||
| 299 | + case .newest: | ||
| 300 | + self.sortType = "1" | ||
| 301 | + case .priceMin: | ||
| 302 | + self.sortType = "2" | ||
| 303 | + case .priceMax: | ||
| 304 | + self.sortType = "3" | ||
| 305 | + } | ||
| 306 | + self.tableView.mj_header?.beginRefreshing() | ||
| 307 | + } | ||
| 308 | + | ||
| 309 | + | ||
| 98 | // MARK: - BtnAction | 310 | // MARK: - BtnAction |
| 311 | + @objc func changeCancelAction() { | ||
| 312 | + self.navigationController?.popViewController(animated: true) | ||
| 313 | + } | ||
| 99 | @objc func addBtnAction(){ | 314 | @objc func addBtnAction(){ |
| 315 | + navigationViewController().pushViewController(CNLiveShopNewProductController(), animated: pushAnimated) | ||
| 316 | +// currentViewController()?.navigationController?.pushViewController(CNLiveShopNewProductController(), animated: pushAnimated) | ||
| 317 | + } | ||
| 318 | + @objc func searchBtnClick(){ | ||
| 319 | + navigationViewController().pushViewController(CNLiveShopGoodsSearchViewController(searchType: .defaultGoods), animated: pushAnimated) | ||
| 320 | + } | ||
| 321 | + | ||
| 322 | + // MARK: - 商品编辑通知 | ||
| 323 | + @objc func goodsManageAddNotification(notification:Notification) { | ||
| 324 | + self.getGoodsListApi(page: 1) | ||
| 325 | + } | ||
| 326 | + @objc func goodsManageEditNotification(notification:Notification){ | ||
| 327 | + let dict = (notification.userInfo ?? ["":""]) as! [String :Any] | ||
| 328 | + let nModel = newDictionaryToModel(dict["data"] as! [String : Any], CNLiveShopGoodsListModel.self) as! CNLiveShopGoodsListModel | ||
| 329 | + let dataArr = Array(self.dataArray) | ||
| 330 | + | ||
| 331 | + for (idx,mdl) in dataArr.enumerated() { | ||
| 332 | + let model = mdl as! CNLiveShopGoodsListModel | ||
| 333 | + if model.id == nModel.id { | ||
| 334 | + model.title = nModel.title | ||
| 335 | + model.simg = nModel.simg | ||
| 336 | + model.price = nModel.price | ||
| 337 | + model.ads = nModel.ads | ||
| 338 | + model.groupid = nModel.groupid | ||
| 339 | + model.shopid = nModel.shopid | ||
| 340 | + model.category_id = nModel.category_id | ||
| 341 | + model.state = nModel.state | ||
| 342 | + model.count = nModel.count | ||
| 343 | + model.ord = nModel.ord | ||
| 344 | + self.dataArray.replaceObject(at: idx, with: model) | ||
| 345 | + self.tableView.reloadData() | ||
| 346 | + break | ||
| 347 | + } | ||
| 348 | + } | ||
| 100 | 349 | ||
| 101 | - currentViewController()?.navigationController?.pushViewController(CNLiveShopNewProductController(), animated: true) | 350 | + } |
| 351 | + | ||
| 352 | + @objc func goodsManageDeleteNotification(notification:Notification){ | ||
| 353 | + let dict = (notification.userInfo ?? ["":""]) as! [String :Any] | ||
| 354 | + let dataArr = Array(self.dataArray) | ||
| 355 | + | ||
| 356 | + for (_,mdl) in dataArr.enumerated() { | ||
| 357 | + let model = mdl as! CNLiveShopGoodsListModel | ||
| 358 | + if model.id == (dict["goodsId"] as! String){ | ||
| 359 | + self.dataArray.remove(model) | ||
| 360 | + self.tableView.reloadData() | ||
| 361 | + break | ||
| 362 | + } | ||
| 363 | + } | ||
| 102 | } | 364 | } |
| 103 | 365 | ||
| 104 | //MARK: - 网络请求获取商品列表 | 366 | //MARK: - 网络请求获取商品列表 |
| 105 | - func getGoodsListApi(page:String) | 367 | + func getGoodsListApi(page:NSInteger) |
| 106 | { | 368 | { |
| 107 | showLoading(message: "") | 369 | showLoading(message: "") |
| 108 | CNLiveShopGoodListViewModel.requestGoodsList(shopId: DSUserInfoManager.shared.dsUserInfo.id, sortType: "1", page: page) { result, status in | 370 | CNLiveShopGoodListViewModel.requestGoodsList(shopId: DSUserInfoManager.shared.dsUserInfo.id, sortType: "1", page: page) { result, status in |
| 109 | hiddenLoading() | 371 | hiddenLoading() |
| 110 | if status == .success{ | 372 | if status == .success{ |
| 111 | let arr = result as! [CNLiveShopGoodsListModel] | 373 | let arr = result as! [CNLiveShopGoodsListModel] |
| 112 | - if arr.count > 0 | ||
| 113 | - { | ||
| 114 | - self.dataArray.addObjects(from: result as! [CNLiveShopGoodsListModel]) | ||
| 115 | - let newDataArray = NSMutableArray() | ||
| 116 | - for goodsModel in self.dataArray { | ||
| 117 | - if let model = goodsModel as? CNLiveShopGoodsListModel{ | ||
| 118 | - newDataArray.add(model) | ||
| 119 | - } | ||
| 120 | - } | 374 | + |
| 375 | + if self.pageNum == 1 { | ||
| 121 | self.dataArray.removeAllObjects() | 376 | self.dataArray.removeAllObjects() |
| 122 | - self.dataArray.addObjects(from: newDataArray as! [Any]) | ||
| 123 | - | 377 | + self.dataArray.addObjects(from: arr) |
| 378 | + if (self.dataArray.count > 0 && self.tableView.mj_header == nil && self.tableView.mj_footer == nil) { | ||
| 379 | + self.addRefreshView() | ||
| 380 | + } | ||
| 381 | + }else if self.pageNum > 1 { | ||
| 382 | + self.dataArray.addObjects(from: arr) | ||
| 383 | + } | ||
| 384 | + self.tableView.reloadData() | ||
| 385 | + self.tableView.mj_header?.endRefreshing() | ||
| 386 | + self.tableView.mj_footer?.endRefreshing() | ||
| 387 | + if (result as! Array<Any>).count == 0 { | ||
| 388 | + self.tableView.mj_footer?.endRefreshingWithNoMoreData() | ||
| 124 | self.tableView.reloadData() | 389 | self.tableView.reloadData() |
| 125 | - self.emptyLabel.isHidden = true | ||
| 126 | - self.classifyView.emptyView(isEmpty: false) | ||
| 127 | - }else if arr.count == 0{ | ||
| 128 | - //展示emptyView | ||
| 129 | - self.classifyView.emptyView(isEmpty: true) | ||
| 130 | - self.emptyLabel.isHidden = false | ||
| 131 | } | 390 | } |
| 132 | }else if (status == .failed){ | 391 | }else if (status == .failed){ |
| 133 | -// self.NetApiStatus = .apiError | 392 | + self.network_type = .failed |
| 393 | + self.tableView.reloadEmptyDataSet() | ||
| 134 | }else if (status == .noNetwork){ | 394 | }else if (status == .noNetwork){ |
| 135 | - | ||
| 136 | -// self.NetApiStatus = .notNetwork | 395 | + self.network_type = .noNetwork |
| 396 | + self.tableView.reloadEmptyDataSet() | ||
| 137 | } | 397 | } |
| 398 | + | ||
| 138 | } | 399 | } |
| 139 | -// | ||
| 140 | } | 400 | } |
| 141 | } | 401 | } |