diff --git a/lua_probject/base_project/Game/Controller/NewGroupController.lua b/lua_probject/base_project/Game/Controller/NewGroupController.lua index 4cb9d4a5..0f3ab28b 100644 --- a/lua_probject/base_project/Game/Controller/NewGroupController.lua +++ b/lua_probject/base_project/Game/Controller/NewGroupController.lua @@ -42,6 +42,8 @@ function M:FG_GroupList(callback) group.option = tem.option group.show_num = tem.show_num group.isShow = tem.isShow + group.isOpenChatRoom = tem.isOpenChatRoom + group.isWatch = tem.isWatch l_groups:add(group) end end @@ -1582,7 +1584,7 @@ function M:FG_SetGroupShow(isShow, groupId, callback) end) end ---聊天室 +--聊天室数据 ---@groupId 亲友圈id function M:GetChatRoom(groupId, callback) local _client = ControllerManager.GroupClient @@ -1592,3 +1594,27 @@ function M:GetChatRoom(groupId, callback) callback(res) end) end + +--禁止&允许成员查看聊天室 +function M:SetIsOpenChatRoom(groupId, value, callback) + print("能否查看聊天室 groupId = ", groupId) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = groupId + _data.isOpenChatRoom = value + _client:send(Protocol.WEB_FG_SET_ISOPEN_CHATROOM, _data, function(res) + callback(res) + end) +end + +-- 设置是否允许观战 +function M:SetCanWatch(groupId, value, callback) + print("设置是否能观战 groupId = ", groupId) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = groupId + _data.isWatch = value + _client:send(Protocol.WEB_FG_SET_CANWATCH, _data, function(res) + callback(res) + end) +end \ No newline at end of file diff --git a/lua_probject/base_project/Game/Protocol.lua b/lua_probject/base_project/Game/Protocol.lua index 96beb6d7..ab0d4d09 100644 --- a/lua_probject/base_project/Game/Protocol.lua +++ b/lua_probject/base_project/Game/Protocol.lua @@ -273,7 +273,12 @@ Protocol = { WEB_FG_SET_Family_Heartbeat = "group/set_group_heartbeat", -- 亲友圈聊天室 - WEB_FG_GETCHATROOM = 'group/get_chat_rooms', + WEB_FG_GETCHATROOM = "group/get_chat_rooms", + -- 设置是否允许成员查看聊天室 + WEB_FG_SET_ISOPEN_CHATROOM = "group/set_open_chatroom", + -- 设置是否允许观战 + WEB_FG_SET_CANWATCH = "group/set_group_guest", + -------------- group-log--------------------- -- 获取奖励日志 WEB_FG_GET_REWARDS_LOG = "group/log/get_reward_log", diff --git a/lua_probject/base_project/Game/View/Family/FamilyBanDesk.lua b/lua_probject/base_project/Game/View/Family/FamilyBanDesk.lua index 4d3f3649..a136ed6a 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyBanDesk.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyBanDesk.lua @@ -14,19 +14,30 @@ local function ShowMainView(self) self.root.familyType.selectedIndex = rootLastIndex or 1 end -local function LoadData(BanData) - -end - -local function GetIconFromGroupData(playerId, group) - local player = group.memberMap[playerId] - if player then - return player.portrait +local function RemoveItem(table, condition) + for _,item in pairs(table) do + if condition(item) then + table[_] = nil + end end - print("玩家不在group中,无法找到头像 玩家id=",playerId) + --修复下标 + local re = {} + for _,item in pairs(table) do + re[#re + 1] = item + end - return "" + return re +end + +local function GetPlayerFromGroupData(playerId, group) + local player = group.memberMap[playerId] + if player then + return player + end + + print("玩家不在group中, 玩家id=",playerId) + return nil end local function AllUid(deskList) @@ -40,17 +51,39 @@ local function AllUid(deskList) end local function AddPlayer(data, self) + + if self.sending then + ViewUtil.ShowBannerOnScreenCenter("正在操作中。。") + return + end + -- 点击弹出选择成员界面 local view = FamilySelectNumber.New() view:Show(self.root._group.id, function(number) local players = AllUid(data.deskList) players[#players + 1] = number.uid + self.sending = true local fgCtr = ControllerManager.GetController(NewGroupController) - fgCtr:FG_SetBanTable1(self.root._group.id, data.deskId, players, data.deskName, function() self:ReflashDesk() end) + fgCtr:FG_SetBanTable1(self.root._group.id, data.deskId, players, data.deskName, function(res) + self.sending = false + if res.ReturnCode ~= 0 then + ViewUtil.ShowBannerOnScreenCenter("设置失败") + return + end + data.deskList[#data.deskList + 1] = {uid = number.uid} + self:ReflashDesk() + end) end) end local function DelPalyer(data, uid, self) + --print("删除玩家", uid) + + if self.sending then + ViewUtil.ShowBannerOnScreenCenter("正在操作中。。") + return + end + local players = AllUid(data.deskList) for _, id in pairs(players) do if id == uid then @@ -65,18 +98,46 @@ local function DelPalyer(data, uid, self) end players = fix + self.sending = true local fgCtr = ControllerManager.GetController(NewGroupController) - fgCtr:FG_SetBanTable1(self.root._group.id, data.deskId, players, data.deskName, function() self:ReflashDesk() end) + fgCtr:FG_SetBanTable1(self.root._group.id, data.deskId, players, data.deskName, function(res) + self.sending = false + if res.ReturnCode ~= 0 then + ViewUtil.ShowBannerOnScreenCenter("删除失败") + return + end + data.deskList = RemoveItem(data.deskList, function(item) + if item.uid == uid then + return true + end + end) + self:ReflashDesk() + end) end local function DelDesk(data, self) + + if self.sending then + ViewUtil.ShowBannerOnScreenCenter("正在操作中。。") + return + end + + self.sending = true local fgCtr = ControllerManager.GetController(NewGroupController) - fgCtr:FG_SetBanTable1(self.root._group.id, data.deskId, {}, data.deskName, function() self:Reflash() end) + fgCtr:FG_SetBanTable1(self.root._group.id, data.deskId, {}, data.deskName, function() + self.sending = false + self:Reflash() + end) end local function ChangeName(deskData, name, self) local fgCtr = ControllerManager.GetController(NewGroupController) - fgCtr:FG_SetBanTable1(self.root._group.id, deskData.deskId, AllUid(deskData.deskList), name, function() + fgCtr:FG_SetBanTable1(self.root._group.id, deskData.deskId, AllUid(deskData.deskList), name, function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ShowBannerOnScreenCenter("删除失败") + return + end + deskData.deskName = name self:ReflashDesk() self:CloseRemaskWindow() end) @@ -104,6 +165,63 @@ local function Sort(BanData) return re end +local function list_BanedPlayersRenderer(index, obj, data, self, fatherIndex) + local loader_icon = obj:GetChild("loader_icon") + local tex_name = obj:GetChild("tex_name") + + local uid = data.deskList[index + 1].uid + local player = GetPlayerFromGroupData(uid, self.root._group) + obj:GetController("cStyle").selectedIndex = 0 + tex_name.text = player.nick + local img = player.portrait + ImageLoad.Load(img, loader_icon) + + local btn_delPlayer = obj:GetChild("btn_delPlayer") + btn_delPlayer.onClick:Set(function() + -- 删除玩家按钮 + self.changedIndex = fatherIndex + DelPalyer(data, player.uid, self) + end) +end + +local function list_banItemRenderer(index, obj, self) + local data = self.BanData[index +1] + --print("刷新关系") + --pt(data) + local tex_name = obj:GetChild("tex_name") + local list_BanedPlayers = obj:GetChild("list_BanedPlayers") + local btn_del = obj:GetChild("btn_del") + local btn_edit = obj:GetChild("btn_edit") + + tex_name.text = data.deskName + obj:GetController("cStyle").selectedIndex = 0 + + btn_edit.onClick:Set(function() + -- 修改备注 + self.changedIndex = index + self.selectBanItem = data + self:OpenRemaskWindow() + end) + + btn_del.onClick:Set(function() + -- 删除整个桌子 + DelDesk(data, self) + end) + + list_BanedPlayers.itemRenderer = function(i, o) + list_BanedPlayersRenderer(i, o, data, self, index) + end + list_BanedPlayers.numItems = #data.deskList + + local add_play = list_BanedPlayers:AddItemFromPool() + add_play:GetController("cStyle").selectedIndex = 1 + add_play:GetChild("btn_addPlayer").onClick:Set(function() + -- 添加玩家按钮 + self.changedIndex = index + AddPlayer(data, self) + end) +end + --endregion @@ -142,6 +260,8 @@ end function BanDesk:Init() + self.sending = false + self.btn_close = self._view:GetChild("btn_close") self.list_banItem = self._view:GetChild("list_banItem") self.cSetName = self._view:GetController("cSetName") @@ -170,58 +290,9 @@ function BanDesk:Init() end) self.list_banItem.itemRenderer = function(index, obj) - - local data = self.BanData[index +1] - - local tex_name = obj:GetChild("tex_name") - local list_BanedPlayers = obj:GetChild("list_BanedPlayers") - local btn_del = obj:GetChild("btn_del") - local btn_edit = obj:GetChild("btn_edit") - - tex_name.text = data.deskName - obj:GetController("cStyle").selectedIndex = 0 - - btn_edit.onClick:Set(function() - -- 修改备注 - self.changedIndex = index - self.selectBanItem = data - self:OpenRemaskWindow() - end) - - btn_del.onClick:Set(function() - -- 删除整个桌子 - DelDesk(data, self) - end) - - list_BanedPlayers.itemRenderer = function(playerIndex, playerObj) - - local loader_icon = playerObj:GetChild("loader_icon") - local tex_name = playerObj:GetChild("tex_name") - - local player = data.deskList[playerIndex + 1] - playerObj:GetController("cStyle").selectedIndex = 0 - tex_name.text = player.nick - local img = GetIconFromGroupData(player.uid, self.root._group) - ImageLoad.Load(img, loader_icon) - - local btn_delPlayer = playerObj:GetChild("btn_delPlayer") - btn_delPlayer.onClick:Set(function() - -- 删除玩家按钮 - self.changedIndex = index - DelPalyer(data, player.uid, self) - end) - end - - list_BanedPlayers.numItems = #data.deskList - - local add_play = list_BanedPlayers:AddItemFromPool() - add_play:GetController("cStyle").selectedIndex = 1 - add_play:GetChild("btn_addPlayer").onClick:Set(function() - -- 添加玩家按钮 - self.changedIndex = index - AddPlayer(data, self) - end) + list_banItemRenderer(index, obj, self) end + end function BanDesk:Reflash() @@ -235,7 +306,6 @@ function BanDesk:Reflash() end function BanDesk:GetBanTableCallback(res) - print("BanDesk:GetBanTableCallback") self.BanData = Sort(res.Data.ban_list) self.list_banItem.numItems = #self.BanData @@ -245,32 +315,26 @@ function BanDesk:GetBanTableCallback(res) local btn_addBanItem = addBanItem:GetChild("btn_addBanItem") addBanItem:GetController("cStyle").selectedIndex = 1 btn_addBanItem.onClick:Set(function() + + if self.sending then + ViewUtil.ShowBannerOnScreenCenter("正在操作中。。") + return + end + + self.sending = true local fgCtr = ControllerManager.GetController(NewGroupController) local groupId = self.root._group.id local banList = {} fgCtr:FG_SetBanTable1(groupId, -1, banList, "新建关系", function() + self.sending = false self:Reflash() end) end) end function BanDesk:ReflashDesk() - -- 只刷新一个元素,暂时怎么处理,有时间优化 - local data = self.BanData[self.changedIndex +1] local obj = self.list_banItem:GetChildAt(self.changedIndex) - local tex_name = obj:GetChild("tex_name") - local list_BanedPlayers = obj:GetChild("list_BanedPlayers") - tex_name.text = data.deskName - obj:GetController("cStyle").selectedIndex = 0 - list_BanedPlayers.numItems = #data.deskList - - local add_play = list_BanedPlayers:AddItemFromPool() - add_play:GetController("cStyle").selectedIndex = 1 - add_play:GetChild("btn_addPlayer").onClick:Set(function() - -- 添加玩家按钮 - self.changedIndex = self.changedIndex - AddPlayer(data, self) - end) + list_banItemRenderer(self.changedIndex, obj, self) end -- 打开备注界面 diff --git a/lua_probject/base_project/Game/View/Family/FamilyChatRoom.lua b/lua_probject/base_project/Game/View/Family/FamilyChatRoom.lua index 476a9e4e..9aac9f9f 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyChatRoom.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyChatRoom.lua @@ -1,5 +1,41 @@ require 'FairyGUI' +--region LOCAL + +local function PlayersItemRenderer(index, obj, self) + local loader_icon = obj:GetChild("") + local tex_name = obj:GetChild("tex_name") + local tex_id = obj:GetChild("tex_id") + local tex_score = obj:GetChild("tex_score") + local cWiner = obj:GetController("cWiner") + + tex_name.text = "wenb" + tex_id.text = "wenb" + tex_score.text = "wenb" +end + +local function ChatItemRenderer(index, obj, self) + local list_players = obj:GetChild("list_players") + local tex_time = obj:GetChild("tex_time") + local tex_name = obj:GetChild("tex_name") + + tex_time.text = "000" + tex_name.text = "000" + + list_players.itemRenderer = PlayersItemRenderer + list_players.numItems = 3 +end + +local function GetIsOpenChatRoom(groupId, self) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:GetIsOpenChatRoom(groupId, function(res) + print("收到是否打开聊天室协议") + pt(res) + end) +end + +--endregion + local FamilyChatRoom = {} --[[ @@ -20,13 +56,15 @@ function FamilyChatRoom:Init(com, root) --self._full_offset = false --self._animation = false --BaseWindow.init(self, "ui://Family/com_chatRoom") - + self.rendererData = {} self.root = root self._view = com self.list_chat = self._view:GetChild("list_chat") self.btn_quit = self._view:GetChild("btn_quit") + self.list_chat.itemRenderer = ChatItemRenderer + self.btn_quit.onClick:Set(function() self:Close() end) @@ -43,15 +81,19 @@ function FamilyChatRoom:Show() local cChatRoom = self.root._view:GetController("cIsChatRoom") cChatRoom.selectedIndex = 1 + GetIsOpenChatRoom(self.root._group.id, self) + local fgCtr = ControllerManager.GetController(NewGroupController) fgCtr:GetChatRoom(self.root._group.id, function(res) self:GetChatCallBack(res) end) + self.list_chat.numItems = 4 end function FamilyChatRoom:GetChatCallBack(res) print("收到聊天室协议") pt(res) + pt(res.Data.records.totalScore) end return FamilyChatRoom \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Family/FamilyJoinAndCreate.lua b/lua_probject/base_project/Game/View/Family/FamilyJoinAndCreate.lua index d73888b3..4897edc7 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyJoinAndCreate.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyJoinAndCreate.lua @@ -36,8 +36,8 @@ function FamilyJoinAndCreate:init(root) fgCtr:FG_GroupList(function(res) fgCtr:FG_CreateGroup(self.input_name.text, 1, 2, function(res) if res.ReturnCode == 0 then - --self.familyType.selectedIndex = 1 - self:ConnetFamily(1, DataManager.groups.groupList, true) + root.familyType.selectedIndex = 1 + root:ConnetFamily(1, DataManager.groups.groupList, true) else ViewUtil.ErrorTip(res.ReturnCode, '创建大联盟失败!') end diff --git a/lua_probject/base_project/Game/View/Family/FamilyMsgRecord.lua b/lua_probject/base_project/Game/View/Family/FamilyMsgRecord.lua new file mode 100644 index 00000000..a910d543 --- /dev/null +++ b/lua_probject/base_project/Game/View/Family/FamilyMsgRecord.lua @@ -0,0 +1,41 @@ +local FamilyMsgRecord = {} + +function FamilyMsgRecord.New(callback) + setmetatable(FamilyMsgRecord, { __index = BaseWindow }) + local inst = setmetatable({}, { __index = FamilyMsgRecord }) + inst._close_destroy = true + inst._full = true + inst._animation = false + inst._full_offset = false + inst._anim_pop = 0 + BaseWindow.init(inst, 'ui://Family/com_FamilyMsgRecord') + inst:Init() + inst._root_view:GetChild("win_mode").visible = false + + inst.closeCallback = callback + + return inst +end + +function FamilyMsgRecord:Show() + BaseWindow.Show(self) +end + +function FamilyMsgRecord:Init() + self.btn_quit = self._view:GetChild("btn_quit") + + self.btn_quit.onClick:Set(function() + self:Close() + end) +end + +function FamilyMsgRecord:Close() + + if self.closeCallback then + self.closeCallback() + end + + BaseWindow.Close(self) +end + +return FamilyMsgRecord \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua b/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua index 222bd5ac..00072363 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua @@ -1,4 +1,5 @@ local FamilyRoomCardRecord = import(".FamilyRoomCardRecord") +local RoomCardRecord = import(".RoomCardRecord") --region LOCAL @@ -15,6 +16,34 @@ local function ShowMainView() root.familyType.selectedIndex = rootLastIndex or 1 end +local function ChangeNotice(self) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_UpdateGroupInfo( + self.family.id, + self.family.name, + self.input_notice.text, + not self.family.ban, + self.family.dissolve_opt, + self.family.kick_opt, + self.family.apply, + self.family.ban_chat1, + self.family.ban_chat2, + self.family.option, + 0, + function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "更改公告失败,请稍后再试") + else + ViewUtil.ErrorTip(res.ReturnCode, "修改成功!") + self.family.notice = self.input_notice.text + self:Refalsh() + self.cWindow.selectedIndex = 0 + end + end + ) +end + + --endregion function FamilyMyFamily:TryShow(groupId, r) @@ -52,8 +81,6 @@ function FamilyMyFamily:Refalsh() -- index = 0 是显示隐藏按钮 self.showNumber = self.family.isShow - print("self.family.isShow",self.family.isShow) - pt(self.family) if self.showNumber == 0 then self.cDisplayNumber.selectedIndex = 1 self.tex_fNumber.text = "*" @@ -85,6 +112,7 @@ function FamilyMyFamily:Init() self.tex_cradNum = self._view:GetChild("tex_cradNum") self.tex_nocice = self._view:GetChild("tex_nocice") self.tex_playerName = self._view:GetChild("tex_playerName") + self.tex_changeTitle = self._view:GetChild("tex_changeTitle") self.btn_quitFamily = self._view:GetChild("btn_quitFamily") self.btn_playSet = self._view:GetChild("btn_playSet") @@ -122,7 +150,9 @@ function FamilyMyFamily:Init() end) self.btn_czRecord.onClick:Set(function() - local view = FamilyRoomCardRecord.New() + --local view = FamilyRoomCardRecord.New() + --view:Show() + local view = RoomCardRecord.New() view:Show() end) @@ -140,7 +170,12 @@ function FamilyMyFamily:Init() local fgCtr = ControllerManager.GetController(NewGroupController) print("发送了退出协议 familyid = ",self.family.id) fgCtr:FG_ExitGroup(self.family.id, function(res) - pt(res) + if res.ReturnCode ~= 0 then + return + end + self:Close() + ControllerManager.ChangeController(NewGroupController) + ViewManager.ChangeView(ViewManager.View_Family) end) end) @@ -156,32 +191,7 @@ function FamilyMyFamily:Init() self.cWindow.selectedIndex = 1 end) - self.btn_confirmNotice.onClick:Set(function() - local fgCtr = ControllerManager.GetController(NewGroupController) - fgCtr:FG_UpdateGroupInfo( - self.family.id, - self.family.name, - self.input_notice.text, - not self.family.ban, - self.family.dissolve_opt, - self.family.kick_opt, - self.family.apply, - self.family.ban_chat1, - self.family.ban_chat2, - self.family.option, - 0, - function(res) - if res.ReturnCode ~= 0 then - ViewUtil.ErrorTip(res.ReturnCode, "更改公告失败,请稍后再试") - else - ViewUtil.ErrorTip(res.ReturnCode, "修改成功!") - self.family.notice = self.input_notice.text - self:Refalsh() - self.cWindow.selectedIndex = 0 - end - end - ) - end) + self.btn_confirmNotice.onClick:Set(ChangeNotice) self.btn_hideNumber.onClick:Set(function() diff --git a/lua_probject/base_project/Game/View/Family/RoomCardRecord.lua b/lua_probject/base_project/Game/View/Family/RoomCardRecord.lua new file mode 100644 index 00000000..8930525c --- /dev/null +++ b/lua_probject/base_project/Game/View/Family/RoomCardRecord.lua @@ -0,0 +1,25 @@ +local RoomCardRecord = {} + +function RoomCardRecord.New() + setmetatable(RoomCardRecord, { __index = BaseWindow }) + local inst = setmetatable({}, { __index = RoomCardRecord }) + inst._close_destroy = true + inst._full = true + inst._animation = false + inst._full_offset = false + inst._anim_pop = 0 + BaseWindow.init(inst, 'ui://Family/com_familyRoomCardRecord') + inst:Init() + inst._root_view:GetChild("win_mode").visible = false + return inst +end + +function RoomCardRecord:Show() + BaseWindow.Show(self) +end + +function RoomCardRecord:Init() + self.list_record = self._view:GetChild("list_record") +end + +return RoomCardRecord \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/FamilyView.lua b/lua_probject/base_project/Game/View/FamilyView.lua index e6e474c8..c1f76b36 100644 --- a/lua_probject/base_project/Game/View/FamilyView.lua +++ b/lua_probject/base_project/Game/View/FamilyView.lua @@ -16,6 +16,7 @@ local FamilyMyFamily = import(".Family.FamilyMyFamily") local FamilyRoomCard = import(".Family.FamilyRoomCard") local FamilyMyfamilyList = import(".Family.FamilyMyfamilyList") local FamilyChatRoom = import(".Family.FamilyChatRoom") +local FamilyMsgRecord = import(".Family.FamilyMsgRecord") --- FamilyView = {} @@ -126,6 +127,58 @@ function M:ShareWx() familyInviteFamilyView:Show() end +function M:MsgView() + self.lastType = self.familyType.selectedIndex + self.familyType.selectedIndex = 0 + local view = FamilyMsgRecord.New(function() + self.familyType.selectedIndex = self.lastType + end) + view:Show() +end + +function M:SetIsOpenChatRoom() + + local value = 1 + if self._group.isOpenChatRoom == 1 then + value = 0 + elseif self._group.isOpenChatRoom == 0 then + value = 1 + end + + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:SetIsOpenChatRoom(self._group.id, value, function(res) + print("设置开启聊天室协议") + pt(res) + + if res.ReturnCode ~= 0 then + return + end + self._group.isOpenChatRoom = value + self:RefalshMoreBtn() + end) +end + +function M:SetCanWatch() + local value = 1 + if self._group.isWatch == 1 then + value = 0 + elseif self._group.isWatch == 0 then + value = 1 + end + + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:SetCanWatch(self._group.id, value, function(res) + print("设置是否观战") + pt(res) + + if res.ReturnCode ~= 0 then + return + end + self._group.isWatch = value + self:RefalshMoreBtn() + end) +end + function M:FamilyRecord() if not self._ViewChild_Record or not self._ViewChild_Record.ShouRanks then self._ViewChild_Record = FamilyRecord.New(self, self._group.id) @@ -198,6 +251,7 @@ function M:MoreBtn() end) ctr_more.selectedIndex = 1 self:ChangeMore() + self:RefalshMoreBtn() end function M:BanFamily() @@ -644,7 +698,7 @@ local MORE_LIST = { }, { name = "消息记录", - Fct = M.ShareWx + Fct = M.MsgView }, { name = "禁止同桌", @@ -652,7 +706,11 @@ local MORE_LIST = { }, { name = "关闭聊天室", - Fct = M.ShareWx + Fct = M.SetIsOpenChatRoom + }, + { + name = "关闭旁观", + Fct = M.SetCanWatch }, } @@ -682,4 +740,26 @@ function M:ChangeMore() list_other.numItems = #moreList end +function M:RefalshMoreBtn() + -- 有空优化吧 + + local tex = "" + if self._group.isOpenChatRoom == 1 then + tex = "关闭聊天室" + elseif self._group.isOpenChatRoom == 0 then + tex = "打开聊天室" + end + MORE_LIST[4].name = tex + + local tex = "" + if self._group.isWatch == 1 then + tex = "关闭观战" + elseif self._group.isWatch == 0 then + tex = "打开观战" + end + MORE_LIST[5].name = tex + + self:ChangeMore() +end + return M diff --git a/wb_new_ui/assets/Family/ChatRoom/Component/item_record.xml b/wb_new_ui/assets/Family/ChatRoom/Component/item_record.xml index 1f52f4d4..ea74fc79 100644 --- a/wb_new_ui/assets/Family/ChatRoom/Component/item_record.xml +++ b/wb_new_ui/assets/Family/ChatRoom/Component/item_record.xml @@ -5,7 +5,7 @@ - + diff --git a/wb_new_ui/assets/Family/ChatRoom/com_chatRoom.xml b/wb_new_ui/assets/Family/ChatRoom/com_chatRoom.xml index c7121cc6..f52eb93c 100644 --- a/wb_new_ui/assets/Family/ChatRoom/com_chatRoom.xml +++ b/wb_new_ui/assets/Family/ChatRoom/com_chatRoom.xml @@ -10,7 +10,7 @@ - + diff --git a/wb_new_ui/assets/Family/MyFamily/com_myFamily.xml b/wb_new_ui/assets/Family/MyFamily/com_myFamily.xml index 81ae1b74..f621dfc0 100644 --- a/wb_new_ui/assets/Family/MyFamily/com_myFamily.xml +++ b/wb_new_ui/assets/Family/MyFamily/com_myFamily.xml @@ -64,7 +64,13 @@ - + + + + + + + @@ -77,7 +83,7 @@ - + diff --git a/wb_new_ui/assets/Family/package.xml b/wb_new_ui/assets/Family/package.xml index 673e156b..e9a61b6d 100644 --- a/wb_new_ui/assets/Family/package.xml +++ b/wb_new_ui/assets/Family/package.xml @@ -320,7 +320,7 @@ - + @@ -358,6 +358,11 @@ + + + + + \ No newline at end of file diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0.png b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0.png index e7c54b42..84a821cc 100644 Binary files a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0.png and b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_1.png b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_1.png index fc2db257..24b40d6d 100644 Binary files a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_1.png and b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_1.png differ diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_2.png b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_2.png index f9d4fff7..0c3ba2cc 100644 Binary files a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_2.png and b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_2.png differ diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_3.png b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_3.png index bd3bc905..fe2e3307 100644 Binary files a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_3.png and b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_3.png differ diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_4.png b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_4.png index fe2e3307..561d9cb6 100644 Binary files a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_4.png and b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_4.png differ 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 25b72990..aa8708f7 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