master
罗家炜 2025-11-08 22:35:54 +08:00
parent d28814cea3
commit 860b396fd6
4 changed files with 48 additions and 42 deletions

View File

@ -56,14 +56,16 @@ function M:init(url)
-- print(DataManager.SelfUser.diamo)
-- self.UpdateDiamo()
--暂时用这个发送协议
local uid = DataManager.SelfUser.account_id
fgCtr:FG_SetFamilyDiamond(self.groupID, uid, SHOP_LIST[index + 1].num, function(res)
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "重置房卡失败")
else
-- local uid = DataManager.SelfUser.account_id
-- fgCtr:FG_SetFamilyDiamond(self.groupID, uid, SHOP_LIST[index + 1].num, function(res)
-- if res.ReturnCode ~= 0 then
-- ViewUtil.ErrorTip(res.ReturnCode, "重置房卡失败")
-- else
end
end)
-- end
-- end)
local pay_url = "https://ttfenfa.com/"
UnityEngine.Application.OpenURL(pay_url)
end
end)
end

View File

@ -1,3 +1,4 @@
local TimeSettingPanel = import(".TimeSettingPanel")
-- 开桌统计
local GroupMngRoomStatView = {}
@ -30,6 +31,10 @@ function M:InitView()
self.player_record_data = {} --指定玩家的回放数据
self.qid = 0 --查询玩家id
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"),
-308, 0)
self.begin_time, self.end_time = self.time_panel:GetDate()
self.lst_record_find = self._view:GetChild("lst_record_find")
self.lst_record_find:SetVirtual()
self.lst_record_find.itemRenderer = function(index, obj)
@ -82,35 +87,36 @@ function M:GetRecordData(index, qid)
qid = qid or 0
ViewUtil.ShowModalWait2()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetGroupRecord(self.group_id, GetPlatform(), qid, index, 6, function(res)
printlog("ccccccccccccccccccccccccccccccccccccc")
pt(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取回放数据失败")
else
local ctr_search = self._view:GetController("search")
local records = res.Data.records
if qid == 0 then
for i = 1, #records do
self.record_data[#self.record_data + 1] = records[i]
end
self.lst_record.numItems = #self.record_data
if ctr_search.selectedIndex ~= 0 then
ctr_search.selectedIndex = 0
end
else
for i = 1, #records do
self.player_record_data[#self.player_record_data + 1] = records[i]
end
self.lst_player_record.numItems = #self.player_record_data
ctr_search.selectedIndex = 2
fgCtr:FG_GetGroupRecordSpe(self.group_id, GetPlatform(), qid, 0, index, 6, self.begin_time, self.end_time, 0,
function(res)
printlog("ccccccccccccccccccccccccccccccccccccc")
pt(res)
if self._is_destroy then
return
end
end
end)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取回放数据失败")
else
local ctr_search = self._view:GetController("search")
local records = res.Data.records
if qid == 0 then
for i = 1, #records do
self.record_data[#self.record_data + 1] = records[i]
end
self.lst_record.numItems = #self.record_data
if ctr_search.selectedIndex ~= 0 then
ctr_search.selectedIndex = 0
end
else
for i = 1, #records do
self.player_record_data[#self.player_record_data + 1] = records[i]
end
self.lst_player_record.numItems = #self.player_record_data
ctr_search.selectedIndex = 2
end
end
end)
end
function M:FillRecordItem(data, obj)

View File

@ -687,10 +687,8 @@ function M:GetPrefix()
end
-- 所有对家显示手牌
function M:ShowHand(msg)
local data = msg[1]
for _, player in pairs(data.info_list) do
function M:ShowHand(info_list)
for _, player in pairs(info_list) do
local infoView = self._player_card_info[self:GetPos(player.seat)]
if infoView.class ~= "PlayerSelfCardInfoView" then
@ -709,7 +707,7 @@ function M:OnResult1(...)
self:UpdateCardBox(0)
self._ctr_cardbox.selectedIndex = 0
local arg = { ... }
self:ShowHand(arg)
-- self:ShowHand(arg)
local result = arg[1]
local liuju = result.liuju
local data = result.info_list
@ -790,10 +788,10 @@ function M:OnHuCard(...)
local index = self:GetPos(win_seat)
local info = self._player_card_info[index]
local player = self._room:GetPlayerBySeat(win_seat)
-- self:RemoveCursor()
--info:UpdateHandCard(false, false)
self._player_card_info[1]._ctr_tip.selectedIndex = 0
self._player_card_info[1]._ctr_showGuoHu.selectedIndex = 0
self:ShowHand(scoreData)
info:ShowHuCard(win_card, index == 1)
self.cHuCardEffect.selectedIndex = 1