充值后没有绑定则提示绑定

This commit is contained in:
chenxi 2023-06-05 18:32:51 +08:00
parent 664607d1e1
commit 16975e700e
10 changed files with 576 additions and 556 deletions

View File

@ -142,10 +142,9 @@ function PayManager:requestRewards(purchaseToken, orderId, originOrderId, notSho
end end
if showRewards then if showRewards then
-- if not ModuleManager.AccountManager:getIsBinded() then -- 没绑定账户信息,提示去绑定 if not EDITOR_MODE and not ModuleManager.AccountManager:getIsBinded() then -- 没绑定账户信息,提示去绑定
-- -- body ModuleManager.AccountManager:showBindUI()
-- end end
if msgData.rewards and table.nums(msgData.rewards) > 0 then if msgData.rewards and table.nums(msgData.rewards) > 0 then
GFunc.showRewardBox(msgData.rewards) GFunc.showRewardBox(msgData.rewards)
end end

View File

@ -206,8 +206,9 @@ local act_growup_gift = {
["time_type"]=1, ["time_type"]=1,
["limit_time"]=3, ["limit_time"]=3,
["cd"]=12, ["cd"]=12,
["limit"]=1, ["limit"]=99999,
["value"]=800 ["value"]=800,
["last"]=1
}, },
[2014]={ [2014]={
["hero_id"]=24001, ["hero_id"]=24001,
@ -421,9 +422,10 @@ local act_growup_gift = {
["time_type"]=1, ["time_type"]=1,
["limit_time"]=3, ["limit_time"]=3,
["cd"]=12, ["cd"]=12,
["limit"]=1, ["limit"]=99999,
["value"]=800, ["value"]=800,
["value_2"]=1 ["value_2"]=1,
["last"]=1
}, },
[3014]={ [3014]={
["hero_id"]=34001, ["hero_id"]=34001,
@ -637,9 +639,10 @@ local act_growup_gift = {
["time_type"]=1, ["time_type"]=1,
["limit_time"]=3, ["limit_time"]=3,
["cd"]=12, ["cd"]=12,
["limit"]=1, ["limit"]=99999,
["value"]=800, ["value"]=800,
["value_2"]=1 ["value_2"]=1,
["last"]=1
}, },
[4014]={ [4014]={
["hero_id"]=44001, ["hero_id"]=44001,
@ -853,9 +856,10 @@ local act_growup_gift = {
["time_type"]=1, ["time_type"]=1,
["limit_time"]=3, ["limit_time"]=3,
["cd"]=12, ["cd"]=12,
["limit"]=1, ["limit"]=99999,
["value"]=800, ["value"]=800,
["value_2"]=1 ["value_2"]=1,
["last"]=1
}, },
[5014]={ [5014]={
["hero_id"]=54001, ["hero_id"]=54001,
@ -1069,9 +1073,10 @@ local act_growup_gift = {
["time_type"]=1, ["time_type"]=1,
["limit_time"]=3, ["limit_time"]=3,
["cd"]=12, ["cd"]=12,
["limit"]=1, ["limit"]=99999,
["value"]=800, ["value"]=800,
["value_2"]=1 ["value_2"]=1,
["last"]=1
} }
} }
local config = { local config = {

View File

@ -212,6 +212,7 @@ local LocalizationGlobalConst =
SETTING_DESC_22 = "SETTING_DESC_22", SETTING_DESC_22 = "SETTING_DESC_22",
SETTING_DESC_23 = "SETTING_DESC_23", SETTING_DESC_23 = "SETTING_DESC_23",
SETTING_DESC_25 = "SETTING_DESC_25", SETTING_DESC_25 = "SETTING_DESC_25",
BIND_TIPS_DESC = "BIND_TIPS_DESC",
} }
return LocalizationGlobalConst return LocalizationGlobalConst

File diff suppressed because it is too large Load Diff

View File

@ -212,6 +212,7 @@ local localization_global =
["SETTING_DESC_22"] = "Google Play Store连接异常请稍后再试", ["SETTING_DESC_22"] = "Google Play Store连接异常请稍后再试",
["SETTING_DESC_23"] = "当前有订单正在处理中,请稍后再试", ["SETTING_DESC_23"] = "当前有订单正在处理中,请稍后再试",
["SETTING_DESC_25"] = "支付取消", ["SETTING_DESC_25"] = "支付取消",
["BIND_TIPS_DESC"] = "为了您的帐户安全,请绑定账号",
} }
return localization_global return localization_global

