增加一部分上报
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_VIT_GET = "client_vit_get"
|
||||||
local EVENT_NAME_DAILY_TASK = "client_daily_task"
|
local EVENT_NAME_DAILY_TASK = "client_daily_task"
|
||||||
local EVENT_NAME_MAIL_OPT = "client_mail_opt"
|
local EVENT_NAME_MAIL_OPT = "client_mail_opt"
|
||||||
|
local EVENT_NAME_PAY_UI_SHOW = "client_pay_ui_show" -- 内购相关界面展示
|
||||||
|
|
||||||
function BIReport:setIsNewPlayer(isNewPlayer)
|
function BIReport:setIsNewPlayer(isNewPlayer)
|
||||||
self.isNewPlayer = isNewPlayer
|
self.isNewPlayer = isNewPlayer
|
||||||
@ -824,4 +825,13 @@ function BIReport:postAccountChangeFinish(loginType, success)
|
|||||||
self:report(EVENT_NAME_ACCOUNT_OPT, args)
|
self:report(EVENT_NAME_ACCOUNT_OPT, args)
|
||||||
end
|
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
|
return BIReport
|
||||||
@ -694,7 +694,11 @@ function MainCityUI:switchComp(index)
|
|||||||
for i, comp in pairs(self.subComps) do
|
for i, comp in pairs(self.subComps) do
|
||||||
comp:getBaseObject():setActive(i == index)
|
comp:getBaseObject():setActive(i == index)
|
||||||
if i == index then
|
if i == index then
|
||||||
|
if index == GConst.MainCityConst.BOTTOM_PAGE.SHOP then
|
||||||
|
comp:clearPostFlag()
|
||||||
|
end
|
||||||
comp:refresh()
|
comp:refresh()
|
||||||
|
|
||||||
self:updateTime()
|
self:updateTime()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -43,6 +43,9 @@ function FirstRechargePopUI:onLoadRootComplete()
|
|||||||
|
|
||||||
self:_bind()
|
self:_bind()
|
||||||
self:refresh()
|
self:refresh()
|
||||||
|
|
||||||
|
-- 上报
|
||||||
|
BIReport:postPayUIShow(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.FIRST_RECHARGE_ID)
|
||||||
end
|
end
|
||||||
|
|
||||||
function FirstRechargePopUI:_bind()
|
function FirstRechargePopUI:_bind()
|
||||||
|
|||||||
@ -154,6 +154,9 @@ function GiftPopUI:refresh(needCheck)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 上报
|
||||||
|
BIReport:postPayUIShow(self.actType, self.actId)
|
||||||
|
|
||||||
self:updateTime()
|
self:updateTime()
|
||||||
end
|
end
|
||||||
|
|||||||
@ -21,6 +21,7 @@ function ShopComp:init()
|
|||||||
self.uiMap = self.baseObject:genAllChildren()
|
self.uiMap = self.baseObject:genAllChildren()
|
||||||
|
|
||||||
self.page = PAGE_MAIN -- 默认展示主要商品
|
self.page = PAGE_MAIN -- 默认展示主要商品
|
||||||
|
self.post = false
|
||||||
|
|
||||||
self:initTitlePage()
|
self:initTitlePage()
|
||||||
self:initMainPage()
|
self:initMainPage()
|
||||||
@ -81,6 +82,7 @@ end
|
|||||||
function ShopComp:switchPage(page)
|
function ShopComp:switchPage(page)
|
||||||
if self.page ~= page then
|
if self.page ~= page then
|
||||||
self.page = page
|
self.page = page
|
||||||
|
self.post = false
|
||||||
self:refresh()
|
self:refresh()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -168,6 +170,59 @@ function ShopComp:refresh()
|
|||||||
end
|
end
|
||||||
|
|
||||||
self:refreshTime()
|
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
|
end
|
||||||
|
|
||||||
function ShopComp:refreshTime()
|
function ShopComp:refreshTime()
|
||||||
@ -181,7 +236,7 @@ function ShopComp:refreshTime()
|
|||||||
end
|
end
|
||||||
if self.coinCellCount ~= coinCellCount then
|
if self.coinCellCount ~= coinCellCount then
|
||||||
self.coinCellCount = coinCellCount
|
self.coinCellCount = coinCellCount
|
||||||
DataManager.ShopData:setDirty()
|
DataManager.ShopData:setDirty()
|
||||||
end
|
end
|
||||||
local growCellCount = 0
|
local growCellCount = 0
|
||||||
if self.growSellCell and self.growSellCell:getIsOpen() then
|
if self.growSellCell and self.growSellCell:getIsOpen() then
|
||||||
|
|||||||
@ -6,7 +6,6 @@ end
|
|||||||
|
|
||||||
function ShopData:initBase()
|
function ShopData:initBase()
|
||||||
self:initActChapterStoreData()
|
self:initActChapterStoreData()
|
||||||
self:initFirstRecharge()
|
|
||||||
self:initCrossDay()
|
self:initCrossDay()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -52,7 +51,7 @@ function ShopData:initActGift(act)
|
|||||||
end
|
end
|
||||||
self.giftMap[giftType][giftId] = gift
|
self.giftMap[giftType][giftId] = gift
|
||||||
end
|
end
|
||||||
|
self:initFirstRecharge()
|
||||||
self:setDirty()
|
self:setDirty()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user