Commit 83820717079cb83806e4dfc133c1ef3b52ea3c5c

Authored by “张旭”
1 parent 3e88ec43

1.1.7.25.04.26.16 , QMUITips在iOS18.4闪退的问题

metaCode.xcodeproj/project.pbxproj
@@ -2343,10 +2343,14 @@ @@ -2343,10 +2343,14 @@
2343 inputFileListPaths = ( 2343 inputFileListPaths = (
2344 "${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-resources-${CONFIGURATION}-input-files.xcfilelist", 2344 "${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-resources-${CONFIGURATION}-input-files.xcfilelist",
2345 ); 2345 );
  2346 + inputPaths = (
  2347 + );
2346 name = "[CP] Copy Pods Resources"; 2348 name = "[CP] Copy Pods Resources";
2347 outputFileListPaths = ( 2349 outputFileListPaths = (
2348 "${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-resources-${CONFIGURATION}-output-files.xcfilelist", 2350 "${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-resources-${CONFIGURATION}-output-files.xcfilelist",
2349 ); 2351 );
  2352 + outputPaths = (
  2353 + );
2350 runOnlyForDeploymentPostprocessing = 0; 2354 runOnlyForDeploymentPostprocessing = 0;
2351 shellPath = /bin/sh; 2355 shellPath = /bin/sh;
2352 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-resources.sh\"\n"; 2356 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-resources.sh\"\n";
@@ -2382,10 +2386,14 @@ @@ -2382,10 +2386,14 @@
2382 inputFileListPaths = ( 2386 inputFileListPaths = (
2383 "${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-frameworks-${CONFIGURATION}-input-files.xcfilelist", 2387 "${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-frameworks-${CONFIGURATION}-input-files.xcfilelist",
2384 ); 2388 );
  2389 + inputPaths = (
  2390 + );
2385 name = "[CP] Embed Pods Frameworks"; 2391 name = "[CP] Embed Pods Frameworks";
2386 outputFileListPaths = ( 2392 outputFileListPaths = (
2387 "${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-frameworks-${CONFIGURATION}-output-files.xcfilelist", 2393 "${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-frameworks-${CONFIGURATION}-output-files.xcfilelist",
2388 ); 2394 );
  2395 + outputPaths = (
  2396 + );
2389 runOnlyForDeploymentPostprocessing = 0; 2397 runOnlyForDeploymentPostprocessing = 0;
2390 shellPath = /bin/sh; 2398 shellPath = /bin/sh;
2391 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-frameworks.sh\"\n"; 2399 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-metaCode/Pods-metaCode-frameworks.sh\"\n";
@@ -2960,7 +2968,7 @@ @@ -2960,7 +2968,7 @@
2960 CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; 2968 CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements;
2961 CODE_SIGN_IDENTITY = "Apple Development"; 2969 CODE_SIGN_IDENTITY = "Apple Development";
2962 CODE_SIGN_STYLE = Automatic; 2970 CODE_SIGN_STYLE = Automatic;
2963 - CURRENT_PROJECT_VERSION = 1.1.7.25.04.25.21; 2971 + CURRENT_PROJECT_VERSION = 1.1.7.25.04.26.16;
2964 DEBUG_INFORMATION_FORMAT = dwarf; 2972 DEBUG_INFORMATION_FORMAT = dwarf;
2965 DEVELOPMENT_TEAM = 94X49GG3ZW; 2973 DEVELOPMENT_TEAM = 94X49GG3ZW;
2966 ENABLE_BITCODE = NO; 2974 ENABLE_BITCODE = NO;
@@ -3216,7 +3224,7 @@ @@ -3216,7 +3224,7 @@
3216 CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; 3224 CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements;
3217 CODE_SIGN_IDENTITY = "Apple Development"; 3225 CODE_SIGN_IDENTITY = "Apple Development";
3218 CODE_SIGN_STYLE = Automatic; 3226 CODE_SIGN_STYLE = Automatic;
3219 - CURRENT_PROJECT_VERSION = 1.1.7.25.04.25.21; 3227 + CURRENT_PROJECT_VERSION = 1.1.7.25.04.26.16;
3220 DEVELOPMENT_TEAM = 94X49GG3ZW; 3228 DEVELOPMENT_TEAM = 94X49GG3ZW;
3221 ENABLE_BITCODE = NO; 3229 ENABLE_BITCODE = NO;
3222 ENABLE_MODULE_VERIFIER = NO; 3230 ENABLE_MODULE_VERIFIER = NO;
@@ -3454,6 +3462,7 @@ @@ -3454,6 +3462,7 @@
3454 SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; 3462 SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
3455 SWIFT_EMIT_LOC_STRINGS = YES; 3463 SWIFT_EMIT_LOC_STRINGS = YES;
3456 SWIFT_OBJC_BRIDGING_HEADER = "metaCode/Classes/Vendors/metaCode-Bridging-Header.h"; 3464 SWIFT_OBJC_BRIDGING_HEADER = "metaCode/Classes/Vendors/metaCode-Bridging-Header.h";
  3465 + SWIFT_OPTIMIZATION_LEVEL = "-Onone";
