加数数打点

This commit is contained in:
huanghaipeng 2025-11-14 15:40:24 +08:00
parent 5e83f7e1cb
commit 6265247c80
4 changed files with 195 additions and 19 deletions

View File

@ -3129,7 +3129,7 @@
"component": "", "component": "",
"_componentId": "1dc93b4fehOrpGgTkihBH4g", "_componentId": "1dc93b4fehOrpGgTkihBH4g",
"handler": "openHeath", "handler": "openHeath",
"customEventData": "" "customEventData": "healthBtn"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
@ -3634,7 +3634,7 @@
"component": "", "component": "",
"_componentId": "1dc93b4fehOrpGgTkihBH4g", "_componentId": "1dc93b4fehOrpGgTkihBH4g",
"handler": "openShop", "handler": "openShop",
"customEventData": "" "customEventData": "coinBtn"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
@ -4181,7 +4181,7 @@
"component": "", "component": "",
"_componentId": "1dc93b4fehOrpGgTkihBH4g", "_componentId": "1dc93b4fehOrpGgTkihBH4g",
"handler": "openMonthCard", "handler": "openMonthCard",
"customEventData": "" "customEventData": "yiconBtn"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
@ -4560,7 +4560,7 @@
"component": "", "component": "",
"_componentId": "1dc93b4fehOrpGgTkihBH4g", "_componentId": "1dc93b4fehOrpGgTkihBH4g",
"handler": "openStarter_pack", "handler": "openStarter_pack",
"customEventData": "" "customEventData": "xinshouBtn"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
@ -4784,7 +4784,7 @@
"component": "", "component": "",
"_componentId": "83533ha7L1Hn4Ep+rvR3z5k", "_componentId": "83533ha7L1Hn4Ep+rvR3z5k",
"handler": "init", "handler": "init",
"customEventData": "" "customEventData": "btnRank"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
@ -10585,7 +10585,7 @@
"component": "", "component": "",
"_componentId": "1dc93b4fehOrpGgTkihBH4g", "_componentId": "1dc93b4fehOrpGgTkihBH4g",
"handler": "openShop", "handler": "openShop",
"customEventData": "" "customEventData": "shopBtn"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
@ -10864,7 +10864,7 @@
"component": "", "component": "",
"_componentId": "1dc93b4fehOrpGgTkihBH4g", "_componentId": "1dc93b4fehOrpGgTkihBH4g",
"handler": "openDailyQuests", "handler": "openDailyQuests",
"customEventData": "" "customEventData": "dayBtn"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
@ -11045,7 +11045,7 @@
"component": "", "component": "",
"_componentId": "1dc93b4fehOrpGgTkihBH4g", "_componentId": "1dc93b4fehOrpGgTkihBH4g",
"handler": "openWinStreak", "handler": "openWinStreak",
"customEventData": "" "customEventData": "hammerBtn"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
@ -11226,7 +11226,7 @@
"component": "", "component": "",
"_componentId": "1dc93b4fehOrpGgTkihBH4g", "_componentId": "1dc93b4fehOrpGgTkihBH4g",
"handler": "openPassCheck", "handler": "openPassCheck",
"customEventData": "" "customEventData": "passBtn"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",

View File

