ssssssssss
parent
8de4272e9f
commit
1637af8dee
|
|
@ -6,12 +6,12 @@
|
||||||
* @Copyright Copyright (c) 2019, MagicianJoker
|
* @Copyright Copyright (c) 2019, MagicianJoker
|
||||||
--]]
|
--]]
|
||||||
local DayRewardItem = require("Modules/FirstRecharge/DayRewardItem")
|
local DayRewardItem = require("Modules/FirstRecharge/DayRewardItem")
|
||||||
local rechargeConfig=ConfigManager.GetConfig(ConfigName.RechargeCommodityConfig)
|
local rechargeConfig = ConfigManager.GetConfig(ConfigName.RechargeCommodityConfig)
|
||||||
---@class FirstRechargePanel
|
---@class FirstRechargePanel
|
||||||
local FirstRechargePanel = quick_class("FirstRechargePanel", BasePanel)
|
local FirstRechargePanel = quick_class("FirstRechargePanel", BasePanel)
|
||||||
local rechargeId=0
|
local rechargeId = 0
|
||||||
local kMaxTab, kMaxDay = 2, 3
|
local kMaxTab, kMaxDay = 3, 3
|
||||||
local isPay=false
|
local isPay = false
|
||||||
local TextColorDef = {
|
local TextColorDef = {
|
||||||
[1] = Color.New(48 / 255, 31 / 255, 33 / 255, 1),
|
[1] = Color.New(48 / 255, 31 / 255, 33 / 255, 1),
|
||||||
[2] = Color.New(246 / 255, 235 / 255, 179 / 255, 1)
|
[2] = Color.New(246 / 255, 235 / 255, 179 / 255, 1)
|
||||||
|
|
@ -38,11 +38,11 @@ local TipConfig = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local heroImage={
|
local heroImage = {
|
||||||
[1]="Dragon Ball- (624)",
|
[1] = "Dragon Ball- (624)",
|
||||||
[2]="Dragon Ball- (624)",
|
[2] = "Dragon Ball- (624)",
|
||||||
[3]="Dragon Ball- (624)",
|
[3] = "Dragon Ball- (624)",
|
||||||
[4]="Dragon Ball- (624)",
|
[4] = "Dragon Ball- (624)",
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
local _MoneyDataNum = {}
|
local _MoneyDataNum = {}
|
||||||
|
|
@ -84,7 +84,7 @@ function FirstRechargePanel:InitComponent()
|
||||||
self.selectTabs[i] = Util.GetGameObject(self.tabs[i], "selected")
|
self.selectTabs[i] = Util.GetGameObject(self.tabs[i], "selected")
|
||||||
self.tabTitles[i] = Util.GetGameObject(self.tabs[i], "title"):GetComponent("Text")
|
self.tabTitles[i] = Util.GetGameObject(self.tabs[i], "title"):GetComponent("Text")
|
||||||
self.tabRedPoint[i] = Util.GetGameObject(self.tabs[i], "redPoint")
|
self.tabRedPoint[i] = Util.GetGameObject(self.tabs[i], "redPoint")
|
||||||
-- self.tabs[i]:GetComponent(Text)
|
self.tabs[i]:SetActive(true)
|
||||||
end
|
end
|
||||||
self.selectTabIndex = -1
|
self.selectTabIndex = -1
|
||||||
|
|
||||||
|
|
@ -92,10 +92,10 @@ function FirstRechargePanel:InitComponent()
|
||||||
self.rewardGrid = Util.GetGameObject(self.transform, "frame/rewardBg/rewardBg")
|
self.rewardGrid = Util.GetGameObject(self.transform, "frame/rewardBg/rewardBg")
|
||||||
self.rewardGridPos = self.rewardGrid.transform.localPosition
|
self.rewardGridPos = self.rewardGrid.transform.localPosition
|
||||||
self.itemWidth = self.rewardGrid:GetComponent("HorizontalLayoutGroup").spacing
|
self.itemWidth = self.rewardGrid:GetComponent("HorizontalLayoutGroup").spacing
|
||||||
self.preList={}
|
self.preList = {}
|
||||||
self.dayRewardList = {}
|
self.dayRewardList = {}
|
||||||
for i = 1, 4 do
|
for i = 1, 4 do
|
||||||
table.insert(self.preList,Util.GetGameObject(self.transform, "frame/tabsContent/tabs_"..i))
|
table.insert(self.preList, Util.GetGameObject(self.transform, "frame/tabsContent/tabs_" .. i))
|
||||||
end
|
end
|
||||||
|
|
||||||
--bottomPart
|
--bottomPart
|
||||||
|
|
@ -109,7 +109,6 @@ function FirstRechargePanel:InitComponent()
|
||||||
|
|
||||||
BindLightFlash(Util.GetGameObject(self.effect, "saoguang"), Util.GetGameObject(self.frame, "bg_piaodai/Image (3)"))
|
BindLightFlash(Util.GetGameObject(self.effect, "saoguang"), Util.GetGameObject(self.frame, "bg_piaodai/Image (3)"))
|
||||||
BindLightFlash(Util.GetGameObject(self.effect, "saoguang (1)"), self.reChargeBtn)
|
BindLightFlash(Util.GetGameObject(self.effect, "saoguang (1)"), self.reChargeBtn)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function FirstRechargePanel:BindEvent()
|
function FirstRechargePanel:BindEvent()
|
||||||
|
|
@ -141,12 +140,12 @@ function FirstRechargePanel:BindEvent()
|
||||||
Util.AddClick(self.tenProBtn, function()
|
Util.AddClick(self.tenProBtn, function()
|
||||||
local heroId = 0
|
local heroId = 0
|
||||||
for _, rewardInfo in ConfigPairs(activityRewardConfig) do
|
for _, rewardInfo in ConfigPairs(activityRewardConfig) do
|
||||||
if rewardInfo.ActivityId == ActivityTypeDef.FirstRecharge then--ActivityTypeDef.AccumulativeRecharge then
|
if rewardInfo.ActivityId == ActivityTypeDef.FirstRecharge then --ActivityTypeDef.AccumulativeRecharge then
|
||||||
heroId = rewardInfo.Reward[1][1]
|
heroId = rewardInfo.Reward[1][1]
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
UIManager.OpenPanel(UIName.RoleGetInfoPopup, false, heroId,10)
|
UIManager.OpenPanel(UIName.RoleGetInfoPopup, false, heroId, 10)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -161,8 +160,9 @@ function FirstRechargePanel:OnSortingOrderChange()
|
||||||
-- self.dayRewardList[i]:OnSortingOrderChange(self.sortingOrder)
|
-- self.dayRewardList[i]:OnSortingOrderChange(self.sortingOrder)
|
||||||
-- end
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
local fun = nil
|
local fun = nil
|
||||||
function FirstRechargePanel:OnOpen(context,_fun)
|
function FirstRechargePanel:OnOpen(context, _fun)
|
||||||
--self.isPlayAnim = true
|
--self.isPlayAnim = true
|
||||||
context = context and context or {}
|
context = context and context or {}
|
||||||
self.selectTabIndex = context.tabIndex and context.tabIndex or 1
|
self.selectTabIndex = context.tabIndex and context.tabIndex or 1
|
||||||
|
|
@ -179,12 +179,12 @@ function FirstRechargePanel:OnOpen(context,_fun)
|
||||||
self.ani.enabled = false
|
self.ani.enabled = false
|
||||||
self.closeBtn:GetComponent("Button").enabled = false
|
self.closeBtn:GetComponent("Button").enabled = false
|
||||||
-- self.tabs[1]:SetActive(false)
|
-- self.tabs[1]:SetActive(false)
|
||||||
Timer.New(function ()
|
Timer.New(function()
|
||||||
self.frame:SetActive(true)
|
self.frame:SetActive(true)
|
||||||
self.effect:SetActive(true)
|
self.effect:SetActive(true)
|
||||||
--self.ani.enabled = true
|
--self.ani.enabled = true
|
||||||
end, qyTime):Start()
|
end, qyTime):Start()
|
||||||
Timer.New(function ()
|
Timer.New(function()
|
||||||
--self.tabs[1]:SetActive(true)
|
--self.tabs[1]:SetActive(true)
|
||||||
self.closeBtn:GetComponent("Button").enabled = true
|
self.closeBtn:GetComponent("Button").enabled = true
|
||||||
end, qyTime + 1):Start()
|
end, qyTime + 1):Start()
|
||||||
|
|
@ -208,13 +208,8 @@ function FirstRechargePanel:OnShow()
|
||||||
local money = activityRewardConfig[missInfo.missionId].Values[1][1]
|
local money = activityRewardConfig[missInfo.missionId].Values[1][1]
|
||||||
--LogError("money===="..money)
|
--LogError("money===="..money)
|
||||||
--local index = FirstRechargeManager.GetFirstRechargeIndexByMoney(money)
|
--local index = FirstRechargeManager.GetFirstRechargeIndexByMoney(money)
|
||||||
local index=0
|
local index = FirstRechargeManager.GetFirstRechargeIndexByMoney(money)
|
||||||
if money==10000 then
|
if not _MoneyDataNum[index] then
|
||||||
index=1
|
|
||||||
else
|
|
||||||
index=2
|
|
||||||
end
|
|
||||||
if _MoneyDataNum[index]==nil then
|
|
||||||
_MoneyDataNum[index] = {}
|
_MoneyDataNum[index] = {}
|
||||||
end
|
end
|
||||||
table.insert(_MoneyDataNum[index], missInfo)
|
table.insert(_MoneyDataNum[index], missInfo)
|
||||||
|
|
@ -222,17 +217,17 @@ function FirstRechargePanel:OnShow()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 判断数据
|
-- 判断数据
|
||||||
local minIndex=1
|
local minIndex = 1
|
||||||
for index, dataList in pairs(_MoneyDataNum) do
|
for index, dataList in pairs(_MoneyDataNum) do
|
||||||
if dataList and #dataList > 0 then
|
if dataList and #dataList > 0 then
|
||||||
-- 排序
|
-- 排序
|
||||||
table.sort(dataList,function(a,b)
|
table.sort(dataList, function(a, b)
|
||||||
return a.missionId < b.missionId
|
return a.missionId < b.missionId
|
||||||
end)
|
end)
|
||||||
local isAll=true
|
local isAll = true
|
||||||
for key, value in pairs(dataList) do
|
for key, value in pairs(dataList) do
|
||||||
if value.state~=1 then
|
if value.state ~= 1 then
|
||||||
isAll=false
|
isAll = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if isAll then
|
if isAll then
|
||||||
|
|
@ -244,27 +239,26 @@ function FirstRechargePanel:OnShow()
|
||||||
minIndex = index
|
minIndex = index
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 如果想看的不存在就显示最小的
|
-- 如果想看的不存在就显示最小的
|
||||||
-- if not _MoneyDataNum[self.selectTabIndex] or #_MoneyDataNum[self.selectTabIndex] <= 0 then
|
-- if not _MoneyDataNum[self.selectTabIndex] or #_MoneyDataNum[self.selectTabIndex] <= 0 then
|
||||||
if self.selectTabIndex==1 then
|
if self.selectTabIndex == 1 then
|
||||||
self.selectTabIndex = minIndex
|
self.selectTabIndex = minIndex
|
||||||
end
|
end
|
||||||
|
|
||||||
--end
|
--end
|
||||||
|
|
||||||
self.reChargeTips.text = Language[10664]..string.format(MoneyUtil.GetMoneyUnitName(),AccumRecharge)--string.format(Language[10665], AccumRecharge)
|
self.reChargeTips.text = Language[10664] ..
|
||||||
|
string.format(MoneyUtil.GetMoneyUnitName(), AccumRecharge) --string.format(Language[10665], AccumRecharge)
|
||||||
self:OnTabChanged(self.selectTabIndex)
|
self:OnTabChanged(self.selectTabIndex)
|
||||||
for i = 1, kMaxTab do
|
for i = 1, kMaxTab do
|
||||||
self:SetTabRedPointStatus(i)
|
self:SetTabRedPointStatus(i)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 判断页签切换是否显示
|
-- 判断页签切换是否显示
|
||||||
Util.GetGameObject(self.transform, "frame/tabsContent"):SetActive(table.nums(_MoneyDataNum)>1)
|
Util.GetGameObject(self.transform, "frame/tabsContent"):SetActive(table.nums(_MoneyDataNum) > 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function FirstRechargePanel:OnTabClicked(index)
|
function FirstRechargePanel:OnTabClicked(index)
|
||||||
|
|
@ -275,31 +269,28 @@ function FirstRechargePanel:OnTabClicked(index)
|
||||||
end
|
end
|
||||||
|
|
||||||
function FirstRechargePanel:OnTabChanged(index)
|
function FirstRechargePanel:OnTabChanged(index)
|
||||||
LogError("index==================="..index)
|
LogError("index===================" .. index)
|
||||||
self.hero.sprite=self.spLoader:LoadSprite(heroImage[index])
|
self.hero.sprite = self.spLoader:LoadSprite(heroImage[index])
|
||||||
for i, select in ipairs(self.selectTabs) do
|
for i, select in ipairs(self.selectTabs) do
|
||||||
select:SetActive(i == index)
|
select:SetActive(i == index)
|
||||||
end
|
end
|
||||||
if index==4 then
|
if index == 4 then
|
||||||
self.heroPreviewBtn:SetActive(false)
|
self.heroPreviewBtn:SetActive(false)
|
||||||
else
|
else
|
||||||
self.heroPreviewBtn:SetActive(true)
|
self.heroPreviewBtn:SetActive(true)
|
||||||
end
|
end
|
||||||
local money=0
|
|
||||||
for i, title in ipairs(self.tabTitles) do
|
for i, title in ipairs(self.tabTitles) do
|
||||||
title.color = i == index and TextColorDef[2] or TextColorDef[1]
|
title.color = i == index and TextColorDef[2] or TextColorDef[1]
|
||||||
--local money = FirstRechargeManager.GetFirstRechargeMoneyByIndex(i)
|
--local money = FirstRechargeManager.GetFirstRechargeMoneyByIndex(i)
|
||||||
if i==1 then
|
if i == 1 then
|
||||||
title.text ="超值首充"
|
title.text = "优选首充"
|
||||||
elseif i==2 then
|
elseif i == 2 then
|
||||||
title.text ="豪华首充"
|
title.text = "尊享首充"
|
||||||
|
elseif i == 3 then
|
||||||
|
title.text = "至臻首充"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if index==1 then
|
|
||||||
money=10000
|
|
||||||
elseif index==2 then
|
|
||||||
money=20000
|
|
||||||
end
|
|
||||||
self.stageImage6.gameObject:SetActive(index == 5)
|
self.stageImage6.gameObject:SetActive(index == 5)
|
||||||
self.stageImage30.gameObject:SetActive(index == 5)
|
self.stageImage30.gameObject:SetActive(index == 5)
|
||||||
self.stageImage100.gameObject:SetActive(index == 5)
|
self.stageImage100.gameObject:SetActive(index == 5)
|
||||||
|
|
@ -309,16 +300,16 @@ function FirstRechargePanel:OnTabChanged(index)
|
||||||
local AccumRecharge = 0
|
local AccumRecharge = 0
|
||||||
self.offsetIndex = 0
|
self.offsetIndex = 0
|
||||||
|
|
||||||
--local money = FirstRechargeManager.GetFirstRechargeMoneyByIndex(index)
|
local money = FirstRechargeManager.GetFirstRechargeMoneyByIndex(index)
|
||||||
rechargeId=money
|
rechargeId = money
|
||||||
|
|
||||||
|
|
||||||
local tempData = _MoneyDataNum[index]
|
local tempData = _MoneyDataNum[index]
|
||||||
isPay=false
|
isPay = false
|
||||||
for _, missInfo in ipairs(tempData) do
|
for _, missInfo in ipairs(tempData) do
|
||||||
if missInfo and missInfo.progress and activityRewardConfig[missInfo.missionId].Values[1][1] == money then
|
if missInfo and missInfo.progress and activityRewardConfig[missInfo.missionId].Values[1][1] == money then
|
||||||
AccumRecharge = missInfo.progress
|
AccumRecharge = missInfo.progress
|
||||||
LogError("missionInfo.state=="..missInfo.state)
|
LogError("missionInfo.state==" .. missInfo.state)
|
||||||
-- if AccumRecharge >= activityRewardConfig[missInfo.missionId].Values[1][1] then
|
-- if AccumRecharge >= activityRewardConfig[missInfo.missionId].Values[1][1] then
|
||||||
-- local day = GetTimePass(FirstRechargeManager.GetRechargeTime())--FirstRechargeManager.GetRechargeTime()
|
-- local day = GetTimePass(FirstRechargeManager.GetRechargeTime())--FirstRechargeManager.GetRechargeTime()
|
||||||
-- if missInfo.state ~= 1 and activityRewardConfig[missInfo.missionId].Values[1][2] <= day then
|
-- if missInfo.state ~= 1 and activityRewardConfig[missInfo.missionId].Values[1][2] <= day then
|
||||||
|
|
@ -326,15 +317,15 @@ function FirstRechargePanel:OnTabChanged(index)
|
||||||
-- break
|
-- break
|
||||||
-- end
|
-- end
|
||||||
-- end
|
-- end
|
||||||
if missInfo.state>0 then
|
if missInfo.state > 0 then
|
||||||
isPay=true
|
isPay = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if isPay then
|
if isPay then
|
||||||
self.reChargeTxt.text=Language[10514]
|
self.reChargeTxt.text = Language[10514]
|
||||||
else
|
else
|
||||||
self.reChargeTxt.text=rechargeConfig[money].Price..Language[11358]
|
self.reChargeTxt.text = rechargeConfig[money].Price .. Language[11358]
|
||||||
end
|
end
|
||||||
if self.offsetIndex == 0 then
|
if self.offsetIndex == 0 then
|
||||||
self.offsetIndex = 1
|
self.offsetIndex = 1
|
||||||
|
|
@ -345,20 +336,21 @@ function FirstRechargePanel:OnTabChanged(index)
|
||||||
vec.x = self.rewardGridPos.x - #tempData * self.itemWidth
|
vec.x = self.rewardGridPos.x - #tempData * self.itemWidth
|
||||||
self.rewardGrid.transform.localPosition = vec
|
self.rewardGrid.transform.localPosition = vec
|
||||||
local x = self.rewardGridPos.x - (self.offsetIndex - 1) * self.itemWidth
|
local x = self.rewardGridPos.x - (self.offsetIndex - 1) * self.itemWidth
|
||||||
local vec2 = Vector3.New(x,self.rewardGridPos.y,self.rewardGridPos.z)
|
local vec2 = Vector3.New(x, self.rewardGridPos.y, self.rewardGridPos.z)
|
||||||
-- --self.tween = self.rewardGrid.gameObject.transform:DOLocalMove(vec2, 0.5):OnStart(function() end):OnUpdate(function() --TODO:测试速度
|
-- --self.tween = self.rewardGrid.gameObject.transform:DOLocalMove(vec2, 0.5):OnStart(function() end):OnUpdate(function() --TODO:测试速度
|
||||||
-- end):OnComplete(function ()
|
-- end):OnComplete(function ()
|
||||||
-- --self.rewardGrid.transform.localPosition = vec2
|
-- --self.rewardGrid.transform.localPosition = vec2
|
||||||
-- end)
|
-- end)
|
||||||
else
|
else
|
||||||
local x = self.rewardGridPos.x - (self.offsetIndex - 1) * self.itemWidth
|
local x = self.rewardGridPos.x - (self.offsetIndex - 1) * self.itemWidth
|
||||||
local vec2 = Vector3.New(x,self.rewardGridPos.y,self.rewardGridPos.z)
|
local vec2 = Vector3.New(x, self.rewardGridPos.y, self.rewardGridPos.z)
|
||||||
--self.rewardGrid.transform.localPosition = vec2
|
--self.rewardGrid.transform.localPosition = vec2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function FirstRechargePanel:ShowContent(index)
|
function FirstRechargePanel:ShowContent(index)
|
||||||
local tempData = {}
|
local tempData = {}
|
||||||
|
LogError("sssssssssssssssssssssssssssss" .. tostring(index))
|
||||||
for _, missionInfo in ipairs(_MoneyDataNum[index]) do
|
for _, missionInfo in ipairs(_MoneyDataNum[index]) do
|
||||||
table.insert(tempData, activityRewardConfig[missionInfo.missionId])
|
table.insert(tempData, activityRewardConfig[missionInfo.missionId])
|
||||||
end
|
end
|
||||||
|
|
@ -368,17 +360,17 @@ function FirstRechargePanel:ShowContent(index)
|
||||||
dayRewardItem.gameObject:SetActive(false)
|
dayRewardItem.gameObject:SetActive(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
for i = 1,math.max(#self.dayRewardList,#tempData) do
|
for i = 1, math.max(#self.dayRewardList, #tempData) do
|
||||||
if not tempData[i] then
|
if not tempData[i] then
|
||||||
self.dayRewardList[i].gameObject:SetActive(false)
|
self.dayRewardList[i].gameObject:SetActive(false)
|
||||||
else
|
else
|
||||||
if not self.dayRewardList[i] then
|
if not self.dayRewardList[i] then
|
||||||
--local go = newObjToParent(self.rewardDay,self.rewardGrid)
|
--local go = newObjToParent(self.rewardDay,self.rewardGrid)
|
||||||
local go=self.rewardGrid.transform:GetChild(i-1).gameObject
|
local go = self.rewardGrid.transform:GetChild(i - 1).gameObject
|
||||||
self.dayRewardList[i] = DayRewardItem.new(self,go)
|
self.dayRewardList[i] = DayRewardItem.new(self, go)
|
||||||
end
|
end
|
||||||
self.dayRewardList[i].gameObject:SetActive(true)
|
self.dayRewardList[i].gameObject:SetActive(true)
|
||||||
self.dayRewardList[i]:SetValue(tempData[i],self.sortingOrder)
|
self.dayRewardList[i]:SetValue(tempData[i], self.sortingOrder)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -396,7 +388,7 @@ function FirstRechargePanel:OnRechargeBtnClicked()
|
||||||
if isPay then
|
if isPay then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
PayManager.Pay(rechargeId,function()
|
PayManager.Pay(rechargeId, function()
|
||||||
--self:OnShow()
|
--self:OnShow()
|
||||||
self.activityInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.FirstRecharge)
|
self.activityInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.FirstRecharge)
|
||||||
_MoneyDataNum = {}
|
_MoneyDataNum = {}
|
||||||
|
|
@ -408,26 +400,21 @@ function FirstRechargePanel:OnRechargeBtnClicked()
|
||||||
-- 构建数据
|
-- 构建数据
|
||||||
local money = activityRewardConfig[missInfo.missionId].Values[1][1]
|
local money = activityRewardConfig[missInfo.missionId].Values[1][1]
|
||||||
--LogError("money===="..money)
|
--LogError("money===="..money)
|
||||||
--local index = FirstRechargeManager.GetFirstRechargeIndexByMoney(money)
|
local index = FirstRechargeManager.GetFirstRechargeIndexByMoney(money)
|
||||||
local index=0
|
if _MoneyDataNum[index] == nil then
|
||||||
if money==10000 then
|
|
||||||
index=1
|
|
||||||
else
|
|
||||||
index=2
|
|
||||||
end
|
|
||||||
if _MoneyDataNum[index]==nil then
|
|
||||||
_MoneyDataNum[index] = {}
|
_MoneyDataNum[index] = {}
|
||||||
end
|
end
|
||||||
table.insert(_MoneyDataNum[index], missInfo)
|
table.insert(_MoneyDataNum[index], missInfo)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self.reChargeTips.text = Language[10664]..string.format(MoneyUtil.GetMoneyUnitName(),AccumRecharge)--string.format(Language[10665], AccumRecharge)
|
self.reChargeTips.text = Language[10664] ..
|
||||||
|
string.format(MoneyUtil.GetMoneyUnitName(), AccumRecharge) --string.format(Language[10665], AccumRecharge)
|
||||||
self:OnTabChanged(self.selectTabIndex)
|
self:OnTabChanged(self.selectTabIndex)
|
||||||
for i = 1, kMaxTab do
|
for i = 1, kMaxTab do
|
||||||
self:SetTabRedPointStatus(i)
|
self:SetTabRedPointStatus(i)
|
||||||
end
|
end
|
||||||
-- 判断页签切换是否显示
|
-- 判断页签切换是否显示
|
||||||
Util.GetGameObject(self.transform, "frame/tabsContent"):SetActive(table.nums(_MoneyDataNum)>1)
|
Util.GetGameObject(self.transform, "frame/tabsContent"):SetActive(table.nums(_MoneyDataNum) > 1)
|
||||||
end)
|
end)
|
||||||
--JumpManager.GoJump(36004)
|
--JumpManager.GoJump(36004)
|
||||||
-- if not ShopManager.IsActive(SHOP_TYPE.SOUL_STONE_SHOP) then
|
-- if not ShopManager.IsActive(SHOP_TYPE.SOUL_STONE_SHOP) then
|
||||||
|
|
@ -444,7 +431,6 @@ function FirstRechargePanel:OnRechargeBtnClicked()
|
||||||
-- JumpManager.GoJump(36008)
|
-- JumpManager.GoJump(36008)
|
||||||
-- end
|
-- end
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function FirstRechargePanel:SetTabRedPointStatus(tabIndex)
|
function FirstRechargePanel:SetTabRedPointStatus(tabIndex)
|
||||||
|
|
@ -452,6 +438,7 @@ function FirstRechargePanel:SetTabRedPointStatus(tabIndex)
|
||||||
local redPointStatus = FirstRechargeManager.GetRedPointStatus(tabIndex)
|
local redPointStatus = FirstRechargeManager.GetRedPointStatus(tabIndex)
|
||||||
self.tabRedPoint[tabIndex]:SetActive(redPointStatus)
|
self.tabRedPoint[tabIndex]:SetActive(redPointStatus)
|
||||||
end
|
end
|
||||||
|
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function FirstRechargePanel:OnClose()
|
function FirstRechargePanel:OnClose()
|
||||||
if fun then
|
if fun then
|
||||||
|
|
@ -468,4 +455,5 @@ function FirstRechargePanel:OnDestroy()
|
||||||
end
|
end
|
||||||
self.dayRewardList = {}
|
self.dayRewardList = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
return FirstRechargePanel
|
return FirstRechargePanel
|
||||||
Loading…
Reference in New Issue