Commit a807b4fcfd0628dbd103a2a88e7323f5923aafe9
1 parent
e14b3b2b
积分回调更新
Showing
1 changed file
with
5 additions
and
3 deletions
metaCode/Classes/Common/Util/CNLiveIntegralAlertTool.swift
| ... | ... | @@ -333,14 +333,13 @@ class CNLiveIntegralAlertTool:NSObject{ |
| 333 | 333 | navigationViewController().pushViewController(CNLiveMineQuestViewController(checkModel: self.checkInModel!), animated: pushAnimated) |
| 334 | 334 | |
| 335 | 335 | }else if self.currentIntegralPayStatus == .paying{ |
| 336 | - self.integralStatusChangedBlock!(.paying) | |
| 336 | + | |
| 337 | 337 | }else if self.currentIntegralPayStatus == .paySuccess{ |
| 338 | 338 | self.hiddenIntegralAlert() |
| 339 | - self.integralStatusChangedBlock!(.paySuccess) | |
| 339 | + | |
| 340 | 340 | }else if self.currentIntegralPayStatus == .payFailed{ |
| 341 | 341 | self.currentIntegralPayStatus = .integralEnough |
| 342 | 342 | self.initUI() |
| 343 | - self.integralStatusChangedBlock!(.payFailed) | |
| 344 | 343 | }else{ |
| 345 | 344 | |
| 346 | 345 | } |
| ... | ... | @@ -348,6 +347,7 @@ class CNLiveIntegralAlertTool:NSObject{ |
| 348 | 347 | // MARK: - 积分付费接口 |
| 349 | 348 | func postOrderVideoByPoint(){ |
| 350 | 349 | self.currentIntegralPayStatus = .paying |
| 350 | + self.integralStatusChangedBlock!(.paying) | |
| 351 | 351 | self.initUI() |
| 352 | 352 | //付费接口 |
| 353 | 353 | CNLiveHomePageViewModel.orderVideoByPoint(prdId: self.productId) { result, status in |
| ... | ... | @@ -357,6 +357,7 @@ class CNLiveIntegralAlertTool:NSObject{ |
| 357 | 357 | self.initUI() |
| 358 | 358 | //刷新短剧首页数据 |
| 359 | 359 | self.homePageNeedReloadActionBlock!() |
| 360 | + self.integralStatusChangedBlock!(.paySuccess) | |
| 360 | 361 | }else{ |
| 361 | 362 | //购买失败 |
| 362 | 363 | if self.point > Int(self.integralCount)!{ |
| ... | ... | @@ -369,6 +370,7 @@ class CNLiveIntegralAlertTool:NSObject{ |
| 369 | 370 | self.initUI() |
| 370 | 371 | let errMsg = result as! String |
| 371 | 372 | showMessage(message: errMsg) |
| 373 | + self.integralStatusChangedBlock!(.payFailed) | |
| 372 | 374 | } |
| 373 | 375 | } |
| 374 | 376 | ... | ... |