Commit d40b154d573aff70c2829e37c9fedbf7467f4780

Authored by liushiyu
1 parent e14b3b2b

按钮状态修改

metaCode/Classes/Main/VideoPage/Controller/CNLiveShortVideoViewController.swift
... ... @@ -389,23 +389,20 @@ extension CNLiveShortVideoViewController {
389 389 let payButton = button as! APButton
390 390 payButton.startAnimating()
391 391 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 ?? "")
392   - DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
393   - payButton.stopAnimating()
394   - }
395   - CNLiveIntegralAlertTool.shared.homePageNeedReloadActionBlock = {[weak self] in
  392 +// DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
  393 +// payButton.stopAnimating()
  394 +// }
  395 + CNLiveIntegralAlertTool.shared.integralStatusChangedBlock = {[weak self] integralPayStatus in
396 396 guard let self = self else { return }
397 397 payButton.stopAnimating()
398   - for item in self.dataArray {
399   - let homeModel = item as! CNLiveAlbumListModel
400   - homeModel.product!.check = true
401   - self.tableView.reloadData()
402   - }
403   - let index = self.dataArray.index(of: viewcell.homeModel as Any)
404   - self.playTheIndex(index: index)
405   - }
406   - CNLiveIntegralAlertTool.shared.integralStatusChangedBlock = {[weak self] integralPayStatus in
407   - if integralPayStatus == .integralNotEnough{
408   - //取消刷新
  398 + if integralPayStatus == .paySuccess{
  399 + for item in self.dataArray {
  400 + let homeModel = item as! CNLiveAlbumListModel
  401 + homeModel.product!.check = true
  402 + self.tableView.reloadData()
  403 + }
  404 + let index = self.dataArray.index(of: viewcell.homeModel as Any)
  405 + self.playTheIndex(index: index)
409 406 }
410 407 }
411 408 }
... ...