parent
0db39ccbe3
commit
f676618e42
|
@ -276,7 +276,8 @@ function RecruitMainPanel:RemoveListener()
|
|||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function RecruitMainPanel:OnOpen(_index)
|
||||
function RecruitMainPanel:OnOpen(_index)
|
||||
self.dicData = RecruitManager.GetRecruitData()
|
||||
if not _index then
|
||||
if GuideManager.IsInMainGuide() and GuideManager.GetCurId(1) == 105 then
|
||||
self.CurRecruitId = TableRecruitType.Putong
|
||||
|
@ -285,7 +286,21 @@ function RecruitMainPanel:OnOpen(_index)
|
|||
elseif GuideManager.IsFunctionGuideExist() then
|
||||
self.CurRecruitId = TableRecruitType.Siyuanzhen
|
||||
else
|
||||
self.CurRecruitId = RecruitManager.CurRecruitId
|
||||
local isRed = 0
|
||||
for i = 1,self.dicData do
|
||||
if self.dicData[i].RpType and self.dicData[i].RpType > 0 then
|
||||
if RecruitManager.GetAllRecruitBtnRedpoint(self.dicData[i].RpType) then
|
||||
isRed = self.dicData[i].ShopData[1][1]
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
if isRed > 0 then
|
||||
self.CurRecruitId = isRed
|
||||
else
|
||||
self.CurRecruitId = RecruitManager.CurRecruitId
|
||||
end
|
||||
|
||||
end
|
||||
else
|
||||
self.CurRecruitId = _index
|
||||
|
@ -296,7 +311,6 @@ end
|
|||
-- 打开,重新打开时回调
|
||||
function RecruitMainPanel:OnShow()
|
||||
orginLayer = self.sortingOrder
|
||||
self.dicData = RecruitManager.GetRecruitData()
|
||||
this:RefreshTabData()
|
||||
for i = 1,#self.dicData do
|
||||
if self.dicData[i].ShopData[1][1] == self.CurRecruitId then
|
||||
|
@ -500,6 +514,5 @@ function RecruitMainPanel:OnDestroy()
|
|||
self.dicData = {}
|
||||
SubUIManager.Close(this.upView)
|
||||
this.upView = nil
|
||||
self.dicData = {}
|
||||
end
|
||||
return this
|
Loading…
Reference in New Issue