Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop
commit
5ac12cde11
File diff suppressed because it is too large
Load Diff
|
|
@ -15,9 +15,9 @@ end
|
|||
function DynamicTaskPage:InitComponent(gameObject)
|
||||
itemsGrid = {}--item重复利用
|
||||
singleTaskPre = {}
|
||||
this.time = Util.GetGameObject(gameObject, "content/tiao/time"):GetComponent("Text")
|
||||
this.itemPre = Util.GetGameObject(gameObject, "content/itempre")
|
||||
this.scrollItem = Util.GetGameObject(gameObject, "content/grid")
|
||||
this.time = Util.GetGameObject(gameObject, "tiao/time"):GetComponent("Text")
|
||||
this.itemPre = Util.GetGameObject(gameObject, "itempre")
|
||||
this.scrollItem = Util.GetGameObject(gameObject, "grid")
|
||||
local rootHight = this.scrollItem.transform.rect.height
|
||||
local width = this.scrollItem.transform.rect.width
|
||||
this.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, this.scrollItem.transform,
|
||||
|
|
|
|||
|
|
@ -16,9 +16,10 @@ function LeiJiChongZhiPage:InitComponent(gameObject)
|
|||
this.time = Util.GetGameObject(gameObject, "tiao/time"):GetComponent("Text")
|
||||
this.itemPre = Util.GetGameObject(gameObject, "ItemPre")
|
||||
this.scrollItem = Util.GetGameObject(gameObject, "grid")
|
||||
local rootHight = this.scrollItem:GetComponent("RectTransform").sizeDelta
|
||||
local rootHight = this.scrollItem.transform.rect.height
|
||||
local width = this.scrollItem.transform.rect.width
|
||||
this.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, this.scrollItem.transform,
|
||||
this.itemPre, nil, Vector2.New(rootHight.x, rootHight.y), 1, 1, Vector2.New(0, 30))
|
||||
this.itemPre, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(0, 30))
|
||||
this.ScrollView.moveTween.MomentumAmount = 1
|
||||
this.ScrollView.moveTween.Strength = 2
|
||||
end
|
||||
|
|
|
|||
|
|
@ -9,23 +9,23 @@ local singleRecruit = nil
|
|||
local tenRecruit = nil
|
||||
function RewardPreview:ctor(gameObject)
|
||||
self.gameObject = gameObject
|
||||
self:InitComponent(gameObject)
|
||||
self:InitComponent()
|
||||
self:BindEvent()
|
||||
self:OnShow()
|
||||
end
|
||||
|
||||
function RewardPreview:InitComponent(gameObject)
|
||||
function RewardPreview:InitComponent()
|
||||
self.closeBtn = Util.GetGameObject(self.gameObject, "close")
|
||||
self.itemGrid = Util.GetGameObject(self.gameObject, "itemGrid")
|
||||
self.itemPre = Util.GetGameObject(self.gameObject, "itemprefab")
|
||||
self.sliderWidth = Util.GetGameObject(self.gameObject, "Background"):GetComponent("RectTransform").sizeDelta.x
|
||||
self.slider = Util.GetGameObject(self.gameObject, "Background/Fill"):GetComponent("Image")
|
||||
self.sliderWidth = Util.GetGameObject(self.gameObject, "Background"):GetComponent("RectTransform").sizeDelta.x
|
||||
self.curtimes = Util.GetGameObject(self.gameObject, "tip1"):GetComponent("Text")
|
||||
end
|
||||
|
||||
function RewardPreview:BindEvent()
|
||||
Util.AddClick(
|
||||
self.closeBtn.gameObject,
|
||||
self.closeBtn,
|
||||
function()
|
||||
self:OnHide()
|
||||
end
|
||||
|
|
@ -61,8 +61,8 @@ function RewardPreview:RefreshRewarid()
|
|||
count = data[#data].Values[1][1]
|
||||
tmp = 0
|
||||
local position = 0
|
||||
local width = self.itemPre.transform:GetComponent("RectTransform").sizeDelta.x
|
||||
local interval = self.itemGrid.transform:GetComponent("RectTransform").sizeDelta.x - (width * #data)
|
||||
local width = self.itemPre:GetComponent("RectTransform").sizeDelta.x
|
||||
local interval = self.itemGrid:GetComponent("RectTransform").sizeDelta.x - (width * #data)
|
||||
if (not listPre) then
|
||||
listPre = {}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ function TimeLimitedCall:InitComponent(gameObject)
|
|||
self.helpPosition=self.helpBtn:GetComponent("RectTransform").localPosition
|
||||
|
||||
self.activityBtn = Util.GetGameObject(self.gameObject,"activity")
|
||||
self.rewardBtn = Util.GetGameObject(self.gameObject,"reward")
|
||||
self.rewardBtn = Util.GetGameObject(self.gameObject,"rewardBtn")
|
||||
self.rewardBtn:SetActive(false)--(暂时关闭)
|
||||
|
||||
self.timeupdate=Util.GetGameObject(self.gameObject,"timeupdate"):GetComponent("Text") --免费次数剩余刷新时间
|
||||
|
|
@ -146,12 +146,11 @@ end
|
|||
function TimeLimitedCall:RefreshNextLevelReward()
|
||||
local curLvstate = 0
|
||||
local info= ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.FindFairy)
|
||||
LogGreen(info.value)
|
||||
local curTimes = info.value
|
||||
local curTimes = 0
|
||||
local data1 = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",activityId) --通过活动id获取阶段任务
|
||||
local rewarditem
|
||||
for n,m in ipairs(data1) do
|
||||
curLvstate = self:GetMissionStateById(m.Id,activityId)
|
||||
curTimes,curLvstate = self:GetMissionStateById(m.Id,activityId)
|
||||
if(curTimes>=m.Values[1][1]) then
|
||||
if curLvstate==0 then
|
||||
curLvstate=0
|
||||
|
|
@ -251,7 +250,7 @@ end
|
|||
|
||||
function TimeLimitedCall:GetMissionStateById(num,activityId)
|
||||
local mission= ActivityGiftManager.GetActivityInfo(activityId,num) --从后端获取到的阶段数据
|
||||
return mission.state
|
||||
return mission.progress,mission.state
|
||||
end
|
||||
|
||||
--刷新剩余次数
|
||||
|
|
|
|||
|
|
@ -1659,7 +1659,7 @@ function this.RefreshActivityShow()
|
|||
|
||||
this.questionnaireBtn:SetActive(QuestionnaireManager.GetQuestionState() == 0)
|
||||
--轮转活动 限时召唤 乾坤宝盒
|
||||
this.btnDynamicActivity:SetActive(not not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.FindFairy))
|
||||
this.btnDynamicActivity:SetActive(not not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.DynamicAct))
|
||||
end
|
||||
|
||||
function this.SetSevenDayCarnivalName()
|
||||
|
|
|
|||
|
|
@ -750,16 +750,15 @@ end
|
|||
this.TimeLimitedTimes = 0
|
||||
this.allData = {}
|
||||
function this.InitDynamicActData()
|
||||
local id = ActivityGiftManager.GetActivityIdByType(ActivityTypeDef.DynamicAct)
|
||||
if (not id) or id == 0 then
|
||||
return nil
|
||||
end
|
||||
if not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.DynamicAct) then
|
||||
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.DynamicAct)
|
||||
if (not id) or id < 1 then
|
||||
return nil
|
||||
end
|
||||
LogGreen("ActivityId:"..id)
|
||||
this.allData = {}
|
||||
local allListData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ThemeActivityTaskConfig, "ActivityId", id)
|
||||
local allMissionData = TaskManager.GetTypeTaskList(TaskTypeDef.DynamicActTask)
|
||||
LogGreen("allMissionData:"..#allMissionData)
|
||||
for i=1,#allListData do
|
||||
for j=1,#allMissionData do
|
||||
if allListData[i].Id == allMissionData[j].missionId then
|
||||
|
|
|
|||
Loading…
Reference in New Issue