From a47f18db0712880bb6465a684a0559501eebbdfb Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Thu, 3 Aug 2023 14:20:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/bi_report.lua | 10 +++++++++- lua/app/module/activity/activity_manager.lua | 4 ++-- lua/app/module/arena/arena_manager.lua | 4 ++-- lua/app/module/shop/shop_manager.lua | 18 ++++++++--------- lua/app/ui/activity/gold_pig/gold_pig_ui.lua | 5 +++-- lua/app/ui/arena/arena_pop_gift_ui.lua | 3 ++- lua/app/ui/arena/bounty_main_ui.lua | 2 +- lua/app/ui/bounty/bounty_main_ui.lua | 2 +- lua/app/ui/fund/growth_fund_ui.lua | 2 +- .../cell/side_bar_arena_gift_cell.lua | 2 +- .../cell/side_bar_armor_gift_cell.lua | 2 +- .../cell/side_bar_beginner_gift_cell.lua | 2 +- .../cell/side_bar_first_recharge_cell.lua | 2 +- .../main_city/cell/side_bar_gold_pig_cell.lua | 2 +- .../cell/side_bar_grow_up_gift_cell.lua | 2 +- .../cell/side_bar_introduct_gift_cell.lua | 2 +- .../cell/side_bar_weapon_gift_cell.lua | 2 +- lua/app/ui/main_city/component/main_comp.lua | 7 ++++++- lua/app/ui/main_city/main_city_ui.lua | 20 +++++++++++++------ lua/app/ui/shop/cell/arena_gift_sell_cell.lua | 2 +- lua/app/ui/shop/first_recharge_pop_ui.lua | 5 +++-- lua/app/ui/shop/gift_pop_ui.lua | 3 ++- lua/app/ui/shop/introduct_pop_ui.lua | 5 +++-- lua/app/ui/shop/shop_comp.lua | 18 ++++++++--------- lua/app/userdata/shop/shop_data.lua | 2 +- 25 files changed, 77 insertions(+), 51 deletions(-) diff --git a/lua/app/common/bi_report.lua b/lua/app/common/bi_report.lua index 6efda7e7..c1519b1c 100644 --- a/lua/app/common/bi_report.lua +++ b/lua/app/common/bi_report.lua @@ -250,6 +250,13 @@ BIReport.ARENA_OPT_TYPE = { SETTLEMENT = "Settlement", } +BIReport.PAY_UI_SHOW_TYPE = { + LOGIN_POP = "LoginPop", + TRIGGER_POP = "TriggerPop", + CLICK_SHOW = "ClickShow", + SHOP_SHOW = "ShopShow", +} + -- b6 local EVENT_NAME_EXIT = "client_exit" local EVENT_NAME_FIGHT = "client_fight" @@ -1391,10 +1398,11 @@ end -- 内购相关界面展示,包括弹出/主动打开(如果是打开商城页签,钻石礼包只上报id2,章节礼包只上报首个可购买章节id) -- giftType为BIReport.GIFT_TYPE -function BIReport:postPayUIShow(giftType, giftId) +function BIReport:postPayUIShow(giftType, giftId, showType) local args = { gift_type = giftType, gift_id = giftId, + show_type = showType } self:report(EVENT_NAME_PAY_UI_SHOW, args) end diff --git a/lua/app/module/activity/activity_manager.lua b/lua/app/module/activity/activity_manager.lua index 6ff79b79..9e85fbdd 100644 --- a/lua/app/module/activity/activity_manager.lua +++ b/lua/app/module/activity/activity_manager.lua @@ -1,7 +1,7 @@ local ActivityManager = class("ActivityManager", BaseModule) -function ActivityManager:showGoldPigUI() - UIManager:showUI("app/ui/activity/gold_pig/gold_pig_ui") +function ActivityManager:showGoldPigUI(showType) + UIManager:showUI("app/ui/activity/gold_pig/gold_pig_ui", {showType = showType}) end function ActivityManager:buyGoldPig(id) diff --git a/lua/app/module/arena/arena_manager.lua b/lua/app/module/arena/arena_manager.lua index 82cec391..dcaeb600 100644 --- a/lua/app/module/arena/arena_manager.lua +++ b/lua/app/module/arena/arena_manager.lua @@ -225,8 +225,8 @@ function ArenaManager:rspAdBoxReward(result) end end -function ArenaManager:showGiftPopUI() - UIManager:showUI("app/ui/arena/arena_pop_gift_ui") +function ArenaManager:showGiftPopUI(showType) + UIManager:showUI("app/ui/arena/arena_pop_gift_ui", {showType = showType}) end return ArenaManager \ No newline at end of file diff --git a/lua/app/module/shop/shop_manager.lua b/lua/app/module/shop/shop_manager.lua index d5e5d6d7..44c63e4c 100644 --- a/lua/app/module/shop/shop_manager.lua +++ b/lua/app/module/shop/shop_manager.lua @@ -32,40 +32,40 @@ function ShopManager:showBoxLevelUpUI(params) end -- 触发弹窗礼包 -function ShopManager:triggerGiftPopUI(actType, actId) +function ShopManager:triggerGiftPopUI(actType, actId, showType) -- 入门礼包不在通用触发条件内 if (actType == PayManager.PURCHARSE_TYPE.ACT_GIFT and actId == GConst.ShopConst.INTRODUCT_GIFT_ID) then - self:showGiftPopUI(actType, actId, false) + self:showGiftPopUI(actType, actId, false, showType) DataManager.ShopData:removePopUpGift(actType, actId) else if ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.ACT_GIFT_SHOW_OPEN, true) then - self:showGiftPopUI(actType, actId, false) + self:showGiftPopUI(actType, actId, false, showType) DataManager.ShopData:removePopUpGift(actType, actId) end end end -function ShopManager:showGiftPopUI(actType, actId, onlySelf) +function ShopManager:showGiftPopUI(actType, actId, onlySelf, showType) if GFunc.isShenhe() then return end if actType == PayManager.PURCHARSE_TYPE.ACT_GIFT and actId == GConst.ShopConst.FIRST_RECHARGE_ID then - UIManager:showUI("app/ui/shop/first_recharge_pop_ui") + UIManager:showUI("app/ui/shop/first_recharge_pop_ui", {showType = showType}) elseif actType == PayManager.PURCHARSE_TYPE.ACT_GIFT and actId == GConst.ShopConst.INTRODUCT_GIFT_ID then - UIManager:showUI("app/ui/shop/introduct_pop_ui") + UIManager:showUI("app/ui/shop/introduct_pop_ui", {showType = showType}) else - UIManager:showUI("app/ui/shop/gift_pop_ui", {type = actType, id = actId, onlySelf = onlySelf}) + UIManager:showUI("app/ui/shop/gift_pop_ui", {type = actType, id = actId, onlySelf = onlySelf, showType = showType}) end end -- 触发金币弹窗礼包 function ShopManager:triggerCoinGiftPopUI(actId) - self:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, actId) + self:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, actId, BIReport.PAY_UI_SHOW_TYPE.TRIGGER_POP) end -- 触发成长礼包 function ShopManager:triggerGrowUpGiftPopUI(actId) - self:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW, actId) + self:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW, actId, BIReport.PAY_UI_SHOW_TYPE.TRIGGER_POP) end -- 购买每日特惠商品 diff --git a/lua/app/ui/activity/gold_pig/gold_pig_ui.lua b/lua/app/ui/activity/gold_pig/gold_pig_ui.lua index c2b5221a..d221115d 100644 --- a/lua/app/ui/activity/gold_pig/gold_pig_ui.lua +++ b/lua/app/ui/activity/gold_pig/gold_pig_ui.lua @@ -8,8 +8,9 @@ function GoldPigUI:getPrefabPath() return "assets/prefabs/ui/activity/gold_pig/gold_pig_ui.prefab" end -function GoldPigUI:ctor() +function GoldPigUI:ctor(params) self.goldPigId = DataManager.GoldPigData:getId() + self.showType = params.showType end function GoldPigUI:onLoadRootComplete() @@ -55,7 +56,7 @@ function GoldPigUI:onLoadRootComplete() end end) - BIReport:postPayUIShow(BIReport.GIFT_TYPE.GOLD_PIG) + BIReport:postPayUIShow(BIReport.GIFT_TYPE.GOLD_PIG, self.goldPigId, self.showType) self.timeTx = uiMap["gold_pig_ui.bg.time_bg.time_tx"] local isFull = DataManager.GoldPigData:getIsFull() diff --git a/lua/app/ui/arena/arena_pop_gift_ui.lua b/lua/app/ui/arena/arena_pop_gift_ui.lua index 49269e54..5b1468ee 100644 --- a/lua/app/ui/arena/arena_pop_gift_ui.lua +++ b/lua/app/ui/arena/arena_pop_gift_ui.lua @@ -14,6 +14,7 @@ function GiftPopUI:ctor(params) self.actType = PayManager.PURCHARSE_TYPE.ACT_GIFT self.actId = DataManager.ArenaData:getGiftId() + self.showType = params.showType DataManager.ArenaData:cleaShowPopGift() end @@ -103,7 +104,7 @@ function GiftPopUI:refresh() -- 上报 local giftType = PayManager:getGiftType(self.actType, self.actId) - BIReport:postPayUIShow(giftType, self.actId) + BIReport:postPayUIShow(giftType, self.actId, self.showType) self:updateTime() end diff --git a/lua/app/ui/arena/bounty_main_ui.lua b/lua/app/ui/arena/bounty_main_ui.lua index e2a43b79..bd21990a 100644 --- a/lua/app/ui/arena/bounty_main_ui.lua +++ b/lua/app/ui/arena/bounty_main_ui.lua @@ -63,7 +63,7 @@ function BountyMainUI:onLoadRootComplete() end, 1) self:updateTime() - BIReport:postPayUIShow(BIReport.GIFT_TYPE.ARENA_BOUNTY) + BIReport:postPayUIShow(BIReport.GIFT_TYPE.ARENA_BOUNTY, nil, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) end function BountyMainUI:initTitle() diff --git a/lua/app/ui/bounty/bounty_main_ui.lua b/lua/app/ui/bounty/bounty_main_ui.lua index ed271ad4..5cddd491 100644 --- a/lua/app/ui/bounty/bounty_main_ui.lua +++ b/lua/app/ui/bounty/bounty_main_ui.lua @@ -63,7 +63,7 @@ function BountyMainUI:onLoadRootComplete() end, 1) self:updateTime() - BIReport:postPayUIShow(BIReport.GIFT_TYPE.BOUNTY) + BIReport:postPayUIShow(BIReport.GIFT_TYPE.BOUNTY, nil, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) end function BountyMainUI:initTitle() diff --git a/lua/app/ui/fund/growth_fund_ui.lua b/lua/app/ui/fund/growth_fund_ui.lua index c2104ca9..901d4fd5 100644 --- a/lua/app/ui/fund/growth_fund_ui.lua +++ b/lua/app/ui/fund/growth_fund_ui.lua @@ -69,7 +69,7 @@ function GrowthFundUI:onLoadRootComplete() self:initPayBtns() self:initRewards() self:bindData() - BIReport:postPayUIShow(BIReport.GIFT_TYPE.GROWTH_FUND) + BIReport:postPayUIShow(BIReport.GIFT_TYPE.GROWTH_FUND, nil, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) end function GrowthFundUI:initTitle() diff --git a/lua/app/ui/main_city/cell/side_bar_arena_gift_cell.lua b/lua/app/ui/main_city/cell/side_bar_arena_gift_cell.lua index ee860b82..809877a3 100644 --- a/lua/app/ui/main_city/cell/side_bar_arena_gift_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_arena_gift_cell.lua @@ -18,7 +18,7 @@ function SideBarArenaGiftCell:getSpineName() end function SideBarArenaGiftCell:onClick() - ModuleManager.ArenaManager:showGiftPopUI() + ModuleManager.ArenaManager:showGiftPopUI(BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) end function SideBarArenaGiftCell:getIsShowRedPoint() diff --git a/lua/app/ui/main_city/cell/side_bar_armor_gift_cell.lua b/lua/app/ui/main_city/cell/side_bar_armor_gift_cell.lua index e19f4155..8e19d62e 100644 --- a/lua/app/ui/main_city/cell/side_bar_armor_gift_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_armor_gift_cell.lua @@ -13,7 +13,7 @@ end function SideBarArmorGiftCell:onClick() local gift = DataManager.ShopData:getGift(GIFT_TYPE) if gift then - ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, gift.id, true) + ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, gift.id, true, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) end end diff --git a/lua/app/ui/main_city/cell/side_bar_beginner_gift_cell.lua b/lua/app/ui/main_city/cell/side_bar_beginner_gift_cell.lua index ab8fcf0d..7388fb47 100644 --- a/lua/app/ui/main_city/cell/side_bar_beginner_gift_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_beginner_gift_cell.lua @@ -14,7 +14,7 @@ function SideBarBeginnerGiftCell:getSpineName() end function SideBarBeginnerGiftCell:onClick() - ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.BEGINNER_GIFT_ID, true) + ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.BEGINNER_GIFT_ID, true, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) end function SideBarBeginnerGiftCell:getIsShowRedPoint() diff --git a/lua/app/ui/main_city/cell/side_bar_first_recharge_cell.lua b/lua/app/ui/main_city/cell/side_bar_first_recharge_cell.lua index 38ffd9ed..f56e887e 100644 --- a/lua/app/ui/main_city/cell/side_bar_first_recharge_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_first_recharge_cell.lua @@ -18,7 +18,7 @@ function SideBarFirstRechargeCell:getIsShowRedPoint() end function SideBarFirstRechargeCell:onClick() - ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.FIRST_RECHARGE_ID, true) + ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.FIRST_RECHARGE_ID, true, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) end return SideBarFirstRechargeCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_gold_pig_cell.lua b/lua/app/ui/main_city/cell/side_bar_gold_pig_cell.lua index 11e4782c..00c26405 100644 --- a/lua/app/ui/main_city/cell/side_bar_gold_pig_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_gold_pig_cell.lua @@ -14,7 +14,7 @@ function SideBarGoldPigCell:getSpineName() end function SideBarGoldPigCell:onClick() - ModuleManager.ActivityManager:showGoldPigUI() + ModuleManager.ActivityManager:showGoldPigUI(BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) end function SideBarGoldPigCell:onRefresh() diff --git a/lua/app/ui/main_city/cell/side_bar_grow_up_gift_cell.lua b/lua/app/ui/main_city/cell/side_bar_grow_up_gift_cell.lua index 09eabbb1..c3beb0f0 100644 --- a/lua/app/ui/main_city/cell/side_bar_grow_up_gift_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_grow_up_gift_cell.lua @@ -12,7 +12,7 @@ end function SideBarGrowUpGiftCell:onClick() local gift = DataManager.ShopData:getGrowUpGift() if gift then - ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW, gift.current_grow_up_id, true) + ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW, gift.current_grow_up_id, true, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) end end diff --git a/lua/app/ui/main_city/cell/side_bar_introduct_gift_cell.lua b/lua/app/ui/main_city/cell/side_bar_introduct_gift_cell.lua index 5907dfa7..0784f4d4 100644 --- a/lua/app/ui/main_city/cell/side_bar_introduct_gift_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_introduct_gift_cell.lua @@ -14,7 +14,7 @@ function SideBarIntroductGiftCell:getSpineName() end function SideBarIntroductGiftCell:onClick() - ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.INTRODUCT_GIFT_ID, true) + ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.INTRODUCT_GIFT_ID, true, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) end function SideBarIntroductGiftCell:getIsShowRedPoint() diff --git a/lua/app/ui/main_city/cell/side_bar_weapon_gift_cell.lua b/lua/app/ui/main_city/cell/side_bar_weapon_gift_cell.lua index 6c7191a4..4759a55f 100644 --- a/lua/app/ui/main_city/cell/side_bar_weapon_gift_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_weapon_gift_cell.lua @@ -13,7 +13,7 @@ end function SideBarWeaponGiftCell:onClick() local gift = DataManager.ShopData:getGift(GIFT_TYPE) if gift then - ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, gift.id, true) + ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, gift.id, true, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) end end diff --git a/lua/app/ui/main_city/component/main_comp.lua b/lua/app/ui/main_city/component/main_comp.lua index 99e93112..fe352ddc 100644 --- a/lua/app/ui/main_city/component/main_comp.lua +++ b/lua/app/ui/main_city/component/main_comp.lua @@ -85,7 +85,12 @@ function MainComp:refreshModule(selectModule) if self.curModuleType == GConst.MainCityConst.MAIN_MODULE.ARENA then if DataManager.ArenaData:needShowPopGift() and DataManager.ArenaData:getGiftId() then - ModuleManager.ArenaManager:showGiftPopUI() + local showType = BIReport.PAY_UI_SHOW_TYPE.TRIGGER_POP + local mainUI = UIManager:getUIByIndex(UIManager.UI_PATH.MAINCITY_UI) + if mainUI and mainUI.isFirstEnter then + showType = BIReport.PAY_UI_SHOW_TYPE.LOGIN_POP + end + ModuleManager.ArenaManager:showGiftPopUI(showType) end elseif self.curModuleType == GConst.MainCityConst.MAIN_MODULE.DUNGEON then if DataManager.TutorialData:getIsInTutorial() then diff --git a/lua/app/ui/main_city/main_city_ui.lua b/lua/app/ui/main_city/main_city_ui.lua index a15d2c29..d378a556 100644 --- a/lua/app/ui/main_city/main_city_ui.lua +++ b/lua/app/ui/main_city/main_city_ui.lua @@ -1020,7 +1020,11 @@ function MainCityUI:checkMainPop() -- 金猪满了后下次进主城要弹出来 if DataManager.GoldPigData:getPopFlag() then DataManager.GoldPigData:markPop() - ModuleManager.ActivityManager:showGoldPigUI() + local showType = BIReport.PAY_UI_SHOW_TYPE.TRIGGER_POP + if self.isFirstEnter then + showType = BIReport.PAY_UI_SHOW_TYPE.LOGIN_POP + end + ModuleManager.ActivityManager:showGoldPigUI(showType) end end @@ -1077,6 +1081,10 @@ end -- 检查礼包(首充(作废)/入门/章节/新手/助力/成长/金币顺序) function MainCityUI:checkGift() + local showType = BIReport.PAY_UI_SHOW_TYPE.TRIGGER_POP + if self.isFirstEnter then + showType = BIReport.PAY_UI_SHOW_TYPE.LOGIN_POP + end -- 审核模式不弹礼包 if GFunc.isShenhe() then return @@ -1143,7 +1151,7 @@ function MainCityUI:checkGift() -- end -- 入门礼包 if introductGiftIds and #introductGiftIds > 0 then - ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, introductGiftIds[1]) + ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, introductGiftIds[1], showType) return true end ---- 试玩弹窗在章节礼包前 @@ -1154,22 +1162,22 @@ function MainCityUI:checkGift() end -- 章节礼包 if chapterPopUpGifts and #chapterPopUpGifts > 0 then - ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.CHAPTER_GIFT, chapterPopUpGifts[1]) + ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.CHAPTER_GIFT, chapterPopUpGifts[1], showType) return true end -- 新手礼包 if beginnerGiftIds and #beginnerGiftIds > 0 then - ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, beginnerGiftIds[1]) + ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, beginnerGiftIds[1], showType) return true end -- 助力礼包 if levelUpGiftIds and #levelUpGiftIds then - ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, levelUpGiftIds[1]) + ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, levelUpGiftIds[1], showType) return true end -- 成长礼包 if growUpPopUpGifts and #growUpPopUpGifts > 0 then - ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW, growUpPopUpGifts[1]) + ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW, growUpPopUpGifts[1], showType) return true end end diff --git a/lua/app/ui/shop/cell/arena_gift_sell_cell.lua b/lua/app/ui/shop/cell/arena_gift_sell_cell.lua index e42274fa..a6a5d683 100644 --- a/lua/app/ui/shop/cell/arena_gift_sell_cell.lua +++ b/lua/app/ui/shop/cell/arena_gift_sell_cell.lua @@ -98,7 +98,7 @@ end function ArenaGiftSellCell:onClickGift(id) -- PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT) - ModuleManager.ArenaManager:showGiftPopUI() + ModuleManager.ArenaManager:showGiftPopUI(BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) end return ArenaGiftSellCell \ No newline at end of file diff --git a/lua/app/ui/shop/first_recharge_pop_ui.lua b/lua/app/ui/shop/first_recharge_pop_ui.lua index 53452ebe..a1d05882 100644 --- a/lua/app/ui/shop/first_recharge_pop_ui.lua +++ b/lua/app/ui/shop/first_recharge_pop_ui.lua @@ -1,7 +1,8 @@ local FirstRechargePopUI = class("FirstRechargePopUI", BaseUI) local MAX_ITEM_NUM = 3 -function FirstRechargePopUI:ctor() +function FirstRechargePopUI:ctor(params) + self.showType = params.showType end function FirstRechargePopUI:isFullScreen() @@ -49,7 +50,7 @@ function FirstRechargePopUI:onLoadRootComplete() self:refresh() -- 上报 - BIReport:postPayUIShow(BIReport.GIFT_TYPE.FIRST_RECHARGE, GConst.ShopConst.FIRST_RECHARGE_ID) + BIReport:postPayUIShow(BIReport.GIFT_TYPE.FIRST_RECHARGE, GConst.ShopConst.FIRST_RECHARGE_ID, self.showType) end function FirstRechargePopUI:_bind() diff --git a/lua/app/ui/shop/gift_pop_ui.lua b/lua/app/ui/shop/gift_pop_ui.lua index 38b9b365..ffe14e45 100644 --- a/lua/app/ui/shop/gift_pop_ui.lua +++ b/lua/app/ui/shop/gift_pop_ui.lua @@ -47,6 +47,7 @@ function GiftPopUI:ctor(params) self.actType = params.type self.actId = params.id self.onlySelf = params.onlySelf -- 有此标记时 关闭直接关闭界面 + self.showType = params.showType self.buyCount = DataManager.ShopData:getGiftBoughtNum(self.actType, self.actId) -- 触发时该礼包的购买数量 end @@ -178,7 +179,7 @@ function GiftPopUI:refresh(needCheck) -- 上报 local giftType = PayManager:getGiftType(self.actType, self.actId) - BIReport:postPayUIShow(giftType, self.actId) + BIReport:postPayUIShow(giftType, self.actId, self.showType) self:updateTime() end diff --git a/lua/app/ui/shop/introduct_pop_ui.lua b/lua/app/ui/shop/introduct_pop_ui.lua index fbe5623e..73c63875 100644 --- a/lua/app/ui/shop/introduct_pop_ui.lua +++ b/lua/app/ui/shop/introduct_pop_ui.lua @@ -1,7 +1,8 @@ local IntroductPopUI = class("IntroductPopUI", BaseUI) local MAX_ITEM_NUM = 3 -function IntroductPopUI:ctor() +function IntroductPopUI:ctor(params) + self.showType = params.showType end function IntroductPopUI:isFullScreen() @@ -52,7 +53,7 @@ function IntroductPopUI:onLoadRootComplete() self:refresh() -- 上报 - BIReport:postPayUIShow(BIReport.GIFT_TYPE.INTRODUCTORY_GIFT, GConst.ShopConst.INTRODUCT_GIFT_ID) + BIReport:postPayUIShow(BIReport.GIFT_TYPE.INTRODUCTORY_GIFT, GConst.ShopConst.INTRODUCT_GIFT_ID, self.showType) end function IntroductPopUI:_bind() diff --git a/lua/app/ui/shop/shop_comp.lua b/lua/app/ui/shop/shop_comp.lua index 3936fd91..2da48776 100644 --- a/lua/app/ui/shop/shop_comp.lua +++ b/lua/app/ui/shop/shop_comp.lua @@ -214,40 +214,40 @@ function ShopComp:postEnterPage() -- 章节 local actIdList = DataManager.ShopData:getActChapterStoreCanBuyActIds() if actIdList and #actIdList > 0 then - BIReport:postPayUIShow(BIReport.GIFT_TYPE.ACT_CHAPTER_STORE, actIdList[1]) -- 约定上报第一个付费项 + BIReport:postPayUIShow(BIReport.GIFT_TYPE.ACT_CHAPTER_STORE, actIdList[1], BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) -- 约定上报第一个付费项 end -- 新手 if not DataManager.ShopData:getBeginnerGiftHasBuy() then - BIReport:postPayUIShow(BIReport.GIFT_TYPE.BEGINNER_GIFT, GConst.ShopConst.BEGINNER_GIFT_ID) + BIReport:postPayUIShow(BIReport.GIFT_TYPE.BEGINNER_GIFT, GConst.ShopConst.BEGINNER_GIFT_ID, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) end -- 助力 local actIdList = DataManager.ShopData:getLevelUpGiftActIds() if actIdList and #actIdList > 0 then for _, id in ipairs(actIdList) do - BIReport:postPayUIShow(BIReport.GIFT_TYPE.LEVEL_UP_GIFT, id) + BIReport:postPayUIShow(BIReport.GIFT_TYPE.LEVEL_UP_GIFT, id, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) end end -- 成长 local act = DataManager.ShopData:getGrowUpGift() if act then - BIReport:postPayUIShow(BIReport.GIFT_TYPE.GROW_UP_GIFT_NEW, act.current_grow_up_id) + BIReport:postPayUIShow(BIReport.GIFT_TYPE.GROW_UP_GIFT_NEW, act.current_grow_up_id, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) end -- 金币 local actId = DataManager.ShopData:getValidCoinGiftId() if actId and actId > 0 then - BIReport:postPayUIShow(BIReport.GIFT_TYPE.COIN_GIFT, actId) + BIReport:postPayUIShow(BIReport.GIFT_TYPE.COIN_GIFT, actId, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) end -- 竞技场 local actId = DataManager.ArenaData:getGiftId() if actId and actId > 0 then - BIReport:postPayUIShow(BIReport.GIFT_TYPE.ARENA_GIFT, actId) + BIReport:postPayUIShow(BIReport.GIFT_TYPE.ARENA_GIFT, actId, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) end -- 武器副本 local actIdInfo = DataManager.ShopData:getGift(PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT) if actIdInfo then local actGiftId = actIdInfo.id if actGiftId and actGiftId > 0 then - BIReport:postPayUIShow(BIReport.GIFT_TYPE.WEAPON_GIFT, actGiftId) + BIReport:postPayUIShow(BIReport.GIFT_TYPE.WEAPON_GIFT, actGiftId, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) end end -- 防具副本 @@ -255,12 +255,12 @@ function ShopComp:postEnterPage() if actIdInfo then local actGiftId = actIdInfo.id if actGiftId and actGiftId > 0 then - BIReport:postPayUIShow(BIReport.GIFT_TYPE.ARMOR_GIFT, actGiftId) + BIReport:postPayUIShow(BIReport.GIFT_TYPE.ARMOR_GIFT, actGiftId, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) end end else -- 找到所有的钻石项目 - BIReport:postPayUIShow(BIReport.GIFT_TYPE.MALL_TREASURE, 2) -- 约定上报第一个付费项 + BIReport:postPayUIShow(BIReport.GIFT_TYPE.MALL_TREASURE, 2, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) -- 约定上报第一个付费项 end end diff --git a/lua/app/userdata/shop/shop_data.lua b/lua/app/userdata/shop/shop_data.lua index f58bc69e..2a3a1351 100644 --- a/lua/app/userdata/shop/shop_data.lua +++ b/lua/app/userdata/shop/shop_data.lua @@ -889,7 +889,7 @@ function ShopData:checkPopGift(actGiftType) for _, actId in ipairs(gifts) do local cfgInfo = self:getActGiftConfig()[actId] if cfgInfo and cfgInfo.type == actGiftType then - ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, actId) + ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, actId, BIReport.PAY_UI_SHOW_TYPE.TRIGGER_POP) end end end