Commit 48071bedbad9c8a8d1b9191b1db9e3060ea9ecf9

Authored by liushiyu
1 parent c0d5ceb0

添加积分支付之后不显示问题

metaCode/Classes/Main/VideoPage/Controller/CNLiveShortVideoViewController.swift
@@ -376,11 +376,12 @@ extension CNLiveShortVideoViewController { @@ -376,11 +376,12 @@ extension CNLiveShortVideoViewController {
376 payButton.startAnimating() 376 payButton.startAnimating()
377 CNLiveIntegralAlertTool.shared.showIntegralAlert(title: "\(viewcell.homeModel.albumMsgModel?.albumName ?? "")共\(viewcell.homeModel.albumMsgModel?.episodeNow ?? "1")集", integralCount: viewcell.homeModel.albumMsgModel?.product?.point ?? "0", productId: viewcell.homeModel.product?.productId ?? "") 377 CNLiveIntegralAlertTool.shared.showIntegralAlert(title: "\(viewcell.homeModel.albumMsgModel?.albumName ?? "")共\(viewcell.homeModel.albumMsgModel?.episodeNow ?? "1")集", integralCount: viewcell.homeModel.albumMsgModel?.product?.point ?? "0", productId: viewcell.homeModel.product?.productId ?? "")
378 CNLiveIntegralAlertTool.shared.homePageNeedReloadActionBlock = {[weak self] in 378 CNLiveIntegralAlertTool.shared.homePageNeedReloadActionBlock = {[weak self] in
  379 +// DispatchQueue.main.asyncAfter(deadline: .now() + 1) {[weak self] in
379 guard let self = self else { return } 380 guard let self = self else { return }
380 payButton.stopAnimating() 381 payButton.stopAnimating()
381 for item in self.dataArray { 382 for item in self.dataArray {
382 let homeModel = item as! CNLiveAlbumListModel 383 let homeModel = item as! CNLiveAlbumListModel
383 - homeModel.product!.albumProductType = "0" 384 + homeModel.product!.check = true
384 self.tableView.reloadData() 385 self.tableView.reloadData()
385 } 386 }
386 let index = self.dataArray.index(of: viewcell.homeModel as Any) 387 let index = self.dataArray.index(of: viewcell.homeModel as Any)
metaCode/Classes/Main/VideoPage/View/CNLiveShortVideoCommentListView.swift
@@ -248,12 +248,14 @@ class CNLiveShortVideoCommentListView: UIView, UITableViewDelegate, UITableViewD @@ -248,12 +248,14 @@ class CNLiveShortVideoCommentListView: UIView, UITableViewDelegate, UITableViewD
248 let commentView = CNLiveShortVideoCommentListView.init(frame: CGRect.zero, pid: pid, toSid: contentSid) 248 let commentView = CNLiveShortVideoCommentListView.init(frame: CGRect.zero, pid: pid, toSid: contentSid)
249 commentView.resultBlock = result 249 commentView.resultBlock = result
250 250
251 - let delegate = UIApplication.shared.delegate as! AppDelegate  
252 - delegate.window?.addSubview(commentView) 251 +// let delegate = UIApplication.shared.delegate as! AppDelegate
  252 +// delegate.window?.addSubview(commentView)
  253 + currentViewController()?.view.addSubview(commentView)
253 commentView.snp.makeConstraints { make in 254 commentView.snp.makeConstraints { make in
254 make.edges.equalToSuperview() 255 make.edges.equalToSuperview()
255 } 256 }
256 - delegate.window?.layoutIfNeeded() 257 +// delegate.window?.layoutIfNeeded()
  258 + currentViewController()?.view.layoutIfNeeded()
257 commentView.alpha = 0 259 commentView.alpha = 0
258 UIView.animate(withDuration: 0.1) { 260 UIView.animate(withDuration: 0.1) {
259 commentView.alpha = 1 261 commentView.alpha = 1
@@ -283,7 +285,7 @@ extension CNLiveShortVideoCommentListView { @@ -283,7 +285,7 @@ extension CNLiveShortVideoCommentListView {
283 } 285 }
284 cell.deleteBlock = {[weak self] commentModel in 286 cell.deleteBlock = {[weak self] commentModel in
285 guard let self = self else { return } 287 guard let self = self else { return }
286 - self.pageNum = 1 288 + self.pageNum = 0
287 showLoading(message: "") 289 showLoading(message: "")
288 self.requestDataSource() 290 self.requestDataSource()
289 // let tempArray = NSMutableArray(array: self.dataArray) 291 // let tempArray = NSMutableArray(array: self.dataArray)
metaCode/Classes/Main/VideoPage/ViewModel/CNLiveShortVideoViewModel.swift
@@ -49,9 +49,6 @@ class CNLiveShortVideoViewModel: NSObject { @@ -49,9 +49,6 @@ class CNLiveShortVideoViewModel: NSObject {
49 for item in array { 49 for item in array {
50 let listModel = dictionaryToModel(item as! [String : Any], CNLiveAlbumListModel.self,"") as! CNLiveAlbumListModel 50 let listModel = dictionaryToModel(item as! [String : Any], CNLiveAlbumListModel.self,"") as! CNLiveAlbumListModel
51 listModel.albumMsgModel = result as? CNLiveAlbumMsgModel 51 listModel.albumMsgModel = result as? CNLiveAlbumMsgModel
52 - /////测试使用 临时的  
53 - listModel.product?.albumProductType = "0"  
54 -  
55 tempArray.add(listModel) 52 tempArray.add(listModel)
56 tempUrlArray.add(listModel.videoUrl as String) 53 tempUrlArray.add(listModel.videoUrl as String)
57 } 54 }