孙悟空添加新人商城

dev_chengFeng
jiaoyangna 2021-07-02 11:13:59 +08:00
parent 26ef0d21d0
commit 9b01d308e8
2 changed files with 48 additions and 2 deletions

View File

@ -2,6 +2,7 @@
RewardItemSingleShowPopup = Inherit(BasePanel)
local this = RewardItemSingleShowPopup
local JumpConfig = ConfigManager.GetConfig(ConfigName.JumpConfig)
local RechargeCommodityConfig = ConfigManager.GetConfig(ConfigName.RechargeCommodityConfig)
local itemSid
local heroBackData
local itemConfigData
@ -327,7 +328,7 @@ function RewardItemSingleShowPopup:OnShow()
SetTextVerTial(this.posText.gameObject,Vector3.New(64,21,0),"MiddleLeft")
local jumpDataList = heroConfig.Jump
for i = 1, #jumpDataList do
if not RECHARGEABLE and (JumpConfig[jumpDataList[i]].Type == JumpType.firstRecharge or JumpConfig[jumpDataList[i]].Type == JumpType.ZhiZunJiangShi) then--(是否开启充值)
if not RECHARGEABLE and (JumpConfig[jumpDataList[i]].Type == JumpType.firstRecharge or JumpConfig[jumpDataList[i]].Type == JumpType.ZhiZunJiangShi or JumpConfig[jumpDataList[i]].Type == JumpType.recharge) then--(是否开启充值)
else
local isShow = true
if JumpConfig[jumpDataList[i]].Type == JumpType.firstRecharge then
@ -362,6 +363,28 @@ function RewardItemSingleShowPopup:OnShow()
isShow = false
end
end
elseif JumpConfig[jumpDataList[i]].Type == JumpType.recharge then
local actConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.ActivityGroups,"PageType",JumpType.recharge,"Sort",JumpConfig[jumpDataList[i]].Skipfactor[1])
local list = OperatingManager.GetGiftGoodsInfoList(actConfig.ShopData[1][2])
local goodIdList = {}
for i = 1,#list do
local rechargeConfig = RechargeCommodityConfig[list[i].goodsId]
if rechargeConfig.Limit == 0 or rechargeConfig.Limit - list[i].buyTimes > 0 then
if rechargeConfig.ShowType == actConfig.ShopData[1][3] then
for j = 1,#rechargeConfig.RewardShow do
if rechargeConfig.RewardShow[j][1] == heroConfig.Id or rechargeConfig.RewardShow[j][1] == heroConfig.PiecesId then
table.insert(goodIdList,rechargeConfig.Id)
break
end
end
end
end
end
if #goodIdList < 1 then
isShow = false
else
isShow = true
end
end
if isShow then
local tempView = SubUIManager.Open(SubUIConfig.JumpViewNew, this.equipProGrid.transform, jumpDataList[i],heroConfig,self)

View File

@ -1,5 +1,6 @@
local JumpConfig=ConfigManager.GetConfig(ConfigName.JumpConfig)
local ItemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
local RechargeCommodityConfig=ConfigManager.GetConfig(ConfigName.RechargeCommodityConfig)
JumpViewNew = {}
function JumpViewNew:New(gameObject)
local b = {}
@ -44,6 +45,7 @@ end
function JumpViewNew:OnOpen(jumpId,heroConfig,parent)
self.parent = parent
self.jumpSData=JumpConfig[jumpId]
self.heroId = heroConfig.Id
self.needChipId = heroConfig.PiecesId
self.needChipNum = ItemConfig[self.needChipId].UsePerCount
self.btnSureIma.sprite = self.parent.spLoader:LoadSprite("r_hero_button_002")
@ -144,7 +146,10 @@ function JumpViewNew:OnOpen(jumpId,heroConfig,parent)
self.btnSureIma.sprite = self.parent.spLoader:LoadSprite("r_hero_button_001")
end
self.desc.text = string.format("<color=#%s>%s:%s/%s</color>",color,ItemConfig[self.needChipId].Name,itemcount,self.needChipNum)
elseif self.jumpSData.Type == 40 then
elseif self.jumpSData.Type == JumpType.recharge then
self.costIconPos.gameObject:SetActive(false)
self.desc.text = "快速提升孙悟空星级"
elseif self.jumpSData.Type == 40 then
self.costIconPos.gameObject:SetActive(false)
self.desc.text = "助力玉帝升星"
end
@ -193,6 +198,24 @@ function JumpViewNew:GoToJumpData()
ShopManager.SetSelectIndex(self.jumpSData.Skipfactor[1],{self.ShopId})
elseif self.jumpSData.Type == JumpType.XingChenShangDian then
ShopManager.SetSelectIndex(self.shopType,{self.ShopId})
elseif self.jumpSData.Type == JumpType.recharge then
local actConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.ActivityGroups,"PageType",JumpType.recharge,"Sort",self.jumpSData.Skipfactor[1])
local list = OperatingManager.GetGiftGoodsInfoList(actConfig.ShopData[1][2])
local goodIdList = {}
for i = 1,#list do
local rechargeConfig = RechargeCommodityConfig[list[i].goodsId]
if rechargeConfig.Limit == 0 or rechargeConfig.Limit - list[i].buyTimes > 0 then
if rechargeConfig.ShowType == actConfig.ShopData[1][3] then
for j = 1,#rechargeConfig.RewardShow do
if rechargeConfig.RewardShow[j][1] == self.heroId or rechargeConfig.RewardShow[j][1] == self.needChipId then
table.insert(goodIdList,rechargeConfig.Id)
break
end
end
end
end
end
DynamicActivityManager.SetSelectIndex(DataType.Direct,goodIdList)
end
JumpManager.GoJump(self.jumpSData.Id,function()
self.parent:ClosePanel()