Commit 2bf60226f82560e48ac5d708726b38a6a818a7a7
1 parent
9b4258e2
1.1.7.25.04.25.19 ,
元码v1.1.7 新增功能 - 新增新增首页Banner分享电视剧 - 新增首页好看送好礼入口分享电视剧 - 新增我的广告条分享电视剧 优化功能 - 优化市场预览图 - 优化点播页评论显示评论数 修复功能 - 修复非点播页提前录屏或横屏后录屏导致可以录屏的问题 - 修复快速点击视频内容导致白屏或闪退的问题 - 修复专辑上次播放集数不存在导致的无法跳转点播页的问题 - 修复系统深色模式时点播页展开详情变黑的问题
Showing
18 changed files
with
432 additions
and
132 deletions
metaCode.xcodeproj/project.pbxproj
| ... | ... | @@ -11,6 +11,7 @@ |
| 11 | 11 | 19023DB72D80339800872398 /* CNLiveHomeLanmuThreeImgCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19023DB62D80339800872398 /* CNLiveHomeLanmuThreeImgCell.swift */; }; |
| 12 | 12 | 19023DBB2D8270DA00872398 /* CNLiveHomeShopCategoryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19023DBA2D8270DA00872398 /* CNLiveHomeShopCategoryCell.swift */; }; |
| 13 | 13 | 19023DBD2D8282DE00872398 /* CNLiveHomeShopCategoryModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19023DBC2D8282DE00872398 /* CNLiveHomeShopCategoryModel.swift */; }; |
| 14 | + 19088A182DBBA6D800E53176 /* CNLiveMineGiftCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19088A172DBBA6D700E53176 /* CNLiveMineGiftCell.swift */; }; | |
| 14 | 15 | 1909DC962C6309EC001E7986 /* CNLiveDigitalResumePreViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1909DC952C6309EC001E7986 /* CNLiveDigitalResumePreViewController.swift */; }; |
| 15 | 16 | 1909DC982C6342C4001E7986 /* CNLiveDigitalThreeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1909DC972C6342C3001E7986 /* CNLiveDigitalThreeCell.swift */; }; |
| 16 | 17 | 1909DC9B2C634D6F001E7986 /* CNLiveDigitalThreeCerCollectCell .swift in Sources */ = {isa = PBXBuildFile; fileRef = 1909DC9A2C634D6F001E7986 /* CNLiveDigitalThreeCerCollectCell .swift */; }; |
| ... | ... | @@ -418,6 +419,7 @@ |
| 418 | 419 | 19023DB62D80339800872398 /* CNLiveHomeLanmuThreeImgCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveHomeLanmuThreeImgCell.swift; sourceTree = "<group>"; }; |
| 419 | 420 | 19023DBA2D8270DA00872398 /* CNLiveHomeShopCategoryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveHomeShopCategoryCell.swift; sourceTree = "<group>"; }; |
| 420 | 421 | 19023DBC2D8282DE00872398 /* CNLiveHomeShopCategoryModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveHomeShopCategoryModel.swift; sourceTree = "<group>"; }; |
| 422 | + 19088A172DBBA6D700E53176 /* CNLiveMineGiftCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineGiftCell.swift; sourceTree = "<group>"; }; | |
| 421 | 423 | 1909DC952C6309EC001E7986 /* CNLiveDigitalResumePreViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDigitalResumePreViewController.swift; sourceTree = "<group>"; }; |
| 422 | 424 | 1909DC972C6342C3001E7986 /* CNLiveDigitalThreeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDigitalThreeCell.swift; sourceTree = "<group>"; }; |
| 423 | 425 | 1909DC9A2C634D6F001E7986 /* CNLiveDigitalThreeCerCollectCell .swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CNLiveDigitalThreeCerCollectCell .swift"; sourceTree = "<group>"; }; |
| ... | ... | @@ -1966,6 +1968,7 @@ |
| 1966 | 1968 | 1958B4172D8572A200F37E35 /* CNLiveMinePlayHistoryCell.swift */, |
| 1967 | 1969 | 1958B41B2D87BD3E00F37E35 /* CNLiveMinePlayHistoryCollectionCell.swift */, |
| 1968 | 1970 | 1958B4192D8572C100F37E35 /* CNLiveMineMineOrderCell.swift */, |
| 1971 | + 19088A172DBBA6D700E53176 /* CNLiveMineGiftCell.swift */, | |
| 1969 | 1972 | ); |
| 1970 | 1973 | path = View; |
| 1971 | 1974 | sourceTree = "<group>"; |
| ... | ... | @@ -2601,6 +2604,7 @@ |
| 2601 | 2604 | 792E57DB2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift in Sources */, |
| 2602 | 2605 | 191732F12B084822007BCC04 /* CNLiveShopClassifyInputTableViewCell.swift in Sources */, |
| 2603 | 2606 | 191733212B143F3A007BCC04 /* CNLiveGradientView.swift in Sources */, |
| 2607 | + 19088A182DBBA6D800E53176 /* CNLiveMineGiftCell.swift in Sources */, | |
| 2604 | 2608 | 19AD65AE2BA177C20045A444 /* CNLiveShopGoodsDetailsTableHeaderView.swift in Sources */, |
| 2605 | 2609 | 192ED46B2C4F77450057244C /* CNLiveHangYeSecCell.swift in Sources */, |
| 2606 | 2610 | 1958B41C2D87BD3E00F37E35 /* CNLiveMinePlayHistoryCollectionCell.swift in Sources */, |
| ... | ... | @@ -2956,7 +2960,7 @@ |
| 2956 | 2960 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; |
| 2957 | 2961 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 2958 | 2962 | CODE_SIGN_STYLE = Automatic; |
| 2959 | - CURRENT_PROJECT_VERSION = 1.1.7.25.04.25.16; | |
| 2963 | + CURRENT_PROJECT_VERSION = 1.1.7.25.04.25.19; | |
| 2960 | 2964 | DEBUG_INFORMATION_FORMAT = dwarf; |
| 2961 | 2965 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 2962 | 2966 | ENABLE_BITCODE = NO; |
| ... | ... | @@ -3212,7 +3216,7 @@ |
| 3212 | 3216 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; |
| 3213 | 3217 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 3214 | 3218 | CODE_SIGN_STYLE = Automatic; |
| 3215 | - CURRENT_PROJECT_VERSION = 1.1.7.25.04.25.16; | |
| 3219 | + CURRENT_PROJECT_VERSION = 1.1.7.25.04.25.19; | |
| 3216 | 3220 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 3217 | 3221 | ENABLE_BITCODE = NO; |
| 3218 | 3222 | ENABLE_MODULE_VERIFIER = NO; | ... | ... |
metaCode/Classes/Main/HomePage/Controller/DownSlideController/CNUpSlideViewController.swift
| ... | ... | @@ -32,6 +32,8 @@ let SlideModelTypeShop29: String = "29"//29 官方周边 |
| 32 | 32 | let SlideModelTypeShopCategory78: String = "78"//78电商分类 |
| 33 | 33 | |
| 34 | 34 | //let SlideModelTypeThreeDuanJu5: String = "5"//忽必烈版5一排三个 旧版5竖版短剧 一排两个 |
| 35 | +let SlideModelTypeApp_ext_info: String = "app_ext_info"//gift | |
| 36 | + | |
| 35 | 37 | |
| 36 | 38 | |
| 37 | 39 | ... | ... |
metaCode/Classes/Main/HomePages/Model/CNLiveHomePageModel.swift
| ... | ... | @@ -42,6 +42,21 @@ class CNLiveHomePageHuBiLieModel:BaseModel{ |
| 42 | 42 | |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | +////// 忽必烈首页频道Giftmodel | |
| 46 | +class CNLiveHomePageHuBiLieGiftModel:BaseModel{ | |
| 47 | + var type = "" | |
| 48 | + var data :CNLiveHomePageHuBiLieGiftBannerDataModel? | |
| 49 | +} | |
| 50 | +class CNLiveHomePageHuBiLieGiftBannerDataModel:BaseModel{ | |
| 51 | + var share_app_banner :CNLiveHomePageHuBiLieGiftDataModel? | |
| 52 | +} | |
| 53 | +class CNLiveHomePageHuBiLieGiftDataModel:BaseModel{ | |
| 54 | + var home_image = "" | |
| 55 | + var jumpUrl = "" | |
| 56 | + var mine_image = "" | |
| 57 | +} | |
| 58 | + | |
| 59 | + | |
| 45 | 60 | //播放记录 |
| 46 | 61 | class CNLiveHomeFollowListBaseModel:BaseModel{ |
| 47 | 62 | var endRow = 0 | ... | ... |
metaCode/Classes/Main/HomePages/ViewModel/CNLiveHomePageViewModel.swift
| ... | ... | @@ -265,6 +265,35 @@ class CNLiveHomePageViewModel:NSObject,URLSessionTaskDelegate{ |
| 265 | 265 | } |
| 266 | 266 | } |
| 267 | 267 | } |
| 268 | + ///写死送礼banner | |
| 269 | + static func requestGetHomePageTopBannerGift( resultBlock: @escaping downSlideResultBlock) { | |
| 270 | + let param = NSMutableDictionary() | |
| 271 | + CNLiveNetworking.setAllowRequestDefaultArgument(true) | |
| 272 | + CNLiveNetworking.setupShowDataResult(false) | |
| 273 | + let custom_param = NSMutableDictionary() | |
| 274 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") | |
| 275 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | |
| 276 | + CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | |
| 277 | +// https://wjj.ys1.cnliveimg.com/download/mc/extInfoData/extInfo.json | |
| 278 | + CNLiveNetworking.requestNetwork(with: .GET, urlString: "https://wjj.ys1.cnliveimg.com/download/mc/extInfoData/extInfo.json", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | |
| 279 | + hiddenLoading() | |
| 280 | + if (error == nil) { | |
| 281 | + let resp = result as! NSDictionary | |
| 282 | + let type = resp["type"] as! String | |
| 283 | + let data = resp["data"] as! NSDictionary | |
| 284 | + let share_app_banner = data["share_app_banner"] as! NSDictionary | |
| 285 | + let home_image = share_app_banner["home_image"] as! String | |
| 286 | + let jumpUrl = share_app_banner["jumpUrl"] as! String | |
| 287 | + let mine_image = share_app_banner["mine_image"] as! String | |
| 288 | + let dataMdl = newDictionaryToModel(resp as! [String : Any], CNLiveHomePageHuBiLieGiftModel.self) | |
| 289 | + resultBlock(dataMdl,.success) | |
| 290 | + | |
| 291 | + }else{ | |
| 292 | + resultBlock(NSNull(),.failed) | |
| 293 | + } | |
| 294 | + } | |
| 295 | + } | |
| 296 | + | |
| 268 | 297 | //电商分类 |
| 269 | 298 | static func requestGetHomePageShopCategoryApi(shop_id:String,resultBlock: @escaping downSlideResultBlock) { |
| 270 | 299 | let param = NSMutableDictionary() | ... | ... |
metaCode/Classes/Main/HuBiLieHomePage/Controller/CNLiveTVHomeViewController.swift
| ... | ... | @@ -8,6 +8,7 @@ |
| 8 | 8 | import Foundation |
| 9 | 9 | import QMUIKit |
| 10 | 10 | import MJRefresh |
| 11 | +import CNLiveShareToolKit | |
| 11 | 12 | |
| 12 | 13 | class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource, UITableViewDelegate{ |
| 13 | 14 | |
| ... | ... | @@ -117,6 +118,24 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource |
| 117 | 118 | playBtn.isHidden = true |
| 118 | 119 | return playBtn |
| 119 | 120 | }() |
| 121 | + //share gift | |
| 122 | + lazy var shareGiftBtn: UIButton = { | |
| 123 | + let expandBtn = UIButton.init(type: .custom) | |
| 124 | + expandBtn.backgroundColor = .clear | |
| 125 | + expandBtn.frame = CGRect(x: 0, y: 0, width: 90, height: 20) | |
| 126 | + expandBtn.setTitle("好看送好礼", for: .normal) | |
| 127 | + expandBtn.setTitle("好看送好礼", for: .selected) | |
| 128 | + expandBtn.setTitleColor(HexColor("#333333"), for: .normal) | |
| 129 | + expandBtn.setImage(UIImage(named: "home_shareGift"), for: .normal) | |
| 130 | + expandBtn.setImage(UIImage(named: "home_shareGift"), for: .selected) | |
| 131 | + expandBtn.titleLabel?.font = Font_11 | |
| 132 | + expandBtn.setupButtonImageAndTitlePossitionWith(padding: 4, style: .left) | |
| 133 | + expandBtn.addTarget(self, action: #selector(shareGiftBtnAction), for: .touchUpInside) | |
| 134 | + expandBtn.backgroundColor = HexColor("#FFEFE9") | |
| 135 | + expandBtn.clipsToBounds = true | |
| 136 | + expandBtn.layer.cornerRadius = 10 | |
| 137 | + return expandBtn | |
| 138 | + }() | |
| 120 | 139 | |
| 121 | 140 | ///数据源 |
| 122 | 141 | lazy var dataArray: NSMutableArray = { |
| ... | ... | @@ -124,6 +143,7 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource |
| 124 | 143 | return dataArray |
| 125 | 144 | }() |
| 126 | 145 | var currStyleIndex = 0 |
| 146 | + var giftModel:CNLiveHomePageHuBiLieGiftModel?//送礼分享model | |
| 127 | 147 | |
| 128 | 148 | override func viewDidLoad() { |
| 129 | 149 | super.viewDidLoad() |
| ... | ... | @@ -154,6 +174,14 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource |
| 154 | 174 | view.addSubview(pageStyleBtn3) |
| 155 | 175 | view.addSubview(pageStyleBtn4) |
| 156 | 176 | |
| 177 | + view.addSubview(shareGiftBtn) | |
| 178 | + shareGiftBtn.snp.makeConstraints { make in | |
| 179 | + make.right.equalToSuperview().offset(-15) | |
| 180 | + make.width.equalTo(90) | |
| 181 | + make.height.equalTo(20) | |
| 182 | + make.centerY.equalTo(self.pageStyleBtn1.snp.centerY) | |
| 183 | + } | |
| 184 | + | |
| 157 | 185 | view.addSubview(tableView) |
| 158 | 186 | tableView.frame = CGRect(x: 0, y: self.pageStyleBtn1.bottom+10, width: KSreenWidth, height: KSreenHeight-KTabBarHeight-self.pageStyleBtn1.bottom-10) |
| 159 | 187 | self.getHomePageTopConfigListApi() |
| ... | ... | @@ -243,6 +271,17 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource |
| 243 | 271 | |
| 244 | 272 | } |
| 245 | 273 | |
| 274 | + @objc func shareGiftBtnAction(){ | |
| 275 | + CNLiveShareManager.showShareViewWithParam(forShareTitle: "忽必烈电视剧", shareUrl: "http://wjjh5.cnlive.com/cnYmHbl.html?channelName=ymhbl", shareDesc: "邀你共赴大元史诗!点击加入追剧联盟", shareImage: UIImage(named: "shareAppIcon"), screenFull: false, hiddenWjj: true, hiddenQQ: true, hiddenWB: true, hiddenLifeCircle: true, hiddenWechatCircle: false, hiddenWechat: false, hiddenSafari: true, formVC: currentViewController(), topImage: [], topTitles: [], platformType: .all) { title in | |
| 276 | + | |
| 277 | + } completerBlock: { resultType, platformType, typeString in | |
| 278 | + if resultType == .succ{ | |
| 279 | + print("succ") | |
| 280 | + } | |
| 281 | + } | |
| 282 | + | |
| 283 | + } | |
| 284 | + | |
| 246 | 285 | // MARK: - UITableViewDelegate |
| 247 | 286 | func numberOfSections(in tableView: UITableView) -> Int { |
| 248 | 287 | return 1 |
| ... | ... | @@ -401,143 +440,163 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource |
| 401 | 440 | }) |
| 402 | 441 | } |
| 403 | 442 | |
| 443 | + func getHomePageTopBannerGift(){ | |
| 444 | + CNLiveHomePageViewModel.requestGetHomePageTopBannerGift{[weak self] result, status in | |
| 445 | + guard let self = self else { return } | |
| 446 | + if status == .success{ | |
| 447 | + let giftModel = result as! CNLiveHomePageHuBiLieGiftModel | |
| 448 | + self.giftModel = giftModel | |
| 449 | + } | |
| 450 | + } | |
| 451 | + } | |
| 452 | + | |
| 404 | 453 | //MARK: - 获取首页配置 |
| 405 | 454 | func getHomePageTopConfigListApi(){ |
| 406 | - CNLiveHomePageViewModel.requestGetHomePageTopConfigList{[weak self] result, status in | |
| 455 | +// self.getHomePageTopBannerGift() | |
| 456 | + CNLiveHomePageViewModel.requestGetHomePageTopBannerGift{[weak self] result, status in | |
| 407 | 457 | guard let self = self else { return } |
| 408 | 458 | if status == .success{ |
| 409 | - | |
| 410 | - let dataModelArr = result as! [CNLiveHomePageHuBiLieModel] | |
| 411 | - let dataModel = dataModelArr.first! | |
| 459 | + let giftModel = result as! CNLiveHomePageHuBiLieGiftModel | |
| 460 | + self.giftModel = giftModel | |
| 412 | 461 | |
| 413 | - let img = dataModel.img | |
| 414 | - if img.count > 0{ | |
| 415 | - self.iconImgView.kf.setImage(with: URL(string: img)) | |
| 416 | - self.iconImgView.isHidden = false | |
| 417 | - | |
| 418 | - self.iconImgView.snp.remakeConstraints { make in | |
| 419 | - make.left.equalTo(15) | |
| 420 | - make.top.equalTo(KStatusBarHeight+10) | |
| 421 | - make.width.equalTo(74) | |
| 422 | - make.height.equalTo(32) | |
| 423 | - } | |
| 424 | - self.searBarView.snp.remakeConstraints { make in | |
| 425 | - make.left.equalTo(self.iconImgView.snp.right).offset(10) | |
| 426 | - make.top.equalTo(self.iconImgView.snp.top) | |
| 427 | - make.right.equalToSuperview().offset(-15) | |
| 428 | - make.height.equalTo(32) | |
| 429 | - } | |
| 430 | - }else{ | |
| 431 | - self.iconImgView.isHidden = true | |
| 432 | - self.iconImgView.image = nil | |
| 433 | - self.iconImgView.snp.remakeConstraints { make in | |
| 434 | - make.left.equalTo(15) | |
| 435 | - make.top.equalTo(KStatusBarHeight+10) | |
| 436 | - make.width.equalTo(0) | |
| 437 | - make.height.equalTo(32) | |
| 438 | - } | |
| 439 | - self.searBarView.snp.remakeConstraints { make in | |
| 440 | - make.left.equalTo(self.iconImgView.snp.right) | |
| 441 | - make.top.equalTo(self.iconImgView.snp.top) | |
| 442 | - make.right.equalToSuperview().offset(-15) | |
| 443 | - make.height.equalTo(32) | |
| 444 | - } | |
| 445 | - | |
| 446 | - } | |
| 447 | - | |
| 448 | - let homePageListMdls = dataModel.pageStyleList | |
| 449 | - self.homePageStyleListMdls = homePageListMdls | |
| 450 | - for (idx,mdl) in homePageListMdls.enumerated() { | |
| 451 | - if idx == 0{ | |
| 452 | - self.pageStyleBtn1.setTitle(mdl.showName, for: .normal) | |
| 453 | - var width = 60 | |
| 454 | - if mdl.showName.count <= 2{ | |
| 455 | - width = 60 | |
| 456 | - }else if mdl.showName.count == 3{ | |
| 457 | - width = 80 | |
| 462 | + CNLiveHomePageViewModel.requestGetHomePageTopConfigList{[weak self] result, status in | |
| 463 | + guard let self = self else { return } | |
| 464 | + if status == .success{ | |
| 465 | + | |
| 466 | + let dataModelArr = result as! [CNLiveHomePageHuBiLieModel] | |
| 467 | + let dataModel = dataModelArr.first! | |
| 468 | + | |
| 469 | + let img = dataModel.img | |
| 470 | + if img.count > 0{ | |
| 471 | + self.iconImgView.kf.setImage(with: URL(string: img)) | |
| 472 | + self.iconImgView.isHidden = false | |
| 473 | + | |
| 474 | + self.iconImgView.snp.remakeConstraints { make in | |
| 475 | + make.left.equalTo(15) | |
| 476 | + make.top.equalTo(KStatusBarHeight+10) | |
| 477 | + make.width.equalTo(74) | |
| 478 | + make.height.equalTo(32) | |
| 479 | + } | |
| 480 | + self.searBarView.snp.remakeConstraints { make in | |
| 481 | + make.left.equalTo(self.iconImgView.snp.right).offset(10) | |
| 482 | + make.top.equalTo(self.iconImgView.snp.top) | |
| 483 | + make.right.equalToSuperview().offset(-15) | |
| 484 | + make.height.equalTo(32) | |
| 485 | + } | |
| 458 | 486 | }else{ |
| 459 | - width = 100 | |
| 460 | - } | |
| 461 | - //x10 3字80 2字60 高25 y:self.searBarView.bottom+20 | |
| 462 | - self.pageStyleBtn1.snp.makeConstraints { make in | |
| 463 | - make.left.equalTo(10) | |
| 464 | - make.width.equalTo(width) | |
| 465 | - make.height.equalTo(25) | |
| 466 | - make.top.equalTo(self.searBarView.snp.bottom).offset(20) | |
| 467 | - } | |
| 468 | - self.changeBtn(btn: self.pageStyleBtn1, isHighLight: true) | |
| 469 | - self.pageStyleBtn1.isHidden = false | |
| 470 | -// self.group.enter() | |
| 471 | - self.getPageApi(pageID: mdl.pageId) | |
| 487 | + self.iconImgView.isHidden = true | |
| 488 | + self.iconImgView.image = nil | |
| 489 | + self.iconImgView.snp.remakeConstraints { make in | |
| 490 | + make.left.equalTo(15) | |
| 491 | + make.top.equalTo(KStatusBarHeight+10) | |
| 492 | + make.width.equalTo(0) | |
| 493 | + make.height.equalTo(32) | |
| 494 | + } | |
| 495 | + self.searBarView.snp.remakeConstraints { make in | |
| 496 | + make.left.equalTo(self.iconImgView.snp.right) | |
| 497 | + make.top.equalTo(self.iconImgView.snp.top) | |
| 498 | + make.right.equalToSuperview().offset(-15) | |
| 499 | + make.height.equalTo(32) | |
| 500 | + } | |
| 472 | 501 | |
| 473 | - }else if idx == 1{ | |
| 474 | - self.pageStyleBtn2.setTitle(mdl.showName, for: .normal) | |
| 475 | - var width = 60 | |
| 476 | - if mdl.showName.count <= 2{ | |
| 477 | - width = 60 | |
| 478 | - }else if mdl.showName.count == 3{ | |
| 479 | - width = 80 | |
| 480 | - }else{ | |
| 481 | - width = 100 | |
| 482 | - } | |
| 483 | - self.pageStyleBtn2.snp.makeConstraints { make in | |
| 484 | - make.left.equalTo(self.pageStyleBtn1.snp.right) | |
| 485 | - make.width.equalTo(width) | |
| 486 | - make.height.equalTo(self.pageStyleBtn1.snp.height) | |
| 487 | - make.top.equalTo(self.pageStyleBtn1.snp.top) | |
| 488 | 502 | } |
| 489 | - self.changeBtn(btn: self.pageStyleBtn2, isHighLight: false) | |
| 490 | - self.pageStyleBtn2.isHidden = false | |
| 491 | - }else if idx == 2{ | |
| 492 | - self.pageStyleBtn3.setTitle(mdl.showName, for: .normal) | |
| 493 | - var width = 60 | |
| 494 | - if mdl.showName.count <= 2{ | |
| 495 | - width = 60 | |
| 496 | - }else if mdl.showName.count == 3{ | |
| 497 | - width = 80 | |
| 498 | - }else{ | |
| 499 | - width = 100 | |
| 500 | - } | |
| 501 | - self.pageStyleBtn3.snp.makeConstraints { make in | |
| 502 | - make.left.equalTo(self.pageStyleBtn2.snp.right) | |
| 503 | - make.width.equalTo(width) | |
| 504 | - make.height.equalTo(self.pageStyleBtn1.snp.height) | |
| 505 | - make.top.equalTo(self.pageStyleBtn1.snp.top) | |
| 506 | - } | |
| 507 | - self.changeBtn(btn: self.pageStyleBtn3, isHighLight: false) | |
| 508 | - self.pageStyleBtn3.isHidden = false | |
| 509 | - }else if idx == 3{ | |
| 510 | - self.pageStyleBtn4.setTitle(mdl.showName, for: .normal) | |
| 511 | - var width = 60 | |
| 512 | - if mdl.showName.count <= 2{ | |
| 513 | - width = 60 | |
| 514 | - }else if mdl.showName.count == 3{ | |
| 515 | - width = 80 | |
| 516 | - }else{ | |
| 517 | - width = 100 | |
| 518 | - } | |
| 519 | - self.pageStyleBtn4.snp.makeConstraints { make in | |
| 520 | - make.left.equalTo(self.pageStyleBtn3.snp.right) | |
| 521 | - make.width.equalTo(width) | |
| 522 | - make.height.equalTo(self.pageStyleBtn1.snp.height) | |
| 523 | - make.top.equalTo(self.pageStyleBtn1.snp.top) | |
| 503 | + | |
| 504 | + let homePageListMdls = dataModel.pageStyleList | |
| 505 | + self.homePageStyleListMdls = homePageListMdls | |
| 506 | + for (idx,mdl) in homePageListMdls.enumerated() { | |
| 507 | + if idx == 0{ | |
| 508 | + self.pageStyleBtn1.setTitle(mdl.showName, for: .normal) | |
| 509 | + var width = 60 | |
| 510 | + if mdl.showName.count <= 2{ | |
| 511 | + width = 60 | |
| 512 | + }else if mdl.showName.count == 3{ | |
| 513 | + width = 80 | |
| 514 | + }else{ | |
| 515 | + width = 100 | |
| 516 | + } | |
| 517 | + //x10 3字80 2字60 高25 y:self.searBarView.bottom+20 | |
| 518 | + self.pageStyleBtn1.snp.makeConstraints { make in | |
| 519 | + make.left.equalTo(10) | |
| 520 | + make.width.equalTo(width) | |
| 521 | + make.height.equalTo(25) | |
| 522 | + make.top.equalTo(self.searBarView.snp.bottom).offset(20) | |
| 523 | + } | |
| 524 | + self.changeBtn(btn: self.pageStyleBtn1, isHighLight: true) | |
| 525 | + self.pageStyleBtn1.isHidden = false | |
| 526 | + // self.group.enter() | |
| 527 | + self.getPageApi(pageID: mdl.pageId) | |
| 528 | + | |
| 529 | + }else if idx == 1{ | |
| 530 | + self.pageStyleBtn2.setTitle(mdl.showName, for: .normal) | |
| 531 | + var width = 60 | |
| 532 | + if mdl.showName.count <= 2{ | |
| 533 | + width = 60 | |
| 534 | + }else if mdl.showName.count == 3{ | |
| 535 | + width = 80 | |
| 536 | + }else{ | |
| 537 | + width = 100 | |
| 538 | + } | |
| 539 | + self.pageStyleBtn2.snp.makeConstraints { make in | |
| 540 | + make.left.equalTo(self.pageStyleBtn1.snp.right) | |
| 541 | + make.width.equalTo(width) | |
| 542 | + make.height.equalTo(self.pageStyleBtn1.snp.height) | |
| 543 | + make.top.equalTo(self.pageStyleBtn1.snp.top) | |
| 544 | + } | |
| 545 | + self.changeBtn(btn: self.pageStyleBtn2, isHighLight: false) | |
| 546 | + self.pageStyleBtn2.isHidden = false | |
| 547 | + }else if idx == 2{ | |
| 548 | + self.pageStyleBtn3.setTitle(mdl.showName, for: .normal) | |
| 549 | + var width = 60 | |
| 550 | + if mdl.showName.count <= 2{ | |
| 551 | + width = 60 | |
| 552 | + }else if mdl.showName.count == 3{ | |
| 553 | + width = 80 | |
| 554 | + }else{ | |
| 555 | + width = 100 | |
| 556 | + } | |
| 557 | + self.pageStyleBtn3.snp.makeConstraints { make in | |
| 558 | + make.left.equalTo(self.pageStyleBtn2.snp.right) | |
| 559 | + make.width.equalTo(width) | |
| 560 | + make.height.equalTo(self.pageStyleBtn1.snp.height) | |
| 561 | + make.top.equalTo(self.pageStyleBtn1.snp.top) | |
| 562 | + } | |
| 563 | + self.changeBtn(btn: self.pageStyleBtn3, isHighLight: false) | |
| 564 | + self.pageStyleBtn3.isHidden = false | |
| 565 | + }else if idx == 3{ | |
| 566 | + self.pageStyleBtn4.setTitle(mdl.showName, for: .normal) | |
| 567 | + var width = 60 | |
| 568 | + if mdl.showName.count <= 2{ | |
| 569 | + width = 60 | |
| 570 | + }else if mdl.showName.count == 3{ | |
| 571 | + width = 80 | |
| 572 | + }else{ | |
| 573 | + width = 100 | |
| 574 | + } | |
| 575 | + self.pageStyleBtn4.snp.makeConstraints { make in | |
| 576 | + make.left.equalTo(self.pageStyleBtn3.snp.right) | |
| 577 | + make.width.equalTo(width) | |
| 578 | + make.height.equalTo(self.pageStyleBtn1.snp.height) | |
| 579 | + make.top.equalTo(self.pageStyleBtn1.snp.top) | |
| 580 | + } | |
| 581 | + self.changeBtn(btn: self.pageStyleBtn4, isHighLight: false) | |
| 582 | + self.pageStyleBtn4.isHidden = false | |
| 583 | + }else{ | |
| 584 | + | |
| 585 | + } | |
| 524 | 586 | } |
| 525 | - self.changeBtn(btn: self.pageStyleBtn4, isHighLight: false) | |
| 526 | - self.pageStyleBtn4.isHidden = false | |
| 587 | + // self.group.notify(queue: .main) { | |
| 588 | + // // 所有网络请求都已完成,在这里执行你的任务 | |
| 589 | + // self.tableView.mj_header?.endRefreshing() | |
| 590 | + // self.tableView.reloadData() | |
| 591 | + // } | |
| 592 | + | |
| 527 | 593 | }else{ |
| 528 | - | |
| 594 | + self.getHomePageTopConfigListApi() | |
| 529 | 595 | } |
| 530 | 596 | } |
| 531 | -// self.group.notify(queue: .main) { | |
| 532 | -// // 所有网络请求都已完成,在这里执行你的任务 | |
| 533 | -// self.tableView.mj_header?.endRefreshing() | |
| 534 | -// self.tableView.reloadData() | |
| 535 | -// } | |
| 536 | - | |
| 537 | - }else{ | |
| 538 | - self.getHomePageTopConfigListApi() | |
| 539 | 597 | } |
| 540 | 598 | } |
| 599 | + | |
| 541 | 600 | } |
| 542 | 601 | |
| 543 | 602 | func getHomePageShopCategoryApi(shop_id:String){ |
| ... | ... | @@ -622,6 +681,20 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource |
| 622 | 681 | |
| 623 | 682 | let layout = CNLiveDownSlideModelLayout.init(model: model) |
| 624 | 683 | let cellModel = layout.getCellHModel() |
| 684 | + if cellModel.type == SlideModelTypeBanner1{ | |
| 685 | + //banner 写死第一个gift | |
| 686 | + let giftType = self.giftModel?.type | |
| 687 | + let giftMineImageUrl = self.giftModel?.data?.share_app_banner?.mine_image | |
| 688 | + let giftBannerImageUrl = self.giftModel?.data?.share_app_banner?.home_image | |
| 689 | + let giftJumpUrl = self.giftModel?.data?.share_app_banner?.jumpUrl | |
| 690 | + | |
| 691 | + let giftContentMdl = CNLiveDownSlideContentsModel() | |
| 692 | + giftContentMdl.poster = giftBannerImageUrl ?? "" | |
| 693 | + giftContentMdl.model = giftType ?? SlideModelTypeApp_ext_info | |
| 694 | + giftContentMdl.title = "忽必烈电视剧" | |
| 695 | + giftContentMdl.shareUrl = giftJumpUrl ?? "http://wjjh5.cnlive.com/cnYmHbl.html?channelName=ymhbl" | |
| 696 | + cellModel.contents.insert(giftContentMdl, at: 0) | |
| 697 | + } | |
| 625 | 698 | newDataArray.addObjects(from: [cellModel]) |
| 626 | 699 | if model.type == SlideModelTypeFollow77{ |
| 627 | 700 | // self.group.enter() | ... | ... |
metaCode/Classes/Main/HuBiLieHomePage/Util/CNLiveDownSlideTool.swift
| ... | ... | @@ -258,10 +258,10 @@ class CNLiveDownSlideTool:NSObject{ |
| 258 | 258 | print("无法将字符串转换为数据") |
| 259 | 259 | } |
| 260 | 260 | }else{ |
| 261 | + hiddenLoading() | |
| 261 | 262 | return |
| 262 | 263 | } |
| 263 | 264 | } |
| 264 | - | |
| 265 | 265 | // MARK: - 跳转电商订单页 type1 state:0全部 1待付款 2待发货 3代收货 ,购物车type2,地址管理type3 ,我的售后type4 |
| 266 | 266 | // |
| 267 | 267 | class func pushShopH5WithType(type:String,state:String){ | ... | ... |
metaCode/Classes/Main/HuBiLieHomePage/View/Home/Home/CNLiveHomeYingshiBannerCell.swift
| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | |
| 8 | 8 | import Foundation |
| 9 | 9 | import FSPagerView |
| 10 | +import CNLiveShareToolKit | |
| 10 | 11 | |
| 11 | 12 | class CNLiveHomeYingshiBannerCell: UITableViewCell ,FSPagerViewDataSource,FSPagerViewDelegate{ |
| 12 | 13 | |
| ... | ... | @@ -108,8 +109,17 @@ class CNLiveHomeYingshiBannerCell: UITableViewCell ,FSPagerViewDataSource,FSPage |
| 108 | 109 | return |
| 109 | 110 | } |
| 110 | 111 | if let bannerMdl = self.slideModel?.contents[index]{ |
| 111 | - | |
| 112 | - CNLiveDownSlideTool.pushWebAndVodVCWithContentsMdl(model: bannerMdl.model, contentId: bannerMdl.contentId, pid: bannerMdl.pid, shareUrl: bannerMdl.shareUrl, thirdUrl: bannerMdl.thirdUrl, title: bannerMdl.title, s_to: bannerMdl.s_to, trailerId: bannerMdl.trailerId, controller: navigationViewController().visibleViewController, slideModel: nil) | |
| 112 | + if bannerMdl.model == SlideModelTypeApp_ext_info{ | |
| 113 | + CNLiveShareManager.showShareViewWithParam(forShareTitle: "忽必烈电视剧", shareUrl: bannerMdl.shareUrl.count > 0 ? bannerMdl.shareUrl : "http://wjjh5.cnlive.com/cnYmHbl.html?channelName=ymhbl", shareDesc: "邀你共赴大元史诗!点击加入追剧联盟", shareImage: UIImage(named: "shareAppIcon"), screenFull: false, hiddenWjj: true, hiddenQQ: true, hiddenWB: true, hiddenLifeCircle: true, hiddenWechatCircle: false, hiddenWechat: false, hiddenSafari: true, formVC: currentViewController(), topImage: [], topTitles: [], platformType: .all) { title in | |
| 114 | + | |
| 115 | + } completerBlock: { resultType, platformType, typeString in | |
| 116 | + if resultType == .succ{ | |
| 117 | + print("succ") | |
| 118 | + } | |
| 119 | + } | |
| 120 | + }else{ | |
| 121 | + CNLiveDownSlideTool.pushWebAndVodVCWithContentsMdl(model: bannerMdl.model, contentId: bannerMdl.contentId, pid: bannerMdl.pid, shareUrl: bannerMdl.shareUrl, thirdUrl: bannerMdl.thirdUrl, title: bannerMdl.title, s_to: bannerMdl.s_to, trailerId: bannerMdl.trailerId, controller: navigationViewController().visibleViewController, slideModel: nil) | |
| 122 | + } | |
| 113 | 123 | } |
| 114 | 124 | // if bannerMdl?.model == "1" || bannerMdl?.model == "album_video"{ |
| 115 | 125 | // //点播页面 | ... | ... |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineViewController.swift
| ... | ... | @@ -12,7 +12,7 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, |
| 12 | 12 | |
| 13 | 13 | let kCNLiveMinePlayHistoryCellIdentifier = "kCNLiveMinePlayHistoryCellIdentifier" |
| 14 | 14 | let kCNLiveMineMineOrderCellIdentifier = "kCNLiveMineMineOrderCellIdentifier" |
| 15 | - | |
| 15 | + let kCNLiveMineGiftCellIdentifier = "kCNLiveMineGiftCellIdentifier" | |
| 16 | 16 | let kCNLiveMineOneViewCellIdentifier = "kCNLiveMineOneViewCellIdentifier" |
| 17 | 17 | let kCNLiveMineTwoViewCellIdentifier = "kCNLiveMineTwoViewCellIdentifier" |
| 18 | 18 | let kMineBodyThreeViewCellIdentifier = "kMineBodyThreeViewCellIdentifier" |
| ... | ... | @@ -28,8 +28,9 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, |
| 28 | 28 | tableView.register(MineBodyThreeViewCell.self, forCellReuseIdentifier: kMineBodyThreeViewCellIdentifier) |
| 29 | 29 | tableView.register(CNLiveMinePlayHistoryCell.self, forCellReuseIdentifier: kCNLiveMinePlayHistoryCellIdentifier) |
| 30 | 30 | tableView.register(CNLiveMineMineOrderCell.self, forCellReuseIdentifier: kCNLiveMineMineOrderCellIdentifier) |
| 31 | - | |
| 32 | 31 | |
| 32 | + tableView.register(CNLiveMineGiftCell.self, forCellReuseIdentifier: kCNLiveMineGiftCellIdentifier) | |
| 33 | + | |
| 33 | 34 | return tableView |
| 34 | 35 | }() |
| 35 | 36 | |
| ... | ... | @@ -48,6 +49,9 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, |
| 48 | 49 | let array1 : [Dictionary] = [["name":"播放记录","icon":"mine_list_icon_help_feedback"]] |
| 49 | 50 | dataArray.add(array1) |
| 50 | 51 | |
| 52 | + let array0 : [Dictionary] = [["name":"送礼","icon":""]] | |
| 53 | + dataArray.add(array0) | |
| 54 | + | |
| 51 | 55 | let array01 : [Dictionary] = [["name":"已购内容","icon":"mine_list_icon_help_feedback"]] |
| 52 | 56 | dataArray.add(array01) |
| 53 | 57 | |
| ... | ... | @@ -81,6 +85,7 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, |
| 81 | 85 | |
| 82 | 86 | var checkModel: MinePointCheckInModel! |
| 83 | 87 | var followModels:[CNLiveHomeFollowModel]?//播放记录 |
| 88 | + var giftModel:CNLiveHomePageHuBiLieGiftModel?//送礼分享model | |
| 84 | 89 | override func viewDidLoad() { |
| 85 | 90 | super.viewDidLoad() |
| 86 | 91 | view.backgroundColor = HexColor("#f9f9f9") |
| ... | ... | @@ -105,6 +110,19 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, |
| 105 | 110 | // StandAuthNotificationSuccessAction() |
| 106 | 111 | } |
| 107 | 112 | |
| 113 | + func loadGift(){ | |
| 114 | + showLoading(message: "") | |
| 115 | + CNLiveHomePageViewModel.requestGetHomePageTopBannerGift{[weak self] result, status in | |
| 116 | + guard let self = self else { return } | |
| 117 | + hiddenLoading() | |
| 118 | + if status == .success{ | |
| 119 | + let giftModel = result as! CNLiveHomePageHuBiLieGiftModel | |
| 120 | + self.giftModel = giftModel | |
| 121 | + self.tableView.reloadData() | |
| 122 | + } | |
| 123 | + } | |
| 124 | + } | |
| 125 | + | |
| 108 | 126 | func getHomePageFollowApi(sid:String){ |
| 109 | 127 | CNLiveHomePageViewModel.requestGetMinePlayHistory(sid: sid, page: 1){[weak self] result, status in |
| 110 | 128 | guard let self = self else { return } |
| ... | ... | @@ -112,7 +130,8 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, |
| 112 | 130 | if status == .success{ |
| 113 | 131 | let followBaseMdl = result as! CNLiveHomeFollowListBaseModel |
| 114 | 132 | self.followModels = followBaseMdl.list |
| 115 | - self.tableView.reloadData() | |
| 133 | + self.loadGift() | |
| 134 | + | |
| 116 | 135 | }else{ |
| 117 | 136 | //没有 |
| 118 | 137 | } |
| ... | ... | @@ -292,6 +311,10 @@ extension CNLiveMineViewController { |
| 292 | 311 | } |
| 293 | 312 | return cell |
| 294 | 313 | |
| 314 | + }else if name == "送礼"{ | |
| 315 | + let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveMineGiftCellIdentifier) as! CNLiveMineGiftCell | |
| 316 | + cell.giftModel = self.giftModel | |
| 317 | + return cell | |
| 295 | 318 | }else if name == "已购内容"{ |
| 296 | 319 | let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveMineTwoViewCellIdentifier) as! MineBodyTwoListViewCell |
| 297 | 320 | let array = dataArray[indexPath.section] |
| ... | ... | @@ -334,6 +357,8 @@ extension CNLiveMineViewController { |
| 334 | 357 | return 100 |
| 335 | 358 | } |
| 336 | 359 | } |
| 360 | + }else if name == "送礼"{ | |
| 361 | + return CGFloat(Float(CNLiveHomeADH)) | |
| 337 | 362 | }else if name == "已购内容"{ |
| 338 | 363 | return 60 |
| 339 | 364 | }else if name == "我的订单"{ |
| ... | ... | @@ -361,6 +386,8 @@ extension CNLiveMineViewController { |
| 361 | 386 | let name = sub_dict["name"] as! String |
| 362 | 387 | if name == "播放记录"{ |
| 363 | 388 | |
| 389 | + }else if name == "送礼"{ | |
| 390 | + | |
| 364 | 391 | }else if name == "已购内容"{ |
| 365 | 392 | //已购内容 |
| 366 | 393 | let webVC = CNWebViewController() | ... | ... |
metaCode/Classes/Main/MinePage/View/CNLiveMineGiftCell.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveMineGiftCell.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2025/4/25. | |
| 6 | +// | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | +import CNLiveShareToolKit | |
| 10 | +class CNLiveMineGiftCell:UITableViewCell{ | |
| 11 | + | |
| 12 | + //giftModel | |
| 13 | + var _giftModel : CNLiveHomePageHuBiLieGiftModel? | |
| 14 | + var giftModel : CNLiveHomePageHuBiLieGiftModel? { | |
| 15 | + get{ | |
| 16 | + _giftModel | |
| 17 | + } | |
| 18 | + set{ | |
| 19 | + _giftModel = newValue | |
| 20 | + let mine_image = _giftModel?.data?.share_app_banner?.mine_image | |
| 21 | + self.iconImgView.kf.setImage(with: URL(string: mine_image ?? "")) | |
| 22 | + | |
| 23 | + } | |
| 24 | + } | |
| 25 | + | |
| 26 | + lazy var mainView: UIView = { | |
| 27 | + let mainView = UIView.init() | |
| 28 | + mainView.backgroundColor = .white | |
| 29 | + mainView.layer.cornerRadius = 15 | |
| 30 | + mainView.layer.masksToBounds = true | |
| 31 | + return mainView | |
| 32 | + }() | |
| 33 | + lazy var iconImgView :UIImageView = { | |
| 34 | + let imageView = UIImageView() | |
| 35 | + imageView.layer.cornerRadius = 9 | |
| 36 | + imageView.clipsToBounds = true | |
| 37 | + imageView.contentMode = .scaleAspectFill | |
| 38 | + imageView.isUserInteractionEnabled = true | |
| 39 | + imageView.addGestureRecognizer(UITapGestureRecognizer.init(target: self, action: #selector(imgTapAction))) | |
| 40 | + return imageView | |
| 41 | + }() | |
| 42 | + | |
| 43 | + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | |
| 44 | + super.init(style: style, reuseIdentifier: reuseIdentifier) | |
| 45 | + self.selectionStyle = .none | |
| 46 | + self.backgroundColor = .clear | |
| 47 | + contentView.backgroundColor = .clear | |
| 48 | + self.contentView.clipsToBounds = true | |
| 49 | + | |
| 50 | + self.initUI() | |
| 51 | + } | |
| 52 | + | |
| 53 | + required init?(coder: NSCoder) { | |
| 54 | + fatalError("init(coder:) has not been implemented") | |
| 55 | + } | |
| 56 | + | |
| 57 | + func initUI(){ | |
| 58 | + addSubview(mainView) | |
| 59 | + mainView.addSubview(iconImgView) | |
| 60 | + | |
| 61 | + mainView.snp.makeConstraints { make in | |
| 62 | + make.centerX.equalToSuperview() | |
| 63 | + make.left.equalToSuperview().offset(15) | |
| 64 | + make.right.equalToSuperview().offset(-15) | |
| 65 | + make.top.bottom.equalToSuperview() | |
| 66 | + } | |
| 67 | + | |
| 68 | + iconImgView.snp.makeConstraints { make in | |
| 69 | + make.left.equalTo(0) | |
| 70 | + make.top.equalTo(0) | |
| 71 | + make.height.equalTo(Float(CNLiveHomeADH)) | |
| 72 | + make.width.equalTo(CNLiveHomeADW) | |
| 73 | + } | |
| 74 | + | |
| 75 | + } | |
| 76 | + | |
| 77 | + @objc func imgTapAction(ges: UITapGestureRecognizer){ | |
| 78 | + let jumpUrl = self.giftModel?.data?.share_app_banner?.jumpUrl | |
| 79 | + | |
| 80 | + CNLiveShareManager.showShareViewWithParam(forShareTitle: "忽必烈电视剧", shareUrl: jumpUrl?.count ?? 0 > 0 ? jumpUrl : "http://wjjh5.cnlive.com/cnYmHbl.html?channelName=ymhbl", shareDesc: "邀你共赴大元史诗!点击加入追剧联盟", shareImage: UIImage(named: "shareAppIcon"), screenFull: false, hiddenWjj: true, hiddenQQ: true, hiddenWB: true, hiddenLifeCircle: true, hiddenWechatCircle: false, hiddenWechat: false, hiddenSafari: true, formVC: currentViewController(), topImage: [], topTitles: [], platformType: .all) { title in | |
| 81 | + | |
| 82 | + } completerBlock: { resultType, platformType, typeString in | |
| 83 | + if resultType == .succ{ | |
| 84 | + print("succ") | |
| 85 | + } | |
| 86 | + } | |
| 87 | + } | |
| 88 | +} | ... | ... |
metaCode/Classes/Main/Model/CNLiveDownSlideModel.swift
| ... | ... | @@ -56,6 +56,8 @@ let kCNDownSlideContentsModelModelAlbum_video: String = "album_video"//点æ’-ä¸ |
| 56 | 56 | let kCNDownSlideContentsModelModelAlbum_ugc: String = "album_ugc"//çŸå‰§ |
| 57 | 57 | let kCNDownSlideContentsModelModelServing: String = "serving"//微信å°ç¨‹åº |
| 58 | 58 | let kCNDownSlideContentsModelModelProduct: String = "product"//电商h5 |
| 59 | +let kCNDownSlideContentsModelModelApp_ext_info: String = "app_ext_info"//gift | |
| 60 | + | |
| 59 | 61 | |
| 60 | 62 | class CNLiveDownSlideContentsModel: BaseModel { |
| 61 | 63 | ///内容id | ... | ... |
metaCode/Classes/Main/Model/CNLiveDownSlideModelLayout.swift
| ... | ... | @@ -51,7 +51,7 @@ class CNLiveDownSlideModelLayout:NSObject{ |
| 51 | 51 | totalNum = contentsNum |
| 52 | 52 | } |
| 53 | 53 | _slideModel?.cellH = Float(CGFloat(totalNum)*(DownSlideTodayRecommendH + DownSlideRecommendLeftGap)) |
| 54 | - }else if(_slideModel?.type == SlideModelTypeBanner1){//Banner大图 | |
| 54 | + }else if(_slideModel?.type == SlideModelTypeBanner1){//Banner大图 | |
| 55 | 55 | _slideModel?.cellH = Float(DownSlideBannerH)+Float(DownSlideRecommendLeftGap) |
| 56 | 56 | }else if(_slideModel?.type == SlideModelTypeAllCourse12){//全部课程 |
| 57 | 57 | //总显示块数/循环数 | ... | ... |
metaCode/Supporting Files/Assets.xcassets/HomePage/home_shareGift.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "home_shareGift@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "filename" : "home_shareGift@3x.png", | |
| 14 | + "idiom" : "universal", | |
| 15 | + "scale" : "3x" | |
| 16 | + } | |
| 17 | + ], | |
| 18 | + "info" : { | |
| 19 | + "author" : "xcode", | |
| 20 | + "version" : 1 | |
| 21 | + } | |
| 22 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/HomePage/home_shareGift.imageset/home_shareGift@2x.png
0 → 100644
799 Bytes
metaCode/Supporting Files/Assets.xcassets/HomePage/home_shareGift.imageset/home_shareGift@3x.png
0 → 100644
1.41 KB
metaCode/Supporting Files/Assets.xcassets/ShareGift/Contents.json
0 → 100644
metaCode/Supporting Files/Assets.xcassets/ShareGift/shareAppIcon.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "shareAppIcon@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "filename" : "shareAppIcon@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/ShareGift/shareAppIcon.imageset/shareAppIcon@2x.png
0 → 100644
7.1 KB
metaCode/Supporting Files/Assets.xcassets/ShareGift/shareAppIcon.imageset/shareAppIcon@3x.png
0 → 100644
10.2 KB