3457 SWIFT_VERSION = 5.0; 3466 SWIFT_VERSION = 5.0;
3458 TARGETED_DEVICE_FAMILY = 1; 3467 TARGETED_DEVICE_FAMILY = 1;
3459 }; 3468 };
metaCode/Classes/Common/Base/CNLiveBaseTabBarViewController.swift
@@ -48,6 +48,11 @@ class CNLiveBaseTabBarViewController: UITabBarController @@ -48,6 +48,11 @@ class CNLiveBaseTabBarViewController: UITabBarController
48 } 48 }
49 } 49 }
50 } 50 }
  51 + CNLiveHomePageViewModel.requestGetHomePageTopBannerGift{[weak self] result, status in
  52 + guard let self = self else { return }
  53 + let giftModel = result as? CNLiveHomePageHuBiLieGiftModel
  54 + metaAppDelegate.giftModel = giftModel
  55 + }
51 } 56 }
52 // MARK: - 控制器的信息 57 // MARK: - 控制器的信息
53 func setUpTabBar() { 58 func setUpTabBar() {
metaCode/Classes/Main/HomePages/ViewModel/CNLiveHomePageViewModel.swift
@@ -278,13 +278,13 @@ class CNLiveHomePageViewModel:NSObject,URLSessionTaskDelegate{ @@ -278,13 +278,13 @@ class CNLiveHomePageViewModel:NSObject,URLSessionTaskDelegate{
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 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() 279 hiddenLoading()
280 if (error == nil) { 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 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) 288 let dataMdl = newDictionaryToModel(resp as! [String : Any], CNLiveHomePageHuBiLieGiftModel.self)
289 resultBlock(dataMdl,.success) 289 resultBlock(dataMdl,.success)
290 290
metaCode/Classes/Main/HuBiLieHomePage/Controller/CNLiveTVHomeViewController.swift
@@ -143,7 +143,7 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource @@ -143,7 +143,7 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource
143 return dataArray 143 return dataArray
144 }() 144 }()
145 var currStyleIndex = 0 145 var currStyleIndex = 0
146 - var giftModel:CNLiveHomePageHuBiLieGiftModel?//送礼分享model 146 +// var giftModel:CNLiveHomePageHuBiLieGiftModel?//送礼分享model
147 147
148 override func viewDidLoad() { 148 override func viewDidLoad() {
149 super.viewDidLoad() 149 super.viewDidLoad()
@@ -174,6 +174,7 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource @@ -174,6 +174,7 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource
174 view.addSubview(pageStyleBtn3) 174 view.addSubview(pageStyleBtn3)
175 view.addSubview(pageStyleBtn4) 175 view.addSubview(pageStyleBtn4)
176 176
  177 +
177 view.addSubview(shareGiftBtn) 178 view.addSubview(shareGiftBtn)
178 shareGiftBtn.snp.makeConstraints { make in 179 shareGiftBtn.snp.makeConstraints { make in
179 make.right.equalToSuperview().offset(-15) 180 make.right.equalToSuperview().offset(-15)
@@ -181,6 +182,7 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource @@ -181,6 +182,7 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource
181 make.height.equalTo(20) 182 make.height.equalTo(20)
182 make.centerY.equalTo(self.pageStyleBtn1.snp.centerY) 183 make.centerY.equalTo(self.pageStyleBtn1.snp.centerY)
183 } 184 }
  185 + shareGiftBtn.isHidden = true
184 186
185 view.addSubview(tableView) 187 view.addSubview(tableView)
186 tableView.frame = CGRect(x: 0, y: self.pageStyleBtn1.bottom+10, width: KSreenWidth, height: KSreenHeight-KTabBarHeight-self.pageStyleBtn1.bottom-10) 188 tableView.frame = CGRect(x: 0, y: self.pageStyleBtn1.bottom+10, width: KSreenWidth, height: KSreenHeight-KTabBarHeight-self.pageStyleBtn1.bottom-10)
@@ -445,7 +447,7 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource @@ -445,7 +447,7 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource
445 guard let self = self else { return } 447 guard let self = self else { return }
446 if status == .success{ 448 if status == .success{
447 let giftModel = result as! CNLiveHomePageHuBiLieGiftModel 449 let giftModel = result as! CNLiveHomePageHuBiLieGiftModel
448 - self.giftModel = giftModel 450 + metaAppDelegate.giftModel = giftModel
449 } 451 }
450 } 452 }
451 } 453 }
@@ -453,147 +455,144 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource @@ -453,147 +455,144 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource
453 //MARK: - 获取首页配置 455 //MARK: - 获取首页配置
454 func getHomePageTopConfigListApi(){ 456 func getHomePageTopConfigListApi(){
455 // self.getHomePageTopBannerGift() 457 // self.getHomePageTopBannerGift()
456 - CNLiveHomePageViewModel.requestGetHomePageTopBannerGift{[weak self] result, status in 458 +// CNLiveHomePageViewModel.requestGetHomePageTopBannerGift{[weak self] result, status in
  459 +// guard let self = self else { return }
  460 +// let giftModel = result as! CNLiveHomePageHuBiLieGiftModel
  461 +// metaAppDelegate.giftModel = giftModel
  462 +
  463 + CNLiveHomePageViewModel.requestGetHomePageTopConfigList{[weak self] result, status in
457 guard let self = self else { return } 464 guard let self = self else { return }
458 if status == .success{ 465 if status == .success{
459 - let giftModel = result as! CNLiveHomePageHuBiLieGiftModel  
460 - self.giftModel = giftModel 466 +
  467 + let dataModelArr = result as! [CNLiveHomePageHuBiLieModel]
  468 + let dataModel = dataModelArr.first!
461 469
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 - }  
486 - }else{  
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 - } 470 + let img = dataModel.img
  471 + if img.count > 0{
  472 + self.iconImgView.kf.setImage(with: URL(string: img))
  473 + self.iconImgView.isHidden = false
  474 +
  475 + self.iconImgView.snp.remakeConstraints { make in
  476 + make.left.equalTo(15)
  477 + make.top.equalTo(KStatusBarHeight+10)
  478 + make.width.equalTo(74)
  479 + make.height.equalTo(32)
  480 + }
  481 + self.searBarView.snp.remakeConstraints { make in
  482 + make.left.equalTo(self.iconImgView.snp.right).offset(10)
  483 + make.top.equalTo(self.iconImgView.snp.top)
  484 + make.right.equalToSuperview().offset(-15)
  485 + make.height.equalTo(32)
  486 + }
  487 + }else{
  488 + self.iconImgView.isHidden = true
  489 + self.iconImgView.image = nil
  490 + self.iconImgView.snp.remakeConstraints { make in
  491 + make.left.equalTo(15)
  492 + make.top.equalTo(KStatusBarHeight+10)
  493 + make.width.equalTo(0)
  494 + make.height.equalTo(32)
  495 + }
  496 + self.searBarView.snp.remakeConstraints { make in
  497 + make.left.equalTo(self.iconImgView.snp.right)
  498 + make.top.equalTo(self.iconImgView.snp.top)
  499 + make.right.equalToSuperview().offset(-15)
  500 + make.height.equalTo(32)
  501 + }
501 502
  503 + }
  504 +
  505 + let homePageListMdls = dataModel.pageStyleList
  506 + self.homePageStyleListMdls = homePageListMdls
  507 + for (idx,mdl) in homePageListMdls.enumerated() {
  508 + if idx == 0{
  509 + self.pageStyleBtn1.setTitle(mdl.showName, for: .normal)
  510 + var width = 60
  511 + if mdl.showName.count <= 2{
  512 + width = 60
  513 + }else if mdl.showName.count == 3{
  514 + width = 80
  515 + }else{
  516 + width = 100
502 } 517 }
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 - } 518 + //x10 3字80 2字60 高25 y:self.searBarView.bottom+20
  519 + self.pageStyleBtn1.snp.makeConstraints { make in
  520 + make.left.equalTo(10)
  521 + make.width.equalTo(width)
  522 + make.height.equalTo(25)
  523 + make.top.equalTo(self.searBarView.snp.bottom).offset(20)
586 } 524 }
587 - // self.group.notify(queue: .main) {  
588 - // // 所有网络请求都已完成,在这里执行你的任务  
589 - // self.tableView.mj_header?.endRefreshing()  
590 - // self.tableView.reloadData()  
591 - // } 525 + self.changeBtn(btn: self.pageStyleBtn1, isHighLight: true)
  526 + self.pageStyleBtn1.isHidden = false
  527 +// self.group.enter()
  528 + self.getPageApi(pageID: mdl.pageId)
592 529
  530 + }else if idx == 1{
  531 + self.pageStyleBtn2.setTitle(mdl.showName, for: .normal)
  532 + var width = 60
  533 + if mdl.showName.count <= 2{
  534 + width = 60
  535 + }else if mdl.showName.count == 3{
  536 + width = 80
  537 + }else{
  538 + width = 100
  539 + }
  540 + self.pageStyleBtn2.snp.makeConstraints { make in
  541 + make.left.equalTo(self.pageStyleBtn1.snp.right)
  542 + make.width.equalTo(width)
  543 + make.height.equalTo(self.pageStyleBtn1.snp.height)
  544 + make.top.equalTo(self.pageStyleBtn1.snp.top)
  545 + }
  546 + self.changeBtn(btn: self.pageStyleBtn2, isHighLight: false)
  547 + self.pageStyleBtn2.isHidden = false
  548 + }else if idx == 2{
  549 + self.pageStyleBtn3.setTitle(mdl.showName, for: .normal)
  550 + var width = 60
  551 + if mdl.showName.count <= 2{
  552 + width = 60
  553 + }else if mdl.showName.count == 3{
  554 + width = 80
  555 + }else{
  556 + width = 100
  557 + }
  558 + self.pageStyleBtn3.snp.makeConstraints { make in
  559 + make.left.equalTo(self.pageStyleBtn2.snp.right)
  560 + make.width.equalTo(width)
  561 + make.height.equalTo(self.pageStyleBtn1.snp.height)
  562 + make.top.equalTo(self.pageStyleBtn1.snp.top)
  563 + }
  564 + self.changeBtn(btn: self.pageStyleBtn3, isHighLight: false)
  565 + self.pageStyleBtn3.isHidden = false
  566 + }else if idx == 3{
  567 + self.pageStyleBtn4.setTitle(mdl.showName, for: .normal)
  568 + var width = 60
  569 + if mdl.showName.count <= 2{
  570 + width = 60
  571 + }else if mdl.showName.count == 3{
  572 + width = 80
  573 + }else{
  574 + width = 100
  575 + }
  576 + self.pageStyleBtn4.snp.makeConstraints { make in
  577 + make.left.equalTo(self.pageStyleBtn3.snp.right)
  578 + make.width.equalTo(width)
  579 + make.height.equalTo(self.pageStyleBtn1.snp.height)
  580 + make.top.equalTo(self.pageStyleBtn1.snp.top)
  581 + }
  582 + self.changeBtn(btn: self.pageStyleBtn4, isHighLight: false)
  583 + self.pageStyleBtn4.isHidden = false
593 }else{ 584 }else{
594 - self.getHomePageTopConfigListApi() 585 +
595 } 586 }
596 } 587 }
  588 +// self.group.notify(queue: .main) {
  589 +// // 所有网络请求都已完成,在这里执行你的任务
  590 +// self.tableView.mj_header?.endRefreshing()
  591 +// self.tableView.reloadData()
  592 +// }
  593 +
  594 + }else{
  595 + self.getHomePageTopConfigListApi()
597 } 596 }
598 } 597 }
599 598
@@ -672,6 +671,8 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource @@ -672,6 +671,8 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource
672 guard let self = self else { return } 671 guard let self = self else { return }
673 672
674 if status == .success{ 673 if status == .success{
  674 + self.shareGiftBtn.isHidden = !metaAppDelegate.isGift
  675 +
675 self.dataArray.removeAllObjects() 676 self.dataArray.removeAllObjects()
676 let array = result as! [Any] 677 let array = result as! [Any]
677 let newDataArray = NSMutableArray() 678 let newDataArray = NSMutableArray()
@@ -681,18 +682,19 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource @@ -681,18 +682,19 @@ class CNLiveTVHomeViewController:CNLiveBaseViewController, UITableViewDataSource
681 682
682 let layout = CNLiveDownSlideModelLayout.init(model: model) 683 let layout = CNLiveDownSlideModelLayout.init(model: model)
683 let cellModel = layout.getCellHModel() 684 let cellModel = layout.getCellHModel()
684 - if cellModel.type == SlideModelTypeBanner1{ 685 +
  686 + if cellModel.type == SlideModelTypeBanner1 && metaAppDelegate.isGift{
685 //banner 写死第一个gift 687 //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 688 + let giftType = metaAppDelegate.giftModel?.type ?? SlideModelTypeApp_ext_info
  689 + let giftMineImageUrl = metaAppDelegate.giftModel?.data?.share_app_banner?.mine_image ?? "https://wjj.ys1.cnliveimg.com/download/mc/extInfoData/ver-001/mine_banner_bg.jpg"
  690 + let giftBannerImageUrl = metaAppDelegate.giftModel?.data?.share_app_banner?.home_image ?? "https://wjj.ys1.cnliveimg.com/download/mc/extInfoData/ver-001/home_banner_bg.jpg"
  691 + let giftJumpUrl = metaAppDelegate.giftModel?.data?.share_app_banner?.jumpUrl ?? "http://wjjh5.cnlive.com/cnYmHbl.html?channelName=ymhbl"
690 692
691 let giftContentMdl = CNLiveDownSlideContentsModel() 693 let giftContentMdl = CNLiveDownSlideContentsModel()
692 - giftContentMdl.poster = giftBannerImageUrl ?? ""  
693 - giftContentMdl.model = giftType ?? SlideModelTypeApp_ext_info 694 + giftContentMdl.poster = giftBannerImageUrl
  695 + giftContentMdl.model = giftType
694 giftContentMdl.title = "忽必烈电视剧" 696 giftContentMdl.title = "忽必烈电视剧"
695 - giftContentMdl.shareUrl = giftJumpUrl ?? "http://wjjh5.cnlive.com/cnYmHbl.html?channelName=ymhbl" 697 + giftContentMdl.shareUrl = giftJumpUrl
696 cellModel.contents.insert(giftContentMdl, at: 0) 698 cellModel.contents.insert(giftContentMdl, at: 0)
697 } 699 }
698 newDataArray.addObjects(from: [cellModel]) 700 newDataArray.addObjects(from: [cellModel])
metaCode/Classes/Main/HuBiLieHomePage/Controller/CNLiveTVPlayerViewController.swift
@@ -771,9 +771,11 @@ class CNLiveTVPlayerViewController:UIViewController, UITableViewDataSource, UITa @@ -771,9 +771,11 @@ class CNLiveTVPlayerViewController:UIViewController, UITableViewDataSource, UITa
771 dataDic.setValue(total_fee, forKey: "total_fee") 771 dataDic.setValue(total_fee, forKey: "total_fee")
772 772
773 //后台设置一个 com.cnlive.metaCode.new 1 3 78 其他com.cnlive.metaCode.2 773 //后台设置一个 com.cnlive.metaCode.new 1 3 78 其他com.cnlive.metaCode.2
  774 +
774 //苹果内购 775 //苹果内购
775 CNLivePayCostModule.showApplePayViw(withParamDict: dataDic as! [AnyHashable : Any], fromVC: currentViewController()!) {[weak self] result in 776 CNLivePayCostModule.showApplePayViw(withParamDict: dataDic as! [AnyHashable : Any], fromVC: currentViewController()!) {[weak self] result in
776 guard let self = self else { return } 777 guard let self = self else { return }
  778 + hiddenLoading()
777 if result == CNLivePayCostTypeResultSucc{ 779 if result == CNLivePayCostTypeResultSucc{
778 print("succ") 780 print("succ")
779 //刷新页面 781 //刷新页面
metaCode/Classes/Main/HuBiLieHomePage/View/VodDetail/CNLiveVodIntroductionCell.swift
@@ -158,12 +158,14 @@ class CNLiveVodIntroductionCell:UITableViewCell{ @@ -158,12 +158,14 @@ class CNLiveVodIntroductionCell:UITableViewCell{
158 make.height.equalTo(40) 158 make.height.equalTo(40)
159 } 159 }
160 160
161 - self.contentView.addSubview(shareGiftBtn)  
162 - shareGiftBtn.snp.makeConstraints { make in  
163 - make.right.equalToSuperview().offset(-10)  
164 - make.width.equalTo(64)  
165 - make.height.equalTo(21)  
166 - make.centerY.equalTo(self.titleLabel.snp.centerY) 161 + if metaAppDelegate.isGift{
  162 + self.contentView.addSubview(shareGiftBtn)
  163 + shareGiftBtn.snp.makeConstraints { make in
  164 + make.right.equalToSuperview().offset(-10)
  165 + make.width.equalTo(64)
  166 + make.height.equalTo(21)
  167 + make.centerY.equalTo(self.titleLabel.snp.centerY)
  168 + }
167 } 169 }
168 170
169 171
metaCode/Classes/Main/MinePage/Controller/CNLiveMineViewController.swift
@@ -48,9 +48,11 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, @@ -48,9 +48,11 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate,
48 // dataArray.add([""]) 48 // dataArray.add([""])
49 let array1 : [Dictionary] = [["name":"播放记录","icon":"mine_list_icon_help_feedback"]] 49 let array1 : [Dictionary] = [["name":"播放记录","icon":"mine_list_icon_help_feedback"]]
50 dataArray.add(array1) 50 dataArray.add(array1)
51 -  
52 - let array0 : [Dictionary] = [["name":"送礼","icon":""]]  
53 - dataArray.add(array0) 51 +
  52 + if metaAppDelegate.isGift{
  53 + let array0 : [Dictionary] = [["name":"送礼","icon":""]]
  54 + dataArray.add(array0)
  55 + }
54 56
55 let array01 : [Dictionary] = [["name":"已购内容","icon":"mine_list_icon_help_feedback"]] 57 let array01 : [Dictionary] = [["name":"已购内容","icon":"mine_list_icon_help_feedback"]]
56 dataArray.add(array01) 58 dataArray.add(array01)
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineBaseModel.swift
@@ -23,6 +23,8 @@ class UpdateInfoModel: BaseModel { @@ -23,6 +23,8 @@ class UpdateInfoModel: BaseModel {
23 var status:String = "" 23 var status:String = ""
24 var createTime:String = "" 24 var createTime:String = ""
25 25
  26 + var gift = false//是否忽必烈礼物
  27 +
26 /** 28 /**
27 /api/identityApi/list 29 /api/identityApi/list
28 接口的数据 id createTime为公共参数 30 接口的数据 id createTime为公共参数
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineViewModel.swift
@@ -883,6 +883,7 @@ class CNLiveMineViewModel: NSObject { @@ -883,6 +883,7 @@ class CNLiveMineViewModel: NSObject {
883 let ver1 = "\(userInfoModel.version.split(separator: "_").last ?? "0")" 883 let ver1 = "\(userInfoModel.version.split(separator: "_").last ?? "0")"
884 let ver2 = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String 884 let ver2 = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String
885 print("获取的新版本号=>\(ver1),原来的版本号=>\(ver2)") 885 print("获取的新版本号=>\(ver1),原来的版本号=>\(ver2)")
  886 + metaAppDelegate.isGift = userInfoModel.gift
886 if CNLiveMineViewModel.compare(v1: ver1, v2: ver2) { 887 if CNLiveMineViewModel.compare(v1: ver1, v2: ver2) {
887 resultBlock(userInfoModel,.success) 888 resultBlock(userInfoModel,.success)
888 } else { 889 } else {
metaCode/Classes/Other/AppDelegate.swift
@@ -20,6 +20,8 @@ import ZFPlayer @@ -20,6 +20,8 @@ import ZFPlayer
20 class AppDelegate: UIResponder, UIApplicationDelegate { 20 class AppDelegate: UIResponder, UIApplicationDelegate {
21 var window: UIWindow? 21 var window: UIWindow?
22 var isCaptured = false //是否录屏中 22 var isCaptured = false //是否录屏中
  23 + var isGift = false//是否忽必烈礼物
  24 + var giftModel:CNLiveHomePageHuBiLieGiftModel?//送礼分享model
23 25
24 // var orientationLock = UIInterfaceOrientationMask.allButUpsideDown // 默认支持方向 26 // var orientationLock = UIInterfaceOrientationMask.allButUpsideDown // 默认支持方向
25 // func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask { 27 // func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {