Commit 4601c4a7ba965f493e3d71e066b0f6176468674a

Authored by “张旭”
1 parent dd34fe88

认证-卡片点击下滑 , 实时热榜0 短剧1

metaCode.xcodeproj/project.pbxproj
... ... @@ -2348,7 +2348,7 @@
2348 2348 CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements;
2349 2349 CODE_SIGN_IDENTITY = "Apple Development";
2350 2350 CODE_SIGN_STYLE = Automatic;
2351   - CURRENT_PROJECT_VERSION = 1.1.1.24.06.26.11;
  2351 + CURRENT_PROJECT_VERSION = 1.1.2.24.07.01.12;
2352 2352 DEBUG_INFORMATION_FORMAT = dwarf;
2353 2353 DEVELOPMENT_TEAM = 94X49GG3ZW;
2354 2354 ENABLE_BITCODE = NO;
... ... @@ -2421,7 +2421,7 @@
2421 2421 "$(inherited)",
2422 2422 "@executable_path/Frameworks",
2423 2423 );
2424   - MARKETING_VERSION = 1.1.1;
  2424 + MARKETING_VERSION = 1.1.2;
2425 2425 OTHER_LDFLAGS = (
2426 2426 "$(inherited)",
2427 2427 "-all_load",
... ... @@ -2604,7 +2604,7 @@
2604 2604 CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements;
2605 2605 CODE_SIGN_IDENTITY = "Apple Development";
2606 2606 CODE_SIGN_STYLE = Automatic;
2607   - CURRENT_PROJECT_VERSION = 1.1.1.24.06.26.11;
  2607 + CURRENT_PROJECT_VERSION = 1.1.2.24.07.01.12;
2608 2608 DEVELOPMENT_TEAM = 94X49GG3ZW;
2609 2609 ENABLE_BITCODE = NO;
2610 2610 ENABLE_MODULE_VERIFIER = NO;
... ... @@ -2676,7 +2676,7 @@
2676 2676 "$(inherited)",
2677 2677 "@executable_path/Frameworks",
2678 2678 );
2679   - MARKETING_VERSION = 1.1.1;
  2679 + MARKETING_VERSION = 1.1.2;
2680 2680 OTHER_LDFLAGS = (
2681 2681 "$(inherited)",
2682 2682 "-all_load",
... ...
metaCode/Classes/Main/HomePage/Controller/DownSlideController/CNUpSlideDetailViewController.swift
... ... @@ -331,8 +331,18 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou
331 331 return KSreenWidth
332 332 }
333 333 }else{
334   - return DuanJuDetailCellHeight
  334 + if self.cellType == .playletList{
  335 + return DuanJuDetailCellHeight
  336 + }else{
  337 + return 75
  338 + }
335 339 }
  340 +// let SlideModelTypeRecommend4: String = "4"//4一排两个 推荐课程&推荐活动
  341 +// let SlideModelTypeTodayRecommend74: String = "74"//74今日推荐
  342 +// let SlideModelTypeAllCourse12: String = "12"//12列表全部课程
  343 +// let SlideModelTypeOneCourse75: String = "75"//75单课程大图
  344 +// let SlideModelTypeTwoDuanJu5: String = "5"//5竖版短剧 一排两个
  345 +// let SlideModelTypeRealHotList7: String = "7"//7实时热榜
336 346 return 75
337 347 }
338 348  
... ...
metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNMainView.swift
... ... @@ -104,13 +104,13 @@ class CNFrontMainView : UIView{
104 104 }
105 105  
106 106  
107   - frontDescContentView.addSubview(self.textView)
108   - textView.snp.makeConstraints { make in
109   - make.top.equalToSuperview().offset(40)
110   - make.left.equalToSuperview().offset(30)
111   - make.right.equalToSuperview().offset(-30)
112   - make.bottom.equalTo(enterpriseStandBtn.snp.top).offset(-30)
113   - }
  107 +// frontDescContentView.addSubview(self.textView)
  108 +// textView.snp.makeConstraints { make in
  109 +// make.top.equalToSuperview().offset(40)
  110 +// make.left.equalToSuperview().offset(30)
  111 +// make.right.equalToSuperview().offset(-30)
  112 +// make.bottom.equalTo(enterpriseStandBtn.snp.top).offset(-30)
  113 +// }
114 114  
115 115 return frontDescContentView
116 116  
... ... @@ -356,6 +356,8 @@ class CNFrontMainView : UIView{
356 356 let textViewBgImgView:UIImageView = UIImageView()
357 357 textViewBgImgView.clipsToBounds = true
358 358 textViewBgImgView.layer.cornerRadius = 20
  359 + textViewBgImgView.isUserInteractionEnabled = true
  360 + textViewBgImgView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(textViewBgImgViewAction)))
359 361 return textViewBgImgView
360 362 }()
361 363  
... ... @@ -642,6 +644,11 @@ class CNFrontMainView : UIView{
642 644 // tapTransformAciton!()
643 645 }
644 646  
  647 + @objc func textViewBgImgViewAction(){
  648 + //卡片点击,到下滑页
  649 + self.xiahua()
  650 + }
  651 +
645 652 @objc func addStandBtnAction() {
646 653 //跳转到 1按钮时认证页面 电商 / 个人 / 企业 / 机构
647 654 if _idModel!.id == 9 {
... ... @@ -742,21 +749,7 @@ class CNFrontMainView : UIView{
742 749 navigationViewController().pushViewController(shopConsoleVC, animated: pushAnimated)
743 750 }else if self.standInfoSubTitleModel?.jumpType == UpDownTypeAuthAlertUp{
744 751  
745   - let customIndexView = ((self.superview as! CNMainView).superview as! UIScrollView).superview as! CNCustomIndexView
746   - let baseScrollView = customIndexView.baseScrollView
747   - baseScrollView.setContentOffset(CGPoint(x: 0, y: 0), animated: true)
748   -
749   - let result:Dictionary = ["AuthVNumPage":1]
750   - NotificationCenter.default.post(name: Notification.Name.AuthVNumPageManage.kAuthVNumPageChangedNotification, object: nil, userInfo: result)
751   -
752   - currentViewController()?.tabBarController?.tabBar.isHidden = false
753   - customIndexView.superScrollView?.isScrollEnabled = true
754   -
755   - let time = DispatchTime.now() + 0.5
756   - DispatchQueue.main.asyncAfter(deadline:time, execute: DispatchWorkItem(block: {
757   - //下滑提醒View回到初始位置
758   - customIndexView.downSlideViewRemindView.top = -((customIndexView.downSlideViewRemindView.height) + 50)
759   - }))
  752 + self.xiahua()
760 753  
761 754 }else if self.standInfoSubTitleModel?.jumpType == UpDownTypeAuthAlertDown{
762 755 let customIndexView = ((self.superview as! CNMainView).superview as! UIScrollView).superview as! CNCustomIndexView
... ... @@ -778,6 +771,26 @@ class CNFrontMainView : UIView{
778 771  
779 772 self.hiden17Alert()
780 773 }
  774 +
  775 + // MARK: - 自动到下滑页
  776 + func xiahua(){
  777 + let customIndexView = ((self.superview as! CNMainView).superview as! UIScrollView).superview as! CNCustomIndexView
  778 + let baseScrollView = customIndexView.baseScrollView
  779 + baseScrollView.setContentOffset(CGPoint(x: 0, y: 0), animated: true)
  780 +
  781 + let result:Dictionary = ["AuthVNumPage":1]
  782 + NotificationCenter.default.post(name: Notification.Name.AuthVNumPageManage.kAuthVNumPageChangedNotification, object: nil, userInfo: result)
  783 +
  784 + currentViewController()?.tabBarController?.tabBar.isHidden = false
  785 + customIndexView.superScrollView?.isScrollEnabled = true
  786 +
  787 + let time = DispatchTime.now() + 0.5
  788 + DispatchQueue.main.asyncAfter(deadline:time, execute: DispatchWorkItem(block: {
  789 + //下滑提醒View回到初始位置
  790 + customIndexView.downSlideViewRemindView.top = -((customIndexView.downSlideViewRemindView.height) + 50)
  791 + }))
  792 + }
  793 +
781 794 @objc func alertBgViewClickAction() {
782 795 //点击蒙版隐藏view
783 796 self.hiden17Alert()
... ...
metaCode/Classes/Main/HomePages/Controller/HomeController/CNLiveAuthViewController.swift
... ... @@ -17,7 +17,11 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
17 17 let kCNLiveDownSlideTwoDuanJuCellIdentifier = "kCNLiveDownSlideTwoDuanJuCellIdentifier"
18 18 let kCNLiveDownSlideRealHotListCellIdentifier = "kCNLiveDownSlideRealHotListCellIdentifier"
19 19  
  20 + let group = DispatchGroup()
  21 + let queue = DispatchQueue.global(qos: .default)
  22 +
20 23 var isHaveDuanJU = false//是否有在追短剧
  24 + var isHaveReBang = false//是否有实时热榜
21 25 var totolNum = 0//一共显示多少行cell
22 26  
23 27 var selectedCell: CNDownSlideSingleCourseCell?
... ... @@ -51,7 +55,7 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
51 55 super.viewWillAppear(animated)
52 56 self.tabBarController?.tabBar.isHidden = false
53 57 self.updateStatusBarAndTabbarFrame(visible: true)
54   - self.getMyAlbumCollection(page: 1)
  58 +// self.getMyAlbumCollection(page: 1)
55 59 }
56 60 override func viewDidLoad() {
57 61 super.viewDidLoad()
... ... @@ -90,43 +94,26 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
90 94  
91 95 // MARK: - UITableViewDelegate
92 96 func numberOfSections(in tableView: UITableView) -> Int {
93   - if self.isHaveDuanJU{
94   - return 2
95   - }else{
96   - return 1
97   - }
  97 + return 1
  98 +// if self.isHaveDuanJU{
  99 +// return 2
  100 +// }else{
  101 +// return 1
  102 +// }
98 103 }
99 104 func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
100   - if self.isHaveDuanJU && section == 0{
101   - return 1
102   - }else{
103   - return self.dataArray.count
104   - }
  105 + return self.dataArray.count
  106 +// if self.isHaveDuanJU && section == 0{
  107 +// return 1
  108 +// }else{
  109 +// return self.dataArray.count
  110 +// }
105 111 }
106 112  
107 113 func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
108   - if self.isHaveDuanJU && indexPath.section == 0{
109   - guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveHomePageDuanJuCellIdentifier) as? CNLiveHomePageDuanJuCell
110   - else {
111   - return CNLiveHomePageDuanJuCell()
112   - }
113   -
114   - cell.setModelArr(modelArr: self.duanjuDataArray)
115   - cell.DuanJUCellSelectedCallBack = {
116   - duanJuCell in
117   - self.selectedDuanjuCell = duanJuCell
118   -
119   - let detailVC = CNHomePageBaseNavigationController(rootViewController:CNHomepageDuanJuDetailViewController(cell: duanJuCell))
120   -
121   - detailVC.dismissClosure = { [weak self] in
122   - guard let StrongSelf = self else { return }
123   - StrongSelf.updateStatusBarAndTabbarFrame(visible: true)
124   - }
125   - self.updateStatusBarAndTabbarFrame(visible: false)
126   - self.present(detailVC, animated: true, completion: nil)
127   - }
128   - return cell
129   - }else{
  114 +
  115 + if let slideModel = self.dataArray[indexPath.row] as? CNLiveDownSlideModel{
  116 + //除了短剧的model
130 117 let slideModel = self.dataArray[indexPath.row] as! CNLiveDownSlideModel
131 118  
132 119 //type=4一排两个 推荐课程&推荐活动; 74今日推荐; 12列表全部课程; 75单课程大图
... ... @@ -180,51 +167,138 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
180 167 }else{
181 168 return UITableViewCell()
182 169 }
  170 + }else{
  171 + //短剧model
  172 + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveHomePageDuanJuCellIdentifier) as? CNLiveHomePageDuanJuCell
  173 + else {
  174 + return CNLiveHomePageDuanJuCell()
  175 + }
  176 +
  177 + cell.setModelArr(modelArr: self.duanjuDataArray)
  178 + cell.DuanJUCellSelectedCallBack = {
  179 + duanJuCell in
  180 + self.selectedDuanjuCell = duanJuCell
  181 +
  182 + let detailVC = CNHomePageBaseNavigationController(rootViewController:CNHomepageDuanJuDetailViewController(cell: duanJuCell))
  183 +
  184 + detailVC.dismissClosure = { [weak self] in
  185 + guard let StrongSelf = self else { return }
  186 + StrongSelf.updateStatusBarAndTabbarFrame(visible: true)
  187 + }
  188 + self.updateStatusBarAndTabbarFrame(visible: false)
  189 + self.present(detailVC, animated: true, completion: nil)
  190 + }
  191 + return cell
183 192 }
  193 +
  194 +
  195 +// if self.isHaveDuanJU && indexPath.section == 0{
  196 +// guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveHomePageDuanJuCellIdentifier) as? CNLiveHomePageDuanJuCell
  197 +// else {
  198 +// return CNLiveHomePageDuanJuCell()
  199 +// }
  200 +//
  201 +// cell.setModelArr(modelArr: self.duanjuDataArray)
  202 +// cell.DuanJUCellSelectedCallBack = {
  203 +// duanJuCell in
  204 +// self.selectedDuanjuCell = duanJuCell
  205 +//
  206 +// let detailVC = CNHomePageBaseNavigationController(rootViewController:CNHomepageDuanJuDetailViewController(cell: duanJuCell))
  207 +//
  208 +// detailVC.dismissClosure = { [weak self] in
  209 +// guard let StrongSelf = self else { return }
  210 +// StrongSelf.updateStatusBarAndTabbarFrame(visible: true)
  211 +// }
  212 +// self.updateStatusBarAndTabbarFrame(visible: false)
  213 +// self.present(detailVC, animated: true, completion: nil)
  214 +// }
  215 +// return cell
  216 +// }else{
  217 +// let slideModel = self.dataArray[indexPath.row] as! CNLiveDownSlideModel
  218 +//
  219 +// //type=4一排两个 推荐课程&推荐活动; 74今日推荐; 12列表全部课程; 75单课程大图
  220 +// if slideModel.type == SlideModelTypeRecommend4{
  221 +// guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideRecommendCellIdentifier) as? CNLiveDownSlideRecommendCell
  222 +// else {
  223 +// return CNLiveDownSlideRecommendCell()
  224 +// }
  225 +// cell.slideModel = slideModel
  226 +// return cell
  227 +// }else if slideModel.type == SlideModelTypeTodayRecommend74{
  228 +// guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideTodayRecommendCellIdentifier) as? CNLiveDownSlideTodayRecommendCell
  229 +// else {
  230 +// let cell = CNLiveDownSlideTodayRecommendCell()
  231 +// return cell
  232 +// }
  233 +// cell.slideModel = slideModel
  234 +// return cell
  235 +// }else if slideModel.type == SlideModelTypeAllCourse12{
  236 +// guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideAllCourseCellIdentifier) as? CNDownSlideSingleCourseCell
  237 +// else {
  238 +// let cell = CNDownSlideSingleCourseCell()
  239 +// return cell
  240 +// }
  241 +// cell.slideModel = slideModel
  242 +// return cell
  243 +// }else if slideModel.type == SlideModelTypeOneCourse75{
  244 +// guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideSingleCourseCellIdentifier) as? CNDownSlideSingleCourseCell
  245 +// else {
  246 +// let cell = CNDownSlideSingleCourseCell()
  247 +// return cell
  248 +// }
  249 +// cell.slideModel = slideModel
  250 +// return cell
  251 +// }else if slideModel.type == SlideModelTypeTwoDuanJu5{
  252 +// guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideTwoDuanJuCellIdentifier) as? CNDownSlideSingleCourseCell
  253 +// else {
  254 +// let cell = CNDownSlideSingleCourseCell()
  255 +// return cell
  256 +// }
  257 +// cell.slideModel = slideModel
  258 +// return cell
  259 +// }else if slideModel.type == SlideModelTypeRealHotList7{
  260 +// guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideRealHotListCellIdentifier) as? CNDownSlideSingleCourseCell
  261 +// else {
  262 +// let cell = CNDownSlideSingleCourseCell()
  263 +// return cell
  264 +// }
  265 +// cell.slideModel = slideModel
  266 +// return cell
  267 +// }else{
  268 +// return UITableViewCell()
  269 +// }
  270 +// }
184 271 }
185 272  
186 273  
187 274 func tableView(_ tableView: UITableView, didHighlightRowAt indexPath: IndexPath) {
188   - if self.isHaveDuanJU && indexPath.section == 0{
189   -
190   - }else{
  275 +// if self.isHaveDuanJU && indexPath.section == 0{
  276 +//
  277 +// }else{
191 278  
192 279 guard let row = tableView.cellForRow(at: indexPath) as? CNDownSlideSingleCourseCell else { return }
193 280 UIView.animate(withDuration: 0.1) {
194 281 row.bgBackView.transform = CGAffineTransform(scaleX: 0.95, y: 0.95)
195 282 }
196   - }
  283 +// }
197 284 }
198 285  
199 286 func tableView(_ tableView: UITableView, didUnhighlightRowAt indexPath: IndexPath) {
200   - if self.isHaveDuanJU && indexPath.section == 0{
201   -
202   - }else{
  287 +// if self.isHaveDuanJU && indexPath.section == 0{
  288 +//
  289 +// }else{
203 290  
204 291 guard let row = tableView.cellForRow(at: indexPath) as? CNDownSlideSingleCourseCell else { return }
205 292 UIView.animate(withDuration: 0.3) {
206 293 row.bgBackView.transform = CGAffineTransform(scaleX: 1.0, y: 1.0)
207 294 }
208   - }
  295 +// }
209 296 }
210 297  
211 298 func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
212   - if self.isHaveDuanJU && indexPath.section == 0{
213   - //点击在追短剧
214   - guard let cell = tableView.cellForRow(at: indexPath) as? CNLiveHomePageDuanJuCell else { return }
215   - selectedDuanjuCell = cell
216   -
217   - let detailVC = CNHomePageBaseNavigationController(rootViewController:CNHomepageDuanJuDetailViewController(cell: selectedDuanjuCell!))
218   -
219   - detailVC.dismissClosure = { [weak self] in
220   - guard let StrongSelf = self else { return }
221   - StrongSelf.updateStatusBarAndTabbarFrame(visible: true)
222   - }
223   - updateStatusBarAndTabbarFrame(visible: false)
224   - present(detailVC, animated: true, completion: nil)
225   -
226   - }else{
227   -
  299 +
  300 + if let slideModel = self.dataArray[indexPath.row] as? CNLiveDownSlideModel{
  301 + //非短剧
228 302 let slideModel = self.dataArray[indexPath.row] as! CNLiveDownSlideModel
229 303 var cellType:CNLiveHomePageCellType = .course
230 304 ///model
... ... @@ -281,23 +355,118 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
281 355  
282 356 self.navigationController?.pushViewController(CNLiveTotalHotListController(slideModel: slideModel), animated: true)
283 357 }
284   -// else if slideModel.type == SlideModelTypeOneCourse75{
  358 + }else{
  359 + //短剧
  360 + //点击在追短剧
  361 + guard let cell = tableView.cellForRow(at: indexPath) as? CNLiveHomePageDuanJuCell else { return }
  362 + selectedDuanjuCell = cell
  363 +
  364 + let detailVC = CNHomePageBaseNavigationController(rootViewController:CNHomepageDuanJuDetailViewController(cell: selectedDuanjuCell!))
  365 +
  366 + detailVC.dismissClosure = { [weak self] in
  367 + guard let StrongSelf = self else { return }
  368 + StrongSelf.updateStatusBarAndTabbarFrame(visible: true)
  369 + }
  370 + updateStatusBarAndTabbarFrame(visible: false)
  371 + present(detailVC, animated: true, completion: nil)
  372 + }
  373 +
  374 +
  375 +// if self.isHaveDuanJU && indexPath.section == 0{
  376 +// //点击在追短剧
  377 +// guard let cell = tableView.cellForRow(at: indexPath) as? CNLiveHomePageDuanJuCell else { return }
  378 +// selectedDuanjuCell = cell
  379 +//
  380 +// let detailVC = CNHomePageBaseNavigationController(rootViewController:CNHomepageDuanJuDetailViewController(cell: selectedDuanjuCell!))
  381 +//
  382 +// detailVC.dismissClosure = { [weak self] in
  383 +// guard let StrongSelf = self else { return }
  384 +// StrongSelf.updateStatusBarAndTabbarFrame(visible: true)
  385 +// }
  386 +// updateStatusBarAndTabbarFrame(visible: false)
  387 +// present(detailVC, animated: true, completion: nil)
  388 +//
  389 +// }else{
  390 +//
  391 +// let slideModel = self.dataArray[indexPath.row] as! CNLiveDownSlideModel
  392 +// var cellType:CNLiveHomePageCellType = .course
  393 +// ///model
  394 +// ///(1) 1,2时跳转:sharelUrl后面拼接 ?contentId=contentId&videoId=pid
  395 +// ///(2) 3,4时跳转:thirdUrl
  396 +// ///(3)“album”,“album_video”,“album_ugc” -> http://wjjh5.cnlive.com/cnYmAlbumVideoList.html?aid=contentId&title=titlle
  397 +// if slideModel.contents.first?.model ?? "0" == "1" || slideModel.contents.first?.model ?? "0" == "2" || slideModel.contents.first?.model ?? "0" == "3" || slideModel.contents.first?.model ?? "0" == "4"{
  398 +// cellType = .playletToCourse
  399 +// }else if slideModel.contents.first?.model ?? "0" == kCNDownSlideContentsModelModelAlbum_ugc{
  400 +// cellType = .playlet
  401 +// }else{
  402 +// //新类型
  403 +// }
  404 +//
  405 +// //type=4一排两个 推荐课程&推荐活动; 74今日推荐; 12列表全部课程; 75单课程大图
  406 +// if slideModel.type == SlideModelTypeRecommend4{
  407 +//
  408 +// }else if slideModel.type == SlideModelTypeTodayRecommend74{
  409 +//
  410 +// }else if slideModel.type == SlideModelTypeAllCourse12 || slideModel.type == SlideModelTypeOneCourse75{
