tcx_xiyou_yueNan
parent
7ee4724b5c
commit
de30b6f34e
|
|
@ -64,7 +64,6 @@ function this.Pay(id, func)
|
|||
CheckRedPointStatus(RedPointType.GrowthPackage) --成长礼包的红点检测
|
||||
--直购商品
|
||||
local rechargeConfig = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, id)
|
||||
|
||||
--现金点券购买
|
||||
local xjdqNum = BagManager.GetItemCountById(131)
|
||||
if xjdqNum >= rechargeConfig.Price and rechargeConfig.Price > 0 and rechargeConfig.OtherBuy1 and #rechargeConfig.OtherBuy1 > 0 and rechargeConfig.OtherBuy1[1][1] == 131 then
|
||||
|
|
@ -113,21 +112,8 @@ function this.Pay(id, func)
|
|||
UIManager.OpenPanel(UIName.GMCommonConfirmPanel, args)
|
||||
return
|
||||
end
|
||||
if rechargeConfig.BuyType == 1 then --人民币
|
||||
if AppConst.isSDKLogin and rechargeConfig.Price > 0 then
|
||||
PayManager.SdkPay({ Id = id, orderId = orderId })
|
||||
else
|
||||
NetManager.RequestBuyGiftGoods(id, function(msg)
|
||||
this.onSdkPayResult(id)
|
||||
end)
|
||||
end
|
||||
elseif rechargeConfig.BuyType == 2 then --gm余额购买
|
||||
NetManager.SendGmBuyGoodRequest(id)
|
||||
elseif rechargeConfig.BuyType == 3 then --rmb/gm余额购买
|
||||
local sureFunc = function()
|
||||
NetManager.SendGmBuyGoodRequest(id)
|
||||
end
|
||||
local cancelFunc = function()
|
||||
if rechargeConfig.OtherBuy1 == nil then
|
||||
if rechargeConfig.BuyType == 1 then --人民币
|
||||
if AppConst.isSDKLogin and rechargeConfig.Price > 0 then
|
||||
PayManager.SdkPay({ Id = id, orderId = orderId })
|
||||
else
|
||||
|
|
@ -135,14 +121,35 @@ function this.Pay(id, func)
|
|||
this.onSdkPayResult(id)
|
||||
end)
|
||||
end
|
||||
elseif rechargeConfig.BuyType == 2 then --gm余额购买
|
||||
NetManager.SendGmBuyGoodRequest(id)
|
||||
elseif rechargeConfig.BuyType == 3 then --rmb/gm余额购买
|
||||
local sureFunc = function()
|
||||
NetManager.SendGmBuyGoodRequest(id)
|
||||
end
|
||||
local cancelFunc = function()
|
||||
if AppConst.isSDKLogin and rechargeConfig.Price > 0 then
|
||||
PayManager.SdkPay({ Id = id, orderId = orderId })
|
||||
else
|
||||
NetManager.RequestBuyGiftGoods(id, function(msg)
|
||||
this.onSdkPayResult(id)
|
||||
end)
|
||||
end
|
||||
end
|
||||
local args = {}
|
||||
args[1] = Language[12034]
|
||||
args[2] = Language[12035]
|
||||
args[3] = Language[12031]
|
||||
args[4] = sureFunc
|
||||
args[5] = cancelFunc
|
||||
UIManager.OpenPanel(UIName.GMCommonConfirmPanel, args)
|
||||
end
|
||||
local args = {}
|
||||
args[1] = Language[12034]
|
||||
args[2] = Language[12035]
|
||||
args[3] = Language[12031]
|
||||
args[4] = sureFunc
|
||||
args[5] = cancelFunc
|
||||
UIManager.OpenPanel(UIName.GMCommonConfirmPanel, args)
|
||||
else
|
||||
MsgPanel.ShowTwo("现金点卷和论道币不足是否前往充值", function()
|
||||
|
||||
end, function()
|
||||
UIManager.OpenPanel(UIName.ActivityMainPanel, 36, 8)
|
||||
end, nil, GetLanguageStrById("前往"))
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
@ -202,11 +209,13 @@ function this.RequestPay(context)
|
|||
params.serverName = PlayerManager.serverInfo.name
|
||||
-- 角色相关
|
||||
params.roleID = tostring(PlayerManager.uid) ..
|
||||
"_" ..
|
||||
tostring(context.Id) ..
|
||||
"_" ..
|
||||
PackageManager.GetCCCode() ..
|
||||
"_" .. AppConst.Platform --.."_"..tostring(context.orderId or "0").."_"..tostring(LoginManager.ServerId)
|
||||
"_" ..
|
||||
tostring(context.Id) ..
|
||||
"_" ..
|
||||
PackageManager.GetCCCode() ..
|
||||
"_" ..
|
||||
AppConst
|
||||
.Platform --.."_"..tostring(context.orderId or "0").."_"..tostring(LoginManager.ServerId)
|
||||
params.roleName = PlayerManager.nickName
|
||||
params.roleLevel = PlayerManager.level
|
||||
params.vip = tostring(VipManager.GetVipLevel())
|
||||
|
|
@ -214,11 +223,13 @@ function this.RequestPay(context)
|
|||
-- 其他
|
||||
params.payNotifyUrl = ""
|
||||
params.extension = tostring(PlayerManager.uid) ..
|
||||
"_" ..
|
||||
tostring(context.Id) ..
|
||||
"_" ..
|
||||
PackageManager.GetCCCode() ..
|
||||
"_" .. AppConst.Platform --.."_"..tostring(context.orderId or "0").."_"..tostring(LoginManager.ServerId)
|
||||
"_" ..
|
||||
tostring(context.Id) ..
|
||||
"_" ..
|
||||
PackageManager.GetCCCode() ..
|
||||
"_" ..
|
||||
AppConst
|
||||
.Platform --.."_"..tostring(context.orderId or "0").."_"..tostring(LoginManager.ServerId)
|
||||
SDKMgr:Pay(params)
|
||||
|
||||
--
|
||||
|
|
|
|||
Loading…
Reference in New Issue