【礼包 公会援助】列表刷新置顶问题
parent
8f611f0340
commit
3a4d593fdb
|
@ -51,7 +51,8 @@ function this.ShowPanelData(isTop,isAni)
|
|||
allMyAidData = MyGuildManager.GetAllGuildHelpInfo()
|
||||
this.ScrollView:SetData(allMyAidData, function (index, go)
|
||||
this.SingleHelpAidDataShow(go, allMyAidData[index])
|
||||
end)
|
||||
end,not isTop,not isAni)
|
||||
this.emptyObj:SetActive(#allMyAidData <= 0)
|
||||
end)
|
||||
else
|
||||
this.ScrollView:SetData(allMyAidData, function (index, go)
|
||||
|
|
|
@ -109,15 +109,15 @@ function GrowthGiftPage:OnShow(_sortingOrder)
|
|||
else
|
||||
self.titleTip.gameObject:SetActive(false)
|
||||
end
|
||||
self:RefreshData()
|
||||
self:RefreshData(true,true)
|
||||
end
|
||||
|
||||
function GrowthGiftPage:RefreshData()
|
||||
function GrowthGiftPage:RefreshData(isTop,isAni)
|
||||
if self.actType == ActivityTypeDef.GrowthReward then
|
||||
self:SetBtnInvestState()
|
||||
self.clickFun = self.GrowthGiftPageOnClick
|
||||
end
|
||||
self:RefreshGiftData(true)
|
||||
self:RefreshGiftData(isTop,isAni)
|
||||
end
|
||||
|
||||
--设置投资按钮初始状态
|
||||
|
@ -136,7 +136,7 @@ function GrowthGiftPage:SetBtnInvestState()
|
|||
end
|
||||
end
|
||||
|
||||
function GrowthGiftPage:RefreshGiftData(anim)
|
||||
function GrowthGiftPage:RefreshGiftData(isTop,isAni)
|
||||
self.mission = DynamicActivityManager.GetMissionDataByActId(self.curActiId)
|
||||
if not self.missionPre then
|
||||
self.missionPre = {}
|
||||
|
@ -148,7 +148,7 @@ function GrowthGiftPage:RefreshGiftData(anim)
|
|||
|
||||
self.scrollView:SetData(self.mission, function(index, item)
|
||||
self:RefreshShowData(item, self.mission[index])
|
||||
end,not anim)
|
||||
end,not isTop,not isAni)
|
||||
end
|
||||
|
||||
--刷新每一条item
|
||||
|
@ -217,7 +217,7 @@ function GrowthGiftPage:RefreshStatus()
|
|||
-- 检测红点状态
|
||||
RedpotManager.CheckRedPointStatus(RedPointType.GrowthGift)
|
||||
-- 刷新当前界面显示
|
||||
self:RefreshData()
|
||||
self:RefreshData(false,false)
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
|
|
|
@ -70,7 +70,7 @@ function EveryDayGift:BindEvent()
|
|||
FirstRechargeManager.RefreshAccumRechargeValue(1004)
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."czlb", 0)
|
||||
CheckRedPointStatus(RedPointType.GrowthPackage)
|
||||
self:RefreshData()
|
||||
self:RefreshData(nil,false,false)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
@ -127,10 +127,10 @@ function EveryDayGift:OnShow(_sortingOrder)
|
|||
VipManager.SetGrowthPackagePointStatus()
|
||||
CheckRedPointStatus(RedPointType.GrowthPackage)
|
||||
end
|
||||
self:RefreshData(true)
|
||||
self:RefreshData(true,true,true)
|
||||
end
|
||||
|
||||
function EveryDayGift:RefreshData(isUpdata)
|
||||
function EveryDayGift:RefreshData(isUpdata,isTop,isAni)
|
||||
if self.actConfig.RpType > 0 then
|
||||
CheckRedPointStatus(self.actConfig.RpType)
|
||||
end
|
||||
|
@ -143,11 +143,11 @@ function EveryDayGift:RefreshData(isUpdata)
|
|||
self:RefreshFreeData()
|
||||
end
|
||||
-- 刷新商品数据
|
||||
self:RefreshGiftData()
|
||||
self:RefreshGiftData(isTop,isAni)
|
||||
end
|
||||
|
||||
-- 刷新礼包的数据
|
||||
function EveryDayGift:RefreshGiftData()
|
||||
function EveryDayGift:RefreshGiftData(isTop,isAni)
|
||||
rechargeNum = VipManager.GetChargedNum()--已经充值的金额
|
||||
self:isBought()
|
||||
self.scrollView:ForeachItemGO(function(index, go)
|
||||
|
@ -158,7 +158,7 @@ function EveryDayGift:RefreshGiftData()
|
|||
self:RefreshShowData(item, self.shopData[index],index)
|
||||
end
|
||||
local curindex = 0
|
||||
self.scrollView:SetData(self.shopData, callBack)
|
||||
self.scrollView:SetData(self.shopData, callBack,not isTop,not isAni)
|
||||
for i = 1 ,#self.shopData do
|
||||
if self.shopData[i].DataType == DynamicActivityManager.selectIndex.dataType then
|
||||
for j = 1 , #DynamicActivityManager.selectIndex.goodsId do
|
||||
|
@ -172,8 +172,8 @@ function EveryDayGift:RefreshGiftData()
|
|||
break
|
||||
end
|
||||
end
|
||||
LogGreen("curindex:"..curindex)
|
||||
self.scrollView:SetIndex(curindex)
|
||||
-- LogGreen("curindex:"..curindex)
|
||||
-- self.scrollView:SetIndex(curindex)
|
||||
end
|
||||
|
||||
function EveryDayGift:isBought()
|
||||
|
@ -249,7 +249,7 @@ function EveryDayGift:GetRemainTime()
|
|||
self.endTime.text = Language[11355]..formatTime--时分秒
|
||||
end
|
||||
elseif showfreshTime < 0 then
|
||||
self:RefreshData(true)
|
||||
self:RefreshData(true,false,false)
|
||||
end
|
||||
end
|
||||
UpDate()
|
||||
|
|
|
@ -111,7 +111,7 @@ function GiftPre:BindEvent()
|
|||
CheckRedPointStatus(RedPointType.WeekGiftPage)
|
||||
CheckRedPointStatus(RedPointType.MonthGiftPage)
|
||||
CheckRedPointStatus(RedPointType.GrowthPackage)
|
||||
self.parent:RefreshData()
|
||||
self.parent:RefreshData(nil,false,false)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
@ -128,7 +128,7 @@ function GiftPre:BuyAction(costId, costNum, shopType, itemId)
|
|||
else
|
||||
local func = function(shopType, itemId)
|
||||
ShopManager.RequestBuyShopItem(shopType, itemId, 1, function()
|
||||
self.parent:RefreshData()
|
||||
self.parent:RefreshData(nil,false,false)
|
||||
CheckRedPointStatus(RedPointType.DailyGift)
|
||||
CheckRedPointStatus(RedPointType.GrowthPackage)
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue