From 7e099596d3a52d96d89552bf803134ca266d2b90 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Fri, 25 Sep 2020 16:42:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E6=97=B6=E5=95=86=E5=B8=82=20?= =?UTF-8?q?=E5=85=B6=E7=8F=8D=E5=AE=9D=E9=98=81=20=E5=A4=9A=E6=9C=9F?= =?UTF-8?q?=E6=9C=BA=E5=88=B6=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/DynamicActivity/XianShiShangShi.lua | 9 ++++++++- .../~Lua/Modules/DynamicActivity/ZhenQiYiBaoPage.lua | 9 ++++++++- .../~Lua/Modules/Operating/GrowthGiftPage.lua | 2 +- .../~Lua/Modules/Operating/GrowthGiftTaskItem.lua | 4 ++-- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/XianShiShangShi.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/XianShiShangShi.lua index 9764652b81..89cc8dfc58 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/XianShiShangShi.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/XianShiShangShi.lua @@ -3,6 +3,7 @@ local allData={} local itemsGrid = {}--item重复利用 local this=XianShiShangShi local parent +local GlobalActivity = ConfigManager.GetConfig(ConfigName.GlobalActivity) function XianShiShangShi:ctor(mainPanel, gameObject) self.mainPanel = mainPanel self.gameObject = gameObject @@ -47,7 +48,13 @@ function XianShiShangShi:OnShow(_sortingOrder,_parent) XianShiShangShi:SetTime() end function XianShiShangShi:OnShowData() - allData = ConfigManager.GetAllConfigsDataByDoubleKey(ConfigName.RechargeCommodityConfig, "ShowType", 22, "Type", GoodsTypeDef.DirectPurchaseGift) + allData={} + -- allData = ConfigManager.GetAllConfigsDataByDoubleKey(ConfigName.RechargeCommodityConfig, "ShowType", 22, "Type", GoodsTypeDef.DirectPurchaseGift) + local curActId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.DynamicAct_TimeLimitShop) + for i = 1, #GlobalActivity[curActId].CanBuyRechargeId do + local data = ConfigManager.GetConfigDataByKey(ConfigName.RechargeCommodityConfig, "Id", GlobalActivity[curActId].CanBuyRechargeId[i]) + table.insert(allData,data) + end if allData then this.SortData(allData) this.ScrollView:SetData(allData, function (index, go) diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ZhenQiYiBaoPage.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ZhenQiYiBaoPage.lua index b7eba44fd2..2352e10bb8 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ZhenQiYiBaoPage.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ZhenQiYiBaoPage.lua @@ -3,6 +3,7 @@ local allData={} local itemsGrid = {}--item重复利用 local this=ZhenQiYiBaoPage local parent +local GlobalActivity = ConfigManager.GetConfig(ConfigName.GlobalActivity) function ZhenQiYiBaoPage:ctor(mainPanel, gameObject) self.mainPanel = mainPanel self.gameObject = gameObject @@ -47,7 +48,13 @@ function ZhenQiYiBaoPage:OnShow(_sortingOrder,_parent) ZhenQiYiBaoPage:SetTime() end function ZhenQiYiBaoPage:OnShowData() - allData = ConfigManager.GetAllConfigsDataByDoubleKey(ConfigName.RechargeCommodityConfig, "ShowType", 23, "Type", GoodsTypeDef.DirectPurchaseGift) + allData={} + -- allData = ConfigManager.GetAllConfigsDataByDoubleKey(ConfigName.RechargeCommodityConfig, "ShowType", 23, "Type", GoodsTypeDef.DirectPurchaseGift) + local curActId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.DynamicAct_Treasure) + for i = 1, #GlobalActivity[curActId].CanBuyRechargeId do + local data = ConfigManager.GetConfigDataByKey(ConfigName.RechargeCommodityConfig, "Id", GlobalActivity[curActId].CanBuyRechargeId[i]) + table.insert(allData,data) + end if allData then this.SortData(allData) this.ScrollView:SetData(allData, function (index, go) diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/GrowthGiftPage.lua b/Assets/ManagedResources/~Lua/Modules/Operating/GrowthGiftPage.lua index e55ea042a2..b0c7d45a3e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/GrowthGiftPage.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/GrowthGiftPage.lua @@ -104,7 +104,7 @@ function GrowthGiftPage:RefreshShowData(item, data) local GrowthRewardId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.GrowthReward)--当前礼包奖励的活动类型(6\7\8\9\16)(成长礼包的不同档位奖励ActivityId不同,虽然同为成长基金) local singleRewardData = ActivityGiftManager.GetActivityInfo(GrowthRewardId, data.Id)--获取活动数据 self.context.Id - local havaBought = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, GlobalActivity[GrowthRewardId].CanBuyRechargeId)--当前礼包ID(101\102\103\104\105) + local havaBought = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, GlobalActivity[GrowthRewardId].CanBuyRechargeId[1])--当前礼包ID(101\102\103\104\105) local openStatus = ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.GrowthReward) --item local shadow = Util.GetGameObject(item, "shadow") diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/GrowthGiftTaskItem.lua b/Assets/ManagedResources/~Lua/Modules/Operating/GrowthGiftTaskItem.lua index 27cd4f8171..9d78176fab 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/GrowthGiftTaskItem.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/GrowthGiftTaskItem.lua @@ -43,7 +43,7 @@ function GrowthGiftTaskItem:OnSortingOrderChange(cursortingOrder) end function GrowthGiftTaskItem:SetValue() local activityInfo = ActivityGiftManager.GetActivityInfo(GrowthRewardId, self.context.Id)--获取活动数据 self.context.Id - local goods = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, GlobalActivity[GrowthRewardId].CanBuyRechargeId)--判断当前礼包是否已投资 + local goods = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, GlobalActivity[GrowthRewardId].CanBuyRechargeId[1])--判断当前礼包是否已投资 if activityInfo then self.state = activityInfo.state @@ -81,7 +81,7 @@ end function GrowthGiftTaskItem:OnBtnDealClicked() local openStatus = ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.GrowthReward) - local goods = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, GlobalActivity[GrowthRewardId].CanBuyRechargeId) + local goods = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, GlobalActivity[GrowthRewardId].CanBuyRechargeId[1]) if not openStatus or (goods and goods.buyTimes < 1) then PopupTipPanel.ShowTip(Language[11474]) return