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