Commit 7fe1468b3d862df4370f6a2fe9f24206f418686e

Authored by “张旭”
1 parent b3173611

积分不同状态回调

metaCode.xcodeproj/project.pbxproj
@@ -2070,7 +2070,7 @@ @@ -2070,7 +2070,7 @@
2070 CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; 2070 CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements;
2071 CODE_SIGN_IDENTITY = "Apple Development"; 2071 CODE_SIGN_IDENTITY = "Apple Development";
2072 CODE_SIGN_STYLE = Automatic; 2072 CODE_SIGN_STYLE = Automatic;
2073 - CURRENT_PROJECT_VERSION = 1.0.4.24.01.27.15; 2073 + CURRENT_PROJECT_VERSION = 1.0.5.24.01.30.17;
2074 DEVELOPMENT_TEAM = 94X49GG3ZW; 2074 DEVELOPMENT_TEAM = 94X49GG3ZW;
2075 ENABLE_BITCODE = NO; 2075 ENABLE_BITCODE = NO;
2076 ENABLE_MODULE_VERIFIER = NO; 2076 ENABLE_MODULE_VERIFIER = NO;
@@ -2142,7 +2142,7 @@ @@ -2142,7 +2142,7 @@
2142 "$(inherited)", 2142 "$(inherited)",
2143 "@executable_path/Frameworks", 2143 "@executable_path/Frameworks",
2144 ); 2144 );
2145 - MARKETING_VERSION = 1.0.4; 2145 + MARKETING_VERSION = 1.0.5;
2146 OTHER_LDFLAGS = ( 2146 OTHER_LDFLAGS = (
2147 "$(inherited)", 2147 "$(inherited)",
2148 "-all_load", 2148 "-all_load",
@@ -2324,7 +2324,7 @@ @@ -2324,7 +2324,7 @@
2324 CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; 2324 CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements;
2325 CODE_SIGN_IDENTITY = "Apple Development"; 2325 CODE_SIGN_IDENTITY = "Apple Development";
2326 CODE_SIGN_STYLE = Automatic; 2326 CODE_SIGN_STYLE = Automatic;
2327 - CURRENT_PROJECT_VERSION = 1.0.4.24.01.27.15; 2327 + CURRENT_PROJECT_VERSION = 1.0.5.24.01.30.17;
2328 DEVELOPMENT_TEAM = 94X49GG3ZW; 2328 DEVELOPMENT_TEAM = 94X49GG3ZW;
2329 ENABLE_BITCODE = NO; 2329 ENABLE_BITCODE = NO;
2330 ENABLE_MODULE_VERIFIER = NO; 2330 ENABLE_MODULE_VERIFIER = NO;
@@ -2396,7 +2396,7 @@ @@ -2396,7 +2396,7 @@
2396 "$(inherited)", 2396 "$(inherited)",
2397 "@executable_path/Frameworks", 2397 "@executable_path/Frameworks",
2398 ); 2398 );
2399 - MARKETING_VERSION = 1.0.4; 2399 + MARKETING_VERSION = 1.0.5;
2400 OTHER_LDFLAGS = ( 2400 OTHER_LDFLAGS = (
2401 "$(inherited)", 2401 "$(inherited)",
2402 "-all_load", 2402 "-all_load",
metaCode/Classes/Common/Util/CNLiveIntegralAlertTool.swift
@@ -23,12 +23,14 @@ enum CNLiveIntegralPayStatus { @@ -23,12 +23,14 @@ enum CNLiveIntegralPayStatus {
23 case payFailed 23 case payFailed
24 24
25 } 25 }
  26 +typealias integralStatusChangeBlock = (_ integralPayStatus:CNLiveIntegralPayStatus) -> Void
26 27
27 class CNLiveIntegralAlertTool:NSObject{ 28 class CNLiveIntegralAlertTool:NSObject{
28 static let shared = CNLiveIntegralAlertTool() 29 static let shared = CNLiveIntegralAlertTool()
29 30
30 var homePageNeedReloadActionBlock:homePageNeedReloadBlockActionBlock? 31 var homePageNeedReloadActionBlock:homePageNeedReloadBlockActionBlock?
31 - 32 + var integralStatusChangedBlock:integralStatusChangeBlock?
  33 +
32 ///当前积分支付状态 34 ///当前积分支付状态
33 var currentIntegralPayStatus: CNLiveIntegralPayStatus = .integralEnough 35 var currentIntegralPayStatus: CNLiveIntegralPayStatus = .integralEnough
34 36
@@ -323,18 +325,22 @@ class CNLiveIntegralAlertTool:NSObject{ @@ -323,18 +325,22 @@ class CNLiveIntegralAlertTool:NSObject{
323 @objc func payBtnAction(){ 325 @objc func payBtnAction(){
324 if self.currentIntegralPayStatus == .integralEnough{ 326 if self.currentIntegralPayStatus == .integralEnough{
325 self.postOrderVideoByPoint() 327 self.postOrderVideoByPoint()
  328 + self.integralStatusChangedBlock!(.integralEnough)
326 }else if self.currentIntegralPayStatus == .integralNotEnough{ 329 }else if self.currentIntegralPayStatus == .integralNotEnough{
327 self.hiddenIntegralAlert() 330 self.hiddenIntegralAlert()
  331 + self.integralStatusChangedBlock!(.integralNotEnough)
328 //跳转任务中心 332 //跳转任务中心
329 navigationViewController().pushViewController(CNLiveMineQuestViewController(checkModel: self.checkInModel!), animated: pushAnimated) 333 navigationViewController().pushViewController(CNLiveMineQuestViewController(checkModel: self.checkInModel!), animated: pushAnimated)
330 334
331 }else if self.currentIntegralPayStatus == .paying{ 335 }else if self.currentIntegralPayStatus == .paying{
332 - 336 + self.integralStatusChangedBlock!(.paying)
333 }else if self.currentIntegralPayStatus == .paySuccess{ 337 }else if self.currentIntegralPayStatus == .paySuccess{
334 self.hiddenIntegralAlert() 338 self.hiddenIntegralAlert()
  339 + self.integralStatusChangedBlock!(.paySuccess)
335 }else if self.currentIntegralPayStatus == .payFailed{ 340 }else if self.currentIntegralPayStatus == .payFailed{
336 self.currentIntegralPayStatus = .integralEnough 341 self.currentIntegralPayStatus = .integralEnough
337 self.initUI() 342 self.initUI()
  343 + self.integralStatusChangedBlock!(.payFailed)
338 }else{ 344 }else{
339 345
340 } 346 }