41 lines
891 B
Lua
41 lines
891 B
Lua
|
|
|
||
|
|
-- 开桌统计
|
||
|
|
local GroupMngMemberInfoView = {}
|
||
|
|
|
||
|
|
local M = GroupMngMemberInfoView
|
||
|
|
|
||
|
|
function GroupMngMemberInfoView.new(gid)
|
||
|
|
local self = M
|
||
|
|
self.class = "GroupMngMemberInfoView"
|
||
|
|
self.group_id = gid
|
||
|
|
self:InitView()
|
||
|
|
return self
|
||
|
|
end
|
||
|
|
|
||
|
|
function M:initData()
|
||
|
|
self:ShowPeopleNum()
|
||
|
|
end
|
||
|
|
|
||
|
|
function M:ShowPeopleNum()
|
||
|
|
ViewUtil.ShowModalWait(nil)
|
||
|
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||
|
|
fgCtr:FG_GetMembersCount(self.group_id,function(res)
|
||
|
|
|
||
|
|
ViewUtil.CloseModalWait()
|
||
|
|
|
||
|
|
if res.ReturnCode == 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
|
||
|
|
|
||
|
|
function M:InitView()
|
||
|
|
self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupMemberInfo")
|
||
|
|
|
||
|
|
end
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
return M
|