Merge branch 'master' of http://121.41.95.54:3000/fpgajie/changhong
commit
d2dded33ba
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -13,12 +13,7 @@
|
||||||
"commandLine": "-workdir ${workspaceRoot}/../ -file src/main.lua",
|
"commandLine": "-workdir ${workspaceRoot}/../ -file src/main.lua",
|
||||||
"port": 7003,
|
"port": 7003,
|
||||||
"exePath": "",
|
"exePath": "",
|
||||||
"fileExtNames": [
|
"fileExtNames": [".lua", ".txt", ".lua.txt", ".bytes"],
|
||||||
".lua",
|
|
||||||
".txt",
|
|
||||||
".lua.txt",
|
|
||||||
".bytes"
|
|
||||||
],
|
|
||||||
"isFoxGloryProject": false,
|
"isFoxGloryProject": false,
|
||||||
"printType": 1
|
"printType": 1
|
||||||
},
|
},
|
||||||
|
|
@ -29,12 +24,7 @@
|
||||||
"runtimeType": "Cocos2",
|
"runtimeType": "Cocos2",
|
||||||
"localRoot": "${workspaceRoot}",
|
"localRoot": "${workspaceRoot}",
|
||||||
"port": 7003,
|
"port": 7003,
|
||||||
"fileExtNames": [
|
"fileExtNames": [".lua", ".txt", ".lua.txt", ".bytes"],
|
||||||
".lua",
|
|
||||||
".txt",
|
|
||||||
".lua.txt",
|
|
||||||
".bytes"
|
|
||||||
],
|
|
||||||
"isFoxGloryProject": false,
|
"isFoxGloryProject": false,
|
||||||
"printType": 1
|
"printType": 1
|
||||||
},
|
},
|
||||||
|
|
@ -44,12 +34,7 @@
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"runtimeType": "Unity",
|
"runtimeType": "Unity",
|
||||||
"localRoot": "${workspaceRoot}",
|
"localRoot": "${workspaceRoot}",
|
||||||
"fileExtNames": [
|
"fileExtNames": [".lua", ".txt", ".lua.txt", ".bytes"],
|
||||||
".lua",
|
|
||||||
".txt",
|
|
||||||
".lua.txt",
|
|
||||||
".bytes"
|
|
||||||
],
|
|
||||||
"port": 7003,
|
"port": 7003,
|
||||||
"printType": 1
|
"printType": 1
|
||||||
},
|
},
|
||||||
|
|
@ -59,12 +44,7 @@
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"runtimeType": "Unity",
|
"runtimeType": "Unity",
|
||||||
"localRoot": "${workspaceRoot}",
|
"localRoot": "${workspaceRoot}",
|
||||||
"fileExtNames": [
|
"fileExtNames": [".lua", ".txt", ".lua.txt", ".bytes"],
|
||||||
".lua",
|
|
||||||
".txt",
|
|
||||||
".lua.txt",
|
|
||||||
".bytes"
|
|
||||||
],
|
|
||||||
"port": 7003,
|
"port": 7003,
|
||||||
"printType": 1
|
"printType": 1
|
||||||
},
|
},
|
||||||
|
|
@ -74,12 +54,7 @@
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"runtimeType": "Unity",
|
"runtimeType": "Unity",
|
||||||
"localRoot": "${workspaceRoot}",
|
"localRoot": "${workspaceRoot}",
|
||||||
"fileExtNames": [
|
"fileExtNames": [".lua", ".txt", ".lua.txt", ".bytes"],
|
||||||
".lua",
|
|
||||||
".txt",
|
|
||||||
".lua.txt",
|
|
||||||
".bytes"
|
|
||||||
],
|
|
||||||
"port": 7003,
|
"port": 7003,
|
||||||
"printType": 1
|
"printType": 1
|
||||||
},
|
},
|
||||||
|
|
@ -90,9 +65,7 @@
|
||||||
"runtimeType": "OpenResty",
|
"runtimeType": "OpenResty",
|
||||||
"localRoot": "${workspaceRoot}",
|
"localRoot": "${workspaceRoot}",
|
||||||
"port": 7003,
|
"port": 7003,
|
||||||
"fileExtNames": [
|
"fileExtNames": [".lua"],
|
||||||
".lua"
|
|
||||||
],
|
|
||||||
"printType": 1
|
"printType": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -103,14 +76,18 @@
|
||||||
"mainFile": "${fileBasenameNoExtension}",
|
"mainFile": "${fileBasenameNoExtension}",
|
||||||
"localRoot": "${fileDirname}",
|
"localRoot": "${fileDirname}",
|
||||||
"curFileExtname": "${fileExtname}",
|
"curFileExtname": "${fileExtname}",
|
||||||
"fileExtNames": [
|
"fileExtNames": [".lua", ".txt", ".lua.txt", ".bytes"],
|
||||||
".lua",
|
|
||||||
".txt",
|
|
||||||
".lua.txt",
|
|
||||||
".bytes"
|
|
||||||
],
|
|
||||||
"port": 7003,
|
"port": 7003,
|
||||||
"printType": 1
|
"printType": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "emmylua_new",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "EmmyLua-Debug",
|
||||||
|
"host": "localhost",
|
||||||
|
"port": 9966,
|
||||||
|
"ext": ["lua", "lua.txt", "lua.bytes"],
|
||||||
|
"ideConnectDebugger": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -2122,9 +2122,9 @@ function M:__refreshManager()
|
||||||
local btn_stat = self._view:GetChild('btn_stat')
|
local btn_stat = self._view:GetChild('btn_stat')
|
||||||
btn_stat.onClick:Set(
|
btn_stat.onClick:Set(
|
||||||
function()
|
function()
|
||||||
if not self.mng_view2 then
|
-- if not self.mng_view2 then
|
||||||
self.mng_view2 = GroupManagerView.new(self._root_view, self.curGroup.id, 2)
|
self.mng_view2 = GroupManagerView.new(self._root_view, self.curGroup.id, 2)
|
||||||
end
|
-- end
|
||||||
-- self:SetRoomListVisible(false)
|
-- self:SetRoomListVisible(false)
|
||||||
self.mng_view2:Show()
|
self.mng_view2:Show()
|
||||||
end
|
end
|
||||||
|
|
@ -2500,7 +2500,7 @@ end
|
||||||
function M:ShowErrorJoinRoom(data)
|
function M:ShowErrorJoinRoom(data)
|
||||||
local msg = string.format("玩法:%s", data.gamePlayStr)
|
local msg = string.format("玩法:%s", data.gamePlayStr)
|
||||||
local _curren_msg = MsgWindow.new(self._root_view, msg, MsgWindow.MsgMode.OnlyOk, nil, nil,
|
local _curren_msg = MsgWindow.new(self._root_view, msg, MsgWindow.MsgMode.OnlyOk, nil, nil,
|
||||||
{ titleUrl = "ui://NewGroup/wanfaxinxi" ,openClose = true,closeZone=true})
|
{ titleUrl = "ui://NewGroup/wanfaxinxi", openClose = true, closeZone = true })
|
||||||
_curren_msg._view:GetChild("btn_ok").icon = "ui://NewGroup/kaishiyouxi"
|
_curren_msg._view:GetChild("btn_ok").icon = "ui://NewGroup/kaishiyouxi"
|
||||||
_curren_msg.onOk:Add(
|
_curren_msg.onOk:Add(
|
||||||
function()
|
function()
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ function GroupManagerView.new(blur_view, gid, btn_type, callback)
|
||||||
setmetatable(M, { __index = BaseWindow })
|
setmetatable(M, { __index = BaseWindow })
|
||||||
local self = setmetatable({}, { __index = M })
|
local self = setmetatable({}, { __index = M })
|
||||||
self.class = "GroupManagerView"
|
self.class = "GroupManagerView"
|
||||||
-- self._close_destroy = true
|
self._close_destroy = true
|
||||||
self._put_map = false
|
self._put_map = false
|
||||||
self._new_hide = false
|
self._new_hide = false
|
||||||
self._queue = false
|
self._queue = false
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ local GroupMemberOperateView = import('.GroupMemberOperateView')
|
||||||
local GroupAddMemberInfoView = import('.GroupAddMemberInfoView')
|
local GroupAddMemberInfoView = import('.GroupAddMemberInfoView')
|
||||||
local GroupStatMember = import('.GroupStatMember')
|
local GroupStatMember = import('.GroupStatMember')
|
||||||
local GroupMngFagPackView = import('../GroupMngFagPackView')
|
local GroupMngFagPackView = import('../GroupMngFagPackView')
|
||||||
local GroupMngPartnerStatViewAlone = import(".GroupMngPartnerStatViewAlone")
|
local GroupMngPartnerStatViewAlone = import(".GroupMngPartnerStatViewAlone2")
|
||||||
|
|
||||||
|
|
||||||
local MngPermission = import('.MngPermission')
|
local MngPermission = import('.MngPermission')
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,8 @@ function M:GetPartnerData(index, callback)
|
||||||
if index == 0 then
|
if index == 0 then
|
||||||
self.partner_data = {}
|
self.partner_data = {}
|
||||||
end
|
end
|
||||||
ViewUtil.ShowModalWait(nil)
|
-- printlog("lingmeng log")
|
||||||
|
-- ViewUtil.ShowModalWait(true, "正在获取全部成员战绩信息", 0.01)
|
||||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
fgCtr:FG_GetPartnerList(self.group_id, 0, index, 10, function(res)
|
fgCtr:FG_GetPartnerList(self.group_id, 0, index, 10, function(res)
|
||||||
ViewUtil.CloseModalWait()
|
ViewUtil.CloseModalWait()
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,6 @@ function M:InitView()
|
||||||
ViewUtil.ErrorTip(nil, '输入不能为空')
|
ViewUtil.ErrorTip(nil, '输入不能为空')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self._view:GetChild('tex_id').text = ""
|
|
||||||
qid = tonumber(text) or 0
|
qid = tonumber(text) or 0
|
||||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
fgCtr:FG_GetMemberStat(self.group_id, qid, DataManager.SelfUser.account_id,
|
fgCtr:FG_GetMemberStat(self.group_id, qid, DataManager.SelfUser.account_id,
|
||||||
|
|
@ -154,6 +153,7 @@ function M:InitView()
|
||||||
local btn_back = self._view:GetChild('btn_back')
|
local btn_back = self._view:GetChild('btn_back')
|
||||||
btn_back.onClick:Set(
|
btn_back.onClick:Set(
|
||||||
function()
|
function()
|
||||||
|
self._view:GetChild('tex_id').text = ""
|
||||||
ctr_search.selectedIndex = 0
|
ctr_search.selectedIndex = 0
|
||||||
table.sort(self.record_data, function(a, b)
|
table.sort(self.record_data, function(a, b)
|
||||||
return a.round > b.round
|
return a.round > b.round
|
||||||
|
|
@ -334,7 +334,7 @@ function M:GetRecoedData(index, type)
|
||||||
self.record_data = {}
|
self.record_data = {}
|
||||||
self.lst_record.numItems = 0
|
self.lst_record.numItems = 0
|
||||||
end
|
end
|
||||||
ViewUtil.ShowModalWait("正在获取数据中")
|
ViewUtil.ShowModalWait(true, "正在获取全部成员战绩", 0.01)
|
||||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
fgCtr:FG_GetMemberStat(self.group_id, 0, self._data_choosePlayyer.uid,
|
fgCtr:FG_GetMemberStat(self.group_id, 0, self._data_choosePlayyer.uid,
|
||||||
index, 33, 3, self.begin_time, self.end_time, type,
|
index, 33, 3, self.begin_time, self.end_time, type,
|
||||||
|
|
|
||||||
|
|
@ -490,7 +490,7 @@ function M:OnRenderRecordItemNew(obj, mainRecord, root_id)
|
||||||
obj:GetController("more").onChanged:Set(function() end)
|
obj:GetController("more").onChanged:Set(function() end)
|
||||||
obj:GetController("more").selectedIndex = 0
|
obj:GetController("more").selectedIndex = 0
|
||||||
obj:GetController("more").onChanged:Set(function(context)
|
obj:GetController("more").onChanged:Set(function(context)
|
||||||
self:MoreChanged(context, mainRecord.uid)
|
self:MoreChanged(context, mainRecord.uid, obj)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local btn_check_members = obj:GetChild("btn_check_members")
|
local btn_check_members = obj:GetChild("btn_check_members")
|
||||||
|
|
@ -536,7 +536,7 @@ function M:OnRenderRecordItemNew(obj, mainRecord, root_id)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:MoreChanged(context, id)
|
function M:MoreChanged(context, id, obj)
|
||||||
print("lingmeng MoreChanged", context.sender.selectedIndex)
|
print("lingmeng MoreChanged", context.sender.selectedIndex)
|
||||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
local time_type = self._view:GetController("type").selectedIndex
|
local time_type = self._view:GetController("type").selectedIndex
|
||||||
|
|
@ -569,6 +569,7 @@ function M:MoreChanged(context, id)
|
||||||
-- end
|
-- end
|
||||||
-- end)
|
-- end)
|
||||||
-- else
|
-- else
|
||||||
|
show_total_table[myInfo.father].list:SetChildIndex(obj, show_total_table[myInfo.father].childCount - 1)
|
||||||
self:RecursionGetAllRecordData(0, id, myInfo.father)
|
self:RecursionGetAllRecordData(0, id, myInfo.father)
|
||||||
-- end
|
-- end
|
||||||
end
|
end
|
||||||
|
|
@ -577,6 +578,9 @@ function M:MoreChanged(context, id)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local info = show_total_table[id]
|
local info = show_total_table[id]
|
||||||
|
if info.father then
|
||||||
|
show_total_table[info.father].list:SetChildIndex(obj, 0)
|
||||||
|
end
|
||||||
info.list:RemoveChildrenToPool()
|
info.list:RemoveChildrenToPool()
|
||||||
self:RecursionChangeHeight(id, -info.childCount)
|
self:RecursionChangeHeight(id, -info.childCount)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,665 @@
|
||||||
|
local TimeSettingPanel = import(".TimeSettingPanelTog")
|
||||||
|
local GroupPartnerStatMember = import(".GroupPartnerStatMember")
|
||||||
|
local GroupPartnerStatPlay = import(".GroupPartnerStatPlay")
|
||||||
|
local GroupNumberInputView = import(".GroupNumberInputView")
|
||||||
|
-- 开桌统计
|
||||||
|
local GroupMngPartnerStatViewAlone = {}
|
||||||
|
|
||||||
|
local M = GroupMngPartnerStatViewAlone
|
||||||
|
setmetatable(M, { __index = BaseWindow })
|
||||||
|
|
||||||
|
function GroupMngPartnerStatViewAlone.new(gid)
|
||||||
|
local self = setmetatable({}, { __index = M })
|
||||||
|
self.class = "GroupMngPartnerStatViewAlone"
|
||||||
|
self.group_id = gid
|
||||||
|
self:InitView()
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--初始化数据
|
||||||
|
function M:initData()
|
||||||
|
self.lst_record.numItems = 0
|
||||||
|
self.ctr_search = self._view:GetController('search')
|
||||||
|
|
||||||
|
local now_time = os.date("*t", now)
|
||||||
|
local today = os.time({ year = now_time.year, month = now_time.month, day = now_time.day, hour = 0, min = 0, sec = 0 })
|
||||||
|
self.begin_time = today
|
||||||
|
self.end_time = today + 86400
|
||||||
|
self._data_record = {}
|
||||||
|
self._selectIndexList = {}
|
||||||
|
self._selectIndex = 0
|
||||||
|
self._selectedLev = 0
|
||||||
|
self:GetRecordData(0)
|
||||||
|
end
|
||||||
|
|
||||||
|
--初始化页面
|
||||||
|
function M:InitView()
|
||||||
|
BaseWindow.init(self, "ui://NewGroup/View_GroupPartnerStatAlone")
|
||||||
|
|
||||||
|
local group = DataManager.groups:get(self.group_id)
|
||||||
|
|
||||||
|
self:InitListRecord()
|
||||||
|
|
||||||
|
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"),
|
||||||
|
-308, 0, function()
|
||||||
|
self.begin_time, self.end_time = self.time_panel:GetDate()
|
||||||
|
self:InitListRecord()
|
||||||
|
if self._view:GetController('search').selectedIndex == 1 then
|
||||||
|
ViewUtil.ShowModalWait(nil)
|
||||||
|
local text = self._view:GetChild('tex_id').text
|
||||||
|
local qid, qnick
|
||||||
|
if text == "" then
|
||||||
|
ViewUtil.CloseModalWait()
|
||||||
|
ViewUtil.ErrorTip(nil, '输入不能为空')
|
||||||
|
return
|
||||||
|
end
|
||||||
|
qid = tonumber(text) or 0
|
||||||
|
qnick = text
|
||||||
|
local time_type = self._view:GetController("type").selectedIndex
|
||||||
|
if self.begin_time ~= nil and self.end_time ~= nil then
|
||||||
|
time_type = 0
|
||||||
|
end
|
||||||
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
|
fgCtr:FG_FindPartnerStat(
|
||||||
|
self.group_id,
|
||||||
|
qid, 0, 6, time_type, self.begin_time, self.end_time,
|
||||||
|
function(res)
|
||||||
|
-- printlog("aaaaaaaaaaaaaaaa22222222222222222222222222222")
|
||||||
|
-- pt(res)
|
||||||
|
ViewUtil.CloseModalWait()
|
||||||
|
if self._is_destroy then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if res.ReturnCode ~= 0 then
|
||||||
|
ViewUtil.ErrorTip(res.ReturnCode, '找不到成员')
|
||||||
|
else
|
||||||
|
self:ChangedClear(0)
|
||||||
|
self:InitListRecordFind()
|
||||||
|
self:InsertTableRecord(1, res.Data.members[1])
|
||||||
|
self._selectedLev = 1
|
||||||
|
self._selectIndex = 1
|
||||||
|
self._selectIndexList[self._selectedLev] = self._selectIndex
|
||||||
|
self:GetAllRecordData(0, { lev = 1, index = 1 })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
else
|
||||||
|
self:ChangedClear(0)
|
||||||
|
self:GetRecordData()
|
||||||
|
end
|
||||||
|
end, { showDay = group.lev < 3 and 30 or 7 })
|
||||||
|
self.begin_time, self.end_time = self.time_panel:GetDate()
|
||||||
|
local ctr_page = self._view:GetController("type")
|
||||||
|
ctr_page.onChanged:Set(function()
|
||||||
|
self.lst_record.numItems = 0
|
||||||
|
if ctr_page.selectedIndex == 0 then
|
||||||
|
local now_time = os.date("*t", now)
|
||||||
|
local today = os.time({ year = now_time.year, month = now_time.month, day = now_time.day, hour = 0, min = 0, sec = 0 })
|
||||||
|
self.begin_time = today
|
||||||
|
self.end_time = today + 86400
|
||||||
|
else
|
||||||
|
local now_time = os.date("*t", now)
|
||||||
|
local today = os.time({ year = now_time.year, month = now_time.month, day = now_time.day, hour = 0, min = 0, sec = 0 })
|
||||||
|
self.begin_time = today - 86400 * ctr_page.selectedIndex
|
||||||
|
self.end_time = today - 86400 * (ctr_page.selectedIndex - 1)
|
||||||
|
end
|
||||||
|
self:GetRecordData()
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- 搜索玩家
|
||||||
|
self._view:GetChild('btn_search').onClick:Set(
|
||||||
|
function()
|
||||||
|
--printlog("aaaaaaaaaa1111111111111111111111111111111111111111111111")
|
||||||
|
ViewUtil.ShowModalWait(nil)
|
||||||
|
local text = self._view:GetChild('tex_id').text
|
||||||
|
local qid, qnick
|
||||||
|
if text == "" then
|
||||||
|
ViewUtil.CloseModalWait()
|
||||||
|
ViewUtil.ErrorTip(nil, '输入不能为空')
|
||||||
|
return
|
||||||
|
end
|
||||||
|
qid = tonumber(text) or 0
|
||||||
|
qnick = text
|
||||||
|
local time_type = self._view:GetController("type").selectedIndex
|
||||||
|
if self.begin_time ~= nil and self.end_time ~= nil then
|
||||||
|
time_type = 0
|
||||||
|
end
|
||||||
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
|
fgCtr:FG_FindPartnerStat(
|
||||||
|
self.group_id,
|
||||||
|
qid, 0, 6, time_type, self.begin_time, self.end_time,
|
||||||
|
function(res)
|
||||||
|
-- printlog("aaaaaaaaaaaaaaaa22222222222222222222222222222")
|
||||||
|
-- pt(res)
|
||||||
|
ViewUtil.CloseModalWait()
|
||||||
|
if self._is_destroy then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if res.ReturnCode ~= 0 then
|
||||||
|
ViewUtil.ErrorTip(res.ReturnCode, '找不到成员')
|
||||||
|
else
|
||||||
|
self.ctr_search.selectedIndex = 1
|
||||||
|
self:ChangedClear(0)
|
||||||
|
self:InitListRecordFind()
|
||||||
|
self:InsertTableRecord(1, res.Data.members[1])
|
||||||
|
self._selectedLev = 1
|
||||||
|
self._selectIndex = 1
|
||||||
|
self._selectIndexList[self._selectedLev] = self._selectIndex
|
||||||
|
self:GetAllRecordData(0, { lev = 1, index = 1 })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
local btn_back = self._view:GetChild('btn_back')
|
||||||
|
btn_back.onClick:Set(
|
||||||
|
function()
|
||||||
|
self._view:GetChild('tex_id').text = ""
|
||||||
|
self:ChangedClear(0)
|
||||||
|
self:GetRecordData()
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
---comment 根据lev等级添加数据
|
||||||
|
---@param lev number 用户所在的等级
|
||||||
|
---@param data table 用户信息
|
||||||
|
function M:InsertTableRecord(lev, data)
|
||||||
|
if self._data_record[lev] then
|
||||||
|
table.insert(self._data_record[lev], data)
|
||||||
|
else
|
||||||
|
self._data_record[lev] = {}
|
||||||
|
table.insert(self._data_record[lev], data)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- comment 获取全部数据之后,计算相关参数,count为全部数据的数量,selectCount为点击的用户是第几个子项
|
||||||
|
function M:GetDataRecordLevList()
|
||||||
|
local count = 0
|
||||||
|
local selectCount = 0
|
||||||
|
for i = 1, #self._data_record do
|
||||||
|
count = count + #self._data_record[i]
|
||||||
|
end
|
||||||
|
for i = 1, self._selectIndexList and #self._selectIndexList or 1 do
|
||||||
|
selectCount = selectCount + (self._selectIndexList and self._selectIndexList[i] or 1)
|
||||||
|
end
|
||||||
|
if self._lst_selectIndex then
|
||||||
|
selectCount = selectCount + self._lst_selectIndex
|
||||||
|
self._lst_selectIndex = nil
|
||||||
|
end
|
||||||
|
self._data_record.count = count
|
||||||
|
if self.ctr_search.selectedIndex == 1 then
|
||||||
|
if self.item_result.numItems == self._data_record.count then
|
||||||
|
self.item_result:RefreshVirtualList()
|
||||||
|
else
|
||||||
|
self.item_result.numItems = self._data_record.count
|
||||||
|
end
|
||||||
|
self.item_result:ScrollToView(self._selectedLev == 0 and 0 or selectCount - 1)
|
||||||
|
else
|
||||||
|
if self.lst_record.numItems == self._data_record.count then
|
||||||
|
self.lst_record:RefreshVirtualList()
|
||||||
|
else
|
||||||
|
self.lst_record.numItems = self._data_record.count
|
||||||
|
end
|
||||||
|
self.lst_record:ScrollToView(self._selectedLev == 0 and 0 or selectCount - 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- comment 根据展开规则,递归得到对应的数据的层级和索引,通过层级索引获得对应数据
|
||||||
|
---@param index number 虚拟列表的子项index
|
||||||
|
---@param lev number 默认为1,表示从第一项开始递归计算,也可以在函数内设置,此处在调用时默认传1
|
||||||
|
---@return number 返回子项在数据表中的层级
|
||||||
|
---@return number 返回子项在数据表层级中的索引
|
||||||
|
function M:RecursionGetIndex(index, lev)
|
||||||
|
if lev <= #self._selectIndexList then
|
||||||
|
if self._selectIndexList[lev] == nil then
|
||||||
|
return 1, 1
|
||||||
|
end
|
||||||
|
if index <= self._selectIndexList[lev] then
|
||||||
|
return lev, index
|
||||||
|
end
|
||||||
|
return self:RecursionGetIndex(index - self._selectIndexList[lev], lev + 1)
|
||||||
|
else
|
||||||
|
local haveXia = self._data_record[self._selectedLev + 1] and 1 or 0
|
||||||
|
local tempLev = #self._selectIndexList - (lev - self._selectedLev - 1 - haveXia)
|
||||||
|
if index <= #self._data_record[tempLev] - (self._selectIndexList[tempLev] or 0) then
|
||||||
|
return tempLev, (self._selectIndexList[tempLev] or 0) + index
|
||||||
|
end
|
||||||
|
return self:RecursionGetIndex(index - (#self._data_record[tempLev] - (self._selectIndexList[tempLev] or 0)),
|
||||||
|
lev + 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- comment 搜索和非搜索通用的虚拟列表渲染逻辑
|
||||||
|
---@param index any 虚拟列表传输过来的子项索引
|
||||||
|
---@param obj any 虚拟列表传输过来的子项
|
||||||
|
function M:ListRenderer(index, obj)
|
||||||
|
local tempLev, tempIndex = self:RecursionGetIndex(index + 1, 1)
|
||||||
|
local dataInfo = self._data_record[tempLev][tempIndex]
|
||||||
|
local nameStr = ViewUtil.stringEllipsis(dataInfo.nick)
|
||||||
|
if dataInfo.hpall and dataInfo.hpall.total_member and (dataInfo.partnerLev ~= 0 or dataInfo.lev == 1) then
|
||||||
|
nameStr = string.format("%s(%d)", nameStr, dataInfo.hpall.total_member - 1)
|
||||||
|
end
|
||||||
|
obj:GetChild("tex_name").text = nameStr
|
||||||
|
obj:GetChild("tex_id").text = "ID:" .. dataInfo.uid
|
||||||
|
local tex_total_score = obj:GetChild("tex_total_score")
|
||||||
|
local ctr_show_total = obj:GetController("show_total")
|
||||||
|
if dataInfo.hpall then
|
||||||
|
tex_total_score.text = d2ad(dataInfo.hpall.hp)
|
||||||
|
ctr_show_total.selectedIndex = 1
|
||||||
|
else
|
||||||
|
ctr_show_total.selectedIndex = 0
|
||||||
|
end
|
||||||
|
obj:GetChild("tex_round_valid").text = d2ad((dataInfo.reward_tongji or dataInfo.reward_hp) + dataInfo
|
||||||
|
.total_win) --d2ad(data.reward_hp) --data.valid_round / 100
|
||||||
|
obj:GetChild("tex_round_total").text = dataInfo.total_round
|
||||||
|
obj:GetChild("tex_total").text = d2ad(dataInfo.total_win)
|
||||||
|
obj:GetChild("tex_round_youxiao").text = dataInfo.valid_round / 100
|
||||||
|
obj:GetChild('tex_reward').text = d2ad(dataInfo.reward_tongji or dataInfo.reward_hp)
|
||||||
|
obj:GetChild("btn_more").visible = not dataInfo.partnerLev or dataInfo.partnerLev > 0
|
||||||
|
obj:GetController("more").onChanged:Set(function() end)
|
||||||
|
if tempLev <= self._selectedLev then
|
||||||
|
obj:GetController("select").selectedIndex = 1
|
||||||
|
else
|
||||||
|
obj:GetController("select").selectedIndex = 0
|
||||||
|
end
|
||||||
|
if tempIndex == self._selectIndexList[tempLev] then
|
||||||
|
obj:GetController("more").selectedIndex = 1
|
||||||
|
else
|
||||||
|
obj:GetController("more").selectedIndex = 0
|
||||||
|
end
|
||||||
|
obj:GetController("more").onChanged:Set(function(context)
|
||||||
|
self:MoreChanged(context, { lev = tempLev, index = tempIndex })
|
||||||
|
end)
|
||||||
|
|
||||||
|
local btn_check_members = obj:GetChild("btn_check_members")
|
||||||
|
btn_check_members.visible = not dataInfo.partnerLev or dataInfo.partnerLev > 0
|
||||||
|
btn_check_members.onClick:Set(function()
|
||||||
|
ViewUtil.ShowModalWait(self._root_view)
|
||||||
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
|
if dataInfo.uid == DataManager.SelfUser.account_id then
|
||||||
|
fgCtr:FG_GetMembersCount(self.group_id, function(res)
|
||||||
|
ViewUtil.CloseModalWait()
|
||||||
|
if res.ReturnCode == 0 then
|
||||||
|
tex_total_score.text = d2ad(res.Data.hp_num1 + res.Data.otherHp)
|
||||||
|
ctr_show_total.selectedIndex = 1
|
||||||
|
else
|
||||||
|
ViewUtil.ErrorTip(res.ReturnCode, "目标没有总线值")
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
else
|
||||||
|
fgCtr:FG_GetTotalHp(self.group_id, dataInfo.uid, function(res)
|
||||||
|
ViewUtil.CloseModalWait()
|
||||||
|
if res.ReturnCode == 0 then
|
||||||
|
local hp = d2ad(res.Data.hp)
|
||||||
|
tex_total_score.text = hp
|
||||||
|
dataInfo._total_hp = hp
|
||||||
|
ctr_show_total.selectedIndex = 1
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
obj:GetChild('btn_super').visible = not dataInfo.partnerLev or dataInfo.partnerLev > 0
|
||||||
|
obj:GetChild('btn_super').onClick:Set(function()
|
||||||
|
if obj:GetController("more").selectedIndex == 0 then
|
||||||
|
self:ChangedClear(tempLev)
|
||||||
|
ViewUtil:ShowModalWait()
|
||||||
|
if tempLev == 1 then
|
||||||
|
self._selectedLev = 1
|
||||||
|
self._selectIndex = tempIndex
|
||||||
|
self._selectIndexList[self._selectedLev] = self._selectIndex
|
||||||
|
self:LevGetRecordData(0, dataInfo,
|
||||||
|
self.GetNumberRecordForLev1(self, 0, { lev = tempLev, index = tempIndex }))
|
||||||
|
else
|
||||||
|
self._selectedLev = tempLev
|
||||||
|
self._selectIndex = tempIndex
|
||||||
|
self._selectIndexList[self._selectedLev] = self._selectIndex
|
||||||
|
self:GetAllRecordData(0, { lev = tempLev, index = tempIndex },
|
||||||
|
self.GetNumberRecord(self, 0, { lev = tempLev, index = tempIndex }))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self:ChangedClear(tempIndex + 1)
|
||||||
|
self._selectedLev = tempLev
|
||||||
|
self._selectIndex = tempIndex
|
||||||
|
self._selectIndexList[self._selectedLev] = self._selectIndex
|
||||||
|
if tempLev == 1 and not dataInfo.partnerLev and #self._data_record >= 2 then
|
||||||
|
ViewUtil.ShowModalWait("正在获取成员中")
|
||||||
|
self:GetNumberRecordForLev1(0, { lev = tempLev, index = tempIndex })
|
||||||
|
ViewUtil.CloseModalWait()
|
||||||
|
else
|
||||||
|
self:GetNumberRecord(0, { lev = tempLev, index = tempIndex })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- comment 初始化初始list
|
||||||
|
function M:InitListRecord()
|
||||||
|
if not self.lst_record then
|
||||||
|
self.lst_record = self._view:GetChild("lst_record")
|
||||||
|
self.lst_record:SetVirtual()
|
||||||
|
self.lst_record.itemRenderer = function(index, obj)
|
||||||
|
self:ListRenderer(index, obj)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- comment 初始化搜索list
|
||||||
|
function M:InitListRecordFind()
|
||||||
|
if not self.item_result then
|
||||||
|
self.item_result = self._view:GetChild("lst_member_find")
|
||||||
|
self.item_result:SetVirtual()
|
||||||
|
self.item_result.itemRenderer = function(index, obj)
|
||||||
|
self:ListRenderer(index, obj)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- comment 第一次获取非搜索的数据
|
||||||
|
function M:GetRecordData()
|
||||||
|
ViewUtil.ShowModalWait()
|
||||||
|
local group = DataManager.groups:get(self.group_id)
|
||||||
|
local time_type = self._view:GetController("type").selectedIndex
|
||||||
|
if self.begin_time ~= nil and self.end_time ~= nil then
|
||||||
|
time_type = 0
|
||||||
|
end
|
||||||
|
self:InitListRecord()
|
||||||
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
|
if group.lev == 1 then
|
||||||
|
ViewUtil.ShowModalWait("获取盟主数据中")
|
||||||
|
self.groupumberTemp = {}
|
||||||
|
self.groupumberTemp.lev = 1
|
||||||
|
self.groupumberTemp.uid = group.owner
|
||||||
|
self.groupumberTemp.nick = group.o_nick
|
||||||
|
self.groupumberTemp.total_round = 0
|
||||||
|
self.groupumberTemp.valid_round = 0
|
||||||
|
self.groupumberTemp.reward_hp = 0
|
||||||
|
self.groupumberTemp.total_win = 0
|
||||||
|
self:GetPropLog(0)
|
||||||
|
else
|
||||||
|
self:GetFristData(fgCtr, 0, time_type)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- comment 非盟主第一次获取数据
|
||||||
|
---@param fgCtr any 亲友圈控制器
|
||||||
|
---@param index number 递归开始下标,默认传0
|
||||||
|
---@param time_type number 时间类型 0为拼接传过去的开始时间和结束时间去搜索
|
||||||
|
function M:GetFristData(fgCtr, index, time_type)
|
||||||
|
fgCtr:FG_GetPartnerStat(self.group_id, index * 67, 67, time_type, self.begin_time, self.end_time, function(res)
|
||||||
|
ViewUtil.CloseModalWait()
|
||||||
|
|
||||||
|
if res.ReturnCode == 0 then
|
||||||
|
self:InitListRecord()
|
||||||
|
|
||||||
|
local members = res.Data.members
|
||||||
|
if members and #members then
|
||||||
|
for i = 1, #members do
|
||||||
|
if members[i].uid == DataManager.SelfUser.account_id then
|
||||||
|
self:InsertTableRecord(1, members[i])
|
||||||
|
self._selectedLev = 1
|
||||||
|
self._selectIndex = 1
|
||||||
|
self._selectIndexList[self._selectedLev] = self._selectIndex
|
||||||
|
self:LevGetRecordData(0, members[i])
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if index == 0 and (not members or #members == 0) then
|
||||||
|
ViewUtil.ErrorTip(nil, "你不是合伙人")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ViewUtil.ErrorTip(res.ReturnCode, "当前成员获取失败")
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- comment 盟主第一次获取数据
|
||||||
|
--- sp:里面包含连续两条协议调用,之后可以只用一条协议就能获取所有内容,或者和获取代理数据的协议合并
|
||||||
|
---@param index number 递归开始下标,默认传0
|
||||||
|
function M:GetPropLog(index)
|
||||||
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
|
fgCtr:FG_GetPropLog(self.group_id, index * 67, 67, self.begin_time, self.end_time, function(res)
|
||||||
|
if res.ReturnCode ~= 0 then
|
||||||
|
ViewUtil.CloseModalWait()
|
||||||
|
ViewUtil.ErrorTip(res.ReturnCode, "获取排名信息失败")
|
||||||
|
else
|
||||||
|
local info = res.Data
|
||||||
|
self.groupumberTemp.total_round = info.count
|
||||||
|
self.groupumberTemp.valid_round = info.valid_count * 100
|
||||||
|
self.groupumberTemp.reward_hp = info.pump
|
||||||
|
self.groupumberTemp.total_win = 0
|
||||||
|
ViewUtil.CloseModalWait()
|
||||||
|
fgCtr:FG_GetMembersCount(self.group_id, function(res)
|
||||||
|
ViewUtil.CloseModalWait()
|
||||||
|
if res.ReturnCode == 0 then
|
||||||
|
self.groupumberTemp.hpall = {}
|
||||||
|
self.groupumberTemp.hpall.hp = res.Data.hp_num1 + res.Data.otherHp
|
||||||
|
self.groupumberTemp.hpall.total_member = res.Data.member_num
|
||||||
|
self:InsertTableRecord(1, self.groupumberTemp)
|
||||||
|
self._selectedLev = 1
|
||||||
|
self._selectIndex = 1
|
||||||
|
self._selectIndexList[self._selectedLev] = self._selectIndex
|
||||||
|
self:LevGetRecordData(0, self.groupumberTemp)
|
||||||
|
else
|
||||||
|
ViewUtil.ErrorTip(res.ReturnCode, "目标没有总线值")
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- comment 点击减号触发获取数据
|
||||||
|
---@param context any 官方传输的信息
|
||||||
|
---@param data table 自己拼接的信息,lev为点击数据所在的层级,index为点击数据所在的索引
|
||||||
|
function M:MoreChanged(context, data)
|
||||||
|
if context.sender.selectedIndex == 1 then
|
||||||
|
local myInfo = self._data_record[data.lev][data.index]
|
||||||
|
if myInfo then
|
||||||
|
self:ChangedClear(data.lev)
|
||||||
|
ViewUtil:ShowModalWait()
|
||||||
|
if data.lev == 1 then
|
||||||
|
self._selectedLev = 1
|
||||||
|
self._selectIndex = data.index
|
||||||
|
self._selectIndexList[self._selectedLev] = self._selectIndex
|
||||||
|
self:LevGetRecordData(0, myInfo)
|
||||||
|
else
|
||||||
|
self._selectedLev = data.lev
|
||||||
|
self._selectIndex = data.index
|
||||||
|
self._selectIndexList[self._selectedLev] = self._selectIndex
|
||||||
|
self:GetAllRecordData(0, data)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ViewUtil.ErrorTip(nil, "统计页面失效,请重新打开")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self._lst_selectIndex = self._selectIndexList[data.lev]
|
||||||
|
self:ChangedClear(data.lev)
|
||||||
|
self._selectedLev = data.lev - 1
|
||||||
|
self._selectIndex = self._selectIndexList[self._selectedLev] or 0
|
||||||
|
self:GetDataRecordLevList()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- comment 清理指定层级一下的所有数据
|
||||||
|
---@param lev number 指定的层级,一般是点击数据所在的层级,收缩是是点击层级的上一级
|
||||||
|
function M:ChangedClear(lev)
|
||||||
|
if lev ~= 0 then
|
||||||
|
self._selectIndexList[lev] = nil
|
||||||
|
end
|
||||||
|
for i = lev + 1, #self._data_record do
|
||||||
|
self._data_record[i] = nil
|
||||||
|
self._selectIndexList[i] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- comment 盟主递归获取普通成员数据
|
||||||
|
---@param index number 递归开始下标,默认传0
|
||||||
|
function M:GetNumberRecordForLev1(index)
|
||||||
|
local time_type = self._view:GetController("type").selectedIndex
|
||||||
|
if self.begin_time ~= nil and self.end_time ~= nil then
|
||||||
|
time_type = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
|
fgCtr:FG_GroupMembers12(
|
||||||
|
self.group_id,
|
||||||
|
index * 67,
|
||||||
|
67,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
function(res)
|
||||||
|
if res.ReturnCode ~= 0 then
|
||||||
|
ViewUtil.ErrorTip(res.ReturnCode, '获取成员列表失败')
|
||||||
|
else
|
||||||
|
local numbers = res.Data.members
|
||||||
|
|
||||||
|
if #numbers == 0 then
|
||||||
|
self:GetDataRecordLevList()
|
||||||
|
else
|
||||||
|
self:ChangedClear(3)
|
||||||
|
for i = 1, #numbers do
|
||||||
|
if numbers[i].lev ~= 1 and numbers[i].partnerLev == 0 then
|
||||||
|
self:InsertTableRecord(2, numbers[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self:GetNumberRecordForLev1(index + 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- comment 非盟主递归获取普通成员数据
|
||||||
|
---@param index number 递归开始下标,默认传0
|
||||||
|
---@param data table 自己拼接的信息,lev为点击数据所在的层级,index为点击数据所在的索引
|
||||||
|
function M:GetNumberRecord(index, data)
|
||||||
|
ViewUtil.ShowModalWait("正在获取成员中")
|
||||||
|
local time_type = self._view:GetController("type").selectedIndex
|
||||||
|
if self.begin_time ~= nil and self.end_time ~= nil then
|
||||||
|
time_type = 0
|
||||||
|
end
|
||||||
|
local myInfo = self._data_record[data.lev][data.index]
|
||||||
|
local fatherInfo
|
||||||
|
if self.ctr_search.selectedIndex == 1 then
|
||||||
|
fatherInfo = {}
|
||||||
|
fatherInfo.uid = DataManager.SelfUser.account_id
|
||||||
|
else
|
||||||
|
fatherInfo = self._data_record[data.lev][data.index]
|
||||||
|
if data.lev > 1 then
|
||||||
|
fatherInfo = self._data_record[data.lev - 1][self._selectIndexList[data.lev - 1]]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
|
fgCtr:FG_GetDirectMemberStat(self.group_id, myInfo.uid, fatherInfo.uid, index * 67, 67,
|
||||||
|
time_type,
|
||||||
|
self.begin_time,
|
||||||
|
self.end_time, function(res)
|
||||||
|
ViewUtil.CloseModalWait()
|
||||||
|
if res.ReturnCode == 0 then
|
||||||
|
local members = res.Data.members
|
||||||
|
if #members > 0 then
|
||||||
|
for i = 1, #members do
|
||||||
|
if members[i].partnerLev and members[i].partnerLev == 0 then
|
||||||
|
self:InsertTableRecord(data.lev + 1, members[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self:GetNumberRecord(index + 1, data)
|
||||||
|
else
|
||||||
|
self:GetDataRecordLevList()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- comment 递归获取第一级代理数据
|
||||||
|
---@param index number 递归开始下标,默认传0
|
||||||
|
---@param data table 自己拼接的信息,lev为点击数据所在的层级,index为点击数据所在的索引
|
||||||
|
---@param callback function 用于点击非展开数据的查看下级按钮,一般是对应递归获取普通成员的方法
|
||||||
|
function M:LevGetRecordData(index, data, callback)
|
||||||
|
local time_type = self._view:GetController("type").selectedIndex
|
||||||
|
if self.begin_time ~= nil and self.end_time ~= nil then
|
||||||
|
time_type = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
|
fgCtr:FG_GetPartnerStat(self.group_id, index * 67, 67, time_type, self.begin_time, self.end_time, function(res)
|
||||||
|
ViewUtil.CloseModalWait()
|
||||||
|
if res.ReturnCode == 0 then
|
||||||
|
local members = res.Data.members
|
||||||
|
if #members > 0 then
|
||||||
|
if self._data_record[2] then
|
||||||
|
lastIndex = #self._data_record[2]
|
||||||
|
end
|
||||||
|
for i = 1, #members do
|
||||||
|
if data.uid ~= members[i].uid then
|
||||||
|
self:InsertTableRecord(2, members[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self:LevGetRecordData(index + 1, data)
|
||||||
|
else
|
||||||
|
if callback then
|
||||||
|
callback()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self:GetDataRecordLevList()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ViewUtil.ErrorTip(res.ReturnCode, "获取下级合伙人失败")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- comment 递归获取指定代理下级数据
|
||||||
|
---@param index number 递归开始下标,默认传0
|
||||||
|
---@param data table 自己拼接的信息,lev为点击数据所在的层级,index为点击数据所在的索引
|
||||||
|
---@param callback function 用于点击非展开数据的查看下级按钮,一般是对应递归获取普通成员的方法
|
||||||
|
function M:GetAllRecordData(index, data, callback)
|
||||||
|
ViewUtil.ShowModalWait()
|
||||||
|
local time_type = self._view:GetController("type").selectedIndex
|
||||||
|
if self.begin_time ~= nil and self.end_time ~= nil then
|
||||||
|
time_type = 0
|
||||||
|
end
|
||||||
|
local myInfo = self._data_record[data.lev][data.index]
|
||||||
|
local fatherInfo
|
||||||
|
if self.ctr_search.selectedIndex == 1 then
|
||||||
|
fatherInfo = {}
|
||||||
|
fatherInfo.uid = DataManager.SelfUser.account_id
|
||||||
|
else
|
||||||
|
fatherInfo = self._data_record[data.lev - 1][#self._data_record[data.lev - 1]]
|
||||||
|
end
|
||||||
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
|
fgCtr:FG_GetPartnerStatMember(self.group_id, myInfo.uid, fatherInfo.uid, index * 67, 67,
|
||||||
|
time_type,
|
||||||
|
self.begin_time,
|
||||||
|
self.end_time, function(res)
|
||||||
|
ViewUtil.CloseModalWait()
|
||||||
|
if res.ReturnCode == 0 then
|
||||||
|
local members = res.Data.members
|
||||||
|
if #members > 0 then
|
||||||
|
for i = 1, #members do
|
||||||
|
if members[i].uid ~= myInfo.uid then
|
||||||
|
self:InsertTableRecord(self._selectedLev + 1, members[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self:GetAllRecordData(index + 1, data)
|
||||||
|
else
|
||||||
|
if callback then
|
||||||
|
callback()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self:GetDataRecordLevList()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ViewUtil:ErrorTip(res.ReturnCode, "获取下级合伙人失败")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -43,6 +43,7 @@ end
|
||||||
local modal_wait_win = nil
|
local modal_wait_win = nil
|
||||||
-- local modal_wait_win_url = "ui://Common/GlobalModalWaiting"
|
-- local modal_wait_win_url = "ui://Common/GlobalModalWaiting"
|
||||||
function ViewUtil.ShowModalWait(blur_view, title, time)
|
function ViewUtil.ShowModalWait(blur_view, title, time)
|
||||||
|
printlog("lingmeng log", blur_view, title, time)
|
||||||
local flag = type(blur_view) == "boolean"
|
local flag = type(blur_view) == "boolean"
|
||||||
ViewUtil.CloseModalWait()
|
ViewUtil.CloseModalWait()
|
||||||
ViewUtil.continue = coroutine.start(
|
ViewUtil.continue = coroutine.start(
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,18 @@ oldGameVersion = 2 --1 原始 2 老游戏新加功能
|
||||||
|
|
||||||
--主入口函数。从这里开始lua逻辑
|
--主入口函数。从这里开始lua逻辑
|
||||||
function Main()
|
function Main()
|
||||||
|
-- if true then
|
||||||
|
-- local suc = pcall(function()
|
||||||
|
-- local path = Application.streamingAssetsPath .. "/../../.."
|
||||||
|
-- package.cpath = package.cpath .. ";" .. path .. "/?.dll"
|
||||||
|
-- local dbg = require("emmy_core")
|
||||||
|
-- dbg.tcpConnect('localhost', 9966)
|
||||||
|
-- end)
|
||||||
|
-- if suc then
|
||||||
|
-- print("=============================调试连接成功!===========================")
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
|
||||||
-- PlayerPrefs.DeleteKey('session_id')
|
-- PlayerPrefs.DeleteKey('session_id')
|
||||||
Application.targetFrameRate = 60
|
Application.targetFrameRate = 60
|
||||||
FairyGUI.UIConfig.buttonSound = FairyGUI.NAudioClip(ResourcesManager.LoadObject("base/common/sound/click.mp3",
|
FairyGUI.UIConfig.buttonSound = FairyGUI.NAudioClip(ResourcesManager.LoadObject("base/common/sound/click.mp3",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"libview.firstColumnWidth": 338,
|
"libview.firstColumnWidth": 522,
|
||||||
"libview.iconScale": 0,
|
"libview.iconScale": 0,
|
||||||
"doc.openedDocs": [
|
"doc.openedDocs": [
|
||||||
"ui://m7iejg46ilon7ias",
|
"ui://m7iejg46ilon7ias",
|
||||||
|
|
@ -31,6 +31,9 @@
|
||||||
"ui://2d9xdj6zab5pcji",
|
"ui://2d9xdj6zab5pcji",
|
||||||
"ui://2d9xdj6znld2cjm",
|
"ui://2d9xdj6znld2cjm",
|
||||||
"ui://m7iejg46hsbhhjn",
|
"ui://m7iejg46hsbhhjn",
|
||||||
|
"ui://m7iejg46imp57ihp",
|
||||||
|
"ui://m7iejg46f6brhww",
|
||||||
|
"ui://m7iejg46t1hqhxw",
|
||||||
"ui://2d9xdj6zlumrgj",
|
"ui://2d9xdj6zlumrgj",
|
||||||
"ui://2d9xdj6znlwcgk",
|
"ui://2d9xdj6znlwcgk",
|
||||||
"ui://2d9xdj6zl0lzb",
|
"ui://2d9xdj6zl0lzb",
|
||||||
|
|
@ -46,7 +49,7 @@
|
||||||
"test.device": "720p Phone",
|
"test.device": "720p Phone",
|
||||||
"canvasColor": 10066329,
|
"canvasColor": 10066329,
|
||||||
"auxline2": true,
|
"auxline2": true,
|
||||||
"doc.activeDoc": "ui://m7iejg4610snh5j",
|
"doc.activeDoc": "ui://m7iejg46f6brhww",
|
||||||
"libview.twoColumn": false,
|
"libview.twoColumn": false,
|
||||||
"libview.expandedNodes": [
|
"libview.expandedNodes": [
|
||||||
"27vd145b",
|
"27vd145b",
|
||||||
|
|
@ -62,7 +65,9 @@
|
||||||
"27vd145b",
|
"27vd145b",
|
||||||
"/font/images/win/",
|
"/font/images/win/",
|
||||||
"m7iejg46",
|
"m7iejg46",
|
||||||
"/"
|
"/",
|
||||||
|
"m7iejg46",
|
||||||
|
"/mgr/"
|
||||||
],
|
],
|
||||||
"auxline1": true,
|
"auxline1": true,
|
||||||
"snapToGrid": true,
|
"snapToGrid": true,
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,11 @@
|
||||||
<controller name="show_total" pages="0,,1," selected="0"/>
|
<controller name="show_total" pages="0,,1," selected="0"/>
|
||||||
<controller name="menkan" pages="0,,1," selected="0"/>
|
<controller name="menkan" pages="0,,1," selected="0"/>
|
||||||
<controller name="more" pages="0,,1," selected="0"/>
|
<controller name="more" pages="0,,1," selected="0"/>
|
||||||
|
<controller name="select" pages="0,,1," selected="1"/>
|
||||||
<displayList>
|
<displayList>
|
||||||
<image id="n64_hp03" name="n64" src="ilon7ib8" fileName="mgr/imgs/numberHpAlone/Rectangle 347.png" xy="37,-1" size="998,113">
|
<image id="n64_hp03" name="n64" src="ilon7ib8" fileName="mgr/imgs/numberHpAlone/Rectangle 347.png" xy="-1,-1" size="1036,113">
|
||||||
<gearXY controller="more" pages="1" values="0,-1" default="37,-1"/>
|
<gearXY controller="select" pages="1" values="-1,-1" default="37,-1"/>
|
||||||
<gearSize controller="more" pages="1" values="1036,113,1,1" default="998,113,1,1"/>
|
<gearSize controller="select" pages="1" values="1036,113,1,1" default="998,113,1,1"/>
|
||||||
<relation target="" sidePair="width-width"/>
|
<relation target="" sidePair="width-width"/>
|
||||||
</image>
|
</image>
|
||||||
<text id="n19_oj7k" name="tex_name" xy="111,16" size="194,37" group="n20_oj7k" font="Microsoft YaHei" fontSize="26" color="#444444" vAlign="middle" autoSize="shrink" bold="true" text="玩家名字">
|
<text id="n19_oj7k" name="tex_name" xy="111,16" size="194,37" group="n20_oj7k" font="Microsoft YaHei" fontSize="26" color="#444444" vAlign="middle" autoSize="shrink" bold="true" text="玩家名字">
|
||||||
|
|
@ -64,7 +65,7 @@
|
||||||
<relation target="" sidePair="width-width%,left-right%"/>
|
<relation target="" sidePair="width-width%,left-right%"/>
|
||||||
</text>
|
</text>
|
||||||
<component id="n65_xt5s" name="btn_more" src="xt5s7iia" fileName="mgr/component/member/partner/btn_mul.xml" xy="43,21" size="68,68">
|
<component id="n65_xt5s" name="btn_more" src="xt5s7iia" fileName="mgr/component/member/partner/btn_mul.xml" xy="43,21" size="68,68">
|
||||||
<gearXY controller="more" pages="0,1" values="43,21|13,21"/>
|
<gearXY controller="more" pages="0,1" values="43,21|25,21"/>
|
||||||
<relation target="" sidePair="right-right%"/>
|
<relation target="" sidePair="right-right%"/>
|
||||||
<Button icon="ui://m7iejg46xt5s7iic" selectedIcon="ui://m7iejg46xt5s7iib" controller="more" page="1"/>
|
<Button icon="ui://m7iejg46xt5s7iic" selectedIcon="ui://m7iejg46xt5s7iib" controller="more" page="1"/>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -315,62 +315,68 @@ PlayerSettings:
|
||||||
- m_Textures: []
|
- m_Textures: []
|
||||||
m_Width: 192
|
m_Width: 192
|
||||||
m_Height: 192
|
m_Height: 192
|
||||||
m_Kind: 0
|
m_Kind: 1
|
||||||
m_SubKind:
|
m_SubKind:
|
||||||
- m_Textures: []
|
- m_Textures: []
|
||||||
m_Width: 144
|
m_Width: 144
|
||||||
m_Height: 144
|
m_Height: 144
|
||||||
m_Kind: 0
|
m_Kind: 1
|
||||||
m_SubKind:
|
m_SubKind:
|
||||||
- m_Textures: []
|
- m_Textures: []
|
||||||
m_Width: 96
|
m_Width: 96
|
||||||
m_Height: 96
|
m_Height: 96
|
||||||
m_Kind: 0
|
m_Kind: 1
|
||||||
m_SubKind:
|
m_SubKind:
|
||||||
- m_Textures: []
|
- m_Textures: []
|
||||||
m_Width: 72
|
m_Width: 72
|
||||||
m_Height: 72
|
m_Height: 72
|
||||||
m_Kind: 0
|
m_Kind: 1
|
||||||
m_SubKind:
|
m_SubKind:
|
||||||
- m_Textures: []
|
- m_Textures: []
|
||||||
m_Width: 48
|
m_Width: 48
|
||||||
m_Height: 48
|
m_Height: 48
|
||||||
m_Kind: 0
|
m_Kind: 1
|
||||||
m_SubKind:
|
m_SubKind:
|
||||||
- m_Textures: []
|
- m_Textures: []
|
||||||
m_Width: 36
|
m_Width: 36
|
||||||
m_Height: 36
|
m_Height: 36
|
||||||
m_Kind: 0
|
m_Kind: 1
|
||||||
m_SubKind:
|
m_SubKind:
|
||||||
- m_Textures: []
|
- m_Textures:
|
||||||
|
- {fileID: 0}
|
||||||
m_Width: 192
|
m_Width: 192
|
||||||
m_Height: 192
|
m_Height: 192
|
||||||
m_Kind: 1
|
m_Kind: 0
|
||||||
m_SubKind:
|
m_SubKind:
|
||||||
- m_Textures: []
|
- m_Textures:
|
||||||
|
- {fileID: 0}
|
||||||
m_Width: 144
|
m_Width: 144
|
||||||
m_Height: 144
|
m_Height: 144
|
||||||
m_Kind: 1
|
m_Kind: 0
|
||||||
m_SubKind:
|
m_SubKind:
|
||||||
- m_Textures: []
|
- m_Textures:
|
||||||
|
- {fileID: 0}
|
||||||
m_Width: 96
|
m_Width: 96
|
||||||
m_Height: 96
|
m_Height: 96
|
||||||
m_Kind: 1
|
m_Kind: 0
|
||||||
m_SubKind:
|
m_SubKind:
|
||||||
- m_Textures: []
|
- m_Textures:
|
||||||
|
- {fileID: 0}
|
||||||
m_Width: 72
|
m_Width: 72
|
||||||
m_Height: 72
|
m_Height: 72
|
||||||
m_Kind: 1
|
m_Kind: 0
|
||||||
m_SubKind:
|
m_SubKind:
|
||||||
- m_Textures: []
|
- m_Textures:
|
||||||
|
- {fileID: 0}
|
||||||
m_Width: 48
|
m_Width: 48
|
||||||
m_Height: 48
|
m_Height: 48
|
||||||
m_Kind: 1
|
m_Kind: 0
|
||||||
m_SubKind:
|
m_SubKind:
|
||||||
- m_Textures: []
|
- m_Textures:
|
||||||
|
- {fileID: 0}
|
||||||
m_Width: 36
|
m_Width: 36
|
||||||
m_Height: 36
|
m_Height: 36
|
||||||
m_Kind: 1
|
m_Kind: 0
|
||||||
m_SubKind:
|
m_SubKind:
|
||||||
- m_BuildTarget: iPhone
|
- m_BuildTarget: iPhone
|
||||||
m_Icons:
|
m_Icons:
|
||||||
|
|
@ -464,7 +470,8 @@ PlayerSettings:
|
||||||
m_Height: 20
|
m_Height: 20
|
||||||
m_Kind: 2
|
m_Kind: 2
|
||||||
m_SubKind: iPad
|
m_SubKind: iPad
|
||||||
- m_Textures: []
|
- m_Textures:
|
||||||
|
- {fileID: 0}
|
||||||
m_Width: 1024
|
m_Width: 1024
|
||||||
m_Height: 1024
|
m_Height: 1024
|
||||||
m_Kind: 4
|
m_Kind: 4
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue