diff --git a/lua_probject/base_project/Game/Controller/GroupMgrController.lua b/lua_probject/base_project/Game/Controller/GroupMgrController.lua index 8d3b12db..a7b8ff9d 100644 --- a/lua_probject/base_project/Game/Controller/GroupMgrController.lua +++ b/lua_probject/base_project/Game/Controller/GroupMgrController.lua @@ -137,6 +137,7 @@ function M:connect(host, groupId, callback) group.ban_chat1 = res.Data.ban_chat1 group.ban_chat2 = res.Data.ban_chat2 group.isvip = res.Data.isvip + group.isWatch = res.Data.isWatch else self.code = SocketCode.ExceptionOnConnect _mgr_client:destroy() @@ -406,6 +407,7 @@ end function M:__OnNetEvent(msg) print("消息ID===>>" .. msg.Command) + pt(msg) local func = self._eventmap[msg.Command] if (func ~= nil) then func(self, msg.Data) end end diff --git a/lua_probject/base_project/Game/Protocol.lua b/lua_probject/base_project/Game/Protocol.lua index 5ca74c0c..c17a8551 100644 --- a/lua_probject/base_project/Game/Protocol.lua +++ b/lua_probject/base_project/Game/Protocol.lua @@ -349,8 +349,6 @@ Protocol = { WEB_FG_Witness_ROOM = "group/room/join_spectator", -- 圈子退出观战房间 WEB_FG_Exit_Witness_ROOM = "group/room/out_spectator", - -- 设置是否允许观战 - WEB_FG_SET_CANWATCH = "group/set_group_guest", -------------- group-mgr -------------------- -- 进入圈子 @@ -391,6 +389,8 @@ Protocol = { FGMGR_EVT_ISOPEN_CHATROOM = "12011", -- 进入聊天室 FGMGR_EVT_ENTER_CHATROOM = "13004", + -- 设置是否允许观战 + WEB_FG_SET_CANWATCH = "group/set_group_guest", --end::::::::::::::牌友圈协议:::::::::::::::::::: diff --git a/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua b/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua index 4839beaf..f0332ca3 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua @@ -270,6 +270,8 @@ function FamilyMyFamily:Init() notice = self.input_text.text }, self) end + self.input_text.text = "" + self.tex_changeTitle.text = "修改公告" self.cWindow.selectedIndex = 1 end) @@ -280,6 +282,8 @@ function FamilyMyFamily:Init() name = self.input_text.text }, self) end + self.input_text.text = "" + self.tex_changeTitle.text = "修改家族名字" self.cWindow.selectedIndex = 1 end) @@ -290,6 +294,8 @@ function FamilyMyFamily:Init() wechatId = self.input_text.text }, self) end + self.input_text.text = "" + self.tex_changeTitle.text = "修改微信号" self.cWindow.selectedIndex = 1 end) diff --git a/lua_probject/base_project/Game/View/FamilyView.lua b/lua_probject/base_project/Game/View/FamilyView.lua index 821611c9..8cab2b65 100644 --- a/lua_probject/base_project/Game/View/FamilyView.lua +++ b/lua_probject/base_project/Game/View/FamilyView.lua @@ -190,6 +190,9 @@ function M:SetCanWatch() end self._group.isWatch = value self:RefalshMoreBtn() + -- + local fgCtr = ControllerManager.GetController(NewGroupController) + self:UpdateFamilyRoom(fgCtr, self._group.id) end) end @@ -372,7 +375,7 @@ function M:UpdateFamilyRoom(fgCtr, id) obj:GetController('num').selectedIndex = roomList[newIndex].maxPlayers - 2 -- if self._group.isWatch == 1 then -- 允许观战 - obj:GetController('type').selectedIndex = 1 + obj:GetController('type').selectedIndex = self._group.isWatch or 1 -- end local plist = roomList[newIndex].plist local insertName = ""