diff --git a/EasyHook.dll b/EasyHook.dll
new file mode 100644
index 00000000..d0f5cfda
Binary files /dev/null and b/EasyHook.dll differ
diff --git a/emmy_core.dll b/emmy_core.dll
new file mode 100644
index 00000000..4376aeb3
Binary files /dev/null and b/emmy_core.dll differ
diff --git a/emmy_hook.dll b/emmy_hook.dll
new file mode 100644
index 00000000..2d1dec0b
Binary files /dev/null and b/emmy_hook.dll differ
diff --git a/emmy_tool.exe b/emmy_tool.exe
new file mode 100644
index 00000000..605e9a91
Binary files /dev/null and b/emmy_tool.exe differ
diff --git a/lua_probject/.vscode/launch.json b/lua_probject/.vscode/launch.json
index 8191125a..dabd1029 100644
--- a/lua_probject/.vscode/launch.json
+++ b/lua_probject/.vscode/launch.json
@@ -1,116 +1,93 @@
{
- // 使用 IntelliSense 了解相关属性。
- // 悬停以查看现有属性的描述。
- // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
- "version": "0.2.0",
- "configurations": [
- {
- "name": "Cocos2-launch",
- "type": "lua",
- "request": "launch",
- "runtimeType": "Cocos2",
- "localRoot": "${workspaceRoot}",
- "commandLine": "-workdir ${workspaceRoot}/../ -file src/main.lua",
- "port": 7003,
- "exePath": "",
- "fileExtNames": [
- ".lua",
- ".txt",
- ".lua.txt",
- ".bytes"
- ],
- "isFoxGloryProject": false,
- "printType": 1
- },
- {
- "name": "COCOS(remote debugging)",
- "type": "lua",
- "request": "attach",
- "runtimeType": "Cocos2",
- "localRoot": "${workspaceRoot}",
- "port": 7003,
- "fileExtNames": [
- ".lua",
- ".txt",
- ".lua.txt",
- ".bytes"
- ],
- "isFoxGloryProject": false,
- "printType": 1
- },
- {
- "name": "Unity-ulua",
- "type": "lua",
- "request": "attach",
- "runtimeType": "Unity",
- "localRoot": "${workspaceRoot}",
- "fileExtNames": [
- ".lua",
- ".txt",
- ".lua.txt",
- ".bytes"
- ],
- "port": 7003,
- "printType": 1
- },
- {
- "name": "Unity-slua",
- "type": "lua",
- "request": "attach",
- "runtimeType": "Unity",
- "localRoot": "${workspaceRoot}",
- "fileExtNames": [
- ".lua",
- ".txt",
- ".lua.txt",
- ".bytes"
- ],
- "port": 7003,
- "printType": 1
- },
- {
- "name": "Unity-xlua",
- "type": "lua",
- "request": "attach",
- "runtimeType": "Unity",
- "localRoot": "${workspaceRoot}",
- "fileExtNames": [
- ".lua",
- ".txt",
- ".lua.txt",
- ".bytes"
- ],
- "port": 7003,
- "printType": 1
- },
- {
- "name": "OpenResty",
- "type": "lua",
- "request": "attach",
- "runtimeType": "OpenResty",
- "localRoot": "${workspaceRoot}",
- "port": 7003,
- "fileExtNames": [
- ".lua"
- ],
- "printType": 1
- },
- {
- "name": "LuaTest",
- "type": "lua",
- "request": "launch",
- "runtimeType": "LuaTest",
- "mainFile": "${fileBasenameNoExtension}",
- "localRoot": "${fileDirname}",
- "curFileExtname": "${fileExtname}",
- "fileExtNames": [
- ".lua",
- ".txt",
- ".lua.txt",
- ".bytes"
- ],
- "port": 7003,
- "printType": 1
- }
- ]
-}
\ No newline at end of file
+ // 使用 IntelliSense 了解相关属性。
+ // 悬停以查看现有属性的描述。
+ // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Cocos2-launch",
+ "type": "lua",
+ "request": "launch",
+ "runtimeType": "Cocos2",
+ "localRoot": "${workspaceRoot}",
+ "commandLine": "-workdir ${workspaceRoot}/../ -file src/main.lua",
+ "port": 7003,
+ "exePath": "",
+ "fileExtNames": [".lua", ".txt", ".lua.txt", ".bytes"],
+ "isFoxGloryProject": false,
+ "printType": 1
+ },
+ {
+ "name": "COCOS(remote debugging)",
+ "type": "lua",
+ "request": "attach",
+ "runtimeType": "Cocos2",
+ "localRoot": "${workspaceRoot}",
+ "port": 7003,
+ "fileExtNames": [".lua", ".txt", ".lua.txt", ".bytes"],
+ "isFoxGloryProject": false,
+ "printType": 1
+ },
+ {
+ "name": "Unity-ulua",
+ "type": "lua",
+ "request": "attach",
+ "runtimeType": "Unity",
+ "localRoot": "${workspaceRoot}",
+ "fileExtNames": [".lua", ".txt", ".lua.txt", ".bytes"],
+ "port": 7003,
+ "printType": 1
+ },
+ {
+ "name": "Unity-slua",
+ "type": "lua",
+ "request": "attach",
+ "runtimeType": "Unity",
+ "localRoot": "${workspaceRoot}",
+ "fileExtNames": [".lua", ".txt", ".lua.txt", ".bytes"],
+ "port": 7003,
+ "printType": 1
+ },
+ {
+ "name": "Unity-xlua",
+ "type": "lua",
+ "request": "attach",
+ "runtimeType": "Unity",
+ "localRoot": "${workspaceRoot}",
+ "fileExtNames": [".lua", ".txt", ".lua.txt", ".bytes"],
+ "port": 7003,
+ "printType": 1
+ },
+ {
+ "name": "OpenResty",
+ "type": "lua",
+ "request": "attach",
+ "runtimeType": "OpenResty",
+ "localRoot": "${workspaceRoot}",
+ "port": 7003,
+ "fileExtNames": [".lua"],
+ "printType": 1
+ },
+ {
+ "name": "LuaTest",
+ "type": "lua",
+ "request": "launch",
+ "runtimeType": "LuaTest",
+ "mainFile": "${fileBasenameNoExtension}",
+ "localRoot": "${fileDirname}",
+ "curFileExtname": "${fileExtname}",
+ "fileExtNames": [".lua", ".txt", ".lua.txt", ".bytes"],
+ "port": 7003,
+ "printType": 1
+ },
+ {
+ "type": "emmylua_new",
+ "request": "launch",
+ "name": "EmmyLua-Debug",
+ "host": "localhost",
+ "port": 9966,
+ "ext": ["lua", "lua.txt", "lua.bytes"],
+ "ideConnectDebugger": false
+ }
+ ]
+}
diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua
index 44f268ed..b2d21944 100644
--- a/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua
+++ b/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua
@@ -2122,9 +2122,9 @@ function M:__refreshManager()
local btn_stat = self._view:GetChild('btn_stat')
btn_stat.onClick:Set(
function()
- if not self.mng_view2 then
- self.mng_view2 = GroupManagerView.new(self._root_view, self.curGroup.id, 2)
- end
+ -- if not self.mng_view2 then
+ self.mng_view2 = GroupManagerView.new(self._root_view, self.curGroup.id, 2)
+ -- end
-- self:SetRoomListVisible(false)
self.mng_view2:Show()
end
@@ -2500,8 +2500,8 @@ end
function M:ShowErrorJoinRoom(data)
local msg = string.format("玩法:%s", data.gamePlayStr)
local _curren_msg = MsgWindow.new(self._root_view, msg, MsgWindow.MsgMode.OnlyOk, nil, nil,
- { titleUrl = "ui://NewGroup/wanfaxinxi" ,openClose = true,closeZone=true})
- _curren_msg._view:GetChild("btn_ok").icon = "ui://NewGroup/kaishiyouxi"
+ { titleUrl = "ui://NewGroup/wanfaxinxi", openClose = true, closeZone = true })
+ _curren_msg._view:GetChild("btn_ok").icon = "ui://NewGroup/kaishiyouxi"
_curren_msg.onOk:Add(
function()
self:__startGame("", data.room.pid, false)
diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua
index 28774960..0df27176 100644
--- a/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua
+++ b/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua
@@ -11,7 +11,7 @@ function GroupManagerView.new(blur_view, gid, btn_type, callback)
setmetatable(M, { __index = BaseWindow })
local self = setmetatable({}, { __index = M })
self.class = "GroupManagerView"
- -- self._close_destroy = true
+ self._close_destroy = true
self._put_map = false
self._new_hide = false
self._queue = false
diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberHpListView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberHpListView.lua
index e4ac292b..3d963cb4 100644
--- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberHpListView.lua
+++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberHpListView.lua
@@ -7,7 +7,7 @@ local GroupMemberOperateView = import('.GroupMemberOperateView')
local GroupAddMemberInfoView = import('.GroupAddMemberInfoView')
local GroupStatMember = import('.GroupStatMember')
local GroupMngFagPackView = import('../GroupMngFagPackView')
-local GroupMngPartnerStatViewAlone = import(".GroupMngPartnerStatViewAlone")
+local GroupMngPartnerStatViewAlone = import(".GroupMngPartnerStatViewAlone2")
local MngPermission = import('.MngPermission')
@@ -355,7 +355,7 @@ function M:FillItem(obj, member, refresh, index)
obj:GetChild('tex_zongchangci').text = member.parentId
- -- obj:GetChild('tex_pername').text = member.parentId_nick or ""
+ -- obj:GetChild('tex_pername').text = member.parentId_nick or ""
obj:GetChild('tex_ruhui').text = os.date('%Y/%m/%d %H:%M:%S', member.join_time)
--上级
diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView.lua
index a4e63af2..46be9001 100644
--- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView.lua
+++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView.lua
@@ -136,7 +136,8 @@ function M:GetPartnerData(index, callback)
if index == 0 then
self.partner_data = {}
end
- ViewUtil.ShowModalWait(nil)
+ -- printlog("lingmeng log")
+ -- ViewUtil.ShowModalWait(true, "正在获取全部成员战绩信息", 0.01)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetPartnerList(self.group_id, 0, index, 10, function(res)
ViewUtil.CloseModalWait()
diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua
index 323e9edb..d151b347 100644
--- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua
+++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua
@@ -123,7 +123,6 @@ function M:InitView()
ViewUtil.ErrorTip(nil, '输入不能为空')
return
end
- self._view:GetChild('tex_id').text = ""
qid = tonumber(text) or 0
local fgCtr = ControllerManager.GetController(NewGroupController)
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')
btn_back.onClick:Set(
function()
+ self._view:GetChild('tex_id').text = ""
ctr_search.selectedIndex = 0
table.sort(self.record_data, function(a, b)
return a.round > b.round
@@ -334,7 +334,7 @@ function M:GetRecoedData(index, type)
self.record_data = {}
self.lst_record.numItems = 0
end
- ViewUtil.ShowModalWait("正在获取数据中")
+ ViewUtil.ShowModalWait(true, "正在获取全部成员战绩", 0.01)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetMemberStat(self.group_id, 0, self._data_choosePlayyer.uid,
index, 33, 3, self.begin_time, self.end_time, type,
diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone.lua
index 166b414c..833a4ddd 100644
--- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone.lua
+++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone.lua
@@ -490,7 +490,7 @@ function M:OnRenderRecordItemNew(obj, mainRecord, root_id)
obj:GetController("more").onChanged:Set(function() end)
obj:GetController("more").selectedIndex = 0
obj:GetController("more").onChanged:Set(function(context)
- self:MoreChanged(context, mainRecord.uid)
+ self:MoreChanged(context, mainRecord.uid, obj)
end)
local btn_check_members = obj:GetChild("btn_check_members")
@@ -536,7 +536,7 @@ function M:OnRenderRecordItemNew(obj, mainRecord, root_id)
end)
end
-function M:MoreChanged(context, id)
+function M:MoreChanged(context, id, obj)
print("lingmeng MoreChanged", context.sender.selectedIndex)
local fgCtr = ControllerManager.GetController(NewGroupController)
local time_type = self._view:GetController("type").selectedIndex
@@ -569,6 +569,7 @@ function M:MoreChanged(context, id)
-- end
-- end)
-- else
+ show_total_table[myInfo.father].list:SetChildIndex(obj, show_total_table[myInfo.father].childCount - 1)
self:RecursionGetAllRecordData(0, id, myInfo.father)
-- end
end
@@ -577,6 +578,9 @@ function M:MoreChanged(context, id)
end
else
local info = show_total_table[id]
+ if info.father then
+ show_total_table[info.father].list:SetChildIndex(obj, 0)
+ end
info.list:RemoveChildrenToPool()
self:RecursionChangeHeight(id, -info.childCount)
end
diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone2.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone2.lua
new file mode 100644
index 00000000..f2125834
--- /dev/null
+++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone2.lua
@@ -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
diff --git a/lua_probject/base_project/Game/View/ViewUtil.lua b/lua_probject/base_project/Game/View/ViewUtil.lua
index c6d9d211..2bc7ded3 100644
--- a/lua_probject/base_project/Game/View/ViewUtil.lua
+++ b/lua_probject/base_project/Game/View/ViewUtil.lua
@@ -43,6 +43,7 @@ end
local modal_wait_win = nil
-- local modal_wait_win_url = "ui://Common/GlobalModalWaiting"
function ViewUtil.ShowModalWait(blur_view, title, time)
+ printlog("lingmeng log", blur_view, title, time)
local flag = type(blur_view) == "boolean"
ViewUtil.CloseModalWait()
ViewUtil.continue = coroutine.start(
diff --git a/lua_probject/base_project/Main.lua b/lua_probject/base_project/Main.lua
index fb20ef37..622be89f 100644
--- a/lua_probject/base_project/Main.lua
+++ b/lua_probject/base_project/Main.lua
@@ -36,6 +36,18 @@ oldGameVersion = 2 --1 原始 2 老游戏新加功能
--主入口函数。从这里开始lua逻辑
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')
Application.targetFrameRate = 60
FairyGUI.UIConfig.buttonSound = FairyGUI.NAudioClip(ResourcesManager.LoadObject("base/common/sound/click.mp3",
diff --git a/wb_new_ui/.objs/workspace.json b/wb_new_ui/.objs/workspace.json
index 85d23c98..3a873dea 100644
--- a/wb_new_ui/.objs/workspace.json
+++ b/wb_new_ui/.objs/workspace.json
@@ -1,5 +1,5 @@
{
- "libview.firstColumnWidth": 338,
+ "libview.firstColumnWidth": 522,
"libview.iconScale": 0,
"doc.openedDocs": [
"ui://m7iejg46ilon7ias",
@@ -31,6 +31,9 @@
"ui://2d9xdj6zab5pcji",
"ui://2d9xdj6znld2cjm",
"ui://m7iejg46hsbhhjn",
+ "ui://m7iejg46imp57ihp",
+ "ui://m7iejg46f6brhww",
+ "ui://m7iejg46t1hqhxw",
"ui://2d9xdj6zlumrgj",
"ui://2d9xdj6znlwcgk",
"ui://2d9xdj6zl0lzb",
@@ -46,7 +49,7 @@
"test.device": "720p Phone",
"canvasColor": 10066329,
"auxline2": true,
- "doc.activeDoc": "ui://m7iejg4610snh5j",
+ "doc.activeDoc": "ui://m7iejg46f6brhww",
"libview.twoColumn": false,
"libview.expandedNodes": [
"27vd145b",
@@ -62,7 +65,9 @@
"27vd145b",
"/font/images/win/",
"m7iejg46",
- "/"
+ "/",
+ "m7iejg46",
+ "/mgr/"
],
"auxline1": true,
"snapToGrid": true,
diff --git a/wb_new_ui/assets/NewGroup/mgr/component/member/partner/item_partner_stat.xml b/wb_new_ui/assets/NewGroup/mgr/component/member/partner/item_partner_stat.xml
index 921d8ecd..b7575ee6 100644
--- a/wb_new_ui/assets/NewGroup/mgr/component/member/partner/item_partner_stat.xml
+++ b/wb_new_ui/assets/NewGroup/mgr/component/member/partner/item_partner_stat.xml
@@ -4,10 +4,11 @@
+
-
-
-
+
+
+
@@ -64,7 +65,7 @@
-
+
diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_fui.bytes b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_fui.bytes
index 02c2dd91..fa780996 100644
Binary files a/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_fui.bytes and b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_fui.bytes differ
diff --git a/wb_unity_pro/ProjectSettings/ProjectSettings.asset b/wb_unity_pro/ProjectSettings/ProjectSettings.asset
index 065f2b6a..c39fe7a4 100644
--- a/wb_unity_pro/ProjectSettings/ProjectSettings.asset
+++ b/wb_unity_pro/ProjectSettings/ProjectSettings.asset
@@ -315,62 +315,68 @@ PlayerSettings:
- m_Textures: []
m_Width: 192
m_Height: 192
- m_Kind: 0
+ m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 144
m_Height: 144
- m_Kind: 0
+ m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 96
m_Height: 96
- m_Kind: 0
+ m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 72
m_Height: 72
- m_Kind: 0
+ m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 48
m_Height: 48
- m_Kind: 0
+ m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 36
m_Height: 36
- m_Kind: 0
+ m_Kind: 1
m_SubKind:
- - m_Textures: []
+ - m_Textures:
+ - {fileID: 0}
m_Width: 192
m_Height: 192
- m_Kind: 1
+ m_Kind: 0
m_SubKind:
- - m_Textures: []
+ - m_Textures:
+ - {fileID: 0}
m_Width: 144
m_Height: 144
- m_Kind: 1
+ m_Kind: 0
m_SubKind:
- - m_Textures: []
+ - m_Textures:
+ - {fileID: 0}
m_Width: 96
m_Height: 96
- m_Kind: 1
+ m_Kind: 0
m_SubKind:
- - m_Textures: []
+ - m_Textures:
+ - {fileID: 0}
m_Width: 72
m_Height: 72
- m_Kind: 1
+ m_Kind: 0
m_SubKind:
- - m_Textures: []
+ - m_Textures:
+ - {fileID: 0}
m_Width: 48
m_Height: 48
- m_Kind: 1
+ m_Kind: 0
m_SubKind:
- - m_Textures: []
+ - m_Textures:
+ - {fileID: 0}
m_Width: 36
m_Height: 36
- m_Kind: 1
+ m_Kind: 0
m_SubKind:
- m_BuildTarget: iPhone
m_Icons:
@@ -464,7 +470,8 @@ PlayerSettings:
m_Height: 20
m_Kind: 2
m_SubKind: iPad
- - m_Textures: []
+ - m_Textures:
+ - {fileID: 0}
m_Width: 1024
m_Height: 1024
m_Kind: 4