From 1a514447749bdab35671cf783c5599cbe263aae0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-7R8JEQQ\\k" <1076390229@qq.com> Date: Thu, 24 Jul 2025 15:54:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E5=91=98=E5=A4=87=E6=B3=A8=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=81=E5=AE=B6=E6=97=8F=E7=95=8C=E9=9D=A2=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=B5=81=E7=A8=8B=E6=95=B4=E7=90=86=E3=80=81=E5=80=8D?= =?UTF-8?q?=E6=95=B0=E4=BA=8C=E7=BA=A7=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Game/Controller/GroupMgrController.lua | 17 +++ .../Game/Controller/NewGroupController.lua | 1 + lua_probject/base_project/Game/Protocol.lua | 9 +- .../Game/View/Family/FamilyAllNumbers.lua | 3 +- .../Game/View/Family/FamilyAuditNumber.lua | 59 ++++++--- .../Game/View/Family/FamilyEventView.lua | 26 +++- .../Game/View/Family/FamilyMyFamily.lua | 8 +- .../base_project/Game/View/FamilyView.lua | 118 ++++++++++++++---- .../base_project/Game/View/MissileSender.lua | 2 + .../MngView/GroupGameSettingView_jaingxi.lua | 30 ++++- .../Component/comp_auditNumberChild.xml | 2 +- .../Family/Main/Component/c_otherChild.xml | 9 ++ .../MyFamily/Component/btn_familyManage.xml | 9 ++ wb_new_ui/assets/Family/package.xml | 1 + .../Main_new/Clearing/Component/Missile.xml | 2 +- .../NewGroup/mgr/View_GroupGameSetting.xml | 44 ++++--- wb_new_ui/assets/NewGroup/package.xml | 4 + .../ART/base/Family/ui/Family_atlas0.png | Bin 5027990 -> 5016119 bytes .../ART/base/Family/ui/Family_atlas0_1.png | Bin 2180180 -> 2180564 bytes .../ART/base/Family/ui/Family_fui.bytes | Bin 118847 -> 119453 bytes .../main_majiang/ui/Main_Majiang_fui.bytes | Bin 378424 -> 378424 bytes .../ART/base/newgroup/ui/NewGroup_atlas0.png | Bin 1077592 -> 2374897 bytes .../base/newgroup/ui/NewGroup_atlas0_1.png | Bin 1806848 -> 42807 bytes .../ART/base/newgroup/ui/NewGroup_fui.bytes | Bin 265800 -> 267219 bytes 24 files changed, 270 insertions(+), 74 deletions(-) diff --git a/lua_probject/base_project/Game/Controller/GroupMgrController.lua b/lua_probject/base_project/Game/Controller/GroupMgrController.lua index cc2440d0..15d0c117 100644 --- a/lua_probject/base_project/Game/Controller/GroupMgrController.lua +++ b/lua_probject/base_project/Game/Controller/GroupMgrController.lua @@ -19,6 +19,7 @@ GroupMgrEvent = { OnNewRecord = "OnNewRecord", OnMemberState = "OnMemberState", Onpush_assistant = "Onpush_assistant", + OnFamilyReflash = "OnFamilyReflash", } GroupMgrController = { @@ -59,6 +60,7 @@ function GroupMgrController.new() self._eventmap[Protocol.FGMGR_EVT_NEWCHAT] = self.FG_Data_NewChat self._eventmap[Protocol.FGMGR_EVT_Member_State] = self.FG_Data_Member_State self._eventmap[Protocol.FGMGR_EVT_Push_Assistant] = self.OnEVT_Push_Assistant + self._eventmap[Protocol.WEB_FG_REFLASH] = self.FG_Data_Family_Reflash -- self:connect(callback) return self end @@ -373,6 +375,15 @@ function M:FG_Get_Offline_Member(groupId, callback) end) end +-- 获取申请列表的数量 +function M:FG_Get_Apply_Count(groupId, callback) + local _data = {} + _data.id = groupId + self._mgr_client:send(Protocol.WEB_FG_APPLYCOUNT, _data, function(res) + callback(res) + end) +end + -- 回复邀请 -- function M:FG_ResponseInvited(id, refuse) -- local _data = {} @@ -431,6 +442,12 @@ function M:FG_Data_Member_State(evt_data) DispatchEvent(self._dispatcher, GroupMgrEvent.OnMemberState, evt_data) end +function M:FG_Data_Family_Reflash(evt_data) + print("收到家族刷新推送") + pt(evt_data) + DispatchEvent(self._dispatcher, GroupMgrEvent.OnFamilyReflash, evt_data) +end + function M:PopEvent() local _cacheEvent = self._cacheEvent if (_cacheEvent:Count() > 0) then diff --git a/lua_probject/base_project/Game/Controller/NewGroupController.lua b/lua_probject/base_project/Game/Controller/NewGroupController.lua index 58099764..e2b7db4a 100644 --- a/lua_probject/base_project/Game/Controller/NewGroupController.lua +++ b/lua_probject/base_project/Game/Controller/NewGroupController.lua @@ -1185,6 +1185,7 @@ function M:FG_EnterGroup(group_id, callback) group.notice = res.Data.notice group.hide_action = res.Data.hide_action + -- GroupMgrController:connect self.mgr_ctr = ControllerManager.GetController(GroupMgrController) self.mgr_ctr:connect(res.Data.host, group_id, function(res1) if res1.ReturnCode == 0 then diff --git a/lua_probject/base_project/Game/Protocol.lua b/lua_probject/base_project/Game/Protocol.lua index 5e2f3aab..3a42428f 100644 --- a/lua_probject/base_project/Game/Protocol.lua +++ b/lua_probject/base_project/Game/Protocol.lua @@ -278,9 +278,14 @@ Protocol = { -- 亲友圈房卡充值 WEB_FG_RECHARGE_DIAMO = "group/recharge_diamo", -- 进入亲友圈 - WEB_FG_GET_ONLINE_MEMBER = "13005",--"get_online_member", + WEB_FG_GET_ONLINE_MEMBER = "13005", --"get_online_member", -- 退出亲友圈 - WEB_FG_GET_OFFLINE_MEMBER = "13006",--"get_offline_member", + WEB_FG_GET_OFFLINE_MEMBER = "13006", --"get_offline_member", + -- 家族界面刷新推送 + WEB_FG_REFLASH = "11111", + + -- 获得申请列表的数量 + WEB_FG_APPLYCOUNT = "request_apply_count", -------------- group-log--------------------- -- 获取奖励日志 WEB_FG_GET_REWARDS_LOG = "group/log/get_reward_log", diff --git a/lua_probject/base_project/Game/View/Family/FamilyAllNumbers.lua b/lua_probject/base_project/Game/View/Family/FamilyAllNumbers.lua index f481c7d7..be153b2b 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyAllNumbers.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyAllNumbers.lua @@ -61,13 +61,14 @@ function M:FillList(numbers) local i = index + 1 obj:GetController('lev').selectedIndex = numbers[i].lev - 1 obj:GetController('ban').selectedIndex = numbers[i].ban + obj:GetChild('name').emojies = EmojiDitc.EmojiesDitc obj:GetChild('name').text = numbers[i].nick obj:GetChild('id').text = string.format("ID:%s", numbers[i].uid) if numbers[i].tag == "" then obj:GetChild("remark").text = "备注:无" else - obj:GetChild("remark").text = numbers[i].tag + obj:GetChild("remark").text = "备注:" .. numbers[i].tag end ImageLoad.Load(numbers[i].portrait, obj:GetChild('btn_head')._iconObject) diff --git a/lua_probject/base_project/Game/View/Family/FamilyAuditNumber.lua b/lua_probject/base_project/Game/View/Family/FamilyAuditNumber.lua index cf2510be..b559b8c4 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyAuditNumber.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyAuditNumber.lua @@ -5,40 +5,46 @@ local FamilyAuditNumber = {} local M = FamilyAuditNumber +local function AddItem(self, index, obj) + local info = self.data[index + 1] + obj:GetChild('text_name').text = info.nick + obj:GetChild('text_id').text = info.id + obj:GetChild('text_tag').text = "备注: " .. info.tag + obj:GetChild('text_time').text = os.date('%Y-%m-%d %H:%M', os.time()) + ImageLoad.Load(info.portrait, obj:GetChild('btn_head')._iconObject) + obj:GetChild('btn_allow').onClick:Set(function() + self:ClickBtn(1, info.id) + end) + obj:GetChild('btn_unAllow').onClick:Set(function() + self:ClickBtn(0, info.id) + end) +end + function FamilyAuditNumber.new(root) setmetatable(M, { __index = root }) local self = setmetatable({}, { __index = M }) - self:InitList() - + --self:Show() + return self end -function M:InitList() +function M:Show() local fgCtr = ControllerManager.GetController(NewGroupController) fgCtr:FG_GroupJoins(self._group.id, function(res) - pt(res) if res.ReturnCode ~= 0 then ViewUtil.ErrorTip(res.ReturnCode, "获取成员列表失败") + return else - local data = res.Data.joins + self.data = res.Data.joins self.familyType.selectedIndex = 6 local list = self._view:GetChild('list_auditNumberList') - list:SetVirtual() + --list:RemoveChildrenToPool() + --list:SetVirtual() list.itemRenderer = function(index, obj) - local info = data[index + 1] - obj:GetChild('text_name').text = info.nick - obj:GetChild('text_id').text = info.id - obj:GetChild('text_time').text = os.date('%Y-%m-%d %H:%M', os.time()) - ImageLoad.Load(info.portrait, obj:GetChild('btn_head')._iconObject) - obj:GetChild('btn_allow').onClick:Set(function() - self:ClickBtn(1, info.id) - end) - obj:GetChild('btn_unAllow').onClick:Set(function() - self:ClickBtn(0, info.id) - end) + AddItem(self, index, obj) end - list.numItems = #data + list.numItems = #self.data end end) end @@ -55,9 +61,24 @@ function M:ClickBtn(isAllow, uid) else end - self:InitList() + self:Show() end end) end +function M:OnNewApply(arg) + arg = arg[1] + + local msg = {} + msg.nick = arg.nick + msg.id = arg.uid + msg.portrait = arg.portrait + msg.tag = arg.remark + self.data[#self.data + 1] = msg + + local list = self._view:GetChild('list_auditNumberList') + local obj = list:AddItemFromPool() + AddItem(self, #self.data - 1, obj) +end + return M diff --git a/lua_probject/base_project/Game/View/Family/FamilyEventView.lua b/lua_probject/base_project/Game/View/Family/FamilyEventView.lua index bad57c8c..fdf9b584 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyEventView.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyEventView.lua @@ -27,6 +27,7 @@ function FamilyEventView.new(root) mgr_ctr:AddEventListener(GroupMgrEvent.OnNewRecord, handler(self, self._evtOnNewRecord)) mgr_ctr:AddEventListener(GroupMgrEvent.Onpush_assistant, handler(self, self._evtOnPush_assistant)) --mgr_ctr:AddEventListener(GroupMgrEvent.OnMemberState, handler(self, self._evtOnMemberState)) + mgr_ctr:AddEventListener(GroupMgrEvent.OnFamilyReflash, handler(self, self._evtOnPush_assistant)) return self end @@ -101,9 +102,9 @@ end function M:_evtOnNewApply(...) print("_evtOnNewApply") - local arg = {...} + local arg = { ... } pt(arg) - self._child_familyAuditNumber:InitList() + self._child_familyAuditNumber:OnNewApply(arg) end function M:_evtInviteResponse(...) @@ -202,15 +203,32 @@ function M:_evtOnPush_assistant(...) return end - local arg = {...} + local arg = { ... } local groupId = arg[1].id local lev = arg[1].lev - if groupId ~= view._group.id then + if groupId ~= view._group.id then return end view:ChangeOther(lev + 1) end +-- reflashType == "joinFamily" 成功加入了亲友圈 +function M:_evtOnFamilyReflash(...) + local view = ViewManager.GetCurrenView() + if view.class ~= "FamilyMainView" then + return + end + + local arg = { ... } + local reflashType = arg[1].reflashType + local gourpId = arg[1].gourpId + local parm = arg[1].parm + + if reflashType == "joinFamily" then + view:Reflash() + end +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 123de8e5..b01ac21c 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua @@ -81,7 +81,7 @@ function FamilyMyFamily:Refalsh() self.tex_fNumber.text = self.family.member_num self.tex_cradNum.text = self.family.diamo self.tex_nocice.text = self.family.notice - self.tex_wxId.text = self.family.wechatId + self.tex_wxId.text = Utils.TextOmit(self.family.wechatId, 6) ImageLoad.Load(self.family.o_portrait, self.loader_icon) self.cStyle.selectedIndex = self.family.lev - 1 @@ -220,7 +220,7 @@ function FamilyMyFamily:Init() notice = self.input_text.text }, self) end - self.input_text.text = "" + self.input_text.text = self.family.notice self.tex_changeTitle.text = "修改公告" self.cWindow.selectedIndex = 1 end) @@ -232,7 +232,7 @@ function FamilyMyFamily:Init() name = self.input_text.text }, self) end - self.input_text.text = "" + self.input_text.text = self.family.name self.tex_changeTitle.text = "修改家族名字" self.cWindow.selectedIndex = 1 end) @@ -244,7 +244,7 @@ function FamilyMyFamily:Init() wechatId = self.input_text.text }, self) end - self.input_text.text = "" + self.input_text.text = self.family.wechatId 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 e6a37f8e..6faf70e2 100644 --- a/lua_probject/base_project/Game/View/FamilyView.lua +++ b/lua_probject/base_project/Game/View/FamilyView.lua @@ -56,6 +56,7 @@ function M:init(url) local view = self._view self.lastTime = os.time() + self._child_familyAuditNumber = FamilyAuditNumber.new(self) self.com_FamilyChatRoom = FamilyChatRoom:Init(view:GetChild('com_chatRoom'), self) local fgCtr = ControllerManager.GetController(NewGroupController) @@ -131,6 +132,19 @@ function M:init(url) end) end +function M:Reflash() + fgCtr:FG_GroupList(function(res) + local groups = res.Data.groups + if #groups > 0 then + self.familyType.selectedIndex = 1 + self:ConnetFamily(1, groups, true) + else + self:JoinFamily(true) + self.btn_chatRoom.visible = false + end + end) +end + function M:InitCloseClick() self.btn_close.onClick:Set(function() print("lingmengfamily", self.lastType, self.familyType.selectedIndex) @@ -261,7 +275,23 @@ end function M:AuditNumber() self.lastType = 1 - self._child_familyAuditNumber = FamilyAuditNumber.new(self) + self._child_familyAuditNumber:Show() + --self._child_familyAuditNumber = FamilyAuditNumber.new(self) +end + +function M:UpdataRedPointAuditNumber(obj) + if self._child_familyAuditNumber.data == nil or #self._child_familyAuditNumber.data <= 0 then + obj:GetController("cRedPoint").selectedIndex = 0 + return + end + + local redPointNum = #self._child_familyAuditNumber.data + if redPointNum > 99 then + redPointNum = "99+" + end + + obj:GetController("cRedPoint").selectedIndex = 1 + obj:GetChild("tex_redPoint").text = redPointNum end function M:ShowShop() @@ -343,29 +373,50 @@ function M:ChangeNumber(fgCtr, group_id, limit, num, minus_only, sort_type) return 0 end -function M:ConnetFamilyRoom(fgCtr, id) +function M:EnterGroup(fgCtr, id) fgCtr:FG_EnterGroup(id, function(res) ViewUtil:CloseModalWait() if res.ReturnCode ~= 0 then ViewUtil.ErrorTip(res.ReturnCode, "获取房间列表列表失败") else - self:UpdateFamilyRoom(fgCtr, id) - self._view:GetController('familyBan').selectedIndex = self._group.ban and 1 or 0 - - local mgr_ctr = ControllerManager.GetController(GroupMgrController) - mgr_ctr:FG_ENTER_CHATROOM(self._group.id, function(res) - print("拉取到聊天室数据") - pt(res) - end) - - FamilyOnline(self._group.id, self) - + self:OnEnterGroupCallBack() return 1 end end) return 0 end +function M:OnEnterGroupCallBack() + local fgCtr = ControllerManager.GetController(NewGroupController) + self._mgr_ctr:FG_Get_Apply_Count(self._group.id, function(res) + print("收到获得申请列表的数量") + pt(res) + if res.ReturnCode ~= 0 then + return + end + end) + self._view:GetController('familyBan').selectedIndex = self._group.ban and 1 or 0 + + local mgr_ctr = ControllerManager.GetController(GroupMgrController) + mgr_ctr:FG_ENTER_CHATROOM(self._group.id, function(res) + print("拉取到聊天室数据") + pt(res) + end) + + FamilyOnline(self._group.id, self) + + ViewUtil.ShowModalWait(self._root_view, "正在加载亲友圈权限中......") + self:ChangeOther(tonumber(self._group.lev) + 1) + allLoad = 1 + + ViewUtil.ShowModalWait(self._root_view, "正在加载成员列表中......") + self:ChangeNumber(fgCtr, self._group.id, 0, self._group.total_member_num, false, 1) + + ViewUtil.ShowModalWait(self._root_view, "正在加载房间列表中......") + self:UpdateFamilyRoom(fgCtr, self._group.id) + ViewUtil.CloseModalWait() +end + function M:UpdateFamilyRoom(fgCtr, id) local list_room = self._view:GetChild('list_room') list_room:SetVirtual() @@ -402,7 +453,7 @@ function M:UpdateFamilyRoom(fgCtr, id) roomName = Utils.TextOmit(roomName, 6) obj:GetChild('game_type').emojies = EmojiDitc.EmojiesDitc obj:GetChild('game_type').text = string.format("(%s)%s", playGameInfoTable[roomList[newIndex].pid].gameName, - playGameInfoTable[roomList[newIndex].pid].name, + roomName, roomList[newIndex].id) obj:GetChild('btn_joinGame'):GetController('type').selectedIndex = 1 obj:GetController('num').selectedIndex = roomList[newIndex].maxPlayers - 2 @@ -478,8 +529,9 @@ function M:UpdateFamilyRoom(fgCtr, id) local gamePlay = times / 1000 .. "倍," gamePlay = gamePlay .. mode:LoadConfigToDetail(playList[newIndex].config) obj:GetChild('Label_gameRule').title = gamePlay - obj:GetChild('game_type').text = string.format("(%s)%s", playList[newIndex].game_name, playList[newIndex] - .name) + local roomName = Utils.TextOmit(playList[newIndex].name, 6) + roomName = string.format("(%s)%s", playList[newIndex].game_name, roomName) + obj:GetChild('game_type').text = roomName obj:GetChild('btn_joinGame'):GetController('type').selectedIndex = 0 obj:GetController('num').selectedIndex = playList[newIndex].maxPlayers - 2 obj:GetChild('btn_joinGame').onClick:Set(function() @@ -576,7 +628,7 @@ function M:ConnetFamily(index, groups, isCreate) ViewUtil:CloseModalWait() local list_family = self._view:GetChild('list_family') - list_family:SetVirtual() + --list_family:SetVirtual() self._group = DataManager.groups:get(groups[index].id) DataManager.CurrenGroup = self._group self._view:GetChild('text_familyId').text = self._group.id @@ -607,6 +659,10 @@ function M:ConnetFamily(index, groups, isCreate) local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait(self._root_view, "正在进入亲友圈......") + self:EnterGroup(fgCtr, self._group.id) + + --[[ ViewUtil.ShowModalWait(self._root_view, "正在加载亲友圈权限中......") self:ChangeOther(tonumber(self._group.lev) + 1) allLoad = 1 @@ -618,7 +674,8 @@ function M:ConnetFamily(index, groups, isCreate) ViewUtil.ShowModalWait(self._root_view, "正在加载房间列表中......") - allLoad = allLoad + self:ConnetFamilyRoom(fgCtr, self._group.id) + allLoad = allLoad + self:EnterGroup(fgCtr, self._group.id) + ]] UpdateBeat:Add(self.OnUpdate, self) if self._group.isOpenChatRoom == 1 then @@ -729,7 +786,8 @@ local IDENTITY_LIST = { }, { name = "申请消息", - Fct = M.AuditNumber + Fct = M.AuditNumber, + redPointFct = M.UpdataRedPointAuditNumber --开启红点 }, { name = "查看成员", @@ -771,7 +829,8 @@ local IDENTITY_LIST = { }, { name = "申请消息", - Fct = M.AuditNumber + Fct = M.AuditNumber, + redPointFct = M.UpdataRedPointAuditNumber --开启红点 }, { name = "查看成员", @@ -841,8 +900,14 @@ function M:ChangeOther(i) self._lev = i list_other:SetVirtual() list_other.itemRenderer = function(index, obj) - obj:GetChild('title').text = otherList[index + 1].name - obj.onClick:Set(handler(self, otherList[index + 1].Fct)) + local cfg = otherList[index + 1] + obj:GetChild('title').text = cfg.name + obj.onClick:Set(handler(self, cfg.Fct)) + + print("cfg.redPointFct", cfg.redPointFct) + if cfg.redPointFct then + cfg.redPointFct(self, obj) + end end list_other.numItems = #otherList end @@ -852,11 +917,16 @@ function M:ChangeMore() local list_other = self._view:GetChild('list_more') list_other:SetVirtual() list_other.itemRenderer = function(index, obj) - obj:GetChild('title').text = moreList[index + 1].name - obj.onClick:Set(handler(self, moreList[index + 1].Fct)) + local cfg = moreList[index + 1] + obj:GetChild('title').text = cfg.name + obj.onClick:Set(handler(self, cfg.Fct)) obj.onClick:Add(function() self._view:GetController('moreBtn').selectedIndex = 0 end) + print("cfg.redPointFct", cfg.redPointFct) + if cfg.redPointFct then + cfg.redPointFct(self, obj) + end end list_other.numItems = #moreList end diff --git a/lua_probject/base_project/Game/View/MissileSender.lua b/lua_probject/base_project/Game/View/MissileSender.lua index cb79a4f7..1b9057c9 100644 --- a/lua_probject/base_project/Game/View/MissileSender.lua +++ b/lua_probject/base_project/Game/View/MissileSender.lua @@ -56,6 +56,8 @@ function MissileSender.Send(url, send, target, view, animUrl, num, time) local obj = GetObj() obj:GetChild("loader").url = url view:AddChild(obj) + obj.width = send.width + obj.height = send.height obj.xy = sendPos -- 间隔 diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView_jaingxi.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView_jaingxi.lua index 74af3625..4735dcc7 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView_jaingxi.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView_jaingxi.lua @@ -43,7 +43,16 @@ function M:init(url) BaseWindow.init(self, url) self.hpData = {} - self:FillGameData() + --self:FillGameData() + + self.tex_times = self._view:GetChild("tex_times") + + self.btn_changeTimes = self._view:GetChild("btn_changeTimes") + self.btn_closeTimesPage = self._view:GetChild("btn_closeTimesPage") + + self.cTimesPage = self._view:GetController("cTimesPage") + + self.SliderTimes = self._view:GetChild("SliderTimes") self._view:GetChild("btn_next").onClick:Set(function() if self._view:GetChild("tex_name").text == "" then @@ -73,6 +82,24 @@ function M:init(url) end) grcv:Show() end) + + self.btn_changeTimes.onClick:Set(function() + if self.cTimesPage.selectedIndex == 0 then + self.cTimesPage.selectedIndex = 1 + else + self.cTimesPage.selectedIndex = 0 + end + end) + + self.btn_closeTimesPage.onClick:Set(function() + self.cTimesPage.selectedIndex = 0 + end) + + self.SliderTimes.onChanged:Set(function() + self.tex_times.text = math.ceil(self.SliderTimes.value) + end) + + self:FillGameData() end -- 显示游戏列表 @@ -109,6 +136,7 @@ function M:FillGameData() local tex_name = self._view:GetChild("tex_name") tex_name.text = self.play.name self._view:GetChild("tex_times").text = self.play.hp_times / 1000 + self.SliderTimes.value = self.play.hp_times / 1000 end end diff --git a/wb_new_ui/assets/Family/AuditNumber/Component/comp_auditNumberChild.xml b/wb_new_ui/assets/Family/AuditNumber/Component/comp_auditNumberChild.xml index 863310d9..c5fe064f 100644 --- a/wb_new_ui/assets/Family/AuditNumber/Component/comp_auditNumberChild.xml +++ b/wb_new_ui/assets/Family/AuditNumber/Component/comp_auditNumberChild.xml @@ -11,7 +11,7 @@ - + diff --git a/wb_new_ui/assets/Family/Main/Component/c_otherChild.xml b/wb_new_ui/assets/Family/Main/Component/c_otherChild.xml index d5c62170..30aa67b5 100644 --- a/wb_new_ui/assets/Family/Main/Component/c_otherChild.xml +++ b/wb_new_ui/assets/Family/Main/Component/c_otherChild.xml @@ -1,9 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/wb_new_ui/assets/Family/MyFamily/Component/btn_familyManage.xml b/wb_new_ui/assets/Family/MyFamily/Component/btn_familyManage.xml index 80b70888..084e895b 100644 --- a/wb_new_ui/assets/Family/MyFamily/Component/btn_familyManage.xml +++ b/wb_new_ui/assets/Family/MyFamily/Component/btn_familyManage.xml @@ -1,10 +1,19 @@ + + + + + + + + +