Commit 833c632fb94fe485cde70c8b6ce7afc4748349b3
1 parent
c4cbe6dd
优化功能
- 优化短剧首页和短剧详情页列表大图一致 - 优化短剧详情页大图为不能点击且和首页一致 - 优化短剧+课程大图的首页和详情页隐藏标题和副标题 修复功能 - 修复短剧播放页列表付费时积分不足没有跳转的问题 - 修复短剧列表只显示10条的问题 - 修复在追短剧不显示副标题的问题 - 修复今日推荐等类型不支持跳转短剧的问题
Showing
8 changed files
with
30 additions
and
19 deletions
metaCode/Classes/Common/Util/CNLiveIntegralAlertTool.swift
| ... | ... | @@ -334,12 +334,11 @@ class CNLiveIntegralAlertTool:NSObject{ |
| 334 | 334 | @objc func payBtnAction(){ |
| 335 | 335 | if self.currentIntegralPayStatus == .integralEnough{ |
| 336 | 336 | self.postOrderVideoByPoint() |
| 337 | -// self.integralStatusChangedBlock!(self.currentIntegralPayStatus) | |
| 338 | 337 | }else if self.currentIntegralPayStatus == .integralNotEnough{ |
| 339 | 338 | self.hiddenIntegralAlert() |
| 340 | -// self.integralStatusChangedBlock!(self.currentIntegralPayStatus) | |
| 339 | + self.integralStatusChangedBlock!(.payCancel) | |
| 341 | 340 | //跳转任务中心 |
| 342 | - navigationViewController().pushViewController(CNLiveMineQuestViewController(checkModel: self.checkInModel!), animated: pushAnimated) | |
| 341 | + navigationViewController().visibleViewController?.navigationController?.pushViewController(CNLiveMineQuestViewController(checkModel: self.checkInModel!), animated: pushAnimated) | |
| 343 | 342 | |
| 344 | 343 | }else if self.currentIntegralPayStatus == .paying{ |
| 345 | 344 | |
| ... | ... | @@ -370,14 +369,12 @@ class CNLiveIntegralAlertTool:NSObject{ |
| 370 | 369 | if self.point > Int(self.integralCount)!{ |
| 371 | 370 | //可以支付积分 |
| 372 | 371 | self.currentIntegralPayStatus = .integralEnough |
| 373 | -// self.integralStatusChangedBlock!(.integralEnough) | |
| 374 | - | |
| 375 | 372 | }else{ |
| 376 | 373 | //积分不足 |
| 377 | 374 | self.currentIntegralPayStatus = .integralNotEnough |
| 378 | -// self.integralStatusChangedBlock!(.integralEnough) | |
| 379 | 375 | } |
| 380 | 376 | self.initUI() |
| 377 | + self.integralStatusChangedBlock!(.payCancel) | |
| 381 | 378 | let errMsg = result as! String |
| 382 | 379 | showMessage(message: errMsg) |
| 383 | 380 | } | ... | ... |
metaCode/Classes/Main/HomePage/Controller/DownSlideController/CNUpSlideDetailViewController.swift
| ... | ... | @@ -286,16 +286,17 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou |
| 286 | 286 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
| 287 | 287 | let albumModel = self.dataArray[indexPath.row] as! CNLiveAlbumModel |
| 288 | 288 | if indexPath.section == 0{ |
| 289 | + //大图统一不能点击跳转 | |
| 289 | 290 | if self.cellType == .playlet{ |
| 290 | 291 | //短剧大图,跳转播放页 |
| 291 | - navigationViewController().visibleViewController?.navigationController?.pushViewController(CNLiveShortVideoViewController(aid: albumModel.contentId), animated: pushAnimated) | |
| 292 | +// navigationViewController().visibleViewController?.navigationController?.pushViewController(CNLiveShortVideoViewController(aid: albumModel.contentId), animated: pushAnimated) | |
| 292 | 293 | }else if self.cellType == .course || self.cellType == .playletToCourse{ |
| 293 | 294 | if self.slideModel?.type == SlideModelTypeAllCourse12{ |
| 294 | 295 | //全部课程,跳转h5 |
| 295 | 296 | |
| 296 | 297 | }else if self.slideModel?.type == SlideModelTypeOneCourse75{ |
| 297 | 298 | //大图课程,跳转h5 |
| 298 | - CNLiveDownSlideTool.pushWebVCWithCNLiveAlbumMdl(albumModel: albumModel,controller: self) | |
| 299 | +// CNLiveDownSlideTool.pushWebVCWithCNLiveAlbumMdl(albumModel: albumModel,controller: self) | |
| 299 | 300 | } |
| 300 | 301 | } |
| 301 | 302 | }else{ | ... | ... |
metaCode/Classes/Main/HomePage/Controller/WebController/CNWebView.swift
| ... | ... | @@ -123,7 +123,6 @@ class CNWebView:UIView,WKNavigationDelegate{ |
| 123 | 123 | let dateStr = formatter.string(from: date) |
| 124 | 124 | let sidStr = String(format: "%@%@", UserInfoManager.shared.userInfo.uid,dateStr) |
| 125 | 125 | let signStr = sidStr.crypt(operation: CCOperation(kCCEncrypt), key: CNLiveMCEnvironmentManager.shared.appKey) |
| 126 | - //看是 appKey还是appKeywjj | |
| 127 | 126 | let sidSignStr = (signStr ?? "").isEmpty ? "" : signStr |
| 128 | 127 | let sourceArray = str.components(separatedBy: "?") |
| 129 | 128 | let buildVersion = Bundle.main.infoDictionary!["CFBundleVersion"] as! String | ... | ... |
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideSingleCourseCell.swift
| ... | ... | @@ -190,19 +190,23 @@ class CNDownSlideSingleCourseCell: UITableViewCell { |
| 190 | 190 | bgImageView.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius |
| 191 | 191 | bgImageView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] |
| 192 | 192 | bgImageView.layer.masksToBounds = true |
| 193 | - bgImageView.kf.setImage(with: URL(string: model.contents[0].poster ?? "")) | |
| 194 | - | |
| 193 | + if let bgImgStr = model.background{ | |
| 194 | + bgImageView.kf.setImage(with: URL(string: bgImgStr)) | |
| 195 | + }else{ | |
| 196 | + bgImageView.kf.setImage(with: URL(string: model.contents[0].poster ?? "")) | |
| 197 | + } | |
| 198 | + | |
| 195 | 199 | let titleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: DownSlideRecommendLeftGap, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) |
| 196 | 200 | titleLbl.text = model.contents[0].title ?? "" |
| 197 | 201 | titleLbl.font = BoldFont_21 |
| 198 | 202 | titleLbl.textColor = HexColor("#FFFFFF") |
| 199 | - bgImageView.addSubview(titleLbl) | |
| 203 | +// bgImageView.addSubview(titleLbl) | |
| 200 | 204 | |
| 201 | 205 | let subTitleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y:titleLbl.bottom , width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) |
| 202 | 206 | subTitleLbl.text = model.contents[0].subTitle ?? "" |
| 203 | 207 | subTitleLbl.font = Font_12 |
| 204 | 208 | subTitleLbl.textColor = HexColor("#FFFFFF") |
| 205 | - bgImageView.addSubview(subTitleLbl) | |
| 209 | +// bgImageView.addSubview(subTitleLbl) | |
| 206 | 210 | |
| 207 | 211 | //单节底部视图 |
| 208 | 212 | let singleCourseBottomView = UIView(frame: CGRect(x: 0, y: DownSlideSingleCourseImgH, width: DownSlideSingleCourseW, height: DownSlideSingleCourseMoreH)) | ... | ... |
metaCode/Classes/Main/HomePages/View/HomepageDetail/CNLiveAlbumCell.swift
| ... | ... | @@ -123,7 +123,7 @@ class CNLiveAlbumCell:UITableViewCell{ |
| 123 | 123 | |
| 124 | 124 | //在追短剧model |
| 125 | 125 | self.titleLabl.text = model.albumName |
| 126 | - self.subTitleLabel.text = model.subTitle | |
| 126 | + self.subTitleLabel.text = model.desc | |
| 127 | 127 | self.iconImgView.kf.setImage(with: URL(string: model.albumImg)) |
| 128 | 128 | self.titleLabl.width = KSreenWidth-(self.iconImgView.right+15)-80-30 |
| 129 | 129 | self.subTitleLabel.width = self.titleLabl.width | ... | ... |
metaCode/Classes/Main/HomePages/View/HomepageDetail/CNLiveAlbumImageCell.swift
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | // metaCode |
| 4 | 4 | // |
| 5 | 5 | // Created by zx on 2024/1/8. |
| 6 | -// | |
| 6 | +// 短剧详情页大图cell | |
| 7 | 7 | |
| 8 | 8 | import Foundation |
| 9 | 9 | |
| ... | ... | @@ -36,7 +36,7 @@ class CNLiveAlbumImageCell:UITableViewCell{ |
| 36 | 36 | private func setupUI() { |
| 37 | 37 | contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) |
| 38 | 38 | self.contentView.addSubview(self.iconImgView) |
| 39 | - self.contentView.addSubview(self.titleLabel) | |
| 39 | +// self.contentView.addSubview(self.titleLabel) | |
| 40 | 40 | self.contentView.clipsToBounds = true |
| 41 | 41 | } |
| 42 | 42 | ... | ... |
metaCode/Classes/Main/Model/CNLiveDownSlideModel.swift
| ... | ... | @@ -15,8 +15,10 @@ class CNLiveDownSlideModel: BaseModel { |
| 15 | 15 | var blockName: String? |
| 16 | 16 | ///大块副标题 |
| 17 | 17 | var blockSubTitle: String? |
| 18 | - ///类型 type=4一排两个 74今日推荐 12列表全部课程 75单课程大图/ | |
| 18 | + ///类型 type=4一排两个 74今日推荐 12列表全部课程 75单课程大图 | |
| 19 | 19 | var type: String? |
| 20 | + ///区块封面图 | |
| 21 | + var background: String? | |
| 20 | 22 | ///显示几行 |
| 21 | 23 | var rowNum: Int = 0 |
| 22 | 24 | ///具体内容 title subTitle poster thirdUrl或者shareUrl | ... | ... |
metaCode/Classes/Main/Util/CNLiveDownSlideTool.swift
| ... | ... | @@ -24,7 +24,7 @@ class CNLiveDownSlideTool:NSObject{ |
| 24 | 24 | let webVC = CNWebViewController() |
| 25 | 25 | webVC.url = URL(string: (contentMdl.thirdUrl)!) |
| 26 | 26 | navigationViewController().visibleViewController?.navigationController?.pushViewController(webVC, animated: pushAnimated) |
| 27 | - }else if (contentMdl.model == kCNDownSlideContentsModelModelAlbum) || (contentMdl.model == kCNDownSlideContentsModelModelAlbum_ugc) || (contentMdl.model == kCNDownSlideContentsModelModelAlbum_video){ | |
| 27 | + }else if (contentMdl.model == kCNDownSlideContentsModelModelAlbum) || (contentMdl.model == kCNDownSlideContentsModelModelAlbum_video){ | |
| 28 | 28 | |
| 29 | 29 | let urlString = "http://wjjh5.cnlive.com/cnYmAlbumVideoList.html" |
| 30 | 30 | let queryItem = URLQueryItem(name: "aid", value: contentMdl.contentId) |
| ... | ... | @@ -35,6 +35,10 @@ class CNLiveDownSlideTool:NSObject{ |
| 35 | 35 | let webVC = CNWebViewController() |
| 36 | 36 | webVC.url = regURL |
| 37 | 37 | navigationViewController().visibleViewController?.navigationController?.pushViewController(webVC, animated: pushAnimated) |
| 38 | + }else if (contentMdl.model == kCNDownSlideContentsModelModelAlbum_ugc){ | |
| 39 | + | |
| 40 | + //短剧-跳转短剧播放页 | |
| 41 | + navigationViewController().visibleViewController?.navigationController?.pushViewController(CNLiveShortVideoViewController(aid: contentMdl.contentId ?? ""), animated: pushAnimated) | |
| 38 | 42 | }else{ |
| 39 | 43 | return |
| 40 | 44 | } |
| ... | ... | @@ -55,7 +59,7 @@ class CNLiveDownSlideTool:NSObject{ |
| 55 | 59 | let webVC = CNWebViewController() |
| 56 | 60 | webVC.url = URL(string: (albumModel.thirdUrl)) |
| 57 | 61 | controller.navigationController?.pushViewController(webVC, animated: pushAnimated) |
| 58 | - }else if (albumModel.model == kCNDownSlideContentsModelModelAlbum) || (albumModel.model == kCNDownSlideContentsModelModelAlbum_ugc) || (albumModel.model == kCNDownSlideContentsModelModelAlbum_video){ | |
| 62 | + }else if (albumModel.model == kCNDownSlideContentsModelModelAlbum) || (albumModel.model == kCNDownSlideContentsModelModelAlbum_video){ | |
| 59 | 63 | |
| 60 | 64 | let urlString = "http://wjjh5.cnlive.com/cnYmAlbumVideoList.html" |
| 61 | 65 | let queryItem = URLQueryItem(name: "aid", value: albumModel.contentId) |
| ... | ... | @@ -66,6 +70,10 @@ class CNLiveDownSlideTool:NSObject{ |
| 66 | 70 | let webVC = CNWebViewController() |
| 67 | 71 | webVC.url = regURL |
| 68 | 72 | navigationViewController().visibleViewController?.navigationController?.pushViewController(webVC, animated: pushAnimated) |
| 73 | + }else if (albumModel.model == kCNDownSlideContentsModelModelAlbum_ugc){ | |
| 74 | + //短剧-跳转短剧播放页 | |
| 75 | + navigationViewController().visibleViewController?.navigationController?.pushViewController(CNLiveShortVideoViewController(aid: albumModel.contentId), animated: pushAnimated) | |
| 76 | + | |
| 69 | 77 | }else{ |
| 70 | 78 | return |
| 71 | 79 | } | ... | ... |