285 411 // guard let cell = tableView.cellForRow(at: indexPath) as? CNDownSlideSingleCourseCell else { return }
286 412 // selectedCell = cell
287   -// let detailViewC = CNUpSlideDetailViewController(cell: cell,slideModel: slideModel, albumModel: nil, cellType: cellType)
288   -// let detailVC = CNSlideBaseNavigationController(rootViewController: detailViewC, cellType: cellType)
289   -//
  413 +// let detailVC = CNSlideBaseNavigationController(rootViewController: CNUpSlideDetailViewController(cell: cell,slideModel: slideModel, albumModel: nil, cellType: cellType), cellType: cellType)
290 414 // detailVC.dismissClosure = { [weak self] in
291 415 // guard let StrongSelf = self else { return }
292 416 // StrongSelf.updateStatusBarAndTabbarFrame(visible: true)
293 417 // }
294 418 // updateStatusBarAndTabbarFrame(visible: false)
295 419 // present(detailVC, animated: true, completion: nil)
296   - }
  420 +// }else if slideModel.type == SlideModelTypeTwoDuanJu5{
  421 +// //竖版短剧
  422 +// cellType = .playletList
  423 +// guard let cell = tableView.cellForRow(at: indexPath) as? CNDownSlideSingleCourseCell else { return }
  424 +// selectedCell = cell
  425 +// let detailVC = CNSlideBaseNavigationController(rootViewController: CNUpSlideDetailViewController(cell: cell,slideModel: slideModel, albumModel: nil, cellType: cellType), cellType: cellType)
  426 +// detailVC.dismissClosure = { [weak self] in
  427 +// guard let StrongSelf = self else { return }
  428 +// StrongSelf.updateStatusBarAndTabbarFrame(visible: true)
  429 +// }
  430 +// updateStatusBarAndTabbarFrame(visible: false)
  431 +// present(detailVC, animated: true, completion: nil)
  432 +// }else if slideModel.type == SlideModelTypeRealHotList7{
  433 +// //实时热榜
  434 +// //在当前堆栈里遍历删除 播放控制器CNLiveShortVideoViewController
  435 +// let tempArray = NSMutableArray.init()
  436 +// self.navigationController?.viewControllers.forEach({ item in
  437 +// if (item.isKind(of: CNLiveTotalHotListController.self)) {
  438 +// tempArray.remove(item)
  439 +// }else{
  440 +// tempArray.add(item)
  441 +// }
  442 +// })
  443 +// self.navigationController?.viewControllers = tempArray as! [CNLiveBaseViewController]
  444 +//
  445 +// self.navigationController?.pushViewController(CNLiveTotalHotListController(slideModel: slideModel), animated: true)
  446 +// }
  447 +//// else if slideModel.type == SlideModelTypeOneCourse75{
  448 +//// guard let cell = tableView.cellForRow(at: indexPath) as? CNDownSlideSingleCourseCell else { return }
  449 +//// selectedCell = cell
  450 +//// let detailViewC = CNUpSlideDetailViewController(cell: cell,slideModel: slideModel, albumModel: nil, cellType: cellType)
  451 +//// let detailVC = CNSlideBaseNavigationController(rootViewController: detailViewC, cellType: cellType)
  452 +////
  453 +//// detailVC.dismissClosure = { [weak self] in
  454 +//// guard let StrongSelf = self else { return }
  455 +//// StrongSelf.updateStatusBarAndTabbarFrame(visible: true)
  456 +//// }
  457 +//// updateStatusBarAndTabbarFrame(visible: false)
  458 +//// present(detailVC, animated: true, completion: nil)
  459 +// }
