diff --git a/lua_probject/base_project/Game/Controller/NewGroupController.lua b/lua_probject/base_project/Game/Controller/NewGroupController.lua index 9a6efce5..c011c224 100644 --- a/lua_probject/base_project/Game/Controller/NewGroupController.lua +++ b/lua_probject/base_project/Game/Controller/NewGroupController.lua @@ -872,7 +872,7 @@ function M:FG_GetMemberHpLog(group_id, tag, limit, num, filter, begin_time, end_ end) end --- 获取玩法局数统计 +-- 获取玩法局数统计 --500 function M:FG_GetGameStat(group_id, callback) local _client = ControllerManager.GroupClient local data = {} @@ -908,6 +908,13 @@ function M:FG_GetPropLog(group_id, limit, num, begin_time, end_time, callback) end) end +---comment +---@param group_id any +---@param platform any +---@param qid 用户id +---@param limit any +---@param num any +---@param callback any -- 获取战绩 function M:FG_GetGroupRecord(group_id, platform, qid, limit, num, callback) local _client = ControllerManager.GroupClient diff --git a/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua b/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua index 9b82219a..9ca3928f 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua @@ -16,29 +16,52 @@ function FamilyNumberRecord.New(root) -- end -- end self.familyType.selectedIndex = 5 - self.lastType = 1 self._view:GetChild('text_titleRecord').text = string.format("%s(%s) 成员记录", self._group.name, self._group.id) self._view:GetChild('text_residueDiamond').text = self._group.diamo self._view:GetChild('text_timeRecord').visible = false - local playList = self._group.playList + local games = DataManager.SelfUser.games local comp_gameTypeList = self._view:GetChild('comp_gameTypeList'):GetChild('n0') + local ctr_numberRecordRank = self._view:GetController('numberRecordRank') self._input_IDSerach = self._view:GetChild('input_numberID') + self._viewList_numverRecord = self._view:GetChild('list_numverRecord') + self.ctr_numberRecord = self._view:GetController('numberRecord') - print("lingmengplayList", #playList) - pt(playList) + + print("lingmengplayList", #games) + pt(games) comp_gameTypeList:SetVirtual() comp_gameTypeList.itemRenderer = function(index, obj) - obj.title = playList[index + 1].game_name - obj.data = {} - obj.data.index = index - obj.data.pid = playList[index + 1].id + if index == 0 then + obj.title = "麻将" + obj.data = {} + obj.data.index = index + obj.data.id = -1 + elseif index == 1 then + obj.title = "扑克" + obj.data = {} + obj.data.index = index + obj.data.id = -2 + else + obj.title = games[index - 1].name + obj.data = {} + obj.data.index = index + obj.data.id = games[index - 1].game_id + end end - comp_gameTypeList.numItems = #playList - + comp_gameTypeList.numItems = #games + 2 + self.btn_close.onClick:Set(function() + if self.ctr_numberRecord.selectedIndex > 0 then + self.ctr_numberRecord.selectedIndex = self.ctr_numberRecord.selectedIndex - 1 + else + self:InitCloseClick() + self.familyType.selectedIndex = 1 + end + end) + self:NumverRecordRenderer() self._view:GetChild('btn_clearInput').onClick:Set(function() self._input_IDSerach.text = "" end) @@ -54,20 +77,57 @@ function FamilyNumberRecord.New(root) end) self._view:GetChild('comp_sortTypeList'):GetChild('n0').onClickItem:Set(function(context) self:OnClickSortType(context) + ctr_numberRecordRank.selectedIndex = 0 end) comp_gameTypeList.onClickItem:Set(function(context) - self:OnClickSortType(self._group.id, context.data.data.pid) + self:OnClickSortType(self._group.id, context.data.data.id) + ctr_numberRecordRank.selectedIndex = 0 end) return self end +function M:NumverRecordRenderer() + local numberRecordList = self._viewList_numverRecord + numberRecordList:SetVirtual() + numberRecordList.itemRenderer = function(index, obj) + local info = rank[index + 1] + ImageLoad.Load(info.portrait, obj:GetChild('btn_head')._iconObject) + obj:GetChild('text_ID').text = info.uid + obj:GetChild('text_nick').text = info.nick + obj:GetChild('text_score').text = info.score + obj:GetChild('btn_lookRecord').onClick:Set(function() + self.ctr_numberRecord.selectedIndex = 1 + self:OnClickNumberRank(groupId, info.uid, info.round) + end) + end +end + function M:OnClickSortType(groupId, pid) print("lingmengOnClickSortType") local fgCtr = ControllerManager.GetController(NewGroupController) - fgCtr:FG_GetGroupRecord(groupId, GetPlatform(), pid, 0, 100, function(res) + local numberRecordList = self._viewList_numverRecord + fgCtr:FG_GetMemberRank(groupId, 0, 0, 10, os.time() - 3600 * 120, os.time(), 1, function(res) pt(res) + if res.ReturnCode ~= 0 then + ViewUtil.ShowOneChooose("获取排行榜失败" .. res.ReturnCode) + else + local data = res.Data + local rank = data.ranks + numberRecordList.numItems = #rank + end end) end +function M:OnClickNumberRank(groupId, uid, round) + print("lingmengOnClickNumberRank") + local fgCtr = ControllerManager.GetController(NewGroupController) + local numberRecordList = self._viewList_numverRecord + fgCtr:FG_GetGroupRecordSpe(groupId, GetPlatform(), uid, 0, 0, round, os.time() - 3600 * 120, os.time(), 3, + function(res) + pt(res) + pt("resdata", res.Data.records[1].totalScore) + end) +end + return M diff --git a/lua_probject/base_project/Game/View/FamilyView.lua b/lua_probject/base_project/Game/View/FamilyView.lua index f2d5c8c4..f38d8b44 100644 --- a/lua_probject/base_project/Game/View/FamilyView.lua +++ b/lua_probject/base_project/Game/View/FamilyView.lua @@ -31,19 +31,9 @@ function M:init(url) local createOrJoin = view:GetController('createOrJoin') self.familyType = view:GetController('familyType') - local btn_close = view:GetChild('btn_close') - btn_close.onClick:Set(function() - if not self.lastType or self.familyType.selectedIndex == 1 then - ControllerManager.ChangeController(LoddyController) - ViewManager.ChangeView(ViewManager.View_Lobby) - else - self.familyType.selectedIndex = self.lastType - if self.lastType == 3 then - self.lastType = 1 - createOrJoin.selectedIndex = (createOrJoin.selectedIndex + 1) % 2 - end - end - end) + self.btn_close = view:GetChild('btn_close') + + self:InitCloseClick() fgCtr:FG_GroupList(function(res) local groups = res.Data.groups @@ -106,6 +96,22 @@ function M:init(url) -------绑定成员战绩按钮 view:GetChild('btn_family_record').onClick:Set(function() self._child_familyNumberRecord = FamilyNumberRecord.New(self) + self.lastType = 1 + end) +end + +function M:InitCloseClick() + self.btn_close.onClick:Set(function() + if not self.lastType or self.familyType.selectedIndex == 1 then + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + else + self.familyType.selectedIndex = self.lastType + if self.lastType == 3 then + self.lastType = 1 + createOrJoin.selectedIndex = (createOrJoin.selectedIndex + 1) % 2 + end + end end) end diff --git a/lua_probject/extend_project/extend/poker2/suoha/ExMainView.lua b/lua_probject/extend_project/extend/poker2/suoha/ExMainView.lua index 891cab47..c7364d08 100644 --- a/lua_probject/extend_project/extend/poker2/suoha/ExMainView.lua +++ b/lua_probject/extend_project/extend/poker2/suoha/ExMainView.lua @@ -325,6 +325,12 @@ function M:EventInit() local playerInfo = _player_info[self:GetPos(i)] playerInfo:FillData(list[i]) playerInfo:Ready(false) + + if i == bank_seat then + playerInfo:MarkBank(true) + else + playerInfo:MarkBank(false) + end end end) 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 997004f3..985c38d6 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/extend/poker2/suoha/ui/Extend_Poker_SuoHa_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker2/suoha/ui/Extend_Poker_SuoHa_fui.bytes index af0b4bec..d9dd8fd4 100644 Binary files a/wb_unity_pro/Assets/ART/extend/poker2/suoha/ui/Extend_Poker_SuoHa_fui.bytes and b/wb_unity_pro/Assets/ART/extend/poker2/suoha/ui/Extend_Poker_SuoHa_fui.bytes differ