From 08fa583c33281efc596f790a0a0e98456a30dda5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BD=97=E5=AE=B6=E7=82=9C?= <2029049582@qq.com>
Date: Thu, 19 Jun 2025 23:14:44 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=90=E5=91=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../NewGroup/MngView/GroupGameSettingView.lua | 426 +++++++++---------
.../NewGroup/MngView/GroupMngGameListView.lua | 196 ++++----
.../MngView/GroupMngMemberHpListView.lua | 63 ++-
.../NewGroup/MngView/GroupMngPiLaoZhi.lua | 48 +-
wb_new_ui/.objs/metas/m7iejg46/kwi0hkl.info | 24 +-
wb_new_ui/.objs/metas/m7iejg46/mpllhv5.info | 8 +-
wb_new_ui/.objs/workspace.json | 13 +-
.../NewGroup/mgr/component/game/panel_fag.xml | 22 +-
.../mgr/component/play_set/item_rewards.xml | 14 +-
9 files changed, 426 insertions(+), 388 deletions(-)
diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView.lua
index 1b3e12d4..4370dccc 100644
--- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView.lua
+++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView.lua
@@ -6,9 +6,9 @@ local GroupGameSettingView = {}
local M = GroupGameSettingView
-function GroupGameSettingView.new(blur_view, gid, pid , room_config, callback)
- setmetatable(M, {__index = BaseWindow})
- local self = setmetatable({}, {__index = M})
+function GroupGameSettingView.new(blur_view, gid, pid, room_config, hpdata, callback)
+ setmetatable(M, { __index = BaseWindow })
+ local self = setmetatable({}, { __index = M })
self.class = "GroupGameSettingView"
self._animation = false
self._full = true
@@ -24,6 +24,7 @@ function GroupGameSettingView.new(blur_view, gid, pid , room_config, callback)
if room_config then
self.room_config = json.decode(room_config)
end
+ self.lastHpdata = hpdata
self.rewards_data = {}
self.callback = callback
self._full = true
@@ -32,7 +33,7 @@ function GroupGameSettingView.new(blur_view, gid, pid , room_config, callback)
end
function M:init(url)
- BaseWindow.init(self,url)
+ BaseWindow.init(self, url)
self.hpData = {}
self:FillGameData()
@@ -65,7 +66,7 @@ end
function M:FillGameData()
local index = 1
-- 显示所有游戏
- local games = DataManager.SelfUser.games
+ local games = DataManager.SelfUser.games
local lst_game = self._view:GetChild("lst_game")
-- local n65 = lst_game:GetChild("n65")
printlog("jefe all games")
@@ -77,7 +78,7 @@ function M:FillGameData()
index = i
end
end
- self.gl_view = GameListView.new(lst_game,index,self.room_config)
+ self.gl_view = GameListView.new(lst_game, index, self.room_config)
local btn_close = lst_game:GetChild("btn_close")
btn_close.onClick:Set(function()
self:Destroy()
@@ -87,27 +88,26 @@ function M:FillGameData()
local tex_name = self._view:GetChild("tex_name")
tex_name.text = self.play.name
end
-end
+end
-local tuoguanTimeList={10,30,60,120,180,240,300}
+local tuoguanTimeList = { 10, 30, 60, 120, 180, 240, 300 }
-- 显示玩法体力值配置
-function M:FillFagData()
-
+function M:FillFagData()
local mod = self.gl_view:GetModeData()
local game_id = mod.data.game_data.game_id
local panel_play_set = self._view:GetChild("panel_play_set")
local ctr_show_nonnegative = panel_play_set:GetController("show_nonnegative") --玩法不可负分开关
- local btn_nonnegative = panel_play_set:GetChild("btn_nonnegative") --不可负分开关
- local btn_no_upper = panel_play_set:GetChild("btn_no_upper") --没有上限
- local btn_tuoguan = panel_play_set:GetChild("btn_tuoguan") --托管开关
+ local btn_nonnegative = panel_play_set:GetChild("btn_nonnegative") --不可负分开关
+ local btn_no_upper = panel_play_set:GetChild("btn_no_upper") --没有上限
+ local btn_tuoguan = panel_play_set:GetChild("btn_tuoguan") --托管开关
btn_tuoguan.selected = true
-
+
local btn_BanDismiss = panel_play_set:GetChild("btn_BanDismiss")
local cb_tuoguan_time = panel_play_set:GetChild("comb_offline") --托管时间
- local cb_tuoguan_type = panel_play_set:GetChild("comb_result") --托管结算类型
- local btn_hidden = panel_play_set:GetChild("btn_hidden") --防作弊开关
- local btn_vip = panel_play_set:GetChild("btn_vip") --vip房间开关
+ local cb_tuoguan_type = panel_play_set:GetChild("comb_result") --托管结算类型
+ local btn_hidden = panel_play_set:GetChild("btn_hidden") --防作弊开关
+ local btn_vip = panel_play_set:GetChild("btn_vip") --vip房间开关
--根据hpType显示
local game_data = mod.data.game_data
panel_play_set:GetController("game_type").selectedIndex = game_data and game_data.hpType or 0
@@ -117,7 +117,7 @@ function M:FillFagData()
if group.type == 2 then
ctr_switch.selectedIndex = 1
panel_play_set:GetController("type").selectedIndex = 1
- end
+ end
local hpData
if self.play then
@@ -127,21 +127,21 @@ function M:FillFagData()
end
local config = json.decode(self.play.config)
ctr_switch.selectedIndex = self.play.hpOnOff
-
- btn_BanDismiss.selected = (config.isBanDismiss and config.isBanDismiss ~= 0) and true or false
+
+ btn_BanDismiss.selected = (config.isBanDismiss and config.isBanDismiss ~= 0) and true or false
btn_tuoguan.selected = (config.tuoguan and config.tuoguan ~= 0) and true or false
if btn_tuoguan.selected then
cb_tuoguan_time.value = config.tuoguan_active_timeIndex or 1
cb_tuoguan_type.value = config.tuoguan_result_type
end
-
- if btn_hidden then
- btn_hidden.selected = (config.isHidden and config.isHidden ~= 0) and true or false
- end
- if btn_vip then
- btn_vip.selected = (config.isvip and config.isvip ~= 0) and true or false
- end
-
+
+ if btn_hidden then
+ btn_hidden.selected = (config.isHidden and config.isHidden ~= 0) and true or false
+ end
+ if btn_vip then
+ btn_vip.selected = (config.isvip and config.isvip ~= 0) and true or false
+ end
+
btn_nonnegative.selected = config.isNonnegative and config.isNonnegative == 1
btn_no_upper.selected = config.hp_no_limit and config.hp_no_limit == 1
end
@@ -151,7 +151,7 @@ function M:FillFagData()
btn_nonnegative.selected = false
btn_no_upper.selected = false
else
- btn_nonnegative.selected = true
+ btn_nonnegative.selected = true
end
@@ -161,23 +161,23 @@ function M:FillFagData()
local tex_join_limit = panel_play_set:GetChild("tex_join_limit")
tex_join_limit.text = hpData and d2ad(hpData.limitInRoom) or 0
btn_join_limit.onClick:Set(function()
- self:__input_num(tex_join_limit,"limitInRoom")
+ self:__input_num(tex_join_limit, "limitInRoom")
end)
--机器人
local btn_robot_room = panel_fag:GetChild("robot_room")
local tex_robot_room = panel_fag:GetChild("tex_robot_room")
tex_robot_room.text = hpData and (hpData.robot_room and (hpData.robot_room) or 0) or 0
btn_robot_room.onClick:Set(function()
- self:__input_num(tex_robot_room,"robot_room")
+ self:__input_num(tex_robot_room, "robot_room")
end)
--抢庄限制
- -- local btn_bank_limit = panel_play_set:GetChild("btn_bank_limit")
+ -- local btn_bank_limit = panel_play_set:GetChild("btn_bank_limit")
--local tex_bank_limit = panel_play_set:GetChild("tex_bank_limit")
- -- tex_bank_limit.text = hpData and hpData.limitloot and d2ad(hpData.limitloot) or 0
- -- btn_bank_limit.onClick:Set(function()
- -- self:__input_num(tex_bank_limit,"limitloot")
- -- end)
+ -- tex_bank_limit.text = hpData and hpData.limitloot and d2ad(hpData.limitloot) or 0
+ -- btn_bank_limit.onClick:Set(function()
+ -- self:__input_num(tex_bank_limit,"limitloot")
+ -- end)
-- 退出限制
local btn_exit_limit = panel_play_set:GetChild("btn_exit_limit")
@@ -185,10 +185,10 @@ function M:FillFagData()
tex_exit_limit.text = hpData and hpData.limitPlay and d2ad(hpData.limitPlay) or 1
btn_exit_limit.onClick:Set(function()
-- self:__input_num(tex_exit_limit, "limitPlay")
- local gfiv = GroupNumberInputView.new(self._root_view,function(num)
+ local gfiv = GroupNumberInputView.new(self._root_view, function(num)
if num == 0 then
- ViewUtil.ErrorMsg(nil,-9,"不能输入0")
- return
+ ViewUtil.ErrorMsg(nil, -9, "不能输入0")
+ return
end
tex_exit_limit.text = num
end)
@@ -208,54 +208,52 @@ function M:FillFagData()
local btn_sub = panel_play_set:GetChild("btn_sub")
btn_sub.onClick:Set(function()
- local value = tonumber(tex_times.text)
- if value > 1 then
+ local value = tonumber(tex_times.text)
+ if value > 1 then
value = value - 1
tex_times.text = tostring(value)
- end
-
+ end
end)
local btn_add = panel_play_set:GetChild("btn_add")
btn_add.onClick:Set(function()
local value = tonumber(tex_times.text)
- value = value + 1
+ value = value + 1
tex_times.text = tostring(value)
end)
- --显示创建空房间
- local tex_times_room = panel_play_set:GetChild("tex_times_room")
+ --显示创建空房间
+ local tex_times_room = panel_play_set:GetChild("tex_times_room")
+
+ if hpData and hpData.tex_times_room then
+ tex_times_room.text = hpData.tex_times_room / 1000
+ else
+ tex_times_room.text = 1
+ end
+
- if hpData and hpData.tex_times_room then
- tex_times_room.text = hpData.tex_times_room/1000
- else
- tex_times_room.text = 1
- end
-
-
local btn_sub_room = panel_play_set:GetChild("btn_sub_room")
btn_sub_room.onClick:Set(function()
- local value = tonumber(tex_times_room.text)
- if value > 1 then
+ local value = tonumber(tex_times_room.text)
+ if value > 1 then
value = value - 1
tex_times_room.text = tostring(value)
- end
-
+ end
end)
local btn_add_room = panel_play_set:GetChild("btn_add_room")
btn_add_room.onClick:Set(function()
local value = tonumber(tex_times_room.text)
- value = value + 1
+ value = value + 1
tex_times_room.text = tostring(value)
end)
-
+
-- 显示抽水列表
- if hpData and hpData.rewards_list then
+ if hpData and hpData.rewards_list then
self.rewards_data = hpData.rewards_list
- else
+ else
local tem = {}
-- tem.limitPump = hpData and hpData.limitPump or 0
-- tem.type = hpData and hpData.type or 1
@@ -302,18 +300,18 @@ function M:FillFagData()
local ctr_rewards_value2 = panel_fag:GetController("rewards_value2")
-- 奖励类型:0百分比 1人头制 2全民推广
if self.play then
- -- ctr_rewards1.selectedIndex = self.play.xipai_rewardType - 1
+ -- ctr_rewards1.selectedIndex = self.play.xipai_rewardType - 1
ctr_rewards_value2.selectedIndex = (self.play.anchou_rewardValueType or 1) - 1
end
local base_pump = 0
- if hpData ~= nil and hpData.basePump ~= nil then
+ if hpData ~= nil and hpData.basePump ~= nil then
base_pump = d2ad(hpData.basePump)
end
local tex_base_pump = panel_fag:GetChild("tex_base_pump")
- tex_base_pump.text = ""..base_pump
+ tex_base_pump.text = "" .. base_pump
local btn_base_pump = panel_fag:GetChild("btn_base_pump")
btn_base_pump.onClick:Set(function()
@@ -332,63 +330,63 @@ function M:FillFagData()
-- 点击确定按钮 更新玩法数据
local btn_ok = self._view:GetChild("btn_ok")
- btn_ok.onClick:Set(function()
+ btn_ok.onClick:Set(function()
local _data = mod.data:SelectedConfigData()
- _data.game_id = game_id
+ _data.game_id = game_id
_data.isNonnegative = btn_nonnegative.selected and 1 or 0
_data.hp_no_limit = (btn_nonnegative.selected and btn_no_upper.selected) and 1 or 0
_data.tuoguan = btn_tuoguan.selected
-
- _data.tuoguan_active_time = _data.tuoguan and tuoguanTimeList[(tonumber(cb_tuoguan_time.value))] or 0
- _data.tuoguan_active_timeIndex=tonumber(cb_tuoguan_time.value)
- _data.tuoguan_result_type = _data.tuoguan and tonumber(cb_tuoguan_type.value) or 0
- if btn_BanDismiss.selected then
+
+ _data.tuoguan_active_time = _data.tuoguan and tuoguanTimeList[(tonumber(cb_tuoguan_time.value))] or 0
+ _data.tuoguan_active_timeIndex = tonumber(cb_tuoguan_time.value)
+ _data.tuoguan_result_type = _data.tuoguan and tonumber(cb_tuoguan_type.value) or 0
+ if btn_BanDismiss.selected then
_data.isBanDismiss = 1
end
-
- if btn_hidden then
- _data.isHidden = btn_hidden.selected and 1 or 0
- else
- _data.isHidden=0
- end
-
- if btn_vip then
- _data.isvip = btn_vip.selected and 1 or 0
- else
- _data.isvip=0
- end
-
+
+ if btn_hidden then
+ _data.isHidden = btn_hidden.selected and 1 or 0
+ else
+ _data.isHidden = 0
+ end
+
+ if btn_vip then
+ _data.isvip = btn_vip.selected and 1 or 0
+ else
+ _data.isvip = 0
+ end
+
local hpType = mod.data.game_data.hpType
self.hpData.limitInRoom = ad2d(tonumber(panel_play_set:GetChild("tex_join_limit").text))
self.hpData.limitPlay = ad2d(tonumber(panel_play_set:GetChild("tex_exit_limit").text))
- self.hpData.limitloot = 0-- ad2d(tonumber(panel_play_set:GetChild("tex_bank_limit").text))
+ self.hpData.limitloot = 0 -- ad2d(tonumber(panel_play_set:GetChild("tex_bank_limit").text))
self.hpData.robot_room = (tonumber(panel_fag:GetChild("tex_robot_room").text))
self.hpData.type = self._type
self.hpData.limitPump = self._limitPump
local hpOnOff = ctr_switch.selectedIndex
if game_id == 41 then
if self.hpData.limitloot < ad2d(_data.up_bank) then
- ViewUtil.ErrorMsg(self._root_view,-9,"抢庄限制必须大于等于" .. _data.up_bank)
+ ViewUtil.ErrorMsg(self._root_view, -9, "抢庄限制必须大于等于" .. _data.up_bank)
return
end
end
if hpType > 1 and hpOnOff == 1 then
if self.hpData.limitInRoom < self.hpData.limitPlay then
- ViewUtil.ErrorMsg(self._root_view,-9,"进入限制必须大于等于退出限制")
+ ViewUtil.ErrorMsg(self._root_view, -9, "进入限制必须大于等于退出限制")
return
end
if self.hpData.limitPlay == 0 then
- ViewUtil.ErrorMsg(self._root_view,-9,"退出房间限制不能为0")
+ ViewUtil.ErrorMsg(self._root_view, -9, "退出房间限制不能为0")
return
end
end
local times = tonumber(tex_times.text)
self.hpData.times = ad2d(tonumber(times))
-
- local tex_times_room = tonumber(tex_times_room.text)
+
+ local tex_times_room = tonumber(tex_times_room.text)
self.hpData.tex_times_room = ad2d(tonumber(tex_times_room))
-
+
local base_pump = tonumber(tex_base_pump.text)
self.hpData.basePump = ad2d(tonumber(base_pump))
@@ -403,7 +401,8 @@ function M:FillFagData()
-- tem.limitPump = tonumber(r_item:GetChild("cb_type").value)
-- 抽水次数 固定抽水要发小数
local cb_method = r_item:GetChild("cb_method")
- local proportion = string.gsub(string.gsub(r_item:GetChild("cb_proportion" .. cb_method.value).title, "抽", ""), "次", "")
+ local proportion = string.gsub(
+ string.gsub(r_item:GetChild("cb_proportion" .. cb_method.value).title, "抽", ""), "次", "")
if cb_method.value == "1" then proportion = ad2d(proportion) end
-- 抽水分数
-- self.hpData.pumpProportion = tonumber(proportion)
@@ -415,7 +414,6 @@ function M:FillFagData()
local vsend = string.gsub(r_item:GetChild("cb_min_send").title, "分", "")
tem.UpperLimitReward = ad2d(tonumber(vsend))
-
else
local v = string.gsub(r_item:GetChild("cb_max").title, "分", "")
-- self.hpData.UpperLimit = ad2d(tonumber(v))
@@ -453,7 +451,7 @@ function M:FillFagData()
else
self.hpData.anchou_rewards_val = ad2d(10000)
end
-
+
local tex_name = self._view:GetChild("tex_name")
local name = tex_name.text
@@ -464,83 +462,85 @@ function M:FillFagData()
ViewUtil.ShowModalWait(self._root_view)
if not self.play then
-- 新增玩法
- fgCtr:FG_AddPlay(self.group_id, game_id, _data, name, self.hpData, hpOnOff, group.type, self.table_color, function(res)
- if self._is_destroy then
- return
- end
- ViewUtil.CloseModalWait()
- --print("======新增玩法=============")
- --pt(res)
- if res.ReturnCode == 0 then
- local play = {}
- play.name = name
- play.deskId = self.table_color
- play.game_name = mod.data.game_data.name
- play.gameId = game_id
- play.hpOnOff = hpOnOff
- play.hpData= json.encode(self.hpData)
- play.id = res.Data.pid
- play.xipai_rewards_val = self.hpData.xipairewards_val
- play.anchou_rewards_val = self.hpData.anchou_rewards_val
- play.reward = self.hpData.rewards_val
- play.rewardType = self.hpData.rewards_type
- play.rewardValueType = self.hpData.rewardValueType
- play.xipai_rewardType = self.hpData.xipai_rewardType
- play.anchou_rewardType = 3
- play.xipai_rewardValueType = self.hpData.xipai_rewardValueType
- play.anchou_rewardValueType = 1
- _data.maxPlayers = res.Data.maxPlayers
- play.config = json.encode(_data)
- play.hp_times = self.hpData.times
- play.maxPlayers = _data.maxPlayers
- play.roomNum=self.hpData.tex_times_room/1000
- play.maxRound=res.Data.maxRound
- ViewUtil.ShowBannerOnScreenCenter("添加玩法成功")
- self.callback(play)
- self:Destroy()
- else
- ViewUtil.ErrorTip(res.ReturnCode,"添加玩法失败!")
- end
- end)
+ fgCtr:FG_AddPlay(self.group_id, game_id, _data, name, self.hpData, hpOnOff, group.type, self.table_color,
+ function(res)
+ if self._is_destroy then
+ return
+ end
+ ViewUtil.CloseModalWait()
+ --print("======新增玩法=============")
+ --pt(res)
+ if res.ReturnCode == 0 then
+ local play = {}
+ play.name = name
+ play.deskId = self.table_color
+ play.game_name = mod.data.game_data.name
+ play.gameId = game_id
+ play.hpOnOff = hpOnOff
+ play.hpData = json.encode(self.hpData)
+ play.id = res.Data.pid
+ play.xipai_rewards_val = self.hpData.xipairewards_val
+ play.anchou_rewards_val = self.hpData.anchou_rewards_val
+ play.reward = self.hpData.rewards_val
+ play.rewardType = self.hpData.rewards_type
+ play.rewardValueType = self.hpData.rewardValueType
+ play.xipai_rewardType = self.hpData.xipai_rewardType
+ play.anchou_rewardType = 3
+ play.xipai_rewardValueType = self.hpData.xipai_rewardValueType
+ play.anchou_rewardValueType = 1
+ _data.maxPlayers = res.Data.maxPlayers
+ play.config = json.encode(_data)
+ play.hp_times = self.hpData.times
+ play.maxPlayers = _data.maxPlayers
+ play.roomNum = self.hpData.tex_times_room / 1000
+ play.maxRound = res.Data.maxRound
+ ViewUtil.ShowBannerOnScreenCenter("添加玩法成功")
+ self.callback(play)
+ self:Destroy()
+ else
+ ViewUtil.ErrorTip(res.ReturnCode, "添加玩法失败!")
+ end
+ end)
else
-- 修改玩法
- fgCtr:FG_UpdatePlay(self.group_id,game_id,_data,name,self.hpData,hpOnOff,self.play.id, group.type, self.table_color, function(res)
- if self._is_destroy then
- return
- end
- ViewUtil.CloseModalWait()
- --print("======修改玩法=============")
- --pt(res)
- if res.ReturnCode == 0 then
- local play = {}
- play.name = name
- play.deskId = self.table_color
- play.game_name = mod.data.game_data.name
- play.gameId = game_id
- play.id = self.play.id
- play.hpOnOff = hpOnOff
- play.hpData= json.encode(self.hpData)
- play.xipai_rewards_val = self.hpData.xipairewards_val
- play.anchou_rewards_val = self.hpData.anchou_rewards_val
- play.reward = self.hpData.rewards_val
- play.rewardType = self.hpData.rewards_type
- play.rewardValueType = self.hpData.rewardValueType
- play.xipai_rewardType = self.hpData.xipai_rewardType
- play.anchou_rewardType = 3
- play.xipai_rewardValueType = self.hpData.xipai_rewardValueType
- play.anchou_rewardValueType = 1
- _data.maxPlayers = res.Data.maxPlayers
- play.config = json.encode(_data)
- play.hp_times = self.hpData.times
- play.maxPlayers = _data.maxPlayers
- play.roomNum=self.hpData.tex_times_room/1000
- play.maxRound=res.Data.maxRound
- self.callback(play)
- self:Destroy()
- else
- ViewUtil.ErrorTip(res.ReturnCode,"修改玩法失败!")
- end
- end)
+ fgCtr:FG_UpdatePlay(self.group_id, game_id, _data, name, self.hpData, hpOnOff, self.play.id, group.type,
+ self.table_color, function(res)
+ if self._is_destroy then
+ return
+ end
+ ViewUtil.CloseModalWait()
+ --print("======修改玩法=============")
+ --pt(res)
+ if res.ReturnCode == 0 then
+ local play = {}
+ play.name = name
+ play.deskId = self.table_color
+ play.game_name = mod.data.game_data.name
+ play.gameId = game_id
+ play.id = self.play.id
+ play.hpOnOff = hpOnOff
+ play.hpData = json.encode(self.hpData)
+ play.xipai_rewards_val = self.hpData.xipairewards_val
+ play.anchou_rewards_val = self.hpData.anchou_rewards_val
+ play.reward = self.hpData.rewards_val
+ play.rewardType = self.hpData.rewards_type
+ play.rewardValueType = self.hpData.rewardValueType
+ play.xipai_rewardType = self.hpData.xipai_rewardType
+ play.anchou_rewardType = 3
+ play.xipai_rewardValueType = self.hpData.xipai_rewardValueType
+ play.anchou_rewardValueType = 1
+ _data.maxPlayers = res.Data.maxPlayers
+ play.config = json.encode(_data)
+ play.hp_times = self.hpData.times
+ play.maxPlayers = _data.maxPlayers
+ play.roomNum = self.hpData.tex_times_room / 1000
+ play.maxRound = res.Data.maxRound
+ self.callback(play)
+ self:Destroy()
+ else
+ ViewUtil.ErrorTip(res.ReturnCode, "修改玩法失败!")
+ end
+ end)
end
end)
end
@@ -559,25 +559,25 @@ function M:OnRenderItem(index, obj)
local data = self.rewards_data[index]
-- 抽水方法,固定、浮动
local cb_method = obj:GetChild("cb_method")
- cb_method.value = tostring(self._type)
- cb_method.onChanged:Set(function()
- local tem = membe_clone(self.rewards_data[1])
- tem.pumpProportion = 0
- self._type = tonumber(cb_method.value)
- self.rewards_data = {}
- self.rewards_data[1] = tem
- self:UpdateRewards()
- end)
+ cb_method.value = 1
+ -- cb_method.onChanged:Set(function()
+ -- local tem = membe_clone(self.rewards_data[1])
+ -- tem.pumpProportion = 0
+ -- self._type = tonumber(cb_method.value)
+ -- self.rewards_data = {}
+ -- self.rewards_data[1] = tem
+ -- self:UpdateRewards()
+ -- end)
--大赢家
local tem = obj:GetController("c1").selectedIndex
for i = 1, 2 do
local cb_type = obj:GetChild("cb_type" .. i)
if self._limitPump <= 4 - tem then
- cb_type.value = tostring(self._limitPump)
+ cb_type.value = tostring(self._limitPump)
else
self._limitPump = tonumber(cb_type.value)
- end
- cb_type.onChanged:Set(function()
+ end
+ cb_type.onChanged:Set(function()
local limitPump = cb_type.value
self._limitPump = tonumber(limitPump)
self:UpdateRewards()
@@ -596,6 +596,7 @@ function M:OnRenderItem(index, obj)
end
local cb_proportion1 = obj:GetChild("cb_proportion1")
local cb_proportion2 = obj:GetChild("cb_proportion2")
+ print(cb_method.value)
obj:GetChild("cb_proportion" .. cb_method.value).title = "抽" .. val .. "次"
cb_proportion1.onChanged:Set(function()
data.pumpProportion = ad2d(string.gsub(string.gsub(cb_proportion1.title, "抽", ""), "次", ""))
@@ -620,12 +621,11 @@ function M:OnRenderItem(index, obj)
obj:GetController("give_owner").selectedIndex = 1
end
else
- cb_max.value = UpperLimit .. "分"
+ cb_max.value = UpperLimit .. "分"
self:SetIndex(cb_max, d2ad(data.UpperLimit))
end
obj:GetController("give_owner").onChanged:Add(function()
-
if obj:GetController("give_owner").selectedIndex == 0 then
data.UpperLimitReward = 0
self:UpdateRewards()
@@ -651,11 +651,11 @@ function M:OnRenderItem(index, obj)
if next_data then
tem = string.format("小于%s", d2ad(next_data.UpperLimit))
end
- local tem1 =""
+ local tem1 = ""
if UpperLimitReward ~= 0 then
- tem1 = string.format(",每个玩家赠送盟主%s分",UpperLimitReward)
+ tem1 = string.format(",每个玩家赠送盟主%s分", UpperLimitReward)
end
- str_min_tip = string.format("(低于%s分不抽水%s)", UpperLimit,tem1)
+ str_min_tip = string.format("(低于%s分不抽水%s)", UpperLimit, tem1)
-- str_max_tip = string.format("(低于%s按此设置抽水)", UpperLimit)
elseif index == #self.rewards_data then
str_min_tip = string.format("(大于等于%s按此设置抽水)", UpperLimit)
@@ -672,9 +672,9 @@ function M:OnRenderItem(index, obj)
local input_limit = 1000
local btn_input = obj:GetChild("btn_input")
btn_input.onClick:Set(function()
- local gfiv = GroupNumberInputView.new(self._root_view,function(num)
+ local gfiv = GroupNumberInputView.new(self._root_view, function(num)
if num > input_limit then
- ViewUtil.ErrorMsg(self._root_view,-9,"输入最大不能超过" .. input_limit)
+ ViewUtil.ErrorMsg(self._root_view, -9, "输入最大不能超过" .. input_limit)
return
end
cb_proportion1.title = "抽" .. num .. "次"
@@ -695,16 +695,16 @@ function M:OnRenderItem(index, obj)
end
local btn_input2 = obj:GetChild("btn_input2")
btn_input2.onClick:Set(function()
- local gfiv = GroupNumberInputView.new(self._root_view,function(num)
+ local gfiv = GroupNumberInputView.new(self._root_view, function(num)
if num > input_limit2 then
- ViewUtil.ErrorMsg(nil,-9,"输入值不能超过" .. input_limit2)
- return
+ ViewUtil.ErrorMsg(nil, -9, "输入值不能超过" .. input_limit2)
+ return
elseif num >= max_v then
- ViewUtil.ErrorMsg(nil,-9,"输入值必须小于" .. max_v)
- return
+ ViewUtil.ErrorMsg(nil, -9, "输入值必须小于" .. max_v)
+ return
elseif num <= min_v then
- ViewUtil.ErrorMsg(nil,-9,"输入值必须大于" .. min_v)
- return
+ ViewUtil.ErrorMsg(nil, -9, "输入值必须大于" .. min_v)
+ return
end
-- cb_min.title = num .. "分"
data.UpperLimit = ad2d(num)
@@ -715,8 +715,7 @@ function M:OnRenderItem(index, obj)
local btn_input2_send = obj:GetChild("btn_input2_send")
btn_input2_send.onClick:Set(function()
- local gfiv = GroupNumberInputView.new(self._root_view,function(num)
-
+ local gfiv = GroupNumberInputView.new(self._root_view, function(num)
data.UpperLimitReward = ad2d(num)
self:UpdateRewards()
end, 3)
@@ -726,15 +725,15 @@ function M:OnRenderItem(index, obj)
local tem = string.gsub(cb_min.title, "分", "")
local tem = tonumber(tem)
if tem > input_limit2 then
- ViewUtil.ErrorMsg(nil,-9,"输入值不能超过" .. input_limit2)
- return
+ ViewUtil.ErrorMsg(nil, -9, "输入值不能超过" .. input_limit2)
+ return
elseif tem >= max_v then
cb_min.title = d2ad(data.UpperLimit) .. "分"
- ViewUtil.ErrorMsg(nil,-9,"输入值必须小于" .. max_v)
+ ViewUtil.ErrorMsg(nil, -9, "输入值必须小于" .. max_v)
return
elseif tem <= min_v then
cb_min.title = d2ad(data.UpperLimit) .. "分"
- ViewUtil.ErrorMsg(nil,-9,"输入值必须大于" .. min_v)
+ ViewUtil.ErrorMsg(nil, -9, "输入值必须大于" .. min_v)
return
end
data.UpperLimit = ad2d(string.gsub(cb_min.title, "分", ""))
@@ -744,7 +743,7 @@ function M:OnRenderItem(index, obj)
cb_min_send.onChanged:Set(function()
local tem = string.gsub(cb_min_send.title, "分", "")
local tem = tonumber(tem)
-
+
data.UpperLimitReward = ad2d(string.gsub(cb_min_send.title, "分", ""))
self:UpdateRewards()
end)
@@ -752,14 +751,14 @@ function M:OnRenderItem(index, obj)
cb_max.onChanged:Set(function()
local tem = string.gsub(cb_max.title, "分", "")
local tem = tonumber(tem)
- if tem > max_v then
+ if tem > max_v then
self:SetIndex(cb_max, d2ad(data.UpperLimit))
- ViewUtil.ErrorMsg(nil,-9,"输入值必须小于" .. max_v)
+ ViewUtil.ErrorMsg(nil, -9, "输入值必须小于" .. max_v)
return
- -- elseif tem <= min_v then
- -- self:SetIndex(cb_max, d2ad(data.UpperLimit))
- -- ViewUtil.ErrorMsg(nil,-9,"输入值必须大于" .. min_v)
- -- return
+ -- elseif tem <= min_v then
+ -- self:SetIndex(cb_max, d2ad(data.UpperLimit))
+ -- ViewUtil.ErrorMsg(nil,-9,"输入值必须大于" .. min_v)
+ -- return
end
data.UpperLimit = ad2d(tem)
self:UpdateRewards()
@@ -772,10 +771,10 @@ function M:OnRenderItem(index, obj)
-- 如果UpperLimit达到最大值,无法再增加
if (cb_method.value == "1" and data.UpperLimit >= ad2d(input_limit2)) or (cb_method.value == "2" and cb_max.selectedIndex == cb_max.values.Length - 1) then
ViewUtil.ErrorTip(nil, "已达到上限,无法再增加")
- return
+ return
end
local ul = cb_method.value == "1" and data.UpperLimit + 10 or ad2d(cb_max.values[cb_max.selectedIndex + 1])
- local tem = {type = data.type, pumpProportion = data.pumpProportion, UpperLimit = ul}
+ local tem = { type = data.type, pumpProportion = data.pumpProportion, UpperLimit = ul }
table.insert(self.rewards_data, tem)
self:UpdateRewards()
end)
@@ -784,7 +783,7 @@ function M:OnRenderItem(index, obj)
local msg_tip = MsgWindow.new(self._root_view, "确定删除该项吗?", MsgWindow.MsgMode.OkAndCancel)
msg_tip.onOk:Add(function()
table.remove(self.rewards_data, index)
- self:UpdateRewards()
+ self:UpdateRewards()
end)
msg_tip:Show()
end)
@@ -803,7 +802,7 @@ end
function M:__input_num(tex, filed, itype)
itype = itype or 0
- local gfiv = GroupNumberInputView.new(self._root_view,function(num)
+ local gfiv = GroupNumberInputView.new(self._root_view, function(num)
tex.text = num
if filed == "robot_room" then
--printlog("cccccccccccccccc ",num)
@@ -811,7 +810,6 @@ function M:__input_num(tex, filed, itype)
else
self.hpData[filed] = ad2d(num)
end
-
end, itype)
gfiv:Show()
end
@@ -821,4 +819,4 @@ function M:Destroy()
self.gl_view:Destroy()
end
-return M
\ No newline at end of file
+return M
diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngGameListView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngGameListView.lua
index 05e7f7ac..ea896c9f 100644
--- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngGameListView.lua
+++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngGameListView.lua
@@ -5,52 +5,52 @@ local GroupMngGameListView = {}
local M = GroupMngGameListView
function GroupMngGameListView.new(gid, blur_view)
- setmetatable(M, {__index = BaseWindow})
- local self = setmetatable({}, {__index = M})
- self.class = "GroupMngGameListView"
- self.group_id = gid
- self.blur_view = blur_view
- self._close_destroy = true
- self._put_map = false
+ setmetatable(M, { __index = BaseWindow })
+ local self = setmetatable({}, { __index = M })
+ self.class = "GroupMngGameListView"
+ self.group_id = gid
+ self.blur_view = blur_view
+ self._close_destroy = true
+ self._put_map = false
self._new_hide = false
self._queue = false
self._full = true
- self:init("ui://NewGroup/View_GroupGameList")
- self:InitView()
- return self
+ self:init("ui://NewGroup/View_GroupGameList")
+ self:InitView()
+ return self
end
function M:InitView()
self._view:GetChild("btn_add").onClick:Set(function()
- self:EditPlay()
+ self:EditPlay()
end)
self:FillView()
end
-function M:FillView()
+function M:FillView()
-- 填充玩法对象
self.lst_play = self._view:GetChild("lst_play")
- self.lst_play:SetVirtual()
- self.lst_play.itemRenderer = function(index, obj)
- self:OnRenderItem(index, obj)
- end
- self:initData()
+ self.lst_play:SetVirtual()
+ self.lst_play.itemRenderer = function(index, obj)
+ self:OnRenderItem(index, obj)
+ end
+ self:initData()
local group = DataManager.groups:get(self.group_id)
- if group.lev == 1 then
- self._view:GetController("owner").selectedIndex = 1
- end
+ if group.lev == 1 then
+ self._view:GetController("owner").selectedIndex = 1
+ end
end
function M:initData()
local group = DataManager.groups:get(self.group_id)
- self.lst_play.numItems = #group.playList
+ self.lst_play.numItems = #group.playList
end
function M:OnRenderItem(index, obj)
local group = DataManager.groups:get(self.group_id)
local play = group.playList[index + 1]
-
+
if not play then
self:initData()
end
@@ -58,7 +58,7 @@ function M:OnRenderItem(index, obj)
obj:GetChild("tex_name").text = play.name
obj:GetChild("tex_play").text = play.game_name
local game = DataManager.SelfUser:getGameData(play.gameId)
- local data
+ local data
local hpStr
local hpData = json.decode(play.hpData)
@@ -67,21 +67,23 @@ function M:OnRenderItem(index, obj)
local str_reward_type = play.rewardType == 1 and "赢家返点" or (play.rewardType == 2 and "人头返点")
local str_reward_val = play.rewardValueType == 1 and "百分比返点" or "固定值返点"
local str_hp_type = hpData.type == 1 and "固定抽水" or "浮动抽水"
- local str_base_pump = (hpData.basePump ~= nil and hpData.basePump > 0) and "抽水保障".. d2ad(hpData.basePump) or ""
+ local str_base_pump = (hpData.basePump ~= nil and hpData.basePump > 0) and "抽水保障" .. d2ad(hpData.basePump) or ""
local str_pump = ""
- local str_hp_winner = hpData.limitPump == 0 and "大赢家" or hpData.limitPump == 1 and "所有赢家" or hpData.limitPump == 2 and "两个赢家" or hpData.limitPump == 2 and "三个赢家" or "所有玩家平分"
+ local str_hp_winner = hpData.limitPump == 0 and "大赢家" or hpData.limitPump == 1 and "所有赢家" or
+ hpData.limitPump == 2 and "两个赢家" or hpData.limitPump == 2 and "三个赢家" or "所有玩家平分"
if hpData.rewards_list then
-- for i = 1, #hpData.rewards_list do
- local rd = hpData.rewards_list[#hpData.rewards_list]
- local pump = hpData.type == 2 and rd.pumpProportion or d2ad(rd.pumpProportion)
- str_pump = str_pump .. string.format(" 抽%s次 %s分", pump, d2ad(rd.UpperLimit))
+ local rd = hpData.rewards_list[#hpData.rewards_list]
+ local pump = hpData.type == 2 and rd.pumpProportion or d2ad(rd.pumpProportion)
+ str_pump = str_pump .. string.format(" 抽%s次 %s分", pump, d2ad(rd.UpperLimit))
-- end
else
local pump = hpData.type == 2 and hpData.pumpProportion or d2ad(hpData.pumpProportion)
str_pump = string.format(" 抽%s次 %s分", pump, d2ad(hpData.UpperLimit))
end
local str_fag = string.format("%s %s%s", str_hp_type, str_hp_winner, str_pump)
- local str = string.format("%s %s 进入门槛%s 倍数%s %s %s", str_reward_type, str_reward_val, d2ad(hpData.limitInRoom), d2ad(hpData.times), str_base_pump, str_fag)
+ local str = string.format("%s %s 进入门槛%s 倍数%s %s %s", str_reward_type, str_reward_val, d2ad(hpData.limitInRoom),
+ d2ad(hpData.times), str_base_pump, str_fag)
-- local str = string.format("进入门槛%s 倍数%s %s %s", d2ad(hpData.limitInRoom), d2ad(hpData.times), str_reward_type, str_reward_val)
if game and game.hpType > 1 then
str = string.format("%s 抢庄限制%s 退出限制%s", str, d2ad(hpData.limitloot), d2ad(hpData.limitPlay))
@@ -93,18 +95,15 @@ function M:OnRenderItem(index, obj)
-- end
-- end
- hpStr = "[color=#08a805]积分设置:[/color]".."[color=#2365bb]"..str.."[/color]"
+ hpStr = "[color=#08a805]积分设置:[/color]" .. "[color=#2365bb]" .. str .. "[/color]"
else
-
- hpStr = "[color=#08a805]积分设置:[/color]".."积分关闭"
-
+ hpStr = "[color=#08a805]积分设置:[/color]" .. "积分关闭"
end
--obj:GetChild("tex_fag_info").text = "积分关闭"
local gameStr
if not game then
gameStr = "没有添加该玩法"
-
- else
+ else
-- 副圈主初始化扩展
if group.lev == 2 then
ExtendManager.Init(DataManager.SelfUser.games)
@@ -116,36 +115,36 @@ function M:OnRenderItem(index, obj)
exconfig:FillRoomConfig(r, data)
gameStr = string.gsub(r.room_config:GetDes(), "\r", "")
- gameStr = "[color=#08a805]玩法说明:[/color]".."[color=#2365bb]"..gameStr.."[/color]"
+ gameStr = "[color=#08a805]玩法说明:[/color]" .. "[color=#2365bb]" .. gameStr .. "[/color]"
end
- obj:GetChild("com_gameinfo"):GetChild("tex_room_info").text = hpStr.."\n"..gameStr
+ obj:GetChild("com_gameinfo"):GetChild("tex_room_info").text = hpStr .. "\n" .. gameStr
+
-
obj:GetChild("btn_del").onClick:Set(function()
local msg_del = MsgWindow.new(nil, "删除该玩法,该玩法的相关数据也会被清除。\r确定要删除吗?", MsgWindow.MsgMode.OkAndCancel)
- msg_del.onOk:Add(function( ... )
- local fgCtr = ControllerManager.GetController(NewGroupController)
- ViewUtil.ShowModalWait()
- fgCtr:FG_DelPlay(self.group_id, play.id, function(res)
- if self._is_destroy then
- return
- end
- ViewUtil.CloseModalWait()
- if res.ReturnCode == 0 then
+ msg_del.onOk:Add(function(...)
+ local fgCtr = ControllerManager.GetController(NewGroupController)
+ ViewUtil.ShowModalWait()
+ fgCtr:FG_DelPlay(self.group_id, play.id, function(res)
+ if self._is_destroy then
+ return
+ end
+ ViewUtil.CloseModalWait()
+ if res.ReturnCode == 0 then
group:delPlay(play.id)
self.lst_play.numItems = #group.playList
local group = DataManager.groups:get(self.group_id)
group.update_play = true
- else
- ViewUtil.ErrorTip(res.ReturnCode,"删除玩法失败")
- end
- end)
- end)
- msg_del:Show()
+ else
+ ViewUtil.ErrorTip(res.ReturnCode, "删除玩法失败")
+ end
+ end)
+ end)
+ msg_del:Show()
end)
obj:GetChild("btn_edit").onClick:Set(function()
- self:EditPlay(play.id, play.config)
+ self:EditPlay(play.id, play.config, play.hpData)
end)
obj:GetChild("btn_ban").onClick:Set(function()
self:BanPlay(play.id, 1)
@@ -155,7 +154,7 @@ function M:OnRenderItem(index, obj)
end)
obj:GetController("ban").selectedIndex = play.ban or 0
-
+
-- local MarkSelect=obj:GetChild("btn_select")
-- if play.mark then
-- MarkSelect.selected=true
@@ -165,61 +164,56 @@ function M:OnRenderItem(index, obj)
-- obj:GetChild("btn_select").onClick:Set(function()
-- self:MarkPlay(MarkSelect,play.id,MarkSelect.selected)
-- end)
-
end
-
-function M:MarkPlay(markS,pid,isMark)
+function M:MarkPlay(markS, pid, isMark)
local fgCtr = ControllerManager.GetController(NewGroupController)
- ViewUtil.ShowModalWait()
- fgCtr:FG_MarkPlay(self.group_id, pid, isMark, function(res)
- if self._is_destroy then
- return
- end
- ViewUtil.CloseModalWait()
- if res.ReturnCode == 0 then
- local group = DataManager.groups:get(self.group_id)
+ ViewUtil.ShowModalWait()
+ fgCtr:FG_MarkPlay(self.group_id, pid, isMark, function(res)
+ if self._is_destroy then
+ return
+ end
+ ViewUtil.CloseModalWait()
+ if res.ReturnCode == 0 then
+ local group = DataManager.groups:get(self.group_id)
group:markPlay(pid, isMark)
self:SetSortOrder(group.playList)
self.lst_play.numItems = #group.playList
- else
- markS.selected=not isMark
- ViewUtil.ErrorTip(res.ReturnCode,"设置失败,或已达设置上限")
- end
- end)
+ else
+ markS.selected = not isMark
+ ViewUtil.ErrorTip(res.ReturnCode, "设置失败,或已达设置上限")
+ end
+ end)
end
-
function M:SetSortOrder(playList)
- if playList and #playList>0 then
- local oldList={}
- local newList={}
- for i=1,#playList do
+ if playList and #playList > 0 then
+ local oldList = {}
+ local newList = {}
+ for i = 1, #playList do
if playList[i].mark then
- table.insert(newList,playList[i])
+ table.insert(newList, playList[i])
else
- table.insert(oldList,playList[i])
+ table.insert(oldList, playList[i])
end
end
-
- if #newList>0 then
- for i=1,#newList do
- table.insert(oldList,newList[i])
+
+ if #newList > 0 then
+ for i = 1, #newList do
+ table.insert(oldList, newList[i])
end
end
- DataManager.groups:get(self.group_id).playList=oldList
+ DataManager.groups:get(self.group_id).playList = oldList
end
end
-
-- 设置玩法
-function M:EditPlay(pid, config)
-
+function M:EditPlay(pid, config, hpdata)
if #DataManager.SelfUser.games == 0 then
ViewUtil.ErrorTip(nil, "请先至游戏大厅创建房间添加玩法")
return
end
- local tem = GroupGameSettingView.new(self.blur_view, self.group_id, pid, config, function(play)
+ local tem = GroupGameSettingView.new(self.blur_view, self.group_id, pid, config, hpdata, function(play)
local group = DataManager.groups:get(self.group_id)
group:addPlay(play)
self:FillView()
@@ -231,21 +225,21 @@ end
-- 禁止、恢复玩法
function M:BanPlay(pid, ban)
- local fgCtr = ControllerManager.GetController(NewGroupController)
- ViewUtil.ShowModalWait()
- fgCtr:FG_BanPlay(self.group_id, pid, ban, function(res)
- if self._is_destroy then
- return
- end
- ViewUtil.CloseModalWait()
- if res.ReturnCode == 0 then
- local group = DataManager.groups:get(self.group_id)
+ local fgCtr = ControllerManager.GetController(NewGroupController)
+ ViewUtil.ShowModalWait()
+ fgCtr:FG_BanPlay(self.group_id, pid, ban, function(res)
+ if self._is_destroy then
+ return
+ end
+ ViewUtil.CloseModalWait()
+ if res.ReturnCode == 0 then
+ local group = DataManager.groups:get(self.group_id)
group:banPlay(pid, ban)
self.lst_play.numItems = #group.playList
- else
- ViewUtil.ErrorTip(res.ReturnCode,"设置失败")
- end
- end)
+ else
+ ViewUtil.ErrorTip(res.ReturnCode, "设置失败")
+ end
+ end)
end
-return M
\ No newline at end of file
+return M
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 0ff14db3..922b6d6d 100644
--- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberHpListView.lua
+++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberHpListView.lua
@@ -15,7 +15,7 @@ local MngPermission = import('.MngPermission')
local GroupMngMemberHpListView = {
numberMap = { {}, {} },
backTable = {},
- pageNum = 10,
+ pageNum = 20,
start = 1,
page = 1
}
@@ -95,12 +95,12 @@ function M:FillView()
self.lst_member.itemRenderer = function(index, obj)
self:OnRenderItem(index, obj)
end
- self.lst_member.scrollPane.onPullUpRelease:Set(
- function()
- --printlog("aaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbb ",self.lst_member.numItems)
- self:GetMemberData(self.lst_member.numItems)
- end
- )
+ -- self.lst_member.scrollPane.onPullUpRelease:Set(
+ -- function()
+ -- --printlog("aaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbb ",self.lst_member.numItems)
+ -- self:GetMemberData(self.lst_member.numItems)
+ -- end
+ -- )
-- 初始化搜索成员列表
self.lst_member_find = self._view:GetChild('lst_member_find')
@@ -220,35 +220,48 @@ function M:GetMemberData(index)
if index == 0 then
group:clearMember()
end
-
+
ViewUtil.ShowModalWait(nil, "亲友圈成员较多,请稍后")
local fgCtr = ControllerManager.GetController(NewGroupController)
+ self.member_data = {}
+ self.all_member_data = {}
+ self:RecursionGetMenberData(fgCtr, 0)
+end
+
+function M:RecursionGetMenberData(fgCtr, index)
fgCtr:FG_GroupMembers12(
self.group_id,
- index,
- self.curGroup.total_member_num,
+ index * 67,
+ 67,
self.stype,
self.online,
function(res)
- ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
+ ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(res.ReturnCode, '获取成员列表失败')
+ self:Destroy()
+ return
else
- self.all_member_data = group.members
- -- self.member_data = self.all_member_data
- self.member_data = {}
- for i = 1, #self.all_member_data do
- local number = self.all_member_data[i]
- if number.uid == DataManager.SelfUser.account_id or number.parentId == DataManager.SelfUser.account_id then
- table.insert(self.member_data, number)
+ if res.Data.members and #res.Data.members > 0 then
+ local mumbers = res.Data.members
+ -- self.member_data = self.all_member_data
+ for i = 1, #mumbers do
+ local number = mumbers[i]
+ if number.uid == DataManager.SelfUser.account_id or number.parentId == DataManager.SelfUser.account_id then
+ table.insert(self.member_data, number)
+ end
+ table.insert(self.all_member_data, number)
+ end
+ self:RecursionGetMenberData(fgCtr, index + 1)
+ else
+ ViewUtil.CloseModalWait()
+ self.page = math.ceil(#self.member_data / self.pageNum)
+ self.lst_member.numItems = self:GetChildNumForPage()
+ self._view:GetChild('text_ye').text = string.format("%d/%d", self.start, self.page)
+ if index == 0 then
+ -- self._view:GetChild('tex_memb_num').text = res.Data.member_num
+ -- self._view:GetChild('tex_total_hp').text = d2ad(res.Data.hp_num1+res.Data.otherHp)
end
- end
- self.page = math.ceil(#self.member_data / self.pageNum)
- self.lst_member.numItems = self:GetChildNumForPage()
- self._view:GetChild('text_ye').text = string.format("%d/%d", self.start, self.page)
- if index == 0 then
- -- self._view:GetChild('tex_memb_num').text = res.Data.member_num
- -- self._view:GetChild('tex_total_hp').text = d2ad(res.Data.hp_num1+res.Data.otherHp)
end
end
end
diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPiLaoZhi.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPiLaoZhi.lua
index d8e62828..de6c1af9 100644
--- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPiLaoZhi.lua
+++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPiLaoZhi.lua
@@ -229,6 +229,10 @@ function M:FillView()
ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人奖励失败")
else
self.rewards = res.Data.rewards
+ if not self.rewards then
+ ViewUtil.ErrorTip(nil, "玩法为空")
+ return
+ end
self.lst_rewards.numItems = #self.rewards
end
end)
@@ -257,31 +261,41 @@ function M:GetMemberData(index)
end
ViewUtil.ShowModalWait(nil, "亲友圈成员较多,请稍后")
local fgCtr = ControllerManager.GetController(NewGroupController)
+ self.member_data = {}
+ self:RecursionGetMenberData(fgCtr, 0)
+end
+
+function M:RecursionGetMenberData(fgCtr, index)
fgCtr:FG_GroupMembers12(
self.group_id,
- index,
- self.curGroup.total_member_num,
+ index * 67,
+ 67,
self.stype,
self.online,
function(res)
- ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
+ ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(res.ReturnCode, '获取成员列表失败')
+ self:Destroy()
+ return
else
- local members = group.members
- -- local tempNumberList = {}
- -- for i = 1, #members do
- -- if members[i].lev < 3 or members[i].partnerLev ~= 0 then
- -- table.insert(tempNumberList, members[i])
- -- end
- -- end
- self.member_data = members
- self.page = math.ceil(#group.members / self.pageNum)
- self.lst_member.numItems = self:GetChildNumForPage()
- self._view:GetChild('text_ye').text = string.format("%d/%d", self.start, self.page)
- if index == 0 then
- -- self._view:GetChild('tex_memb_num').text = res.Data.member_num
- -- self._view:GetChild('tex_total_hp').text = d2ad(res.Data.hp_num1+res.Data.otherHp)
+ if res.Data.members and #res.Data.members > 0 then
+ local mumbers = res.Data.members
+ -- self.member_data = self.all_member_data
+ for i = 1, #mumbers do
+ local number = mumbers[i]
+ table.insert(self.member_data, number)
+ end
+ self:RecursionGetMenberData(fgCtr, index + 1)
+ else
+ ViewUtil.CloseModalWait()
+ self.page = math.ceil(#self.member_data / self.pageNum)
+ self.lst_member.numItems = self:GetChildNumForPage()
+ self._view:GetChild('text_ye').text = string.format("%d/%d", self.start, self.page)
+ if index == 0 then
+ -- self._view:GetChild('tex_memb_num').text = res.Data.member_num
+ -- self._view:GetChild('tex_total_hp').text = d2ad(res.Data.hp_num1+res.Data.otherHp)
+ end
end
end
end
diff --git a/wb_new_ui/.objs/metas/m7iejg46/kwi0hkl.info b/wb_new_ui/.objs/metas/m7iejg46/kwi0hkl.info
index 3569889d..ffd8b885 100644
--- a/wb_new_ui/.objs/metas/m7iejg46/kwi0hkl.info
+++ b/wb_new_ui/.objs/metas/m7iejg46/kwi0hkl.info
@@ -1,20 +1,26 @@
{
"objectStatus": {
- "n147_10tp2": {
- "hidden": true
- },
- "n175_upe1": {
- "hidden": true
- },
- "n165_umid": {
- "collapsed": true
- },
"n145_10tp2": {
"hidden": true
},
+ "n147_10tp2": {
+ "hidden": true
+ },
"n156_10tp2": {
"hidden": true,
"collapsed": true
+ },
+ "n165_umid": {
+ "collapsed": true
+ },
+ "n122_cioe": {
+ "hidden": true
+ },
+ "n175_upe1": {
+ "hidden": true
+ },
+ "n141_u26u": {
+ "hidden": true
}
}
}
\ No newline at end of file
diff --git a/wb_new_ui/.objs/metas/m7iejg46/mpllhv5.info b/wb_new_ui/.objs/metas/m7iejg46/mpllhv5.info
index 9e26dfee..fa6c0012 100644
--- a/wb_new_ui/.objs/metas/m7iejg46/mpllhv5.info
+++ b/wb_new_ui/.objs/metas/m7iejg46/mpllhv5.info
@@ -1 +1,7 @@
-{}
\ No newline at end of file
+{
+ "objectStatus": {
+ "n109_g21o": {
+ "hidden": true
+ }
+ }
+}
\ No newline at end of file
diff --git a/wb_new_ui/.objs/workspace.json b/wb_new_ui/.objs/workspace.json
index 0858f5ea..790ad89b 100644
--- a/wb_new_ui/.objs/workspace.json
+++ b/wb_new_ui/.objs/workspace.json
@@ -1,5 +1,5 @@
{
- "libview.firstColumnWidth": 297,
+ "libview.firstColumnWidth": 522,
"expanded_nodes": [
"27vd145b",
"/",
@@ -37,6 +37,11 @@
"ui://ppu1wv76j4mf9k",
"ui://v6yvqp7wf55qwa",
"ui://v6yvqp7wf55qw7",
+ "ui://m7iejg46kwi0hkb",
+ "ui://m7iejg46mpllhv2",
+ "ui://m7iejg46kwi0hkl",
+ "ui://m7iejg46mpllhv5",
+ "ui://m7iejg46mkdvhdu",
"ui://v6yvqp7wf55qw5",
"ui://v6yvqp7waen81bs",
"ui://v6yvqp7waen81b0",
@@ -70,7 +75,7 @@
"test.device": "720p Phone",
"canvasColor": 10066329,
"auxline2": true,
- "doc.activeDoc": "ui://v6yvqp7wf55qw7",
+ "doc.activeDoc": "ui://m7iejg46mpllhv5",
"libview.twoColumn": false,
"libview.expandedNodes": [
"s63l0suw",
@@ -88,7 +93,9 @@
"v6yvqp7w",
"/component/",
"v6yvqp7w",
- "/component/Main/"
+ "/component/Main/",
+ "v6yvqp7w",
+ "/component/Main/component/"
],
"auxline1": true,
"snapToGrid": true,
diff --git a/wb_new_ui/assets/NewGroup/mgr/component/game/panel_fag.xml b/wb_new_ui/assets/NewGroup/mgr/component/game/panel_fag.xml
index 9afbcfcd..929444fb 100644
--- a/wb_new_ui/assets/NewGroup/mgr/component/game/panel_fag.xml
+++ b/wb_new_ui/assets/NewGroup/mgr/component/game/panel_fag.xml
@@ -8,7 +8,7 @@
-
+
@@ -33,7 +33,7 @@
-
+
@@ -54,27 +54,27 @@
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
diff --git a/wb_new_ui/assets/NewGroup/mgr/component/play_set/item_rewards.xml b/wb_new_ui/assets/NewGroup/mgr/component/play_set/item_rewards.xml
index 3f52bb29..106e1f35 100644
--- a/wb_new_ui/assets/NewGroup/mgr/component/play_set/item_rewards.xml
+++ b/wb_new_ui/assets/NewGroup/mgr/component/play_set/item_rewards.xml
@@ -1,15 +1,15 @@
-
+
-
+
-
-
+
+
@@ -59,7 +59,7 @@
-
+
@@ -69,7 +69,7 @@
-
+
@@ -198,6 +198,6 @@
-
+
\ No newline at end of file