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 9e84038d..63c2a51f 100644 Binary files a/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes and b/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes differ