From 15b1b53e3b8786c30a898bfa5c09b1fff806e92f Mon Sep 17 00:00:00 2001 From: "DESKTOP-7R8JEQQ\\k" <1076390229@qq.com> Date: Thu, 10 Jul 2025 03:14:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=87=BA=E6=88=BF=E9=97=B4=E3=80=81?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=8A=A0=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Game/Controller/GroupMgrController.lua | 2 ++ .../Game/View/Family/FamilyAuditNumber.lua | 10 +++--- .../Game/View/Family/FamilyEventView.lua | 6 ++++ .../Game/View/Family/FamilyJoinAndCreate.lua | 6 ++-- .../extend/majiang/jinxi/EXSettingView.lua | 14 +++++--- .../extend/majiang/lichuan/EXSettingView.lua | 31 +++++++++++++++++- .../Main_new/Main_new_2_jiangxi.xml | 11 ++++--- .../Main_Majiang/Main_new/Setting/Setting.xml | 2 ++ .../main_majiang/ui/Main_Majiang_fui.bytes | Bin 368542 -> 368557 bytes 9 files changed, 64 insertions(+), 18 deletions(-) diff --git a/lua_probject/base_project/Game/Controller/GroupMgrController.lua b/lua_probject/base_project/Game/Controller/GroupMgrController.lua index e6ac1271..927aa89c 100644 --- a/lua_probject/base_project/Game/Controller/GroupMgrController.lua +++ b/lua_probject/base_project/Game/Controller/GroupMgrController.lua @@ -15,6 +15,7 @@ GroupMgrEvent = { InviteResponse = "InviteResponse", IsOpenChatRoom = "IsOpenChatRoom", ChatRoomData = "ChatRoomData", + OnNewApply = "OnNewApply", } GroupMgrController = { @@ -263,6 +264,7 @@ function M:OnEvtMessage(evt_data) local group = DataManager.groups:get(self.groupId) group.joins = evt_data.joins group.update_joins = true + DispatchEvent(self._dispatcher, GroupMgrEvent.OnNewApply, evt_data) end -- 被邀请事件 diff --git a/lua_probject/base_project/Game/View/Family/FamilyAuditNumber.lua b/lua_probject/base_project/Game/View/Family/FamilyAuditNumber.lua index 50320dce..cf2510be 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyAuditNumber.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyAuditNumber.lua @@ -49,11 +49,13 @@ function M:ClickBtn(isAllow, uid) if res.ReturnCode ~= 0 then ViewUtil.ErrorTip(res.ReturnCode, "获取成员列表失败") else - --ViewUtil.ShowOneChooose("审核成功") + if isAllow == 1 then + local tagView = GroupSetTagView.new(self._group.id, uid) + tagView:Show() + else + + end self:InitList() - --NumberRemark:TryShow() - local tagView = GroupSetTagView.new(self._group.id, uid) - tagView:Show() end end) end diff --git a/lua_probject/base_project/Game/View/Family/FamilyEventView.lua b/lua_probject/base_project/Game/View/Family/FamilyEventView.lua index eb4b6335..562836dd 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyEventView.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyEventView.lua @@ -23,6 +23,7 @@ function FamilyEventView.new(root) mgr_ctr:AddEventListener(GroupMgrEvent.InviteResponse, handler(self, self._evtInviteResponse)) mgr_ctr:AddEventListener(GroupMgrEvent.IsOpenChatRoom, handler(self, self._evtIsOpenChatRoom)) mgr_ctr:AddEventListener(GroupMgrEvent.ChatRoomData, handler(self, self._evtChatRoomData)) + mgr_ctr:AddEventListener(GroupMgrEvent.OnNewApply, handler(self, self._evtOnNewApply)) return self end @@ -76,6 +77,11 @@ function M:_evtNewMailTip(...) print("family event _evtNewMailTip") end +function M:_evtOnNewApply() + print("_evtOnNewApply") + self._child_familyAuditNumber:InitList() +end + function M:_evtInviteResponse(...) local arg = { ... } local invite_id = arg[1] diff --git a/lua_probject/base_project/Game/View/Family/FamilyJoinAndCreate.lua b/lua_probject/base_project/Game/View/Family/FamilyJoinAndCreate.lua index fac5e0c1..bca29f04 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyJoinAndCreate.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyJoinAndCreate.lua @@ -121,10 +121,8 @@ function FamilyJoinAndCreate:JoinRoom(roomId) --后端似乎还未调通 self:ClearNumTex() fgCtr:FG_JoinGroup(tonumber(roomId), function(res) - if res.ReturnCode == 0 then - ViewUtil.ShowOneChooose("已申请加入亲友圈" .. res.ReturnCode) - else - ViewUtil.ShowOneChooose("申请加入亲友圈失败" .. res.ReturnCode) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode) end end) --先换成邀请玩家 diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXSettingView.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXSettingView.lua index c0f206b2..b9a5896f 100644 --- a/lua_probject/extend_project/extend/majiang/jinxi/EXSettingView.lua +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXSettingView.lua @@ -7,7 +7,9 @@ setmetatable(M, { __index = BaseWindow }) function EXSettingView:Show(room) self._room = room - local roomOwner = self._room.owner_id + + -- 房主,第一个进房间的人 + local roomOwner = self._room.player_list[1].self_user.account_id if roomOwner == DataManager.SelfUser.account_id then self.cBtn.selectedIndex = 1 @@ -62,7 +64,7 @@ function M:init(url) -- GameApplication.Instance.MusicMute = btn_music.selected; end) - local _btn_logout = self._view:GetChild('btn_closeRoom') + local _btn_logout = self._view:GetChild('btn_cancelRoom') _btn_logout.onClick:Set(function() if self._mainView.dismiss_room_cd_time > 0 then ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!") @@ -72,11 +74,15 @@ function M:init(url) end end) - self._view:GetChild("btn_cancelRoom").onClick:Set(function() + self._view:GetChild("btn_closeRoom").onClick:Set(function() local _gamectr = ControllerManager.GetController(GameController) _gamectr:LevelRoom(function(res) print("退出房间") - pt(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode) + return + end + ViewManager.ChangeView(ViewManager.View_Family) end) end) end diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXSettingView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXSettingView.lua index ca51ee0f..51905481 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXSettingView.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXSettingView.lua @@ -5,6 +5,21 @@ local EXSettingView = {} local M = EXSettingView setmetatable(M, { __index = BaseWindow }) +function EXSettingView:Show(room) + self._room = room + + -- 房主,第一个进房间的人 + local roomOwner = self._room.player_list[1].self_user.account_id + + if roomOwner == DataManager.SelfUser.account_id then + self.cBtn.selectedIndex = 1 + else + self.cBtn.selectedIndex = 0 + end + + BaseWindow.Show(self) +end + function EXSettingView.new(main_view, flag_witness) local self = setmetatable({}, { __index = M }) self.class = 'EXSettingView' @@ -24,6 +39,8 @@ function M:init(url) local btn_music = view:GetChild('btn_vedio_music') local btn_sound = view:GetChild('btn_vedio_sound') + self.cBtn = self._view:GetController('cBtn') + -- slider_sound.value = GameApplication.Instance.SoundValue -- slider_music.value = GameApplication.Instance.MusicValue @@ -47,7 +64,7 @@ function M:init(url) -- GameApplication.Instance.MusicMute = btn_music.selected; end) - local _btn_logout = self._view:GetChild('btn_closeRoom') + local _btn_logout = self._view:GetChild('btn_cancelRoom') _btn_logout.onClick:Set(function() if self._flag_witness then local _room = DataManager.CurrenRoom @@ -64,6 +81,18 @@ function M:init(url) end end end) + + self._view:GetChild("btn_closeRoom").onClick:Set(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:LevelRoom(function(res) + print("退出房间") + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode) + return + end + ViewManager.ChangeView(ViewManager.View_Family) + end) + end) end return M diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2_jiangxi.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2_jiangxi.xml index 7e60d40a..79d61082 100644 --- a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2_jiangxi.xml +++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2_jiangxi.xml @@ -1,6 +1,6 @@ - + @@ -124,23 +124,23 @@ - + - + - + - + @@ -148,6 +148,7 @@ + diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Setting/Setting.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Setting/Setting.xml index c6a37a1b..3b59dca5 100644 --- a/wb_new_ui/assets/Main_Majiang/Main_new/Setting/Setting.xml +++ b/wb_new_ui/assets/Main_Majiang/Main_new/Setting/Setting.xml @@ -30,9 +30,11 @@ + + \ No newline at end of file diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes b/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes index 9e84038de068696937686dd1c85143378b900bd3..63c2a51fd89cf646e82149199adfcb603c441ce7 100644 GIT binary patch delta 313 zcmbQYUu^Auu?bF`X$&C1a+0Ibd#g9&!6u`5%&d!87qc$;|BsP@fps1O19LM-K{E$P zoe~i11F<(yBo~PDfVgqHT{Gh{X2D2yMg{=}TLwo4Uxr|YNQTJiU)vaMSsDNTXJnr4 ze}GYHx=%Z!$>a%7+1eZ18G)E-dt*EEKX1lG(;F@`i%GX5+rX&Jz#v-)#6>{dx_#qi z=Gg-L3@Jd@XaJqXFcXL?CLd&ym>xfwk#%~v4m0QUdrz79ruRQ#?qmb2lbOE$DYNqQ z^BToF4Op`4}71V<3CV^qo(cm8W|@WzGOgG75nNx>(~F7?`9W wa@o(A4+%!FGcpJ;*fKaW1Tq9ML@-25w|ma)IC)ZxQ2Vs!%-g3uXA$240OXxdOaK4?