跑的快提示重弄备份
parent
ec2bcbc987
commit
f5e673e897
|
|
@ -49,7 +49,8 @@ function M:FillList(numbers)
|
||||||
obj.onClick:Set(function()
|
obj.onClick:Set(function()
|
||||||
print("lingmengtextBtn_detail")
|
print("lingmengtextBtn_detail")
|
||||||
fgCtr:FG_FindMember(self._group.id,numbers[i].uid,function(res)
|
fgCtr:FG_FindMember(self._group.id,numbers[i].uid,function(res)
|
||||||
local familyNumberDetail = FamilyNumberDetail.new(res)
|
local familyNumberDetail = FamilyNumberDetail.new(self._group.id,res)
|
||||||
|
familyNumberDetail:SetTickCallback(self.TickNumberCallback)
|
||||||
familyNumberDetail:Show()
|
familyNumberDetail:Show()
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
@ -57,8 +58,12 @@ function M:FillList(numbers)
|
||||||
self._viewList_allNumbers.numItems = #numbers
|
self._viewList_allNumbers.numItems = #numbers
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:FillNumberDetail()
|
function M:TickNumberCallback(res)
|
||||||
|
if res.ReturnCode == 0 then
|
||||||
|
self:FillList(self._group.members)
|
||||||
|
else
|
||||||
|
ViewUtil.ErrorTip(res.ReturnCode, "删除成员失败")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,20 @@ local FamilyNumberDetail = {}
|
||||||
local M = FamilyNumberDetail
|
local M = FamilyNumberDetail
|
||||||
setmetatable(M, { __index = BaseWindow })
|
setmetatable(M, { __index = BaseWindow })
|
||||||
|
|
||||||
function FamilyNumberDetail.new(res)
|
function FamilyNumberDetail.new(groupId,res)
|
||||||
local self = setmetatable({}, { __index = M })
|
local self = setmetatable({}, { __index = M })
|
||||||
self.class = 'FamilyNumberDetail'
|
self.class = 'FamilyNumberDetail'
|
||||||
self._close_destroy = true
|
self._close_destroy = true
|
||||||
|
self.groupId = groupId
|
||||||
|
|
||||||
self:init('ui://Family/NumberDetail',res)
|
self:init('ui://Family/NumberDetail',res)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:init(url,res)
|
function M:init(url,res)
|
||||||
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
|
|
||||||
BaseWindow.init(self, url)
|
BaseWindow.init(self, url)
|
||||||
pt(res)
|
|
||||||
local info = res.Data.members[1]
|
local info = res.Data.members[1]
|
||||||
self._view:GetChild('name').text = string.format("%s(%s)",info.nick,info.uid)
|
self._view:GetChild('name').text = string.format("%s(%s)",info.nick,info.uid)
|
||||||
self._view:GetChild('text_allRounds').text = info.total_round
|
self._view:GetChild('text_allRounds').text = info.total_round
|
||||||
|
|
@ -38,12 +39,23 @@ function M:init(url,res)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
self._view:GetChild('btn_tick').onClick:Set(function()
|
self._view:GetChild('btn_tick').onClick:Set(function()
|
||||||
|
ViewUtil.ShowTwoChooose(string.format("是否将用户(%s)踢出",info.nick),function()
|
||||||
|
fgCtr:FG_GroupRemoveMember(self.groupId,info.uid,self._callback_tick)
|
||||||
|
self:Destroy()
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
self._view:GetChild('btn_band').onClick:Set(function()
|
self._view:GetChild('btn_band').onClick:Set(function()
|
||||||
ViewUtil.ShowOneChooose("该功能还未开放")
|
ViewUtil.ShowTwoChooose(string.format("是否禁止用户(%s)进入房间",info.nick),function()
|
||||||
|
fgCtr:FG_GroupRemoveMember(self.groupId,info.uid,function()
|
||||||
|
ViewUtil.ShowOneChooose("用户(%s)已禁止进入房间",info.nick)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M:SetTickCallback(callback)
|
||||||
|
self._callback_tick = callback
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,10 @@ function M:initCards(cardList, flag, flag_allCards)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:CheckCards()
|
function M:CheckCards()
|
||||||
|
if self.cardNum ~= 4 and self.cardNum ~= self.self.lastCardNum then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
print("lingmengCheckAloneOrLong")
|
print("lingmengCheckAloneOrLong")
|
||||||
if self:CheckAloneOrLong() then
|
if self:CheckAloneOrLong() then
|
||||||
return true
|
return true
|
||||||
|
|
@ -213,8 +217,14 @@ end
|
||||||
|
|
||||||
function M:CheckSanDai()
|
function M:CheckSanDai()
|
||||||
--三张
|
--三张
|
||||||
if self.cardNum == 5 and self.cardSize < 4 and M:CheckType(cardType.threeAndTwo) then
|
if self.cardNum == 5 and M:CheckType(cardType.threeAndTwo) then
|
||||||
return cardType.threeAndTwo
|
for i = 1, self.cardSize do
|
||||||
|
local k = self.cardListSord[i]
|
||||||
|
local v = self.cardList[k]
|
||||||
|
if v >= 3 then
|
||||||
|
return cardType.threeAndTwo
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.threelack and self.cardNum == 4 and self.cardSize == 2 and self._flag_allCards and M:CheckType(cardType.threeAndTwo) then
|
if self.threelack and self.cardNum == 4 and self.cardSize == 2 and self._flag_allCards and M:CheckType(cardType.threeAndTwo) then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue