ssssssssss
parent
8de4272e9f
commit
1637af8dee
|
|
@ -10,7 +10,7 @@ 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),
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
@ -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()
|
||||||
|
|
@ -161,6 +160,7 @@ 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
|
||||||
|
|
@ -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)
|
||||||
|
|
@ -244,8 +239,6 @@ function FirstRechargePanel:OnShow()
|
||||||
minIndex = index
|
minIndex = index
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -257,7 +250,8 @@ function FirstRechargePanel:OnShow()
|
||||||
|
|
||||||
--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)
|
||||||
|
|
@ -285,21 +279,18 @@ function FirstRechargePanel:OnTabChanged(index)
|
||||||
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,7 +300,7 @@ 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
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -359,6 +350,7 @@ 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
|
||||||
|
|
@ -408,20 +400,15 @@ 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 money==10000 then
|
|
||||||
index=1
|
|
||||||
else
|
|
||||||
index=2
|
|
||||||
end
|
|
||||||
if _MoneyDataNum[index] == nil then
|
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)
|
||||||
|
|
@ -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