diff --git a/lua_probject/base_project/Game/Controller/GroupMgrController.lua b/lua_probject/base_project/Game/Controller/GroupMgrController.lua index d90f09e6..565810e4 100644 --- a/lua_probject/base_project/Game/Controller/GroupMgrController.lua +++ b/lua_probject/base_project/Game/Controller/GroupMgrController.lua @@ -13,6 +13,7 @@ GroupMgrEvent = { UpdateGroup = "UpdateGroup", NewMailTip = "NewMailTip", InviteResponse = "InviteResponse", + IsOpenChatRoom = "IsOpenChatRoom", } GroupMgrController = { @@ -346,6 +347,7 @@ end function M:FG_Isopen_ChatRoom(evt_data) print("收到是否开启聊天室推送") pt(evt_data) + DispatchEvent(self._dispatcher, GroupMgrEvent.IsOpenChatRoom, evt_data) end function M:PopEvent() diff --git a/lua_probject/base_project/Game/Controller/NewGroupController.lua b/lua_probject/base_project/Game/Controller/NewGroupController.lua index 245ccedf..fd69b23d 100644 --- a/lua_probject/base_project/Game/Controller/NewGroupController.lua +++ b/lua_probject/base_project/Game/Controller/NewGroupController.lua @@ -133,9 +133,9 @@ function M:FG_TopGroup(group_id, top, callback) end) end -function M:FG_UpdateGroupInfo(id, name, notice, ban, dissolve_opt, kick_opt, apply, ban_chat1, ban_chat2, option, showNum, wechatId, - callback) +function M:FG_UpdateGroupInfo(data, callback) local _client = ControllerManager.GroupClient + --[[ local data = {} data.id = id data.name = name @@ -149,6 +149,45 @@ function M:FG_UpdateGroupInfo(id, name, notice, ban, dissolve_opt, kick_opt, app data.option = option data.show_num = showNum data.wechatId = wechatId + ]] + local group = DataManager.groups.groupMap[data.id] + data.name = data.name or group.name + data.notice = data.notice or group.notice + --data.ban = data.ban or group.ban + data.dissolve_opt = data.dissolve_opt or group.dissolve_opt + data.kick_opt = data.kick_opt or group.kick_opt + --data.ban_apply = data.ban_apply or group.apply + --data.ban_chat1 = data.ban_chat1 or group.ban_chat1 + --data.ban_chat2 = data.ban_chat2 or group.ban_chat2 + data.option = data.option or group.option + data.show_num = data.show_num or group.show_num + data.wechatId = data.wechatId or group.wechatId + + if data.ban == nil then + data.ban = group.ban + end + + if data.ban_chat1 == nil then + data.ban_chat1 = group.ban_chat1 + if group.ban_chat1 == nil then + data.ban_chat1 = 0 + end + end + + if data.ban_chat2 == nil then + data.ban_chat2 = group.ban_chat2 + if group.ban_chat2 == nil then + data.ban_chat2 = 0 + end + end + + if data.ban_apply == nil then + data.ban_apply = group.ban_apply + if group.ban_apply == nil then + data.ban_apply = 0 + end + end + print("FG_UpdateGroupInfo") pt(data) _client:send(Protocol.WEB_FG_UPDATE_GROUP_INFO, data, function(res) diff --git a/lua_probject/base_project/Game/Controller/NewGroupController.lua.rej b/lua_probject/base_project/Game/Controller/NewGroupController.lua.rej new file mode 100644 index 00000000..05b7c8c8 --- /dev/null +++ b/lua_probject/base_project/Game/Controller/NewGroupController.lua.rej @@ -0,0 +1,10 @@ +diff a/lua_probject/base_project/Game/Controller/NewGroupController.lua b/lua_probject/base_project/Game/Controller/NewGroupController.lua (rejected hunks) +@@ -147,6 +147,8 @@ + data.ban_chat2 = ban_chat2 + data.option = option + data.show_num = showNum ++ print("FG_UpdateGroupInfo") ++ pt(data) + _client:send(Protocol.WEB_FG_UPDATE_GROUP_INFO, data, function(res) + callback(res) + end) diff --git a/lua_probject/base_project/Game/View/Family/FamilyBanDesk.lua b/lua_probject/base_project/Game/View/Family/FamilyBanDesk.lua index 5a6a7dec..3b71771b 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyBanDesk.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyBanDesk.lua @@ -43,7 +43,6 @@ end local function AllUid(deskList) local re = {} - pt(deskList) for _, player in pairs(deskList) do re[#re + 1] = player.uid end diff --git a/lua_probject/base_project/Game/View/Family/FamilyEventView.lua b/lua_probject/base_project/Game/View/Family/FamilyEventView.lua index c535ee68..6c1127b4 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyEventView.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyEventView.lua @@ -21,6 +21,7 @@ function FamilyEventView.new(root) mgr_ctr:AddEventListener(GroupMgrEvent.UpdateGroup, handler(self, self._evtUpdateGroup)) mgr_ctr:AddEventListener(GroupMgrEvent.NewMailTip, handler(self, self._evtNewMailTip)) mgr_ctr:AddEventListener(GroupMgrEvent.InviteResponse, handler(self, self._evtInviteResponse)) + mgr_ctr:AddEventListener(GroupMgrEvent.IsOpenChatRoom, handler(self, self._evtInviteResponse)) return self end @@ -120,4 +121,11 @@ function M:_evtInviteResponse(...) imv:Show() end +function M:_evtIsOpenChatRoom(...) + local arg = { ... } + + print("_evtIsOpenChatRoom") + pt(arg) +end + return M diff --git a/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua b/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua index afa0f226..7da6e0cd 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua @@ -20,6 +20,30 @@ end local function ChangeFamilyConfig(data, self) local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_UpdateGroupInfo(data, + function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "更改失败,请稍后再试") + else + ViewUtil.ErrorTip(res.ReturnCode, "修改成功!") + self.family.id = data.id or self.family.id + self.family.name = data.name or self.family.name + self.family.notice = data.notice or self.family.notice + self.family.ban = data.ban or not self.family.ban + self.family.dissolve_opt = data.dissolve_opt or self.family.dissolve_opt + self.family.kick_opt = data.kick_opt or self.family.kick_opt + self.family.apply = data.apply or self.family.apply + self.family.ban_chat1 = data.ban_chat1 or self.family.ban_chat1 + self.family.ban_chat2 = data.ban_chat2 or self.family.ban_chat2 + self.family.option = data.option or self.family.option + self.family.show_num = data.show_num + self.family.wechatId = data.wechatId + self:Refalsh() + self.cWindow.selectedIndex = 0 + end + end + ) + --[[ fgCtr:FG_UpdateGroupInfo( data.id or self.family.id, data.name or self.family.name, @@ -40,7 +64,7 @@ local function ChangeFamilyConfig(data, self) ViewUtil.ErrorTip(res.ReturnCode, "修改成功!") self.family.id = data.id or self.family.id self.family.name = data.name or self.family.name - self.family.text = data.notice or self.family.text + self.family.notice = data.notice or self.family.notice self.family.ban = data.ban or not self.family.ban self.family.dissolve_opt = data.dissolve_opt or self.family.dissolve_opt self.family.kick_opt = data.kick_opt or self.family.kick_opt @@ -55,6 +79,7 @@ local function ChangeFamilyConfig(data, self) end end ) + ]] end @@ -154,13 +179,7 @@ function FamilyMyFamily:Init() self.cWindow = self._view:GetController("cWindow") self.cDisplayNumber = self._view:GetController("cDisplayNumber") - --pt(FairyGUI) - --pt(System) - --self.input_text.emojies = FguiEmojiDict.EmojiesDict - self.btn_playSet.onClick:Set(function() - --self:Close() - --BaseWindow.DestroyAll() local curView = ViewManager.GetCurrenView() if curView.class == "FamilyMainView" then curView:PlayEdit() @@ -177,7 +196,6 @@ function FamilyMyFamily:Init() end) self.btn_buyCrad.onClick:Set(function() - --BaseWindow.DestroyAll() local curView = ViewManager.GetCurrenView() if curView.class == "FamilyMainView" then curView:ShowShop() @@ -194,10 +212,6 @@ function FamilyMyFamily:Init() end) self.btn_checkNumber.onClick:Set(function() - --self:Close() - --root:OpenAllNumber(self.family) - - --BaseWindow.DestroyAll() local curView = ViewManager.GetCurrenView() if curView.class == "FamilyMainView" then curView:OpenAllNumber(self.family) @@ -209,10 +223,6 @@ function FamilyMyFamily:Init() end) self.btn_applyMsg.onClick:Set(function() - --self:Close() - --root:AuditNumber() - - --BaseWindow.DestroyAll() local curView = ViewManager.GetCurrenView() if curView.class == "FamilyMainView" then curView:AuditNumber() @@ -245,17 +255,32 @@ function FamilyMyFamily:Init() end) self.btn_editNotice.onClick:Set(function() - self.changeCallback = function() ChangeFamilyConfig({ notice = self.input_text.text }, self) end + self.changeCallback = function() + ChangeFamilyConfig({ + id = self.family.id, + notice = self.input_text.text + }, self) + end self.cWindow.selectedIndex = 1 end) self.btn_editName.onClick:Set(function() - self.changeCallback = function() ChangeFamilyConfig({ name = self.input_text.text }, self) end + self.changeCallback = function() + ChangeFamilyConfig({ + id = self.family.id, + name = self.input_text.text + }, self) + end self.cWindow.selectedIndex = 1 end) self.btn_editWx.onClick:Set(function() - self.changeCallback = function() ChangeFamilyConfig({ wechatId = self.input_text.text }, self) end + self.changeCallback = function() + ChangeFamilyConfig({ + id = self.family.id, + wechatId = self.input_text.text + }, self) + end 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 79c5b8b3..922c84d7 100644 --- a/lua_probject/base_project/Game/View/FamilyView.lua +++ b/lua_probject/base_project/Game/View/FamilyView.lua @@ -266,6 +266,21 @@ end function M:BanFamily() local fgCtr = ControllerManager.GetController(NewGroupController) + local data = { + id = self._group.id, + ban = not self._group.ban + } + fgCtr:FG_UpdateGroupInfo(data, + function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "一键打样失败") + else + self._group.ban = not self._group.ban + self._view:GetController('familyBan').selectedIndex = self._group.ban and 1 or 0 + self:RefalshMoreBtn() + end + end) + --[[ fgCtr:FG_UpdateGroupInfo(self._group.id, self._group.name, "", not self._group.ban, self._group.dissolve_opt, self._group.kick_opt, self._group.apply, self._group.ban_chat1, self._group.ban_chat2, self._group.option, 0, function(res) @@ -274,7 +289,7 @@ function M:BanFamily() else self._view:GetController('familyBan').selectedIndex = self._group.ban and 1 or 0 end - end) + end)]] end function M:BanDeskmate() @@ -799,6 +814,14 @@ function M:RefalshMoreBtn() end MORE_LIST[5].name = tex + local tex = "" + if self._group.ban then + tex = "一键开启" + else + tex = "一键打烊" + end + MORE_LIST[1].name = tex + self:ChangeMore() end diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupMngSettingView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupMngSettingView.lua index ff2d3e3f..d51a36df 100644 --- a/lua_probject/base_project/Game/View/NewGroup/GroupMngSettingView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/GroupMngSettingView.lua @@ -64,15 +64,16 @@ function M:FillView() self._view:GetChild("btn_ok").onClick:Set(function() ViewUtil.ShowModalWait() - local gid = self.group_id - local name = tex_name.text - local notice = tex_notice.text - local ban = ctr_ban.selectedIndex == 1 - local dissolve_opt = ctr_dissolve_time.selectedIndex + 1 - local kick_opt = ctr_kick_time.selectedIndex + 1 - local apply = ctr_alliance.selectedIndex == 1 and ctr_apply.selectedIndex or 0 - local ban_chat1 = not btn_chat_input.selected - local ban_chat2 = not btn_chat_voice.selected + local data = {} + data.id = self.group_id + data.name = tex_name.text + data.notice = tex_notice.text + data.ban = ctr_ban.selectedIndex == 1 + data.dissolve_opt = ctr_dissolve_time.selectedIndex + 1 + data.kick_opt = ctr_kick_time.selectedIndex + 1 + data.apply = ctr_alliance.selectedIndex == 1 and ctr_apply.selectedIndex or 0 + data.ban_chat1 = not btn_chat_input.selected + data.ban_chat2 = not btn_chat_voice.selected local fgCtr = ControllerManager.GetController(NewGroupController) local pt = ctr_pt.selectedIndex @@ -102,7 +103,7 @@ function M:FillView() end end - fgCtr:FG_UpdateGroupInfo(gid, name, notice, ban, dissolve_opt, kick_opt, apply, ban_chat1, ban_chat2, option,showNum, function(res) + fgCtr:FG_UpdateGroupInfo(data, function(res) ViewUtil.CloseModalWait() if res.ReturnCode ~= 0 then ViewUtil.ErrorTip(res.ReturnCode,"设置大联盟失败。") diff --git a/wb_new_ui/assets/Family/Main.xml b/wb_new_ui/assets/Family/Main.xml index 03dc300b..e9f72925 100644 --- a/wb_new_ui/assets/Family/Main.xml +++ b/wb_new_ui/assets/Family/Main.xml @@ -8,7 +8,7 @@ - + @@ -100,19 +100,19 @@ + + + - + - - - diff --git a/wb_new_ui/assets/Family/NumberRecord/comp_numberRecord.xml b/wb_new_ui/assets/Family/NumberRecord/comp_numberRecord.xml index f6419892..08738a41 100644 --- a/wb_new_ui/assets/Family/NumberRecord/comp_numberRecord.xml +++ b/wb_new_ui/assets/Family/NumberRecord/comp_numberRecord.xml @@ -1,12 +1,12 @@ - + - + @@ -41,7 +41,7 @@ - + @@ -67,29 +67,29 @@ - + - + - + - + - + - + diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main/PlayerHead_1.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main/PlayerHead_1.xml index 62f65f26..a8b2232a 100644 --- a/wb_new_ui/assets/Main_Majiang/Main_new/Main/PlayerHead_1.xml +++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main/PlayerHead_1.xml @@ -1,7 +1,7 @@ - + @@ -30,11 +30,11 @@ - + - + - + diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main/PlayerHead_2.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main/PlayerHead_2.xml index fc64768c..d364eaf4 100644 --- a/wb_new_ui/assets/Main_Majiang/Main_new/Main/PlayerHead_2.xml +++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main/PlayerHead_2.xml @@ -1,7 +1,7 @@ - + @@ -27,10 +27,11 @@ - + + - + diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/PlayerHead2_2.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/PlayerHead2_2.xml index 8acb4f93..44aecd60 100644 --- a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/PlayerHead2_2.xml +++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/PlayerHead2_2.xml @@ -1,7 +1,7 @@ - + @@ -27,10 +27,11 @@ - + + - + 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 09ba8097..52960b61 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 @@ -132,9 +132,9 @@ - + - + diff --git a/wb_new_ui/assets/Main_Poker/image/NewPoker/Rectangle 273.png b/wb_new_ui/assets/Main_Poker/image/NewPoker/Rectangle 273.png new file mode 100644 index 00000000..fc7e7386 Binary files /dev/null and b/wb_new_ui/assets/Main_Poker/image/NewPoker/Rectangle 273.png differ diff --git a/wb_new_ui/assets/Main_Poker/newcard/di(1).xml b/wb_new_ui/assets/Main_Poker/newcard/di(1).xml index 81ba9fc3..9376108b 100644 --- a/wb_new_ui/assets/Main_Poker/newcard/di(1).xml +++ b/wb_new_ui/assets/Main_Poker/newcard/di(1).xml @@ -1,7 +1,7 @@ - + diff --git a/wb_new_ui/assets/Main_Poker/package.xml b/wb_new_ui/assets/Main_Poker/package.xml index ceee0b53..7acee9a1 100644 --- a/wb_new_ui/assets/Main_Poker/package.xml +++ b/wb_new_ui/assets/Main_Poker/package.xml @@ -229,6 +229,7 @@ + \ No newline at end of file diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes b/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes index e5da6906..da200bff 100644 Binary files a/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes and b/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes differ 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 394b330f..39843bd3 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 diff --git a/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_atlas0.png b/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_atlas0.png index 3f0ae6f3..258f4b28 100644 Binary files a/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_atlas0.png and b/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_fui.bytes b/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_fui.bytes index 948301a6..f4b86f3a 100644 Binary files a/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_fui.bytes and b/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_fui.bytes differ