diff --git a/lua/app/module/account/account_manager.lua b/lua/app/module/account/account_manager.lua index 9bfea8ae..bb238678 100644 --- a/lua/app/module/account/account_manager.lua +++ b/lua/app/module/account/account_manager.lua @@ -4,8 +4,8 @@ function AccountManager:showBindUI() UIManager:showUI("app/ui/game_setting/account_binding_ui") end -function AccountManager:showDeleteUI() - return UIManager:showUI("app/ui/game_setting/account_delete_ui") +function AccountManager:showDeleteUI(hideCloseBtn) + return UIManager:showUI("app/ui/game_setting/account_delete_ui", {hideCloseBtn = hideCloseBtn}) end function AccountManager:getIsBinded() diff --git a/lua/app/module/login/login_manager.lua b/lua/app/module/login/login_manager.lua index ea4af29c..cc42c279 100644 --- a/lua/app/module/login/login_manager.lua +++ b/lua/app/module/login/login_manager.lua @@ -193,7 +193,7 @@ function LoginManager:loginFinish(data) end, cancelText = I18N:getGlobalText(I18N.GlobalConst.SEIZED_DESC_3), cancelFunc = function() - ModuleManager.AccountManager:deleteAccount() + ModuleManager.AccountManager:showDeleteUI(true) end } GFunc.showMessageBox(params) diff --git a/lua/app/ui/game_setting/account_delete_ui.lua b/lua/app/ui/game_setting/account_delete_ui.lua index 7ba88c5f..6a979c28 100644 --- a/lua/app/ui/game_setting/account_delete_ui.lua +++ b/lua/app/ui/game_setting/account_delete_ui.lua @@ -18,8 +18,9 @@ function AccountDeleteUI:onClose() end end -function AccountDeleteUI:ctor() +function AccountDeleteUI:ctor(params) self.besureTxStr = I18N:getGlobalText(I18N.GlobalConst.BESURE_DELETE_ACCOUNT_DESC) + self.hideCloseBtn = params and params.hideCloseBtn end function AccountDeleteUI:onLoadRootComplete() @@ -36,9 +37,11 @@ function AccountDeleteUI:onLoadRootComplete() end end) - uiMap["account_delete_ui.title_bg_img.close_btn"]:addClickListener(function() + local closeBtn = uiMap["account_delete_ui.title_bg_img.close_btn"] + closeBtn:addClickListener(function() self:closeUI() end) + closeBtn:setActive(not self.hideCloseBtn) self:_display() end