TCX_LongZhu
parent
03579e1c48
commit
eceabf4ae8
|
|
@ -208,6 +208,7 @@ function FirstRechargePanel:OnShow()
|
|||
local money = activityRewardConfig[missInfo.missionId].Values[1][1]
|
||||
--LogError("money===="..money)
|
||||
--local index = FirstRechargeManager.GetFirstRechargeIndexByMoney(money)
|
||||
LogError("ddddddddddddddddddddddddddddddddd"..tostring(money))
|
||||
local index = FirstRechargeManager.GetFirstRechargeIndexByMoney(money)
|
||||
if not _MoneyDataNum[index] then
|
||||
_MoneyDataNum[index] = {}
|
||||
|
|
@ -309,7 +310,7 @@ function FirstRechargePanel:OnTabChanged(index)
|
|||
for _, missInfo in ipairs(tempData) do
|
||||
if missInfo and missInfo.progress and activityRewardConfig[missInfo.missionId].Values[1][1] == money then
|
||||
AccumRecharge = missInfo.progress
|
||||
LogError("missionInfo.state==" .. missInfo.state)
|
||||
LogError("missionInfo.state==" ..tostring(missInfo.missionId).."/".. missInfo.state..""..tostring(money))
|
||||
-- if AccumRecharge >= activityRewardConfig[missInfo.missionId].Values[1][1] then
|
||||
-- local day = GetTimePass(FirstRechargeManager.GetRechargeTime())--FirstRechargeManager.GetRechargeTime()
|
||||
-- if missInfo.state ~= 1 and activityRewardConfig[missInfo.missionId].Values[1][2] <= day then
|
||||
|
|
@ -350,7 +351,7 @@ end
|
|||
|
||||
function FirstRechargePanel:ShowContent(index)
|
||||
local tempData = {}
|
||||
LogError("sssssssssssssssssssssssssssss" .. tostring(index))
|
||||
--LogError("sssssssssssssssssssssssssssss" .. tostring(index))
|
||||
for _, missionInfo in ipairs(_MoneyDataNum[index]) do
|
||||
table.insert(tempData, activityRewardConfig[missionInfo.missionId])
|
||||
end
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ end
|
|||
local ActTypeConfigList = {} -- 做一个缓存避免重复遍历表数据
|
||||
function this.GetTableDataByTypeId(typeId)
|
||||
if not ActTypeConfigList[typeId] then
|
||||
LogError("ffffffffffffffffffffffffff"..tostring(typeId))
|
||||
ActTypeConfigList[typeId] = ConfigManager.GetAllConfigsDataByKey(ConfigName.GlobalSystemConfig, "IsIDdSame", typeId)
|
||||
end
|
||||
return ActTypeConfigList[typeId]
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ local LoginRoot_Channel = ServerConfigManager.GetVersionInfo("channel")
|
|||
local LoginRoot_Version = ServerConfigManager.GetVersionInfo("version")
|
||||
local LoginRoot_PackageVersion = ServerConfigManager.GetVersionInfo("packageVersion")
|
||||
local LoginRoot_NoticeChannel = ServerConfigManager.GetSettingValue(ServerConfigManager.SettingConfig.NOTICE_CHANNEL) or
|
||||
""
|
||||
""
|
||||
local LoginRoot_UserChannel = ServerConfigManager.GetSettingValue(ServerConfigManager.SettingConfig.USER_CHANNEL) or ""
|
||||
local orginLayer
|
||||
local IsUserProtoActive = ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.USER_PROTO)
|
||||
|
|
@ -181,7 +181,7 @@ function this:BindEvent()
|
|||
LoginManager.state = list.state
|
||||
--local severArea = tonumber(string.sub(list.server_id, 0, -5))
|
||||
this.serverMes.text = PlayerManager.serverInfo
|
||||
.name -- .. "\t<color=#56F384FF>" .. severArea .. "</color>" .. Language[11138]
|
||||
.name -- .. "\t<color=#56F384FF>" .. severArea .. "</color>" .. Language[11138]
|
||||
end
|
||||
})
|
||||
end)
|
||||
|
|
@ -389,7 +389,7 @@ function this.ShowNotice()
|
|||
end
|
||||
]]
|
||||
local url = LoginRoot_Url ..
|
||||
"jl_loginserver/getNotice?timestamp=" .. timeStamp .. "&sign=" .. timeSign .. "&packageName=" .. noticeChannel
|
||||
"jl_loginserver/getNotice?timestamp=" .. timeStamp .. "&sign=" .. timeSign .. "&packageName=" .. noticeChannel
|
||||
HttpManager:SendGetHttp(url, function(str)
|
||||
UIManager.OpenPanel(UIName.NoticePopup, str)
|
||||
end, nil, nil, nil)
|
||||
|
|
@ -630,7 +630,7 @@ function this.SetServerList(data)
|
|||
end
|
||||
end
|
||||
end
|
||||
LogError("=================="..tostring(#this.serverList))
|
||||
LogError("==================" .. tostring(#this.serverList))
|
||||
PlayerManager.serverInfo = this.serverList[lastIndex]
|
||||
LoginManager.SocketAddress = this.serverList[lastIndex].ip
|
||||
LoginManager.SocketPort = tonumber(this.serverList[lastIndex].port)
|
||||
|
|
@ -639,7 +639,7 @@ function this.SetServerList(data)
|
|||
|
||||
--local severArea = tonumber(string.sub(this.serverList[lastIndex].server_id, 0, -5))
|
||||
this.serverMes.text = PlayerManager.serverInfo
|
||||
.name -- .. "\t<color=#56F384FF>" .. severArea .. "</color>" .. Language[11138]
|
||||
.name -- .. "\t<color=#56F384FF>" .. severArea .. "</color>" .. Language[11138]
|
||||
|
||||
RequestPanel.Hide()
|
||||
end
|
||||
|
|
@ -672,84 +672,87 @@ end
|
|||
--登录进主界面之前需要依次请求玩家数据,物品数据,装备数据,英雄数据,编队数据,任务数据, 异妖数据,工坊数据, 冒险数据
|
||||
function this.ExecuteLoading()
|
||||
local requestList = {
|
||||
--[[[1] = ]] function() NetManager.PlayerInfoRequest(LoadingPanel.OnStep) end, -- 基础信息
|
||||
--[[[2] = ]] function() NetManager.GetComparenumInfoRequest(LoadingPanel.OnStep) end, -- 数字游戏信息
|
||||
--[[[2] = ]] function() NetManager.RequestMission(LoadingPanel.OnStep) end, -- 任务信息
|
||||
--[[[3] = ]] function() NetManager.ItemInfoRequest(0, LoadingPanel.OnStep) end, -- 物品信息
|
||||
--[[[1] = ]] function() NetManager.PlayerInfoRequest(LoadingPanel.OnStep) end, -- 基础信息
|
||||
--[[[2] = ]] function() NetManager.GetComparenumInfoRequest(LoadingPanel.OnStep) end, -- 数字游戏信息
|
||||
--[[[2] = ]] function() NetManager.RequestMission(LoadingPanel.OnStep) end, -- 任务信息
|
||||
--[[[3] = ]] function() NetManager.ItemInfoRequest(0, LoadingPanel.OnStep) end, -- 物品信息
|
||||
-- [[[4] = ]]function() NetManager.AllEquipRequest(0, LoadingPanel.OnStep) end, -- 装备(走背包了)
|
||||
--[[[4] = ]] function() NetManager.AllEquipTreasureRequest(0, LoadingPanel.OnStep) end, -- 宝物
|
||||
--[[[5] = ]] function() NetManager.GetAllFaXiangRequest(1, LoadingPanel.OnStep) end, -- 法相
|
||||
--[[[4] = ]] function() NetManager.AllEquipTreasureRequest(0, LoadingPanel.OnStep) end, -- 宝物
|
||||
--[[[5] = ]] function() NetManager.GetAllFaXiangRequest(1, LoadingPanel.OnStep) end, -- 法相
|
||||
-- [[[6] = ]]function() NetManager.GetSoulPrintDataRequest(0, LoadingPanel.OnStep) end, -- 魂印(走背包了)
|
||||
--[[[7] = ]] function() NetManager.DiffMonsterRequest(0, LoadingPanel.OnStep) end, -- 异妖
|
||||
--[[[8] = ]] function() NetManager.HeroInfoRequest(0, LoadingPanel.OnStep) end, -- 神将信息
|
||||
--[[[9] = ]] function() NetManager.TeamInfoRequest(LoadingPanel.OnStep) end, -- 编队
|
||||
--[[[10] =]] function() NetManager.GetAllMailData(LoadingPanel.OnStep) end, -- 邮件
|
||||
--[[[11] =]] function() NetManager.GetAllFightDataRequest(LoadingPanel.OnStep) end, -- 关卡信息
|
||||
--[[[12] =]] function() NetManager.GetActivityAllRewardRequest(LoadingPanel.OnStep) end, -- 活动奖励
|
||||
--[[[14] =]] function() ShopManager.InitData(LoadingPanel.OnStep) end, -- 商店
|
||||
--[[[7] = ]] function() NetManager.DiffMonsterRequest(0, LoadingPanel.OnStep) end, -- 异妖
|
||||
--[[[8] = ]] function() NetManager.HeroInfoRequest(0, LoadingPanel.OnStep) end, -- 神将信息
|
||||
--[[[9] = ]] function() NetManager.TeamInfoRequest(LoadingPanel.OnStep) end, -- 编队
|
||||
--[[[10] =]] function() NetManager.GetAllMailData(LoadingPanel.OnStep) end, -- 邮件
|
||||
--[[[11] =]] function() NetManager.GetAllFightDataRequest(LoadingPanel.OnStep) end, -- 关卡信息
|
||||
--[[[12] =]] function() NetManager.GetActivityAllRewardRequest(LoadingPanel.OnStep) end, -- 活动奖励
|
||||
--[[[14] =]] function() ShopManager.InitData(LoadingPanel.OnStep) end, -- 商店
|
||||
--function() NetManager.GetWorkShopInfoRequest(LoadingPanel.OnStep) end, -- 工坊?
|
||||
--[[[15] =]] function() ChatManager.InitData(LoadingPanel.OnStep) end, -- 聊天
|
||||
--[[[16] =]] function() NetManager.GetAllFunState(LoadingPanel.OnStep) end, -- 功能开启信息
|
||||
--[[[17] =]] function() NetManager.RequestGetFriendInfo(1, LoadingPanel.OnStep) end, -- 好友
|
||||
--[[[18] =]] function() NetManager.RequestGetFriendInfo(2, LoadingPanel.OnStep) end, -- 好友申请
|
||||
--[[[19] =]] function() NetManager.RequestGetFriendInfo(3, LoadingPanel.OnStep) end, -- 好友搜索
|
||||
--[[[20] =]] function() NetManager.RequestGetFriendInfo(4, LoadingPanel.OnStep) end, -- 黑名单
|
||||
--[[[21] =]] function() FriendChatManager.InitData(LoadingPanel.OnStep) end, -- 好友消息
|
||||
--[[[22] =]] function() MyGuildManager.InitBaseData(LoadingPanel.OnStep) end, -- 公会信息
|
||||
--[[[15] =]] function() ChatManager.InitData(LoadingPanel.OnStep) end, -- 聊天
|
||||
--[[[16] =]] function() NetManager.GetAllFunState(LoadingPanel.OnStep) end, -- 功能开启信息
|
||||
--[[[17] =]] function() NetManager.RequestGetFriendInfo(1, LoadingPanel.OnStep) end, -- 好友
|
||||
--[[[18] =]] function() NetManager.RequestGetFriendInfo(2, LoadingPanel.OnStep) end, -- 好友申请
|
||||
--[[[19] =]] function() NetManager.RequestGetFriendInfo(3, LoadingPanel.OnStep) end, -- 好友搜索
|
||||
--[[[20] =]] function() NetManager.RequestGetFriendInfo(4, LoadingPanel.OnStep) end, -- 黑名单
|
||||
--[[[21] =]] function() FriendChatManager.InitData(LoadingPanel.OnStep) end, -- 好友消息
|
||||
--[[[22] =]] function() MyGuildManager.InitBaseData(LoadingPanel.OnStep) end, -- 公会信息
|
||||
--function() GuildFightManager.InitBaseData(LoadingPanel.OnStep) end, -- 公会战
|
||||
--[[[23] =]] function() NetManager.GetAllGuildSkillData(LoadingPanel.OnStep) end, -- 公会技能
|
||||
--[[[24] =]] function() NetManager.InitFightPointLevelInfo(LoadingPanel.OnStep) end, -- 关卡
|
||||
--[[[23] =]] function() NetManager.GetAllGuildSkillData(LoadingPanel.OnStep) end, -- 公会技能
|
||||
--[[[24] =]] function() NetManager.InitFightPointLevelInfo(LoadingPanel.OnStep) end, -- 关卡
|
||||
--[[[25] =]] function() NetManager.GetExpeditionRequest(ExpeditionManager.expeditionLeve, LoadingPanel.OnStep) end, -- 大闹天宫
|
||||
--[[[26] =]] function() NetManager.GuildHelpGetAllRequest(LoadingPanel.OnStep) end, -- 公会援助
|
||||
--[[[27] =]] function() DeathPosManager.InitData(LoadingPanel.OnStep) end, -- 十绝阵
|
||||
--[[[28] =]] function() NetManager.TreasureOfHeavenScoreRequest(LoadingPanel.OnStep) end, -- 天宫秘宝积分
|
||||
--[[[29] =]] function() NetManager.RankFirstRequest({ 3, 22, 20, 4, 21 }, { 0, 0, 0, 0, 20 }, LoadingPanel
|
||||
.OnStep) end, -- 排行榜数据
|
||||
--[[[30] =]] function() NetManager.GetSituationInfoRequest(LoadingPanel.OnStep) end, --轩辕宝镜
|
||||
--[[[31] =]] function() NetManager.RefreshTimeSLRequest(LoadingPanel.OnStep) end, --青龙秘宝倒计时
|
||||
--[[[32] =]] function() HeroManager.CheckRepeatTreasure(LoadingPanel.OnStep) end, --检测所有重复穿戴的宝器并卸下
|
||||
--[[[33] =]] function() XiaoYaoManager.GetOpenMapData(LoadingPanel.OnStep) end, --逍遥游
|
||||
--[[[34] =]] function() NetManager.GetHeroSkinData(LoadingPanel.OnStep) end, --皮肤
|
||||
--[[[35] =]] function() NetManager.GetFourElementGetInfo(LoadingPanel.OnStep) end, --四灵试炼
|
||||
--[[[35] =]] function() NetManager.GetChallengeCopyInfo(LoadingPanel.OnStep) end, --修行挑战
|
||||
--[[[36] =]] function() MonsterCampManager.SetMyHelpHeroData(nil, nil, LoadingPanel.OnStep) end, --助战神将
|
||||
--[[[37] =]] function() NetManager.HongMengInfoResponse(LoadingPanel.OnStep) end, --鸿蒙阵
|
||||
--[[[38] =]] function() NetManager.AllBookEnableResponse(LoadingPanel.OnStep) end, --天枢密卷
|
||||
--[[[39] =]] function() NetManager.AllEndLessHeroDataResponse(0, LoadingPanel.OnStep) end, --无尽英雄数据
|
||||
--[[[40] =]] function() NetManager.GetEndlessTreasureInfoResponse(LoadingPanel.OnStep) end, --无尽密保
|
||||
--[[[41] =]] function() MyGuildManager.ReuqsetRedPackage(LoadingPanel.OnStep) end, --请求红包
|
||||
--[[[42] =]] function() NetManager.HardStageRequest(LoadingPanel.OnStep) end, --山河社稷图
|
||||
--[[[43] =]] function() NetManager.VipLevelStateRequset(LoadingPanel.OnStep) end, --vip
|
||||
--[[[26] =]] function() NetManager.GuildHelpGetAllRequest(LoadingPanel.OnStep) end, -- 公会援助
|
||||
--[[[27] =]] function() DeathPosManager.InitData(LoadingPanel.OnStep) end, -- 十绝阵
|
||||
--[[[28] =]] function() NetManager.TreasureOfHeavenScoreRequest(LoadingPanel.OnStep) end, -- 天宫秘宝积分
|
||||
--[[[29] =]] function()
|
||||
NetManager.RankFirstRequest({ 3, 22, 20, 4, 21 }, { 0, 0, 0, 0, 20 }, LoadingPanel
|
||||
.OnStep)
|
||||
end, -- 排行榜数据
|
||||
--[[[30] =]] function() NetManager.GetSituationInfoRequest(LoadingPanel.OnStep) end, --轩辕宝镜
|
||||
--[[[31] =]] function() NetManager.RefreshTimeSLRequest(LoadingPanel.OnStep) end, --青龙秘宝倒计时
|
||||
--[[[32] =]] function() HeroManager.CheckRepeatTreasure(LoadingPanel.OnStep) end, --检测所有重复穿戴的宝器并卸下
|
||||
--[[[33] =]] function() XiaoYaoManager.GetOpenMapData(LoadingPanel.OnStep) end, --逍遥游
|
||||
--[[[34] =]] function() NetManager.GetHeroSkinData(LoadingPanel.OnStep) end, --皮肤
|
||||
--[[[35] =]] function() NetManager.GetFourElementGetInfo(LoadingPanel.OnStep) end, --四灵试炼
|
||||
--[[[35] =]] function() NetManager.GetChallengeCopyInfo(LoadingPanel.OnStep) end, --修行挑战
|
||||
--[[[36] =]] function() MonsterCampManager.SetMyHelpHeroData(nil, nil, LoadingPanel.OnStep) end, --助战神将
|
||||
--[[[37] =]] function() NetManager.HongMengInfoResponse(LoadingPanel.OnStep) end, --鸿蒙阵
|
||||
--[[[38] =]] function() NetManager.AllBookEnableResponse(LoadingPanel.OnStep) end, --天枢密卷
|
||||
--[[[39] =]] function() NetManager.AllEndLessHeroDataResponse(0, LoadingPanel.OnStep) end, --无尽英雄数据
|
||||
--[[[40] =]] function() NetManager.GetEndlessTreasureInfoResponse(LoadingPanel.OnStep) end, --无尽密保
|
||||
--[[[41] =]] function() MyGuildManager.ReuqsetRedPackage(LoadingPanel.OnStep) end, --请求红包
|
||||
--[[[42] =]] function() NetManager.HardStageRequest(LoadingPanel.OnStep) end, --山河社稷图
|
||||
--[[[43] =]] function() NetManager.VipLevelStateRequset(LoadingPanel.OnStep) end, --vip
|
||||
--function() JumpServerManager.LoginGetWorldArenaInfoRequest(LoadingPanel.OnStep) end,--跨服天梯
|
||||
--[[[44] =]] function() NetManager.RequestRedPacketData(LoadingPanel.OnStep) end, --福利红包
|
||||
--[[[45] =]] function() NetManager.BeautyBagWishEquipRequest(nil, LoadingPanel.OnStep) end, --心愿魂印
|
||||
--[[[46] =]] function() LingLongBaoJingManager.InitData(LoadingPanel.OnStep) end, --玲珑宝镜
|
||||
--[[[47] =]] function() NetManager.IsCrossRequert(LoadingPanel.OnStep) end, --跨服
|
||||
--[[[48] =]] function() NetManager.TaiChuSecretvolumeRequest(LoadingPanel.OnStep) end, --太初密卷
|
||||
--[[[49] =]] function() NetManager.CrossYuXuLunDaoGetInfoRequest(2, LoadingPanel.OnStep) end, --玉虚论道红点
|
||||
--[[[50] =]] function() NetManager.GetLikeableDataRequest(LoadingPanel.OnStep) end, --好感度
|
||||
--[[[51] =]] function() NetManager.GetTransformationRequest(LoadingPanel.OnStep) end, --身外化身
|
||||
--[[[52] =]] function() NetManager.GetLingMaiInfoRequest(0, LoadingPanel.OnStep) end, --灵脉秘境
|
||||
--[[[53] =]] function() NetManager.SendGetTailsmanSoulData(LoadingPanel.OnStep) end, --法宝之灵
|
||||
--[[[54] =]] --function() NetManager.RequestArenaRankData(1,LoadingPanel.OnStep) end, --获取竞技场数据
|
||||
--[[[55] =]] function() HomeLandManager.GetData(LoadingPanel.OnStep) end, --家园获取数据
|
||||
--[[[56] =]] function() NetManager.ExplorerMapInfoRequest(LoadingPanel.OnStep) end, --灵脉秘境
|
||||
--[[[57] =]] function() CommonActPageManager.GetPowerRicePower(LoadingPanel.OnStep) end, --战力冲刺
|
||||
--[[[58] =]] function() NetManager.RequestMagicSoldierInfo(LoadingPanel.OnStep) end, --神兵
|
||||
--[[[59] =]] function() NetManager.GemNewInfoRequest(LoadingPanel.OnStep) end, --新命石
|
||||
--[[[60] =]] function() NetManager.BaublesAllInfoRequest(LoadingPanel.OnStep) end, --新法宝
|
||||
--[[[61] =]] function() NetManager.TrainingArchitectureInfoRequest(LoadingPanel.OnStep) end, --特训信息
|
||||
--[[[62] =]] function() NetManager.NewArenaResetRequest(LoadingPanel.OnStep) end, -- 竞技场
|
||||
--[[[63] =]] function() NetManager.GetNewArenaInfoRequest(LoadingPanel.OnStep) end, -- 竞技场
|
||||
--[[[44] =]] function() NetManager.RequestRedPacketData(LoadingPanel.OnStep) end, --福利红包
|
||||
--[[[45] =]] function() NetManager.BeautyBagWishEquipRequest(nil, LoadingPanel.OnStep) end, --心愿魂印
|
||||
--[[[46] =]] function() LingLongBaoJingManager.InitData(LoadingPanel.OnStep) end, --玲珑宝镜
|
||||
--[[[47] =]] function() NetManager.IsCrossRequert(LoadingPanel.OnStep) end, --跨服
|
||||
--[[[48] =]] function() NetManager.TaiChuSecretvolumeRequest(LoadingPanel.OnStep) end, --太初密卷
|
||||
--[[[49] =]] function() NetManager.CrossYuXuLunDaoGetInfoRequest(2, LoadingPanel.OnStep) end, --玉虚论道红点
|
||||
--[[[50] =]] function() NetManager.GetLikeableDataRequest(LoadingPanel.OnStep) end, --好感度
|
||||
--[[[51] =]] function() NetManager.GetTransformationRequest(LoadingPanel.OnStep) end, --身外化身
|
||||
--[[[52] =]] function() NetManager.GetLingMaiInfoRequest(0, LoadingPanel.OnStep) end, --灵脉秘境
|
||||
--[[[53] =]] function() NetManager.SendGetTailsmanSoulData(LoadingPanel.OnStep) end, --法宝之灵
|
||||
--[[[54] =]] --function() NetManager.RequestArenaRankData(1,LoadingPanel.OnStep) end, --获取竞技场数据
|
||||
--[[[55] =]] function() HomeLandManager.GetData(LoadingPanel.OnStep) end, --家园获取数据
|
||||
--[[[56] =]] function() NetManager.ExplorerMapInfoRequest(LoadingPanel.OnStep) end, --灵脉秘境
|
||||
--[[[57] =]] function() CommonActPageManager.GetPowerRicePower(LoadingPanel.OnStep) end, --战力冲刺
|
||||
--[[[58] =]] function() NetManager.RequestMagicSoldierInfo(LoadingPanel.OnStep) end, --神兵
|
||||
--[[[59] =]] function() NetManager.GemNewInfoRequest(LoadingPanel.OnStep) end, --新命石
|
||||
--[[[60] =]] function() NetManager.BaublesAllInfoRequest(LoadingPanel.OnStep) end, --新法宝
|
||||
--[[[61] =]] function() NetManager.TrainingArchitectureInfoRequest(LoadingPanel.OnStep) end, --特训信息
|
||||
--[[[62] =]] function() NetManager.NewArenaResetRequest(LoadingPanel.OnStep) end, -- 竞技场
|
||||
--[[[63] =]] function() NetManager.GetNewArenaInfoRequest(LoadingPanel.OnStep) end, -- 竞技场
|
||||
function() NetManager.QueryLuofuRegisterInfoRequest(LoadingPanel.OnStep) end,
|
||||
function() JumpServerManager.LoginGetWorldArenaInfoRequest(LoadingPanel.OnStep) end, --跨服天梯
|
||||
function() -- 登录请求最终接口,所有请求放在此接口之前
|
||||
function() JumpServerManager.LoginGetWorldArenaInfoRequest(LoadingPanel.OnStep) end, --跨服天梯
|
||||
function() -- 登录请求最终接口,所有请求放在此接口之前
|
||||
-- 登录成功确认
|
||||
NetManager.LoginConfimRequest()
|
||||
-- 登录时初始化主界面竖条显示为打开状态
|
||||
PlayerPrefs.SetInt(PlayerManager.uid .. "MainRightBarSetting", 1)
|
||||
if AppConst.isGuide then
|
||||
if GuideManager.GetCurId(GuideType.Force) == 1 and PlayerManager.nickName == tostring(PlayerManager.uid) and PlayerManager.level == 1 then
|
||||
local data = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig, 161)
|
||||
if data.IsOpen == 1 and GuideManager.GetCurId(GuideType.Force) == 1 and PlayerManager.nickName == tostring(PlayerManager.uid) and PlayerManager.level == 1 then
|
||||
-- 新的引导
|
||||
-- StoryManager.EventTrigger(300001)
|
||||
--创号阶段先进入剧情对话,进入假战斗,然后对话起名,最后进入主界面
|
||||
|
|
@ -874,7 +877,7 @@ function this.RequestHttpLogin()
|
|||
.. "&platform=" .. Platform
|
||||
.. "&channel=" .. user_channel
|
||||
.. "&sub_channel=" .. LoginRoot_SubChannel
|
||||
.. "&pid=" .. AppConst.SdkChannel --LoginManager.pt_pId
|
||||
.. "&pid=" .. AppConst.SdkChannel --LoginManager.pt_pId
|
||||
.. "&gid=" .. AppConst.SdkPackageName --LoginManager.pt_gId
|
||||
.. "&version=" .. LoginRoot_PackageVersion
|
||||
.. "&timeStamp=" .. LoginManager.SdkLoginTimeStamp
|
||||
|
|
|
|||
|
|
@ -2,30 +2,30 @@ require("Base/BasePanel")
|
|||
local WeekCardPanel = Inherit(BasePanel)
|
||||
local sortingOrder = 0
|
||||
local _WeekcardConfig = ConfigManager.GetConfig(ConfigName.WeekcardConfig)
|
||||
local weekReward=ConfigManager.GetConfig(ConfigName.WeekRewardConfig)
|
||||
local weekReward = ConfigManager.GetConfig(ConfigName.WeekRewardConfig)
|
||||
local _ItemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||
local _RechargeCommodityConfig = ConfigManager.GetConfig(ConfigName.RechargeCommodityConfig)
|
||||
local weekcardR=nil
|
||||
local weekcardR = nil
|
||||
--初始化组件(用于子类重写)
|
||||
function WeekCardPanel:InitComponent()
|
||||
self.spLoader = SpriteLoader.New()
|
||||
self.grid = Util.GetGameObject(self.gameObject, "grid")
|
||||
self.cardPres = {}
|
||||
self.timerList = {}
|
||||
self.tabs={}
|
||||
self.selectObj=Util.GetGameObject(self.gameObject, "selectObj")
|
||||
self.selectTxt=Util.GetGameObject(self.gameObject, "selectObj/Text"):GetComponent("Text")
|
||||
self.info1=Util.GetGameObject(self.gameObject, "info1"):GetComponent("Text")
|
||||
self.info2=Util.GetGameObject(self.gameObject, "info2"):GetComponent("Text")
|
||||
self.info1.text="·购买后可领取活动前期累计奖励 及 后续奖励"
|
||||
self.info2.text="·每日0点刷新,奖励可累计领取"
|
||||
self.titleImg=Util.GetGameObject(self.gameObject, "titleImg"):GetComponent("Image")
|
||||
self.timeTxt=Util.GetGameObject(self.gameObject, "time"):GetComponent("Text")
|
||||
self.titleImg.sprite=self.spLoader:LoadSprite("r_zhouka_zksh_zh")
|
||||
for i= 1 ,self.grid.transform.childCount do
|
||||
self.tabs = {}
|
||||
self.selectObj = Util.GetGameObject(self.gameObject, "selectObj")
|
||||
self.selectTxt = Util.GetGameObject(self.gameObject, "selectObj/Text"):GetComponent("Text")
|
||||
self.info1 = Util.GetGameObject(self.gameObject, "info1"):GetComponent("Text")
|
||||
self.info2 = Util.GetGameObject(self.gameObject, "info2"):GetComponent("Text")
|
||||
self.info1.text = "·购买后可领取活动前期累计奖励 及 后续奖励"
|
||||
self.info2.text = "·每日0点刷新,奖励可累计领取"
|
||||
self.titleImg = Util.GetGameObject(self.gameObject, "titleImg"):GetComponent("Image")
|
||||
self.timeTxt = Util.GetGameObject(self.gameObject, "time"):GetComponent("Text")
|
||||
self.titleImg.sprite = self.spLoader:LoadSprite("r_zhouka_zksh_zh")
|
||||
for i = 1, self.grid.transform.childCount do
|
||||
self.cardPres[i] = {}
|
||||
self.cardPres[i].go = self.grid.transform:GetChild(i - 1).gameObject
|
||||
self.cardPres[i].bg = self.cardPres[i].go:GetComponent("Image")
|
||||
self.cardPres[i].bg = self.cardPres[i].go:GetComponent("Image")
|
||||
self.cardPres[i].name = Util.GetGameObject(self.cardPres[i].go, "nameBg/name"):GetComponent("Text")
|
||||
self.cardPres[i].nameBg = Util.GetGameObject(self.cardPres[i].go, "nameBg"):GetComponent("Image")
|
||||
self.cardPres[i].icon = Util.GetGameObject(self.cardPres[i].go, "icon"):GetComponent("Image")
|
||||
|
|
@ -45,18 +45,17 @@ function WeekCardPanel:InitComponent()
|
|||
self.cardPres[i].btnText = Util.GetGameObject(self.cardPres[i].go, "btn/Text"):GetComponent("Text")
|
||||
self.cardPres[i].red = Util.GetGameObject(self.cardPres[i].go, "btn/redPoint")
|
||||
self.cardPres[i].rewardGrid = Util.GetGameObject(self.cardPres[i].go, "grid")
|
||||
self.cardPres[i].rewards={}
|
||||
for j= 1 ,self.cardPres[i].rewardGrid.transform.childCount do
|
||||
table.insert(self.cardPres[i].rewards,self.cardPres[i].rewardGrid.transform:GetChild(j - 1).gameObject)
|
||||
self.cardPres[i].rewards = {}
|
||||
for j = 1, self.cardPres[i].rewardGrid.transform.childCount do
|
||||
table.insert(self.cardPres[i].rewards, self.cardPres[i].rewardGrid.transform:GetChild(j - 1).gameObject)
|
||||
self.cardPres[i].rewardGrid.transform:GetChild(j - 1).gameObject:SetActive(false)
|
||||
end
|
||||
|
||||
end
|
||||
self.btnBack = Util.GetGameObject(self.gameObject,"btnClose")
|
||||
self.btnBack = Util.GetGameObject(self.gameObject, "btnClose")
|
||||
self.helpBtn = Util.GetGameObject(self.gameObject, "helpBtn")
|
||||
|
||||
for i=1,5 do
|
||||
table.insert(self.tabs,Util.GetGameObject(self.gameObject, "scrollrect/tabs/"..i))
|
||||
|
||||
for i = 1, 5 do
|
||||
table.insert(self.tabs, Util.GetGameObject(self.gameObject, "scrollrect/tabs/" .. i))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -86,106 +85,103 @@ function WeekCardPanel:OnOpen(args)
|
|||
-- self.actConfig = _activityConfig
|
||||
-- self.pageIndex = _index
|
||||
-- self.parent = parent
|
||||
activityId=args
|
||||
activityId = args
|
||||
end
|
||||
|
||||
function WeekCardPanel:OnSortingOrderChange()
|
||||
end
|
||||
|
||||
-- 打开,重新打开时回调
|
||||
local allcards={}
|
||||
local curKey=0
|
||||
local curIndex=0
|
||||
local allcards = {}
|
||||
local curKey = 0
|
||||
local curIndex = 0
|
||||
--local activityId=0
|
||||
local endTime=0
|
||||
local endTime = 0
|
||||
function WeekCardPanel:OnShow()
|
||||
self.gameObject:SetActive(true)
|
||||
sortingOrder = _sortingOrder
|
||||
local serverOpenTime = PlayerManager.GetServerOpenTime()
|
||||
-- 查看周卡界面刷新红点
|
||||
PlayerPrefs.SetInt("IsCheckWeekCard_"..PlayerManager.uid, 1)
|
||||
PlayerPrefs.SetInt("IsCheckWeekCard_" .. PlayerManager.uid, 1)
|
||||
CheckRedPointStatus(RedPointType.WeekCard)
|
||||
local id = ActivityGiftManager.GetActivityTypeInfo(102)
|
||||
endTime=id.endTime
|
||||
self.timeTxt.text="活动时间:"..TimeStampToDateStr6(id.startTime).."至"..TimeStampToDateStr6(id.endTime)
|
||||
weekcardR=ConfigManager.GetConfigDataByKey(ConfigName.WeekcardRotationConfig,"GlobalActivity",id.activityId)
|
||||
endTime = id.endTime
|
||||
self.timeTxt.text = "活动时间:" .. TimeStampToDateStr6(id.startTime) .. "至" .. TimeStampToDateStr6(id.endTime)
|
||||
weekcardR = ConfigManager.GetConfigDataByKey(ConfigName.WeekcardRotationConfig, "GlobalActivity", id.activityId)
|
||||
--weekcardR=ConfigManager.GetConfigData(ConfigName.WeekcardRotationConfig,1)
|
||||
local cardTypes={}
|
||||
for i=1,#weekcardR.WeekcardType do
|
||||
local id=weekcardR.WeekcardType[i][3]
|
||||
local min=weekcardR.WeekcardType[i][1]
|
||||
local max=weekcardR.WeekcardType[i][2]
|
||||
local type=_WeekcardConfig[id].Type
|
||||
local data=WeekCardManager.GetWeekCardData(id)
|
||||
local cardTypes = {}
|
||||
for i = 1, #weekcardR.WeekcardType do
|
||||
local id = weekcardR.WeekcardType[i][3]
|
||||
local min = weekcardR.WeekcardType[i][1]
|
||||
local max = weekcardR.WeekcardType[i][2]
|
||||
local type = _WeekcardConfig[id].Type
|
||||
local data = WeekCardManager.GetWeekCardData(id)
|
||||
--已经购买
|
||||
if data then
|
||||
if allcards[type]==nil then
|
||||
allcards[type]={}
|
||||
if allcards[type] == nil then
|
||||
allcards[type] = {}
|
||||
end
|
||||
table.insert(allcards[type],_WeekcardConfig[id])
|
||||
table.insert(cardTypes,_WeekcardConfig[id].WeekcardType)
|
||||
table.insert(allcards[type], _WeekcardConfig[id])
|
||||
table.insert(cardTypes, _WeekcardConfig[id].WeekcardType)
|
||||
else
|
||||
if PlayerManager.level>=min and PlayerManager.level<=max and not cardTypes[_WeekcardConfig[id].WeekcardType] then
|
||||
if allcards[type]==nil then
|
||||
allcards[type]={}
|
||||
if PlayerManager.level >= min and PlayerManager.level <= max and not cardTypes[_WeekcardConfig[id].WeekcardType] then
|
||||
if allcards[type] == nil then
|
||||
allcards[type] = {}
|
||||
end
|
||||
table.insert(allcards[type],_WeekcardConfig[id])
|
||||
table.insert(allcards[type], _WeekcardConfig[id])
|
||||
end
|
||||
end
|
||||
--table.insert(allcards,weekcardR.WeekcardType[i][3])
|
||||
end
|
||||
|
||||
|
||||
for i=1, 5 do
|
||||
self.tabs[i]:SetActive(false)
|
||||
|
||||
|
||||
for i = 1, 5 do
|
||||
self.tabs[i]:SetActive(false)
|
||||
end
|
||||
local i=0
|
||||
local firstKey=0
|
||||
local i = 0
|
||||
local firstKey = 0
|
||||
for key, value in pairs(allcards) do
|
||||
i=i+1
|
||||
i = i + 1
|
||||
self.tabs[i]:SetActive(true)
|
||||
local name=Util.GetGameObject(self.tabs[i], "Text"):GetComponent("Text")
|
||||
name.text=value[1].Desc
|
||||
local red=Util.GetGameObject(self.tabs[i], "redpoint")
|
||||
local name = Util.GetGameObject(self.tabs[i], "Text"):GetComponent("Text")
|
||||
name.text = value[1].Desc
|
||||
local red = Util.GetGameObject(self.tabs[i], "redpoint")
|
||||
red:SetActive(false)
|
||||
if firstKey == 0 then
|
||||
firstKey = key
|
||||
curIndex=i
|
||||
curIndex = i
|
||||
end
|
||||
local kk=key
|
||||
local kk = key
|
||||
Util.AddClick(self.tabs[i], function()
|
||||
|
||||
curKey=kk
|
||||
curIndex=i
|
||||
curKey = kk
|
||||
curIndex = i
|
||||
self:SetCardWind(curKey)
|
||||
end)
|
||||
LogError("key=="..key.." value=="..value[1].Id.." value2=="..value[2].Id)
|
||||
LogError("key==" .. key .. " value==" .. value[1].Id .. " value2==" .. value[2].Id)
|
||||
end
|
||||
self:CheckTabRed()
|
||||
if curKey==0 then
|
||||
curKey=firstKey
|
||||
if curKey == 0 then
|
||||
curKey = firstKey
|
||||
end
|
||||
self:SetCardWind(firstKey)
|
||||
end
|
||||
|
||||
function WeekCardPanel:CheckTabRed()
|
||||
--检测页签红点
|
||||
local num=0
|
||||
for key, value in pairs(allcards) do
|
||||
num=num+1
|
||||
local isTrue=false
|
||||
Util.GetGameObject(self.tabs[num], "redpoint"):SetActive(false)
|
||||
for i=1,#value do
|
||||
isTrue=WeekCardManager.CheckTabRedReward(value[i].Id)
|
||||
--检测页签红点
|
||||
local num = 0
|
||||
for key, value in pairs(allcards) do
|
||||
num = num + 1
|
||||
local isTrue = false
|
||||
Util.GetGameObject(self.tabs[num], "redpoint"):SetActive(false)
|
||||
for i = 1, #value do
|
||||
isTrue = WeekCardManager.CheckTabRedReward(value[i].Id)
|
||||
if isTrue then
|
||||
Util.GetGameObject(self.tabs[num], "redpoint"):SetActive(isTrue)
|
||||
Util.GetGameObject(self.tabs[num], "redpoint"):SetActive(isTrue)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- 钻石数量显示
|
||||
function WeekCardPanel:RefreshShow()
|
||||
-- local allData = WeekCardManager.GetWeekCardDataArray()
|
||||
|
|
@ -199,119 +195,126 @@ function WeekCardPanel:RefreshShow()
|
|||
self:SetCardWind(curKey)
|
||||
end
|
||||
|
||||
|
||||
--设置周卡界面
|
||||
function WeekCardPanel:SetCardWind(key)
|
||||
curkey=key
|
||||
curkey = key
|
||||
if allcards[curkey] then
|
||||
local aaa=0
|
||||
local aaa = 0
|
||||
for k, value in pairs(allcards) do
|
||||
aaa=aaa+1
|
||||
if k==curkey then
|
||||
break
|
||||
end
|
||||
aaa = aaa + 1
|
||||
if k == curkey then
|
||||
break
|
||||
end
|
||||
end
|
||||
self.selectObj.transform:SetParent(self.tabs[aaa].transform)
|
||||
self.selectObj.transform.localScale = Vector3.one
|
||||
self.selectObj.transform.localPosition = Vector3.zero
|
||||
self.selectTxt:GetComponent("Text").text = Util.GetGameObject(self.tabs[aaa], "Text"):GetComponent("Text").text
|
||||
for i=1,#allcards[curkey] do
|
||||
self:ShowCardInfo(i,allcards[curkey][i])
|
||||
end
|
||||
--[[
|
||||
if aaa == 1 then
|
||||
self.selectTxt:GetComponent("Text").text = "精英周卡"
|
||||
Util.GetGameObject(self.tabs[aaa], "Text"):GetComponent("Text").text = "精英周卡"
|
||||
elseif aaa == 2 then
|
||||
self.selectTxt:GetComponent("Text").text = "传奇周卡"
|
||||
Util.GetGameObject(self.tabs[aaa], "Text"):GetComponent("Text").text = "传奇周卡"
|
||||
end
|
||||
]]
|
||||
|
||||
for i = 1, #allcards[curkey] do
|
||||
self:ShowCardInfo(i, allcards[curkey][i])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
--显示周卡信息
|
||||
function WeekCardPanel:ShowCardInfo(index,config)
|
||||
function WeekCardPanel:ShowCardInfo(index, config)
|
||||
local pre = self.cardPres[index]
|
||||
if not pre then
|
||||
return
|
||||
return
|
||||
end
|
||||
if not config then
|
||||
return
|
||||
return
|
||||
end
|
||||
-- 背景
|
||||
|
||||
-- 物品名称
|
||||
if config.QualityType==1 then
|
||||
pre.name.text =config.Name-- "普通"
|
||||
pre.bg.sprite = self.spLoader:LoadSprite("X1_chongzhi_zuanshidiban")
|
||||
pre.btnImg.sprite=self.spLoader:LoadSprite("X1_shouzha_yeqianxuanzhong_01")
|
||||
pre.nameBg.sprite=self.spLoader:LoadSprite("UI_hz_zhonghe01_64")
|
||||
|
||||
else
|
||||
pre.name.text = config.Name--"豪华"
|
||||
-- 物品名称
|
||||
if config.QualityType == 1 then
|
||||
pre.name.text = config.Name -- "普通"
|
||||
pre.bg.sprite = self.spLoader:LoadSprite("X1_chongzhi_zuanshidiban")
|
||||
pre.btnImg.sprite=self.spLoader:LoadSprite("X1_shouzha_yeqianxuanzhong_03")
|
||||
pre.nameBg.sprite=self.spLoader:LoadSprite("UI_hz_zhonghe01_64")
|
||||
pre.btnImg.sprite = self.spLoader:LoadSprite("X1_shouzha_yeqianxuanzhong_01")
|
||||
pre.nameBg.sprite = self.spLoader:LoadSprite("UI_hz_zhonghe01_64")
|
||||
else
|
||||
pre.name.text = config.Name --"豪华"
|
||||
pre.bg.sprite = self.spLoader:LoadSprite("X1_chongzhi_zuanshidiban")
|
||||
pre.btnImg.sprite = self.spLoader:LoadSprite("X1_shouzha_yeqianxuanzhong_03")
|
||||
pre.nameBg.sprite = self.spLoader:LoadSprite("UI_hz_zhonghe01_64")
|
||||
end
|
||||
|
||||
|
||||
-- 每日奖励数量
|
||||
local itemId = 0
|
||||
local dayNum = 0
|
||||
-- pre.rewards
|
||||
-- weekReward
|
||||
local allNum=0
|
||||
local name=""
|
||||
local icon=""
|
||||
local oneNum=0
|
||||
for i=1,#config.BaseRewardID do
|
||||
-- pre.rewards
|
||||
-- weekReward
|
||||
local allNum = 0
|
||||
local name = ""
|
||||
local icon = ""
|
||||
local oneNum = 0
|
||||
for i = 1, #config.BaseRewardID do
|
||||
if pre.rewards[i] then
|
||||
pre.rewards[i]:SetActive(true)
|
||||
local dayTxt=Util.GetGameObject(pre.rewards[i],"day"):GetComponent("Text")
|
||||
dayTxt.text="第"..NumToChinese[config.BaseRewardID[i][1]].."天"
|
||||
local rewardId=config.BaseRewardID[i][2]
|
||||
if weekReward[rewardId] then
|
||||
local id= weekReward[rewardId].BaseReward[1]
|
||||
local num= weekReward[rewardId].BaseReward[2]
|
||||
name=_ItemConfig[id].Name
|
||||
oneNum=num
|
||||
icon=GetResourcePath(_ItemConfig[id].ResourceID)
|
||||
itemId=id
|
||||
pre.rewards[i]:GetComponent("Image").sprite=self.spLoader:LoadSprite(GetQuantityImageByquality(_ItemConfig[id].Quantity))
|
||||
local icon1=Util.GetGameObject(pre.rewards[i],"Image"):GetComponent("Image")
|
||||
icon1.sprite=self.spLoader:LoadSprite(icon)
|
||||
local stateTxt=Util.GetGameObject(pre.rewards[i],"Text"):GetComponent("Text")
|
||||
local numTxt=Util.GetGameObject(pre.rewards[i],"num"):GetComponent("Text")
|
||||
if num>10000 then
|
||||
numTxt.text=PrintWanNum2(num)
|
||||
local dayTxt = Util.GetGameObject(pre.rewards[i], "day"):GetComponent("Text")
|
||||
dayTxt.text = "第" .. NumToChinese[config.BaseRewardID[i][1]] .. "天"
|
||||
local rewardId = config.BaseRewardID[i][2]
|
||||
if weekReward[rewardId] then
|
||||
local id = weekReward[rewardId].BaseReward[1]
|
||||
local num = weekReward[rewardId].BaseReward[2]
|
||||
name = _ItemConfig[id].Name
|
||||
oneNum = num
|
||||
icon = GetResourcePath(_ItemConfig[id].ResourceID)
|
||||
itemId = id
|
||||
pre.rewards[i]:GetComponent("Image").sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(
|
||||
_ItemConfig[id].Quantity))
|
||||
local icon1 = Util.GetGameObject(pre.rewards[i], "Image"):GetComponent("Image")
|
||||
icon1.sprite = self.spLoader:LoadSprite(icon)
|
||||
local stateTxt = Util.GetGameObject(pre.rewards[i], "Text"):GetComponent("Text")
|
||||
local numTxt = Util.GetGameObject(pre.rewards[i], "num"):GetComponent("Text")
|
||||
if num > 10000 then
|
||||
numTxt.text = PrintWanNum2(num)
|
||||
else
|
||||
numTxt.text=num
|
||||
numTxt.text = num
|
||||
end
|
||||
|
||||
allNum=allNum+num
|
||||
|
||||
allNum = allNum + num
|
||||
end
|
||||
|
||||
-- pre.rewards[i]:GetComponent("Image").sprite=self.spLoader:LoadSprite(config.TypeImage)
|
||||
|
||||
-- pre.rewards[i]:GetComponent("Image").sprite=self.spLoader:LoadSprite(config.TypeImage)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
pre.icon.sprite = self.spLoader:LoadSprite(icon)
|
||||
Util.AddClick(pre.icon.gameObject,function()
|
||||
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,itemId,nil)
|
||||
end )
|
||||
pre.Text.text = name.."*"..PrintWanNum2(oneNum)
|
||||
local str=name.."*"..PrintWanNum2(allNum)
|
||||
pre.hint.text = "共计: ".."<color=#F47B22>"..str.."</color>"
|
||||
Util.AddClick(pre.icon.gameObject, function()
|
||||
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, itemId, nil)
|
||||
end)
|
||||
pre.Text.text = name .. "*" .. PrintWanNum2(oneNum)
|
||||
local str = name .. "*" .. PrintWanNum2(allNum)
|
||||
pre.hint.text = "共计: " .. "<color=#F47B22>" .. str .. "</color>"
|
||||
local rechargeCfg = _RechargeCommodityConfig[config.RechargeId]
|
||||
if not rechargeCfg then
|
||||
return
|
||||
return
|
||||
end
|
||||
local data=WeekCardManager.GetWeekCardData(config.Id)
|
||||
local data = WeekCardManager.GetWeekCardData(config.Id)
|
||||
-- 按钮状态
|
||||
if data then
|
||||
local getNum=0
|
||||
for i=1,#data.leaveGetRewardDays do
|
||||
if data.leaveGetRewardDays[i].state==1 then
|
||||
getNum=getNum+1
|
||||
local getNum = 0
|
||||
for i = 1, #data.leaveGetRewardDays do
|
||||
if data.leaveGetRewardDays[i].state == 1 then
|
||||
getNum = getNum + 1
|
||||
end
|
||||
end
|
||||
local residueTimeNum = endTime - GetTimeStamp()
|
||||
local dayNum = math.floor(residueTimeNum / (24 * 3600))
|
||||
pre.timeTxt.text="(剩余"..dayNum.."天)"
|
||||
if dayNum==0 then
|
||||
pre.timeTxt.text = "(剩余" .. dayNum .. "天)"
|
||||
if dayNum == 0 then
|
||||
pre.timeTxt.gameObject:SetActive(false)
|
||||
else
|
||||
pre.timeTxt.gameObject:SetActive(true)
|
||||
|
|
@ -324,7 +327,7 @@ function WeekCardPanel:ShowCardInfo(index,config)
|
|||
Util.AddOnceClick(pre.btn, function()
|
||||
local id = ActivityGiftManager.GetActivityTypeInfo(102)
|
||||
--LogError("cardid=="..data.id.." id=="..id.activityId)
|
||||
WeekCardManager.RequestGetWeekCardReward(data.id, id.activityId,function()
|
||||
WeekCardManager.RequestGetWeekCardReward(data.id, id.activityId, function()
|
||||
-- 刷新显示
|
||||
self:RefreshShow()
|
||||
end)
|
||||
|
|
@ -345,7 +348,7 @@ function WeekCardPanel:ShowCardInfo(index,config)
|
|||
pre.red:SetActive(false)
|
||||
Util.SetGray(pre.btn, false)
|
||||
Util.AddOnceClick(pre.btn, function()
|
||||
PayManager.Pay(config.RechargeId, function(id)
|
||||
PayManager.Pay(config.RechargeId, function(id)
|
||||
-- 前端修改购买状态
|
||||
--data.isBuy = true
|
||||
--WeekCardManager.UpdateWeekCardData(data)
|
||||
|
|
@ -354,21 +357,16 @@ function WeekCardPanel:ShowCardInfo(index,config)
|
|||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function WeekCardPanel:SetCardShow(index, data)
|
||||
local pre = self.cardPres[index]
|
||||
if not pre then
|
||||
return
|
||||
return
|
||||
end
|
||||
local config = _WeekcardConfig[data.id]
|
||||
if not config then
|
||||
return
|
||||
return
|
||||
end
|
||||
-- 背景
|
||||
pre.bg.sprite = self.spLoader:LoadSprite(config.BgImage)
|
||||
|
|
@ -386,7 +384,7 @@ function WeekCardPanel:SetCardShow(index, data)
|
|||
-- 当前累计奖励数量
|
||||
local curNum = dayNum * data.leaveGetRewardDays or 0
|
||||
pre.curNum.text = PrintWanNum2(curNum)
|
||||
pre.curNum.transform.parent.gameObject:SetActive(curNum ~= 0) -- 累计数量为0时不显示
|
||||
pre.curNum.transform.parent.gameObject:SetActive(curNum ~= 0) -- 累计数量为0时不显示
|
||||
-- 总奖励数量
|
||||
local continueDay = config.ContiueDays or 0
|
||||
local allNum = dayNum * continueDay
|
||||
|
|
@ -400,7 +398,7 @@ function WeekCardPanel:SetCardShow(index, data)
|
|||
|
||||
local rechargeCfg = _RechargeCommodityConfig[config.RechargeId]
|
||||
if not rechargeCfg then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
-- 按钮状态
|
||||
|
|
@ -431,7 +429,7 @@ function WeekCardPanel:SetCardShow(index, data)
|
|||
pre.red:SetActive(false)
|
||||
Util.SetGray(pre.btn, false)
|
||||
Util.AddOnceClick(pre.btn, function()
|
||||
PayManager.Pay(config.RechargeId, function(id)
|
||||
PayManager.Pay(config.RechargeId, function(id)
|
||||
-- 前端修改购买状态
|
||||
data.isBuy = true
|
||||
WeekCardManager.UpdateWeekCardData(data)
|
||||
|
|
@ -448,10 +446,11 @@ function WeekCardPanel:OnClose()
|
|||
CheckRedPointStatus(RedPointType.WeekCardOpen)
|
||||
CheckRedPointStatus(RedPointType.WeekCardReward)
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function WeekCardPanel:OnDestroy()
|
||||
self.spLoader:Destroy()
|
||||
self.cardPres = {}
|
||||
end
|
||||
return WeekCardPanel
|
||||
|
||||
return WeekCardPanel
|
||||
|
|
|
|||
Loading…
Reference in New Issue