支付转菊花

This commit is contained in:
chenxi 2023-06-12 22:19:11 +08:00
parent df85eb2aed
commit d8b335daf5
3 changed files with 33 additions and 4 deletions

View File

@ -249,11 +249,11 @@ end
function SDKPayiOSManager:doIosPay(productId, orderId, rechargeId, giftType, purchaseType, giftId, callback) function SDKPayiOSManager:doIosPay(productId, orderId, rechargeId, giftType, purchaseType, giftId, callback)
self.blockTouch = true self.blockTouch = true
UIManager:showWaitNet() UIManager:showWaitPay()
CS.BF.BFMain.Instance.SDKMgr.IosPaySDKMgr.buyCallback = function(isSuccess, result, errorStr) CS.BF.BFMain.Instance.SDKMgr.IosPaySDKMgr.buyCallback = function(isSuccess, result, errorStr)
if self.blockTouch then if self.blockTouch then
self.blockTouch = false self.blockTouch = false
UIManager:hideWaitNet() UIManager:hideWaitPay()
end end
if isSuccess then if isSuccess then
Logger.log("ios pay availableToPurchase = %s", result.availableToPurchase) Logger.log("ios pay availableToPurchase = %s", result.availableToPurchase)

View File

@ -264,7 +264,8 @@ GConst.DOTWEEN_IDS = {
WAIT_NET = 4, WAIT_NET = 4,
TUTORIAL = 5, TUTORIAL = 5,
TASK_TOAST = 6, TASK_TOAST = 6,
BATTLE_UI = 7 BATTLE_UI = 7,
WAIT_PAY = 8
} }
GConst.MESSAGE_BOX_TYPE = { GConst.MESSAGE_BOX_TYPE = {

View File

@ -753,6 +753,33 @@ function UIManager:getUICameraComponent()
return self.uiCamera:getComponent(GConst.TYPEOF_UNITY_CLASS.CAMERA) return self.uiCamera:getComponent(GConst.TYPEOF_UNITY_CLASS.CAMERA)
end end
function UIManager:showWaitPay()
if self.waitNetCount == 0 then
if self.waitPaySeq == nil then
local seq = DOTweenManager:createSeqWithIntId(GConst.DOTWEEN_IDS.WAIT_PAY)
seq:SetAutoKill(false)
seq:AppendInterval(1)
seq:AppendCallback(function()
self.netCanvas:setActive(true)
end)
self.waitPaySeq = seq
elseif not self.waitPaySeq:IsPlaying() then
self.waitPaySeq:Restart()
end
end
self.waitNetCount = self.waitNetCount + 1
self:disableTouch()
end
function UIManager:hideWaitPay()
self:hideWaitNet()
if self.waitNetCount <= 0 then
if self.waitPaySeq then
self.waitPaySeq:Pause()
end
end
end
function UIManager:showWaitNet(forceRestart) function UIManager:showWaitNet(forceRestart)
if self.waitNetCount == 0 or forceRestart then if self.waitNetCount == 0 or forceRestart then
if self.waitNetSeq == nil then if self.waitNetSeq == nil then
@ -1183,7 +1210,8 @@ if NOT_PUBLISH then
[BaseUI.disableUITouch] = true, [BaseUI.disableUITouch] = true,
[BaseScene.disableTouch] = true, [BaseScene.disableTouch] = true,
[UIManager.showLoading] = true, [UIManager.showLoading] = true,
[UIManager.showWaitNet] = true [UIManager.showWaitNet] = true,
[UIManager.showWaitPay] = true
} }
end end
local currFunc = debug.getinfo(2, "f").func local currFunc = debug.getinfo(2, "f").func