增加一部分上报
This commit is contained in:
parent
be043ef0d1
commit
f95926cfde
@ -179,6 +179,7 @@ local EVENT_NAME_VIT_USE = "client_vit_use"
|
||||
local EVENT_NAME_VIT_GET = "client_vit_get"
|
||||
local EVENT_NAME_DAILY_TASK = "client_daily_task"
|
||||
local EVENT_NAME_MAIL_OPT = "client_mail_opt"
|
||||
local EVENT_NAME_PAY_UI_SHOW = "client_pay_ui_show" -- 内购相关界面展示
|
||||
|
||||
function BIReport:setIsNewPlayer(isNewPlayer)
|
||||
self.isNewPlayer = isNewPlayer
|
||||
@ -824,4 +825,13 @@ function BIReport:postAccountChangeFinish(loginType, success)
|
||||
self:report(EVENT_NAME_ACCOUNT_OPT, args)
|
||||
end
|
||||
|
||||
-- 内购相关界面展示,包括弹出/主动打开
|
||||
function BIReport:postPayUIShow(giftType, giftId)
|
||||
local args = {
|
||||
gift_type = giftType,
|
||||
gift_id = giftId,
|
||||
}
|
||||
self:report(EVENT_NAME_PAY_UI_SHOW, args)
|
||||
end
|
||||
|
||||
return BIReport
|
||||
@ -694,7 +694,11 @@ function MainCityUI:switchComp(index)
|
||||
for i, comp in pairs(self.subComps) do
|
||||
comp:getBaseObject():setActive(i == index)
|
||||
if i == index then
|
||||
if index == GConst.MainCityConst.BOTTOM_PAGE.SHOP then
|
||||
comp:clearPostFlag()
|
||||
end
|
||||
comp:refresh()
|
||||
|
||||
self:updateTime()
|
||||
end
|
||||
end
|
||||
|
||||
@ -43,6 +43,9 @@ function FirstRechargePopUI:onLoadRootComplete()
|
||||
|
||||
self:_bind()
|
||||
self:refresh()
|
||||
|
||||
-- 上报
|
||||
BIReport:postPayUIShow(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.FIRST_RECHARGE_ID)
|
||||
end
|
||||
|
||||
function FirstRechargePopUI:_bind()
|
||||
|
||||
@ -155,6 +155,9 @@ function GiftPopUI:refresh(needCheck)
|
||||
end
|
||||
end
|
||||
|
||||
-- 上报
|
||||
BIReport:postPayUIShow(self.actType, self.actId)
|
||||
|
||||
self:updateTime()
|
||||
end
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@ function ShopComp:init()
|
||||
self.uiMap = self.baseObject:genAllChildren()
|
||||
|
||||
self.page = PAGE_MAIN -- 默认展示主要商品
|
||||
self.post = false
|
||||
|
||||
self:initTitlePage()
|
||||
self:initMainPage()
|
||||
@ -81,6 +82,7 @@ end
|
||||
function ShopComp:switchPage(page)
|
||||
if self.page ~= page then
|
||||
self.page = page
|
||||
self.post = false
|
||||
self:refresh()
|
||||
end
|
||||
end
|
||||
@ -168,6 +170,59 @@ function ShopComp:refresh()
|
||||
end
|
||||
|
||||
self:refreshTime()
|
||||
|
||||
-- 上报
|
||||
self:postEnterPage()
|
||||
end
|
||||
|
||||
function ShopComp:postEnterPage()
|
||||
if self.post then
|
||||
return
|
||||
end
|
||||
self.post = true
|
||||
|
||||
if self.page == PAGE_DISCOUNT then
|
||||
-- 找到所有的项目
|
||||
-- 章节
|
||||
local actIdList = DataManager.ShopData:getActChapterStoreCanBuyActIds()
|
||||
if actIdList and #actIdList > 0 then
|
||||
BIReport:postPayUIShow(PayManager.PURCHARSE_TYPE.CHAPTER_GIFT, actIdList[1]) -- 约定上报第一个付费项
|
||||
end
|
||||
-- 新手
|
||||
if not DataManager.ShopData:getBeginnerGiftHasBuy() then
|
||||
BIReport:postPayUIShow(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.BEGINNER_GIFT_ID)
|
||||
end
|
||||
-- 助力
|
||||
local actIdList = DataManager.ShopData:getLevelUpGiftActIds()
|
||||
if actIdList and #actIdList > 0 then
|
||||
for _, id in ipairs(actIdList) do
|
||||
BIReport:postPayUIShow(PayManager.PURCHARSE_TYPE.ACT_GIFT, id)
|
||||
end
|
||||
end
|
||||
-- 成长
|
||||
local actIdList = DataManager.ShopData:getValidGrowUpGifts()
|
||||
if actIdList and #actIdList > 0 then
|
||||
for _, id in ipairs(actIdList) do
|
||||
BIReport:postPayUIShow(PayManager.PURCHARSE_TYPE.GROW_UP_GIFT, id)
|
||||
end
|
||||
end
|
||||
-- 金币
|
||||
local actId = DataManager.ShopData:getValidCoinGiftId()
|
||||
if actId and actId > 0 then
|
||||
BIReport:postPayUIShow(PayManager.PURCHARSE_TYPE.ACT_GIFT, actId)
|
||||
end
|
||||
else
|
||||
-- 找到所有的钻石项目
|
||||
-- local gemCfg = DataManager.ShopData:getMallTreasureConfig()
|
||||
-- for _, id in pairs(gemCfg) do
|
||||
-- BIReport:postPayUIShow(PayManager.PURCHARSE_TYPE.MALL_TREASURE, id)
|
||||
-- end
|
||||
BIReport:postPayUIShow(PayManager.PURCHARSE_TYPE.MALL_TREASURE, 2) -- 约定上报第一个付费项
|
||||
end
|
||||
end
|
||||
|
||||
function ShopComp:clearPostFlag()
|
||||
self.post = false
|
||||
end
|
||||
|
||||
function ShopComp:refreshTime()
|
||||
|
||||
@ -6,7 +6,6 @@ end
|
||||
|
||||
function ShopData:initBase()
|
||||
self:initActChapterStoreData()
|
||||
self:initFirstRecharge()
|
||||
self:initCrossDay()
|
||||
end
|
||||
|
||||
@ -52,7 +51,7 @@ function ShopData:initActGift(act)
|
||||
end
|
||||
self.giftMap[giftType][giftId] = gift
|
||||
end
|
||||
|
||||
self:initFirstRecharge()
|
||||
self:setDirty()
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user