Commit 48071bedbad9c8a8d1b9191b1db9e3060ea9ecf9

Authored by liushiyu
1 parent c0d5ceb0

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

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