297 460 }
298 461  
299 462 func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
300   - if self.isHaveDuanJU && indexPath.section == 0{
  463 +
  464 + if let slideModel = self.dataArray[indexPath.row] as? CNLiveDownSlideModel{
  465 + //非短剧
  466 + let slideModel = self.dataArray[indexPath.row] as! CNLiveDownSlideModel
  467 + return CGFloat(slideModel.cellH)
  468 + }else{
  469 + //短剧
301 470 if self.duanjuDataArray.count > 4{
302 471 //标题55+4个cell*(45+15*2)+首尾15+12圆角
303 472 return CGFloat(4)*(45+15*2)+CGFloat(55)+15+15+12
... ... @@ -307,10 +476,22 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
307 476 return CGFloat(self.duanjuDataArray.count)*(45+15*2)+CGFloat(55)+15+15+12
308 477  
309 478 }
310   - }else{
311   - let slideModel = self.dataArray[indexPath.row] as! CNLiveDownSlideModel
312   - return CGFloat(slideModel.cellH)
313 479 }
  480 +
  481 +// if self.isHaveDuanJU && indexPath.section == 0{
  482 +// if self.duanjuDataArray.count > 4{
  483 +// //标题55+4个cell*(45+15*2)+首尾15+12圆角
  484 +// return CGFloat(4)*(45+15*2)+CGFloat(55)+15+15+12
  485 +//
  486 +// }else{
  487 +// //标题55+n个cell*(45+15*2)+首尾15+12圆角
  488 +// return CGFloat(self.duanjuDataArray.count)*(45+15*2)+CGFloat(55)+15+15+12
  489 +//
  490 +// }
  491 +// }else{
  492 +// let slideModel = self.dataArray[indexPath.row] as! CNLiveDownSlideModel
  493 +// return CGFloat(slideModel.cellH)
  494 +// }
314 495 }
315 496  
316 497 func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
... ... @@ -334,37 +515,57 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
334 515 for listModel in homePageListMdls {
335 516 if listModel.type == 3{
336 517 //在追短剧
  518 + self.group.enter()
337 519 self.getMyAlbumCollection(page: 1)
338 520 }else if listModel.type == 1{
339 521 //页面
  522 + self.group.enter()
340 523 self.getPageApi(pageID: listModel.content)
341 524 }
342 525 }
  526 + self.group.notify(queue: .main) {
  527 + // 所有网络请求都已完成,在这里执行你的任务
  528 + if self.isHaveReBang{
  529 + self.dataArray.insert(self.duanjuDataArray, at: 1)
  530 + }else{
  531 + self.dataArray.insert(self.duanjuDataArray, at: 0)
  532 + }
  533 + self.tableView.mj_header?.endRefreshing()
  534 + self.tableView.reloadData()
  535 + }
343 536 }else{
344 537 self.getHomePageConfigListApi()
345 538 }
346 539 }
347 540 }
348 541  
  542 + //MARK: - 我的专辑收藏--在追短剧
349 543 //我的专辑收藏--在追短剧
350 544 func getMyAlbumCollection(page:NSInteger){
351 545 CNLiveHomePageViewModel.requestGetHomePageMyAlbum(page: page){ result, status in
  546 +
352 547 if status == .success{
353 548 let arr = result as! Array<CNLiveAlbumMsgModel>
354 549 if arr.count>0{
355 550 //显示在追短剧cell
356 551 self.isHaveDuanJU = true
357 552  
  553 +// if self.isHaveReBang{
  554 +// self.dataArray.insert(arr, at: 1)
  555 +// }else{
  556 +// self.dataArray.insert(arr, at: 0)
  557 +// }
  558 +
358 559 self.duanjuDataArray = NSMutableArray(array: arr)
  560 +
359 561 }else{
360 562 //隐藏在追短剧cell
361 563 self.isHaveDuanJU = false
362 564 }
363   - self.tableView.mj_header?.endRefreshing()
364   - self.tableView.reloadData()
  565 + self.group.leave()
365 566  
366 567 }else{
367   -
  568 + self.group.leave()
368 569 }
369 570 }
370 571 }
... ... @@ -375,6 +576,7 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
375 576 // showLoading(message: "")
376 577 CNLiveDownSlideViewModel.requestGetPage(pageId: pageID as NSString) { result, status in
377 578 hiddenLoading()
  579 +
378 580 if status == .success{
379 581 self.dataArray.removeAllObjects()
380 582 let array = result as! [Any]
... ... @@ -384,19 +586,21 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
384 586  
385 587 let layout = CNLiveDownSlideModelLayout.init(model: model)
386 588 let cellModel = layout.getCellHModel()
387   - if cellModel.blockId == "11939"{
  589 + if cellModel.blockId == "11939"{//热播排行榜
388 590 newDataArray.insert(cellModel, at: 0)
  591 + self.isHaveReBang = true
389 592 }else{
390 593 newDataArray.addObjects(from: [cellModel])
391 594 }
392 595 }
393 596 }
394 597 self.dataArray.addObjects(from: newDataArray as! [Any])
395   - self.tableView.mj_header?.endRefreshing()
396   - self.tableView.reloadData()
  598 + self.group.leave()
397 599 }else if (status == .failed){
  600 + self.group.leave()
398 601 // self.NetApiStatus = .apiError
399 602 }else if (status == .noNetwork){
  603 + self.group.leave()
400 604  
401 605 // self.NetApiStatus = .notNetwork
402 606 }
... ...
metaCode/Classes/Main/MinePage/Controller/CNLiveMineViewController.swift
... ... @@ -39,18 +39,20 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate,
39 39 dataArray.add([""])
40 40 let array01 : [Dictionary] = [["name":"我的身份","icon":"mine_header_icon_identity"]]
41 41 dataArray.add(array01)
42   - let array02 : [Dictionary] = [["name":"官方认证","icon":"mine_list_icon_add_identity"]]
  42 + let array02 : [Dictionary] = [["name":"我的数字简历","icon":"mine_jianli"]]
