累计充值

dev_chengFeng
ZhangBiao 2020-08-21 20:11:24 +08:00
parent 52dda5ff47
commit 1a826a3f3e
4 changed files with 901 additions and 406 deletions

View File

@ -18,7 +18,7 @@ function LeiJiChongZhiPage:InitComponent(gameObject)
this.scrollItem = Util.GetGameObject(gameObject, "grid")
local rootHight = this.scrollItem:GetComponent("RectTransform").sizeDelta
this.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, this.scrollItem.transform,
this.itemPre, nil, Vector2.New(rootHight.x, rootHight.y), 1, 1, Vector2.New(0, 10))
this.itemPre, nil, Vector2.New(rootHight.x, rootHight.y), 1, 1, Vector2.New(0, 30))
this.ScrollView.moveTween.MomentumAmount = 1
this.ScrollView.moveTween.Strength = 2
end
@ -120,8 +120,9 @@ function this.SingleDataShow(pre,value)
activityRewardGo:SetActive(true)
local sConFigData = value
local num = Util.GetGameObject(activityRewardGo, "context/num"):GetComponent("Text")
num.text = sConFigData.value
local num = Util.GetGameObject(activityRewardGo, "context/num")
this:NumToNum(num,sConFigData.value)
-- num.text = sConFigData.value
local progress = Util.GetGameObject(activityRewardGo, "context/progress"):GetComponent("Text")
progress.text ="可领取".."("..(sConFigData.progress > sConFigData.value and sConFigData.value or sConFigData.progress) .."/"..sConFigData.value..")"
@ -140,9 +141,7 @@ function this.SingleDataShow(pre,value)
end
local lingquButton = Util.GetGameObject(activityRewardGo.gameObject, "btnBuy")
LogYellow("sConFigData.progress:"..sConFigData.progress)
local state = sConFigData.state
local red = Util.GetGameObject(lingquButton.gameObject, "redPoint")
red:SetActive(state == 2)
@ -166,6 +165,25 @@ function this.SingleDataShow(pre,value)
end
function LeiJiChongZhiPage:NumToNum(num,_value)
local value = _value
local isFirst = true
for i = 1, 5 do
local m = Util.GetGameObject(num,"num"..i)
m:SetActive(false)
local t1 = math.floor(value/math.pow(10, (5-i)))
value = value%(math.pow(10, (5-i)))
if t1<1 and isFirst then
m:SetActive(false)
else
m:SetActive(true)
isFirst = false
m:GetComponent("Text").text = t1
end
end
end
--界面打开时调用(用于子类重写)
function LeiJiChongZhiPage:OnOpen()

View File

@ -150,7 +150,7 @@ function this.GetQinglongTaskData(_curtype)
table.insert(task, taskData[curtype][v.missionId])
end
end
LogBlue("每周任务个数:"..#task)
-- LogBlue("每周任务个数:"..#task)
return task
end

View File

@ -777,7 +777,6 @@ function this.InitLeiJiChongZhiData()
this.LeiJiChongZhiData = {}
local allListData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig, "ActivityId", id)
local allMissionData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.pozhenzhuxian_recharge)
LogYellow(allMissionData.value)
for i=1,#allListData do
for j=1,#allMissionData.mission do
if allListData[i].Id == allMissionData.mission[j].missionId then