抽卡红点提交

dev_chengFeng
jiaoyangna 2021-07-10 18:27:28 +08:00
parent f710e20c60
commit b97b5da01d
1 changed files with 11 additions and 9 deletions

View File

@ -166,7 +166,7 @@ function RecruitMainPanel:BindEvent()
Util.AddClick(this.jiantouyou , function()
this.mask:SetActive(true)
for i = self.curPage - 1,1,-1 do
for i = self.curPage - 2,1,-1 do
if self.dicData[i].RpType and self.dicData[i].RpType > 0 then
if RecruitManager.GetAllRecruitBtnRedpoint(self.dicData[i].RpType) then
self.curPage = i
@ -182,7 +182,7 @@ function RecruitMainPanel:BindEvent()
end)
Util.AddClick(this.jiantouzuo , function()
this.mask:SetActive(true)
for i = self.curPage + 1,#self.dicData,1 do
for i = self.curPage + 2,#self.dicData,1 do
if self.dicData[i].RpType and self.dicData[i].RpType > 0 then
if RecruitManager.GetAllRecruitBtnRedpoint(self.dicData[i].RpType) then
self.curPage = i
@ -190,7 +190,6 @@ function RecruitMainPanel:BindEvent()
end
end
end
self.curPage = 0
self.lastPage = self.curPage - 1 > 0 and self.curPage - 1 or #self.dicData
self.nextPage = self.curPage + 1 > #self.dicData and 1 or self.curPage + 1
lastIndex = self.curPage
@ -201,7 +200,8 @@ end
function RecruitMainPanel:RefreshJianTou()
local index = 0
for i = self.curPage - 1,1,-1 do
LogGreen("self.lastPage:"..self.lastPage.." self.nextPage:"..self.nextPage.." self.curPage:"..self.curPage)
for i = self.curPage - 2,1,-1 do
if self.dicData[i].RpType and self.dicData[i].RpType > 0 then
if RecruitManager.GetAllRecruitBtnRedpoint(self.dicData[i].RpType) then
index = i
@ -209,13 +209,14 @@ function RecruitMainPanel:RefreshJianTou()
end
end
end
LogGreen("index1:"..index)
if index == 0 then
this.jiantouyou.gameObject:SetActive(false)
else
this.jiantouyou.gameObject:SetActive(true)
end
index = 0
for i = self.curPage + 1,#self.dicData,1 do
for i = self.curPage + 2,#self.dicData,1 do
if self.dicData[i].RpType and self.dicData[i].RpType > 0 then
if RecruitManager.GetAllRecruitBtnRedpoint(self.dicData[i].RpType) then
index = i
@ -223,6 +224,7 @@ function RecruitMainPanel:RefreshJianTou()
end
end
end
LogGreen("index2:"..index)
if index == 0 then
this.jiantouzuo.gameObject:SetActive(false)
else
@ -340,13 +342,13 @@ function this:SetIndex()
offSet = offSet - 1
this.SortItemList()
isenter = true
end,0.21):Start()
end,0.25):Start()
end
coroutine.wait(0.01)
end
this.mask:SetActive(false)
this.select.gameObject:SetActive(true)
self:RefreshJianTou()
this:RefreshJianTou()
end)
end
break
@ -384,7 +386,7 @@ function this:LeftAction()
self.curPage = self.nextPage
self.nextPage = self.curPage + 1 > #self.dicData and 1 or self.curPage + 1
this.select.gameObject:SetActive(true)
self:RefreshJianTou()
this:RefreshJianTou()
this:PageOnChange()
--this:RefreshTabData()
end
@ -395,7 +397,7 @@ function this:RightAction()
self.curPage = self.lastPage
self.lastPage = self.curPage - 1 > 0 and self.curPage - 1 or #self.dicData
this.select.gameObject:SetActive(true)
self:RefreshJianTou()
this:RefreshJianTou()
this:PageOnChange()
--this:RefreshTabData()
end