43 43 dataArray.add(array02)
44   - let array03 : [Dictionary] = [["name":"帮助与反馈","icon":"mine_list_icon_help_feedback"],
45   - ["name":"更多设置","icon":"mine_list_icon_set_more"]]
  44 + let array03 : [Dictionary] = [["name":"官方认证","icon":"mine_renzheng"]]
46 45 dataArray.add(array03)
  46 + let array04 : [Dictionary] = [["name":"帮助与反馈","icon":"mine_list_icon_help_feedback"],
  47 + ["name":"更多设置","icon":"mine_list_icon_set_more"]]
  48 + dataArray.add(array04)
47 49  
48   - let array04 : [Dictionary] = [["name":"订单列表","icon":"mine_list_icon_help_feedback"],
  50 + let array05 : [Dictionary] = [["name":"订单列表","icon":"mine_list_icon_help_feedback"],
49 51 ["name":"交易记录","icon":"mine_list_icon_help_feedback"],
50 52 ["name":"新增优惠券","icon":"mine_list_icon_help_feedback"],
51 53 ["name":"优惠券管理","icon":"mine_list_icon_help_feedback"],
52 54 ["name":"抖音短视频","icon":"mine_list_icon_help_feedback"]]
53   -// dataArray.add(array04)
  55 +// dataArray.add(array05)
54 56  
55 57 return dataArray
56 58 }()
... ... @@ -134,7 +136,7 @@ extension CNLiveMineViewController {
134 136 }
135 137  
136 138 func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
137   - if indexPath.section == 0 {
  139 + if indexPath.section == 0 {//我的身份
138 140 let cell = tableView.dequeueReusableCell(withIdentifier: kMineBodyThreeViewCellIdentifier) as! MineBodyThreeViewCell
139 141 cell.checkModel = self.checkModel
140 142 return cell
... ... @@ -167,22 +169,28 @@ extension CNLiveMineViewController {
167 169 self.navigationController?.pushViewController(CNLiveMineQuestViewController.init(checkModel: checkModel), animated: true)
168 170 }
169 171 if indexPath.section == 1 {
170   - //跳转 身份大库
  172 + //我的身份跳转 身份大库
171 173 navigationViewController().pushViewController(CNLiveIdentityRepositoryController(), animated: true)
172 174 // self.navigationController?.pushViewController(CNLiveMineAddInfoViewController.init(show_type: .info), animated: true)
173 175 }
174 176 if indexPath.section == 2 {
  177 + //我的数字简历
  178 +
  179 + }
  180 + if indexPath.section == 3 {
  181 + //官方认证
175 182 navigationViewController().pushViewController(CNLiveDigitalAssetsController(), animated: true)
176   -// self.navigationController?.pushViewController(CNLiveMineAddInfoViewController.init(show_type: .add), animated: true)
177 183 }
178   - if indexPath.section == 3 && indexPath.row == 0 {
  184 +
  185 + if indexPath.section == 4 && indexPath.row == 0 {
  186 +
179 187 self.navigationController?.pushViewController(CNLiveHelpFeedBackViewController.init(), animated: true)
180 188 }
181   - if indexPath.section == 3 && indexPath.row == 1 {
  189 + if indexPath.section == 4 && indexPath.row == 1 {
182 190 self.navigationController?.pushViewController(CNLiveTypeFeedBackViewController.init(show_type: .setting), animated: true)
183 191 }
184 192  
185   - if indexPath.section == 4 {
  193 + if indexPath.section == 5 {
186 194 if indexPath.row == 0 {
187 195 // self.navigationController?.pushViewController(CNLiveShopOrderViewController.init(), animated: true)
188 196 // StandSortManager.removeStandSort()
... ...
metaCode/Classes/Main/MinePage/View/CNLiveMineBodyListView.swift
... ... @@ -38,7 +38,7 @@ class MineBodyOneListViewCell : UITableViewCell {
38 38  
39 39 lazy var lookBtn: UIButton = {
40 40 let lookBtn = UIButton.init(type: .custom)
41   - lookBtn.setTitle(" 去看 ", for: .normal)
  41 + lookBtn.setTitle(" 去看 ", for: .normal)
42 42 lookBtn.setTitleColor(.white, for: .normal)
43 43 lookBtn.titleLabel?.font = BoldFont_14
44 44 lookBtn.layer.masksToBounds = true
... ...
metaCode/Classes/Main/MinePage/View/CNLiveMineInfoAlertView.swift
... ... @@ -556,7 +556,7 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour
556 556 lazy var grayMaskView: UIView = {
557 557 let grayMaskView = UIView()
558 558 tapGesture.addTarget(self, action: #selector(setupCloseButtonAction))
559   - grayMaskView.backgroundColor = UIColor.black.withAlphaComponent(0.2)
  559 + grayMaskView.backgroundColor = UIColor.black.withAlphaComponent(0.6)
560 560 grayMaskView.addGestureRecognizer(tapGesture)
561 561 return grayMaskView
562 562 }()
... ...
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_jianli.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "mine_jianli@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "mine_jianli@3x.png",
  14 + "idiom" : "universal",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "author" : "xcode",
  20 + "version" : 1
  21 + }
  22 +}
... ...
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_jianli.imageset/mine_jianli@2x.png 0 → 100644

1.82 KB

metaCode/Supporting Files/Assets.xcassets/MinePage/mine_jianli.imageset/mine_jianli@3x.png 0 → 100644

3.28 KB

metaCode/Supporting Files/Assets.xcassets/MinePage/mine_jianli_tishi.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "mine_jianli_tishi@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "mine_jianli_tishi@3x.png",
  14 + "idiom" : "universal",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "author" : "xcode",
  20 + "version" : 1
  21 + }
  22 +}
... ...
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_jianli_tishi.imageset/mine_jianli_tishi@2x.png 0 → 100644

219 KB

metaCode/Supporting Files/Assets.xcassets/MinePage/mine_jianli_tishi.imageset/mine_jianli_tishi@3x.png 0 → 100644

567 KB

metaCode/Supporting Files/Assets.xcassets/MinePage/mine_renzheng.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "mine_renzheng@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "mine_renzheng@3x.png",
  14 + "idiom" : "universal",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "author" : "xcode",
  20 + "version" : 1
  21 + }
  22 +}
... ...
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_renzheng.imageset/mine_renzheng@2x.png 0 → 100644

1.49 KB

metaCode/Supporting Files/Assets.xcassets/MinePage/mine_renzheng.imageset/mine_renzheng@3x.png 0 → 100644

2.74 KB