@ -598,7 +598,24 @@ export default class JiaZai extends cc.Component {
} }
// 打开heath弹窗创建预制体并启动自己的倒计时 // 打开heath弹窗创建预制体并启动自己的倒计时
openHeath() { openHeath(event?: cc.Event, customEventData?: string) { // EventTouch EventCustom
let eventName = "";
let btnName = ""
if (customEventData !== undefined) {
btnName = customEventData;
eventName = "click"
} else {
btnName = "healthBtn";
eventName = "auto";
}
let dataInfo = {
interface_id: "heathnum", // 界面名称
reason: eventName, // 事件名称
is_first_exposure: false, // 是否首次曝光
entry_point: btnName, // 按钮名称
}
cc.fx.GameTool.shushu_Track("interface_exposure", dataInfo);
let health = cc.instantiate(this.health); let health = cc.instantiate(this.health);
this.node.addChild(health); this.node.addChild(health);
let heathPop = health.getComponent("heathnum").heatht; let heathPop = health.getComponent("heathnum").heatht;
@ -927,12 +944,30 @@ export default class JiaZai extends cc.Component {
} }
//打开商店 //打开商店
openShop() { openShop(event?: cc.Event, customEventData?: string) {
if (!JiaZai.cachedShopPrefab) { if (!JiaZai.cachedShopPrefab) {
cc.error('Shop prefab is not loaded yet.'); cc.error('Shop prefab is not loaded yet.');
return; return;
} }
let eventName = "";
let btnName = ""
if (customEventData !== undefined) {
btnName = customEventData;
eventName = "click"
} else {
btnName = "shopBtn";
eventName = "auto";
}
let dataInfo = {
interface_id: "shop", // 界面名称
reason: eventName, // 事件名称
is_first_exposure: false, // 是否首次曝光
entry_point: btnName, // 按钮名称
}
cc.fx.GameTool.shushu_Track("interface_exposure", dataInfo);
console.log("统计功能", dataInfo);
if (!this.shopNode) { if (!this.shopNode) {
// 第一次使用,创建节点 // 第一次使用,创建节点
this.shopNode = cc.instantiate(JiaZai.cachedShopPrefab); this.shopNode = cc.instantiate(JiaZai.cachedShopPrefab);
@ -975,11 +1010,30 @@ export default class JiaZai extends cc.Component {
this.updatePower(); this.updatePower();
} }
//打开月卡 //打开月卡
openMonthlyCard() { openMonthlyCard(event?: cc.Event, customEventData?: string) {
if (!JiaZai.cachedMonthlyCardPrefab) { if (!JiaZai.cachedMonthlyCardPrefab) {
cc.error('MonthlyCard prefab is not loaded yet.'); cc.error('MonthlyCard prefab is not loaded yet.');
return; return;
} }
let eventName = "";
let btnName = ""
if (customEventData !== undefined) {
btnName = customEventData;
eventName = "click"
} else {
btnName = "yiconBtn";
eventName = "auto";
}
let dataInfo = {
interface_id: "monthlyCard", // 界面名称
reason: eventName, // 事件名称
is_first_exposure: false, // 是否首次曝光
entry_point: btnName, // 按钮名称
}
cc.fx.GameTool.shushu_Track("interface_exposure", dataInfo);
console.log("统计功能", dataInfo);
if (!this.monthlyCardNode) { if (!this.monthlyCardNode) {
// 第一次使用,创建节点 // 第一次使用,创建节点
this.monthlyCardNode = cc.instantiate(JiaZai.cachedMonthlyCardPrefab); this.monthlyCardNode = cc.instantiate(JiaZai.cachedMonthlyCardPrefab);
@ -1005,7 +1059,24 @@ export default class JiaZai extends cc.Component {
} }
openDailyQuests() { openDailyQuests(event?: cc.Event, customEventData?: string) {
let eventName = "";
let btnName = ""
if (customEventData !== undefined) {
btnName = customEventData;
eventName = "click"
} else {
btnName = "dayBtn";
eventName = "auto";
}
let dataInfo = {
interface_id: "DailyQuests", // 界面名称
reason: eventName, // 事件名称
is_first_exposure: false, // 是否首次曝光
entry_point: btnName, // 按钮名称
}
cc.fx.GameTool.shushu_Track("interface_exposure", dataInfo);
this.dailyQuestsNode = null; this.dailyQuestsNode = null;
this.openLoad2(); this.openLoad2();
this.dailyQuestsShow = true; this.dailyQuestsShow = true;
@ -1328,8 +1399,25 @@ export default class JiaZai extends cc.Component {
// }) // })
} }
openStarter_pack() { openStarter_pack(event?: cc.Event, customEventData?: string) {
if (!JiaZai.cachedActionPrefab) { if (!JiaZai.cachedActionPrefab) {
let eventName = "";
let btnName = ""
if (customEventData !== undefined) {
btnName = customEventData;
eventName = "click"
} else {
btnName = "xinshouBtn";
eventName = "auto";
}
let dataInfo = {
interface_id: "NewbieGift", // 界面名称
reason: eventName, // 事件名称
is_first_exposure: false, // 是否首次曝光
entry_point: btnName, // 按钮名称
}
cc.fx.GameTool.shushu_Track("interface_exposure", dataInfo);
// cc.error('Action prefab is not loaded yet.'); // cc.error('Action prefab is not loaded yet.');
cc.assetManager.loadBundle('action_bundle', (err: Error, bundle: cc.AssetManager.Bundle) => { cc.assetManager.loadBundle('action_bundle', (err: Error, bundle: cc.AssetManager.Bundle) => {
if (err) { if (err) {
@ -1809,7 +1897,24 @@ export default class JiaZai extends cc.Component {
this.openWinStreak(); this.openWinStreak();
} }
//打开连胜活动 //打开连胜活动
openWinStreak() { openWinStreak(event?: cc.Event, customEventData?: string) {
let eventName = "";
let btnName = ""
if (customEventData !== undefined) {
btnName = customEventData;
eventName = "click";
} else {
btnName = "hammerBtn";
eventName = "auto";
}
let dataInfo = {
interface_id: "WinStreak", // 界面名称
reason: eventName, // 事件名称
is_first_exposure: false, // 是否首次曝光
entry_point: btnName, // 按钮名称
}
cc.fx.GameTool.shushu_Track("interface_exposure", dataInfo);
if (!JiaZai.cachedWinStreakPrefab) { if (!JiaZai.cachedWinStreakPrefab) {
// cc.error('Action prefab is not loaded yet.'); // cc.error('Action prefab is not loaded yet.');
cc.assetManager.loadBundle('action_bundle', (err: Error, bundle: cc.AssetManager.Bundle) => { cc.assetManager.loadBundle('action_bundle', (err: Error, bundle: cc.AssetManager.Bundle) => {
@ -1901,12 +2006,29 @@ export default class JiaZai extends cc.Component {
} }
openPassCheck() { openPassCheck(event?: cc.Event, customEventData?: string) {
if (!JiaZai.cachedPassCheckPrefab) { if (!JiaZai.cachedPassCheckPrefab) {
console.error('PassCheck prefab is not loaded yet.') console.error('PassCheck prefab is not loaded yet.')
return; return;
} }
let eventName = "";
let btnName = ""
if (customEventData !== undefined) {
btnName = customEventData;
eventName = "click";
} else {
btnName = "passBtn";
eventName = "auto";
}
let dataInfo = {
interface_id: "passCheck", // 界面名称
reason: eventName, // 事件名称
is_first_exposure: false, // 是否首次曝光
entry_point: btnName, // 按钮名称
}
cc.fx.GameTool.shushu_Track("interface_exposure", dataInfo);
var passCheck = null; var passCheck = null;
Utils.getPassCheckInfo((data) => { Utils.getPassCheckInfo((data) => {
passCheck = data.data.passCheck; passCheck = data.data.passCheck;

View File

@ -411,12 +411,31 @@ export default class SceneManager extends cc.Component {
//打开商店 //打开商店
openShop() { openShop(customEventData?: string) {
console.log("进入sceneManager openShop"); console.log("进入sceneManager openShop");
if (!SceneManager.cachedShopPrefab) { if (!SceneManager.cachedShopPrefab) {
cc.error('Shop prefab is not loaded yet.'); cc.error('Shop prefab is not loaded yet.');
return; return;
} }
let eventName = "";
let btnName = ""
if (customEventData !== undefined) {
btnName = customEventData;
eventName = "click"
} else {
btnName = "shop_level";
eventName = "auto";
}
let dataInfo = {
interface_id: "shop", // 界面名称
reason: eventName, // 事件名称
is_first_exposure: false, // 是否首次曝光
entry_point: btnName, // 按钮名称
}
cc.fx.GameTool.shushu_Track("interface_exposure", dataInfo);
MapConroler._instance.pause = true; MapConroler._instance.pause = true;
MapConroler._instance.stopBoom(); MapConroler._instance.stopBoom();
if (!this.shopNode) { if (!this.shopNode) {
@ -432,11 +451,29 @@ export default class SceneManager extends cc.Component {
// console.log("shopNode parent:", this.shopNode.parent); // console.log("shopNode parent:", this.shopNode.parent);
} }
//打开月卡 //打开月卡
openMonthlyCard() { openMonthlyCard(customEventData?: string) {
if (!SceneManager.cachedMonthlyCardPrefab) { if (!SceneManager.cachedMonthlyCardPrefab) {
cc.error('MonthlyCard prefab is not loaded yet.'); cc.error('MonthlyCard prefab is not loaded yet.');
return; return;
} }
let eventName = "";
let btnName = ""
if (customEventData !== undefined) {
btnName = customEventData;
eventName = "click"
} else {
btnName = "yicon_level";
eventName = "auto";
}
let dataInfo = {
interface_id: "monthlyCard", // 界面名称
reason: eventName, // 事件名称
is_first_exposure: false, // 是否首次曝光
entry_point: btnName, // 按钮名称
}
cc.fx.GameTool.shushu_Track("interface_exposure", dataInfo);
if (!this.monthlyCardNode) { if (!this.monthlyCardNode) {
// 第一次使用,创建节点 // 第一次使用,创建节点
this.monthlyCardNode = cc.instantiate(SceneManager.cachedMonthlyCardPrefab); this.monthlyCardNode = cc.instantiate(SceneManager.cachedMonthlyCardPrefab);

View File

@ -40,7 +40,24 @@ export default class ranking extends cc.Component {
start() { start() {
} }
init() { init(event?: cc.Event, customEventData?: string) {
let eventName = "";
let btnName = ""
if (customEventData !== undefined) {
btnName = customEventData;
eventName = "click"
} else {
btnName = "btnRank";
eventName = "auto";
}
let dataInfo = {
interface_id: "ranking", // 界面名称
reason: eventName, // 事件名称
is_first_exposure: false, // 是否首次曝光
entry_point: btnName, // 按钮名称
}
cc.fx.GameTool.shushu_Track("interface_exposure", dataInfo);
this.openLoad(); this.openLoad();
this.btnRanks.active = true; this.btnRanks.active = true;
let user_Info = cc.fx.StorageMessage.getStorage("user_Info"); let user_Info = cc.fx.StorageMessage.getStorage("user_Info");