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