View File

@ -212,6 +212,7 @@ local localization_global =
["SETTING_DESC_22"] = "Google Play Store connection error, please try again later", ["SETTING_DESC_22"] = "Google Play Store connection error, please try again later",
["SETTING_DESC_23"] = "An order is currently being processed, please try again later", ["SETTING_DESC_23"] = "An order is currently being processed, please try again later",
["SETTING_DESC_25"] = "Payment Cancellation", ["SETTING_DESC_25"] = "Payment Cancellation",
["BIND_TIPS_DESC"] = "For the security of your account, please bind your accounts",
} }
return localization_global return localization_global

View File

@ -212,6 +212,7 @@ local localization_global =
["SETTING_DESC_22"] = "Google Play Store連接異常請稍後再試", ["SETTING_DESC_22"] = "Google Play Store連接異常請稍後再試",
["SETTING_DESC_23"] = "當前有訂單正在處理中,請稍後再試", ["SETTING_DESC_23"] = "當前有訂單正在處理中,請稍後再試",
["SETTING_DESC_25"] = "支付取消", ["SETTING_DESC_25"] = "支付取消",
["BIND_TIPS_DESC"] = "爲了您的帳戶安全,請綁定賬號",
} }
return localization_global return localization_global

View File

@ -1,10 +1,7 @@
local AccountManager = class("AccountManager", BaseModule) local AccountManager = class("AccountManager", BaseModule)
function AccountManager:showBindUI() function AccountManager:showBindUI()
if DataManager.PlayerData:isBinded() then UIManager:showUI("app/ui/game_setting/account_binding_ui")
return
end
UIManager:showUI("app/ui/game_setting/setting_binding_ui")
end end
function AccountManager:showDeleteUI() function AccountManager:showDeleteUI()

View File

@ -0,0 +1,41 @@
local AccountBindUI = class("AccountBindUI", BaseUI)
function AccountBindUI:isFullScreen()
return false
end
function AccountBindUI:getPrefabPath()
return "assets/prefabs/ui/setting/account_bind_ui.prefab"
end
function AccountBindUI:onLoadRootComplete()
self.uiMap = self.root:genAllChildren()
self.uiMap["account_bind_ui.title_bg_img.title_text"]:setText(I18N:getGlobalText(I18N.GlobalConst.MESSAGE_BOX_TITLE))
self.uiMap["account_bind_ui.title_bg_img.bg.content_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.BIND_TIPS_DESC))
self.uiMap["account_bind_ui.title_bg_img.google_sign_btn"]:addClickListener(function()
if ModuleManager.AccountManager:getIsBinded() then
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACCOUNT_ALREADY_BINDED_DESC))
return
end
ModuleManager.AccountManager:bindAccount()
end)
self.uiMap["account_bind_ui.close_btn"]:addClickListener(function()
self:closeUI()
end)
self:addEventListener(EventManager.CUSTOM_EVENT.BIND_ACCOUNT_SUCCESS, function()
self:refreshAccountInfo()
end)
self:refreshAccountInfo()
end
function AccountBindUI:refreshAccountInfo()
if ModuleManager.AccountManager:getIsBinded() then
self.uiMap["account_bind_ui.title_bg_img.google_sign_btn.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACCOUNT_ALREADY_BINDED_DESC))
else
self.uiMap["account_bind_ui.title_bg_img.google_sign_btn.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.BIND_ACCOUNT_DESC))
end
end
return AccountBindUI

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 6744d0c16f8bbef45bd23c43a5742024
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}