活动 修改提交
parent
c2fac79eca
commit
23b46ba218
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 08b8f684f6ce7b94bb863866417f33d2
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -401,5 +401,6 @@ SubUIConfig = {
|
|||
[5] = {name = "MonthCardPage",assetName = "MonthCardPage",script = "Modules/Operating/MonthCardPage"},
|
||||
[6] = {name = "GrowthGiftPage",assetName = "GrowthGiftPage",script = "Modules/Operating/GrowthGiftPage"},
|
||||
[7] = {name = "MissionPre",assetName = "MissionPre",script = "Modules/Operating/MissionPre"},
|
||||
[8] = {name = "UppperMonthCard",assetName = "UppperMonthCard",script = "Modules/Operating/UppperMonthCard"},
|
||||
FetterItem = { name = "FetterItem",assetName = "FetterItem",script = "View/FetterItem" }, --鸿蒙阵内容
|
||||
}
|
|
@ -139,7 +139,7 @@ function DailyRechargePanel:OnDealBtnClicked()
|
|||
PopupTipPanel.ShowTip(Language[10422])
|
||||
return
|
||||
end
|
||||
UIManager.OpenPanel(UIName.MainRechargePanel, 1)
|
||||
JumpManager.GoJump(36008)
|
||||
end
|
||||
self:ClosePanel()
|
||||
end
|
||||
|
|
|
@ -32,9 +32,9 @@ function ActivityMainPanel:BindEvent()
|
|||
Util.AddClick(this.btnBack, function()
|
||||
DynamicActivityManager.RemoveUIList()
|
||||
if #DynamicActivityManager.OpenUIList > 0 then
|
||||
JumpManager.GoJump(DynamicActivityManager.OpenUIList[#DynamicActivityManager.OpenUIList],function()
|
||||
DynamicActivityManager.RemoveUIList()
|
||||
end)
|
||||
JumpManager.GoJump(DynamicActivityManager.OpenUIList[#DynamicActivityManager.OpenUIList],function()
|
||||
DynamicActivityManager.RemoveUIList()
|
||||
end)
|
||||
else
|
||||
this:ClosePanel()
|
||||
end
|
||||
|
|
|
@ -42,7 +42,7 @@ function this:BindEvent()
|
|||
-- PopupTipPanel.ShowTip(Language[10422])
|
||||
-- return
|
||||
-- end
|
||||
-- UIManager.OpenPanel(UIName.MainRechargePanel, 1)
|
||||
-- JumpManager.GoJump(36008)
|
||||
-- end)
|
||||
end
|
||||
function this:BtnClickEvent()
|
||||
|
|
|
@ -78,6 +78,7 @@ function FastExploreInfoPopup:BindEvent()
|
|||
Util.AddClick(this.privilegeGo, function()
|
||||
local isActive = PrivilegeManager.GetPrivilegeOpenStatusById(33)
|
||||
if not isActive then
|
||||
DynamicActivityManager.SetSelectIndex(DataType.Direct,{4002})
|
||||
JumpManager.GoJump(36006)
|
||||
end
|
||||
end)
|
||||
|
|
|
@ -106,7 +106,7 @@ function this:SetShow(root,data)
|
|||
stateBtnText.text=Language[10019]
|
||||
stateImage.sprite=Util.LoadSprite(StateImageName[2])
|
||||
Util.AddOnceClick(stateBtn,function()
|
||||
UIManager.OpenPanel(UIName.MainRechargePanel, 1)
|
||||
JumpManager.GoJump(36008)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -200,7 +200,7 @@ function FirstRechargePanel:OnRechargeBtnClicked()
|
|||
return
|
||||
end
|
||||
self:ClosePanel()
|
||||
UIManager.OpenPanel(UIName.MainRechargePanel, 2)
|
||||
JumpManager.GoJump(36008)
|
||||
end
|
||||
|
||||
function FirstRechargePanel:SetTabRedPointStatus(tabIndex)
|
||||
|
|
|
@ -77,7 +77,7 @@ function LuckyCatPanel:BindEvent()
|
|||
PopupTipPanel.ShowTip(Language[10422])
|
||||
return
|
||||
end
|
||||
UIManager.OpenPanel(UIName.MainRechargePanel, 1)
|
||||
JumpManager.GoJump(36008)
|
||||
else
|
||||
if (haveItemNum >= costItemNum) then
|
||||
LuckyCatManager.GetLuckyCatRequest()
|
||||
|
|
|
@ -70,7 +70,7 @@ function LuckyCat:BindEvent()
|
|||
PopupTipPanel.ShowTip(Language[10422])
|
||||
return
|
||||
end
|
||||
UIManager.OpenPanel(UIName.MainRechargePanel, 1)
|
||||
JumpManager.GoJump(36008)
|
||||
else
|
||||
if (haveItemNum >= costItemNum) then
|
||||
LuckyCatManager.GetLuckyCatRequest()
|
||||
|
|
|
@ -779,7 +779,7 @@ function this:TabBtnAction(id,actType,data)
|
|||
if id == 666 then
|
||||
UIManager.OpenPanel(UIName.UpGradePackagePanel)
|
||||
elseif id == 668 then
|
||||
UIManager.OpenPanel(UIName.OperatingPanel,{tabIndex =7,extraParam =2,showType=2})
|
||||
UIManager.OpenPanel(UIName.ActivityMainPanel,id)
|
||||
elseif id == 667 then
|
||||
UIManager.OpenPanel(UIName.TimeLimitSkinPanel)
|
||||
end
|
||||
|
|
|
@ -4,9 +4,9 @@ local this = NotEnoughPopup
|
|||
|
||||
-- 跳转商店购买窗口,物品id对应界面及参数
|
||||
local _JumpConfig = {
|
||||
[16] = {panelName = UIName.MainRechargePanel, params = {1} },
|
||||
--[15] = {panelName = UIName.MainRechargePanel, params = {1} },
|
||||
--[16] = {panelName = UIName.ShopExchangePopup, params = {SHOP_TYPE.FUNCTION_SHOP, 10013, "兑换妖晶"} },
|
||||
[16] = {36010},
|
||||
--[15] = {36010},
|
||||
--[16] = {36010},
|
||||
}
|
||||
|
||||
--初始化组件(用于子类重写)
|
||||
|
@ -26,7 +26,7 @@ function NotEnoughPopup:BindEvent()
|
|||
Util.AddClick(this.btnRight, function()
|
||||
this:ClosePanel()
|
||||
if _JumpConfig[this._ItemId] then
|
||||
UIManager.OpenPanel(_JumpConfig[this._ItemId].panelName, unpack(_JumpConfig[this._ItemId].params))
|
||||
JumpManager.GoJump(_JumpConfig[this._ItemId])
|
||||
else
|
||||
PopupTipPanel.ShowTip(Language[11311])
|
||||
end
|
||||
|
|
|
@ -88,7 +88,7 @@ function ContinuityRechargeItem:OnDealBtnClicked()
|
|||
PopupTipPanel.ShowTip(Language[10422])
|
||||
return
|
||||
end
|
||||
UIManager.OpenPanel(UIName.MainRechargePanel, 1)
|
||||
JumpManager.GoJump(36008)
|
||||
else
|
||||
NetManager.GetActivityRewardRequest(self.localContext.Id, self.localContext.ActivityId, function(_drop)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, _drop, 1)
|
||||
|
|
|
@ -1,55 +1,51 @@
|
|||
--- 什么又饿吧的鸡精
|
||||
UpperMonthCard = {}
|
||||
|
||||
local UpperMonthCard = {}
|
||||
local sortingOrder = 0
|
||||
local chargeConfig = ConfigManager.GetConfig(ConfigName.RechargeCommodityConfig)
|
||||
|
||||
--- 本地枚举
|
||||
local ImgType = {
|
||||
[128] = {
|
||||
[10002] = {
|
||||
bg = "y_yjj_128beijdi",
|
||||
mask = "y_yjj_128dikuang001",
|
||||
rewardBg = "y_yjj_128kuang",
|
||||
moneyTag = "y_yjj_128",
|
||||
moneyTag = "y_yjj_$19.99",
|
||||
downBg = "y_yjj_128kuang001",
|
||||
rewardPreview = "y_yjj_128kuang002_zh",
|
||||
rewardPreview = "y_yjj_128kuang002",
|
||||
valueMask = "y_yjj_128jjz002",
|
||||
chargerBaseType = GoodsTypeDef.MONTHCARD_128,
|
||||
},
|
||||
[328] = {
|
||||
[10003] = {
|
||||
bg = "y_yjj_328beijdi",
|
||||
mask = "y_yjj_328dikuang001",
|
||||
rewardBg = "y_yjj_328kuang",
|
||||
moneyTag = "y_yjj_328",
|
||||
moneyTag = "y_yjj_$49.99",
|
||||
downBg = "y_yjj_328kuang001",
|
||||
rewardPreview = "y_yjj_328kuang002_zh",
|
||||
rewardPreview = "y_yjj_328kuang002",
|
||||
valueMask = "y_yjj_328jjz002",
|
||||
chargerBaseType = GoodsTypeDef.MONTHCARD_328,
|
||||
},
|
||||
}
|
||||
function UpperMonthCard:New(gameObject)
|
||||
local b = {}
|
||||
b.gameObject = gameObject
|
||||
b.transform = gameObject.transform
|
||||
setmetatable(b, { __index = UpperMonthCard })
|
||||
return b
|
||||
end
|
||||
|
||||
function UpperMonthCard:New(parent, gameObject)
|
||||
local _o
|
||||
_o = _o or {}
|
||||
setmetatable(_o, self)
|
||||
self.__index = self
|
||||
_o:InitComponent(gameObject)
|
||||
_o:BindEvent()
|
||||
_o.gameObject = gameObject
|
||||
_o.parent = parent
|
||||
return _o
|
||||
end
|
||||
|
||||
--- 初始化组件
|
||||
function UpperMonthCard:InitComponent(gameObject)
|
||||
--- Common Part
|
||||
self.Bg = Util.GetGameObject(gameObject, "bg"):GetComponent("Image")
|
||||
self.mask = Util.GetGameObject(gameObject, "Bg/mask"):GetComponent("Image")
|
||||
--初始化组件(用于子类重写)
|
||||
function UpperMonthCard:InitComponent()
|
||||
self.Bg = Util.GetGameObject(self.gameObject, "bg"):GetComponent("Image")
|
||||
self.mask = Util.GetGameObject(self.gameObject, "Bg/mask"):GetComponent("Image")
|
||||
|
||||
self.chargeType = Util.GetGameObject(gameObject, "Bg/payBack/type"):GetComponent("Image")
|
||||
self.btnPreview = Util.GetGameObject(gameObject, "Bg/previewRoot/btnPreview")
|
||||
self.valueIcon = Util.GetGameObject(gameObject, "Bg/previewRoot/Image/icon"):GetComponent("Image")
|
||||
self.totalValue = Util.GetGameObject(gameObject, "Bg/previewRoot/Image/value"):GetComponent("Text")
|
||||
self.valueMask = Util.GetGameObject(gameObject, "Bg/previewRoot/Image"):GetComponent("Image")
|
||||
self.chargeType = Util.GetGameObject(self.gameObject, "Bg/payBack/type"):GetComponent("Image")
|
||||
self.btnPreview = Util.GetGameObject(self.gameObject, "Bg/previewRoot/btnPreview")
|
||||
self.valueIcon = Util.GetGameObject(self.gameObject, "Bg/previewRoot/Image/icon"):GetComponent("Image")
|
||||
self.totalValue = Util.GetGameObject(self.gameObject, "Bg/previewRoot/Image/value"):GetComponent("Text")
|
||||
self.valueMask = Util.GetGameObject(self.gameObject, "Bg/previewRoot/Image"):GetComponent("Image")
|
||||
|
||||
--- 不同的充值行为显示部分
|
||||
self.middlePart = Util.GetGameObject(gameObject, "Bg/partDown/Bg")
|
||||
self.middlePart = Util.GetGameObject(self.gameObject, "Bg/partDown/Bg")
|
||||
self.titleImg = Util.GetGameObject(self.middlePart, "title"):GetComponent("Image")
|
||||
self.infoBg = Util.GetGameObject(self.middlePart, "middle"):GetComponent("Image")
|
||||
self.grid = Util.GetGameObject( self.middlePart, "middle/grid")
|
||||
|
@ -72,42 +68,53 @@ function UpperMonthCard:InitComponent(gameObject)
|
|||
|
||||
---- 奖励列表
|
||||
self.rewardList = {}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function UpperMonthCard:BindEvent()
|
||||
Util.AddClick(self.btnPreview, function()
|
||||
UIManager.OpenPanel(UIName.MonthRewardPreviewPopup, self.baseType, self.chargerBaseType)
|
||||
end)
|
||||
|
||||
Util.AddClick(self.btnBuy, function()
|
||||
|
||||
local isActive = VipManager.GetMonthCardOpenState()
|
||||
if not isActive then
|
||||
MsgPanel.ShowTwo(Language[11387], function()
|
||||
MsgPanel.ShowTwo("请先激活豪华月卡", function()
|
||||
end, function(isShow)
|
||||
JumpManager.GoJump(36004)
|
||||
end, Language[10731], Language[10019],nil, false)
|
||||
end, "取消", "前往",nil, false)
|
||||
else
|
||||
PayManager.Pay(self.baseType, function(id)
|
||||
self:RechargeSuccessFunc(id)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
function UpperMonthCard:AddEvent()
|
||||
end
|
||||
|
||||
function UpperMonthCard:RemoveEvent()
|
||||
-- --添加事件监听(用于子类重写)
|
||||
-- function UpperMonthCard:AddListener()
|
||||
|
||||
-- end
|
||||
|
||||
-- --移除事件监听(用于子类重写)
|
||||
-- function UpperMonthCard:RemoveListener()
|
||||
|
||||
-- end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function EveryDayGift:OnOpen(_activityConfig,_index,parent)
|
||||
self.actConfig = _activityConfig
|
||||
self.pageIndex = _index
|
||||
self.parent = parent
|
||||
end
|
||||
|
||||
function UpperMonthCard:OnShow(parentSorting, arg, pageIndex)
|
||||
self:AddEvent()
|
||||
self.panelType = pageIndex == 7 and 128 or 328
|
||||
-- 打开,重新打开时回调
|
||||
function UpperMonthCard:OnShow(_sortingOrder)
|
||||
self.gameObject:SetActive(true)
|
||||
sortingOrder = _sortingOrder
|
||||
self.actType = self.actConfig.ActId
|
||||
--- 鸡精类型
|
||||
self.chargerBaseType = pageIndex == 7 and GoodsTypeDef.MONTHCARD_128 or GoodsTypeDef.MONTHCARD_328
|
||||
self.chargerBaseType = ImgType[self.actType].chargerBaseType
|
||||
|
||||
--- 鸡精的商品ID
|
||||
-- 判断我是否购买过该商品
|
||||
|
@ -116,40 +123,19 @@ function UpperMonthCard:OnShow(parentSorting, arg, pageIndex)
|
|||
-- 没有购买过判断是否在活动期间
|
||||
local gift = OperatingManager.GetGiftGoodsInfo(self.chargerBaseType)
|
||||
if not gift then
|
||||
Log("错误:没有购买过,也没有在活动期间但是显示了基金活动界面")
|
||||
return
|
||||
end
|
||||
goodsId = gift.goodsId
|
||||
end
|
||||
|
||||
self.baseType = goodsId
|
||||
|
||||
|
||||
self.gameObject:SetActive(true)
|
||||
OperatingManager.SetSerData(self.chargerBaseType)
|
||||
self:SetPanelType(self.panelType)
|
||||
self:SetRewardInfo(self.panelType)
|
||||
self:SetPanelType(self.actType)
|
||||
self:SetRewardInfo(self.actType)
|
||||
self:SetBuyState()
|
||||
-- Log("鸡精类型 --- " .. self.panelType)
|
||||
|
||||
end
|
||||
|
||||
-- 充值成功回调
|
||||
function UpperMonthCard:RechargeSuccessFunc(id)
|
||||
FirstRechargeManager.RefreshAccumRechargeValue(id)
|
||||
OperatingManager.RefreshGiftGoodsBuyTimes(GoodsTypeDef.DemonCrystal, id)
|
||||
--- 设置购买成功数据
|
||||
OperatingManager.SetSignRewarDay(self.chargerBaseType, 438)
|
||||
local startTime = Today_N_OClockTimeStamp(0)
|
||||
OperatingManager.SetGoodsEndTime(self.baseType, startTime + 30 * 24 * 60 * 60 - 1)
|
||||
-- Today_N_OClockTimeStamp
|
||||
|
||||
--- 刷新本地显示
|
||||
self:FreshBoughtShow()
|
||||
|
||||
end
|
||||
|
||||
|
||||
--- 设置不同的显示界面
|
||||
function UpperMonthCard:SetPanelType(type)
|
||||
self.chargeType.sprite = Util.LoadSprite(ImgType[type].moneyTag)
|
||||
|
@ -164,14 +150,6 @@ function UpperMonthCard:SetPanelType(type)
|
|||
self.tipIcon.sprite = SetIcon(chargeConfig[self.baseType].RewardShow[1][1])
|
||||
self.totalValue.text = chargeConfig[self.baseType].RewardShow[1][2]
|
||||
self.charmyNum.text = " " .. chargeConfig[self.baseType].BaseReward[1][2]
|
||||
if GetCurLanguage() == 0 then
|
||||
self.chargeType.gameObject:GetComponent("RectTransform").anchoredPosition = Vector2.New(-30.5,-272.9)
|
||||
elseif GetCurLanguage() == 1 then
|
||||
self.chargeType.gameObject:GetComponent("RectTransform").anchoredPosition = Vector2.New(-30.5,-400)
|
||||
elseif GetCurLanguage() == 2 then
|
||||
self.chargeType.gameObject:GetComponent("RectTransform").anchoredPosition = Vector2.New(-30.5,-347)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- 设置不同界面的奖励信息
|
||||
|
@ -182,39 +160,21 @@ function UpperMonthCard:SetRewardInfo(type)
|
|||
self.rewardList[i] = {}
|
||||
self.rewardList[i].go = newObjToParent(self.itemPre, self.grid)
|
||||
self.rewardList[i].item = SubUIManager.Open(SubUIConfig.ItemView, self.rewardList[i].go.transform)
|
||||
--self.rewardList[i].name = Util.GetGameObject(self.rewardList[i].go, "name"):GetComponent("Text")
|
||||
Util.GetGameObject(self.rewardList[i].go, "name"):SetActive(false)
|
||||
end
|
||||
|
||||
local rewardData = data[i]
|
||||
self.rewardList[i].item:OnOpen(false, {rewardData[1],rewardData[2]}, 1.12, true)
|
||||
--self.rewardList[i].name.text = "第" .. data[i].Day .. "天"
|
||||
self.rewardList[i].item:OnOpen(false, {rewardData[1],rewardData[2]}, 1.12,true)
|
||||
end
|
||||
end
|
||||
|
||||
--- 购买成功刷新
|
||||
function UpperMonthCard:FreshBoughtShow()
|
||||
self.boughtPanel:SetActive(true)
|
||||
self.buyPanel:SetActive(false)
|
||||
self.totalLoginday.text = Language[11388] .. OperatingManager.GetRewardDay(self.chargerBaseType) .. Language[10017]
|
||||
local startStr, endStr = OperatingManager.GetShowTime(OperatingManager.GetGoodsEndTime(self.chargerBaseType))
|
||||
self.boughtLeftTime.text = Language[11389] ..startStr .. " — ".. endStr
|
||||
|
||||
end
|
||||
|
||||
--- 根据是否购买了显示信息
|
||||
function UpperMonthCard:SetBuyState()
|
||||
local isActive = VipManager.GetMonthCardOpenState()
|
||||
Log("豪华月卡是否激活 -- " .. tostring(isActive))
|
||||
local isBought = OperatingManager.IsBaseBuy(self.chargerBaseType)
|
||||
Log(self.panelType .. " 鸡精激活状态 -- " .. tostring(isBought))
|
||||
|
||||
|
||||
self.boughtPanel:SetActive(isBought)
|
||||
self.buyPanel:SetActive(not isBought)
|
||||
Util.SetGray(self.btnBuy, not isActive)
|
||||
-- self.textBuy.text = isActive and (self.panelType .. MoneyUtil.GetMoneyUnitName()) or (self.panelType .. MoneyUtil.GetMoneyUnitName())
|
||||
self.textBuy.text = isActive and (string.format(MoneyUtil.GetMoneyUnitName(),MoneyUtil.GetMoney(self.panelType))) or (string.format(MoneyUtil.GetMoneyUnitName(),MoneyUtil.GetMoney(self.panelType)))-- .. MoneyUtil.GetMoneyUnitName())
|
||||
self.textBuy.text = isActive and (string.format(MoneyUtil.GetMoneyUnitName(),MoneyUtil.GetMoney(chargeConfig[self.baseType].Price))) or (string.format(MoneyUtil.GetMoneyUnitName(),MoneyUtil.GetMoney(chargeConfig[self.baseType].Price)))-- .. MoneyUtil.GetMoneyUnitName())
|
||||
|
||||
if not isBought then
|
||||
self:SetBuyPanelInfo()
|
||||
|
@ -223,7 +183,6 @@ function UpperMonthCard:SetBuyState()
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
function UpperMonthCard:SetBuyPanelInfo()
|
||||
--- 未激活,在活动时间内
|
||||
local isOpen = OperatingManager.IsBaseOpen(self.chargerBaseType, self.baseType)
|
||||
|
@ -246,7 +205,7 @@ function UpperMonthCard:SetBuyPanelInfo()
|
|||
end
|
||||
end, 1, -1, true)
|
||||
self.buyTimer:Start()
|
||||
self.actLeftTime.text = Language[10573] .. self:TimeFormat(endTime - PlayerManager.serverTime)
|
||||
self.actLeftTime.text = "剩余时间: " .. self:TimeFormat(endTime - PlayerManager.serverTime)
|
||||
end
|
||||
else
|
||||
self.actLeftTime.gameObject:SetActive(false)
|
||||
|
@ -254,19 +213,11 @@ function UpperMonthCard:SetBuyPanelInfo()
|
|||
|
||||
end
|
||||
|
||||
function UpperMonthCard:TimeFormat(second)
|
||||
local day = math.floor(second / (24 * 3600))
|
||||
local minute = math.floor(second / 60) % 60
|
||||
local sec = second % 60
|
||||
local hour = math.floor(math.floor(second - day * 24 * 3600 - sec - minute * 60) / 3600)
|
||||
return string.format(Language[11390], day, hour, minute)
|
||||
end
|
||||
|
||||
function UpperMonthCard:SetBoughtPanelInfo()
|
||||
local endTime = OperatingManager.GetGoodsEndTime(self.chargerBaseType)
|
||||
self.totalLoginday.text = Language[11388] .. OperatingManager.GetRewardDay(self.chargerBaseType) .. Language[10017]
|
||||
self.totalLoginday.text = "当前天数:" .. OperatingManager.GetRewardDay(self.chargerBaseType) .. "天"
|
||||
local startStr, endStr = OperatingManager.GetShowTime(endTime)
|
||||
self.boughtLeftTime.text = Language[11389] ..startStr .. " — ".. endStr
|
||||
self.boughtLeftTime.text = "领取时间:" ..startStr .. " — ".. endStr
|
||||
|
||||
--- 购买后倒计时显示
|
||||
self.timer = nil
|
||||
|
@ -278,33 +229,54 @@ function UpperMonthCard:SetBoughtPanelInfo()
|
|||
self.timer:Stop()
|
||||
else
|
||||
OperatingManager.SetSerData(self.chargerBaseType)
|
||||
self.totalLoginday.text = Language[11388] .. OperatingManager.GetRewardDay(self.chargerBaseType) .. Language[10017]
|
||||
self.totalLoginday.text = "当前天数:" .. OperatingManager.GetRewardDay(self.chargerBaseType) .. "天"
|
||||
end
|
||||
end, 1, -1, true)
|
||||
self.timer:Start()
|
||||
|
||||
|
||||
end
|
||||
|
||||
-- 充值成功回调
|
||||
function UpperMonthCard:RechargeSuccessFunc(id)
|
||||
FirstRechargeManager.RefreshAccumRechargeValue(id)
|
||||
OperatingManager.RefreshGiftGoodsBuyTimes(GoodsTypeDef.DemonCrystal, id)
|
||||
--- 设置购买成功数据
|
||||
OperatingManager.SetSignRewarDay(self.chargerBaseType, 438)
|
||||
local startTime = Today_N_OClockTimeStamp(0)
|
||||
OperatingManager.SetGoodsEndTime(self.baseType, startTime + 30 * 24 * 60 * 60 - 1)
|
||||
-- Today_N_OClockTimeStamp
|
||||
|
||||
function UpperMonthCard:OnHide()
|
||||
-- Log(" UpperMonthCard:OnHide()")
|
||||
--- 刷新本地显示
|
||||
self:FreshBoughtShow()
|
||||
end
|
||||
|
||||
--- 购买成功刷新
|
||||
function UpperMonthCard:FreshBoughtShow()
|
||||
self.boughtPanel:SetActive(true)
|
||||
self.buyPanel:SetActive(false)
|
||||
self.totalLoginday.text = "当前天数:" .. OperatingManager.GetRewardDay(self.chargerBaseType) .. "天"
|
||||
local startStr, endStr = OperatingManager.GetShowTime(OperatingManager.GetGoodsEndTime(self.chargerBaseType))
|
||||
self.boughtLeftTime.text = "领取时间:" ..startStr .. " — ".. endStr
|
||||
|
||||
end
|
||||
|
||||
function UpperMonthCard:TimeFormat(second)
|
||||
local day = math.floor(second / (24 * 3600))
|
||||
local minute = math.floor(second / 60) % 60
|
||||
local sec = second % 60
|
||||
local hour = math.floor(math.floor(second - day * 24 * 3600 - sec - minute * 60) / 3600)
|
||||
return string.format("%d天%02d时%02d分", day, hour, minute)
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function UpperMonthCard:OnClose()
|
||||
self.gameObject:SetActive(false)
|
||||
self:RemoveEvent()
|
||||
if self.timer then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
|
||||
if self.buyTimer then
|
||||
self.buyTimer:Stop()
|
||||
self.buyTimer = nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function UpperMonthCard:OnDestroy()
|
||||
for k,v in pairs(self.rewardList) do
|
||||
SubUIManager.Close(v.item)
|
||||
end
|
||||
Util.ClearChild(self.grid.transform)
|
||||
self.rewardList = {}
|
||||
end
|
||||
return UpperMonthCard
|
|
@ -249,7 +249,7 @@ local jumpDic = {
|
|||
[JumpType.RechargeStore] = function(data)--充值商店
|
||||
--PopupTipPanel.ShowTip("商店未开启")
|
||||
-- UIManager.OpenPanel(UIName.MainShopPanel,data[1])
|
||||
UIManager.OpenPanel(UIName.MainRechargePanel, 1)
|
||||
JumpManager.GoJump(36008)
|
||||
end,
|
||||
[JumpType.DatTask] = function(data)--日常任务
|
||||
local openPanle = UIManager.OpenPanel(UIName.MissionDailyPanel)
|
||||
|
@ -295,10 +295,10 @@ local jumpDic = {
|
|||
end
|
||||
end,
|
||||
[JumpType.recharge] = function(data)--充值
|
||||
UIManager.OpenPanel(UIName.ActivityMainPanel, JumpType.recharge, data[1])
|
||||
this.JumpActivity(JumpType.recharge,data[1])
|
||||
end,
|
||||
[JumpType.Welfare] = function(data)--福利
|
||||
UIManager.OpenPanel(UIName.ActivityMainPanel, JumpType.Welfare, data[1])
|
||||
this.JumpActivity(JumpType.Welfare,data[1])
|
||||
end,
|
||||
[JumpType.Expert] = function(data)--限时活动
|
||||
if data and data[1] then
|
||||
|
@ -630,6 +630,25 @@ local jumpDic = {
|
|||
end,
|
||||
}
|
||||
|
||||
function this.JumpActivity(data,skipfactor)
|
||||
if UIManager.IsTopShow(UIName.ActivityMainPanel) then
|
||||
UIManager.ClosePanel(UIName.ActivityMainPanel)
|
||||
end
|
||||
DynamicActivityManager.AddUIList(this.jumpId)
|
||||
UIManager.OpenPanel(UIName.ActivityMainPanel,data,skipfactor)
|
||||
end
|
||||
-- function this.GetTip(openType,openValue)
|
||||
-- if openType == 1 then
|
||||
-- if not FightPointPassManager.IsFightPointPass(openValue) then
|
||||
-- local fightConfig = ConfigManager.GetConfigData(ConfigName.MainLevelConfig, openValue)
|
||||
-- return string.format("通关%s关卡解锁", fightConfig.Name)
|
||||
-- end
|
||||
-- elseif openType == 2 then
|
||||
-- if PlayerManager.level < openValue then
|
||||
-- return string.format("玩家%s级后开放", openValue)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
function this.CheckJump(_jumpId)
|
||||
local jumpSData = JumpConfig[_jumpId]
|
||||
if jumpSData.Type < 10000 then
|
||||
|
@ -651,6 +670,7 @@ function this.GoJumpWithoutTip(_jumpId)
|
|||
end
|
||||
|
||||
function this.GoJump(_jumpId,fun)
|
||||
this.jumpId = _jumpId
|
||||
local jumpSData = JumpConfig[_jumpId]
|
||||
if jumpSData then
|
||||
if jumpSData.Type < 10000 then
|
||||
|
|
|
@ -85,7 +85,7 @@ end
|
|||
function EveryDayGift:OnShow(_sortingOrder)
|
||||
self.gameObject:SetActive(true)
|
||||
self.sortingOrder = _sortingOrder
|
||||
|
||||
self.extra:SetActive(true)
|
||||
self.actId = self.actConfig.ActId
|
||||
self.actType = self.actConfig.ActiveType
|
||||
if self.actConfig.IfBack == 1 then
|
||||
|
|
|
@ -183,7 +183,7 @@ function TreasureOfSomebodyRewardPageV2:OnDealBtnClicked()
|
|||
PopupTipPanel.ShowTip(Language[10422])
|
||||
return
|
||||
end
|
||||
UIManager.OpenPanel(UIName.MainRechargePanel, 1)
|
||||
JumpManager.GoJump(36008)
|
||||
else
|
||||
NetManager.BuyTreasureOfSomeBody()
|
||||
end
|
||||
|
|
|
@ -50,7 +50,7 @@ end
|
|||
|
||||
function UnlockExtraRewardPanel:OnDealBtnClicked()
|
||||
-- if not self.enoughStatus then
|
||||
-- UIManager.OpenPanel(UIName.MainRechargePanel, 1)
|
||||
-- JumpManager.GoJump(36008)
|
||||
-- return
|
||||
-- end
|
||||
-- local gameSettingConfig = ConfigManager.GetConfigData(ConfigName.GameSetting, 1)
|
||||
|
|
|
@ -320,7 +320,7 @@ function UpView:RechargeType(_type)
|
|||
PopupTipPanel.ShowTip(Language[10422])
|
||||
return
|
||||
end
|
||||
UIManager.OpenPanel(UIName.MainRechargePanel, 1)
|
||||
JumpManager.GoJump(36008)
|
||||
elseif _type == UpViewRechargeType.SoulCrystal then
|
||||
-- 充值商店
|
||||
if not MapManager.Mapping then
|
||||
|
@ -328,7 +328,7 @@ function UpView:RechargeType(_type)
|
|||
PopupTipPanel.ShowTip(Language[10422])
|
||||
return
|
||||
end
|
||||
UIManager.OpenPanel(UIName.MainRechargePanel, 1)
|
||||
JumpManager.GoJump(36008)
|
||||
end
|
||||
elseif _type == UpViewRechargeType.YeQiuQuan then--跳限时商市
|
||||
UIManager.OpenPanel(UIName.DynamicActivityPanel,ActivityTypeDef.DynamicAct_TimeLimitShop)
|
||||
|
|
Loading…
Reference in New Issue