Commit e2c6291e authored by duiba_hf's avatar duiba_hf

埋点

parent d2746184
...@@ -10,7 +10,7 @@ import { ...@@ -10,7 +10,7 @@ import {
import Panel from '../../../Module/Panel'; import Panel from '../../../Module/Panel';
import TaskCenter from '../../TaskCenter'; import TaskCenter from '../../TaskCenter';
import { _asyncThrottle, strFormat } from '../../Utils/Utils'; import { _asyncThrottle, strFormat } from '../../Utils/Utils';
import { sendWebNet, sendWebNetWithToken, WebNetName } from '../../Utils/WebNet/WebNet'; import { LOG_TYPE, sendLog, sendWebNet, sendWebNetWithToken, WebNetName } from '../../Utils/WebNet/WebNet';
import { CircleItem } from './CircleItem'; import { CircleItem } from './CircleItem';
import { HandItem } from './HandItem'; import { HandItem } from './HandItem';
import { showToast } from 'db://assets/Module/UIFast'; import { showToast } from 'db://assets/Module/UIFast';
...@@ -138,6 +138,8 @@ export class ChangeEquipPanel extends Panel { ...@@ -138,6 +138,8 @@ export class ChangeEquipPanel extends Panel {
isClick: boolean = false; isClick: boolean = false;
async start() { async start() {
sendLog(LOG_TYPE.EXPOSURE,20)
/** 绑定点击事件 */ /** 绑定点击事件 */
this.leftIcon.on(Button.EventType.CLICK, this.circleRender(1), this); this.leftIcon.on(Button.EventType.CLICK, this.circleRender(1), this);
this.rightIcon.on(Button.EventType.CLICK, this.circleRender(-1), this); this.rightIcon.on(Button.EventType.CLICK, this.circleRender(-1), this);
...@@ -153,6 +155,7 @@ export class ChangeEquipPanel extends Panel { ...@@ -153,6 +155,7 @@ export class ChangeEquipPanel extends Panel {
this.bubbleBreathe(); this.bubbleBreathe();
this.getTaskInfo(); this.getTaskInfo();
} }
/** 气泡呼吸 */ /** 气泡呼吸 */
......
...@@ -4,6 +4,7 @@ import Panel from "../../Module/Panel"; ...@@ -4,6 +4,7 @@ import Panel from "../../Module/Panel";
import { changeScene, hideAllPanel } from "../../Module/UIFast"; import { changeScene, hideAllPanel } from "../../Module/UIFast";
import GameMgr from "../GameMgr"; import GameMgr from "../GameMgr";
import { MainGame } from "../Scenes/MainGame"; import { MainGame } from "../Scenes/MainGame";
import { LOG_TYPE, sendLog } from "../Utils/WebNet/WebNet";
const {ccclass, property} = _decorator; const {ccclass, property} = _decorator;
...@@ -26,6 +27,8 @@ export class GuidePrizePanel extends Panel { ...@@ -26,6 +27,8 @@ export class GuidePrizePanel extends Panel {
mainBtnTween = null; mainBtnTween = null;
start() { start() {
sendLog(LOG_TYPE.EXPOSURE,13)
this.mainBtn.on(Button.EventType.CLICK, this.closePannel, this); this.mainBtn.on(Button.EventType.CLICK, this.closePannel, this);
this.mainBtnTween = tween(this.mainBtn) this.mainBtnTween = tween(this.mainBtn)
...@@ -46,6 +49,7 @@ export class GuidePrizePanel extends Panel { ...@@ -46,6 +49,7 @@ export class GuidePrizePanel extends Panel {
/** 关闭弹窗 */ /** 关闭弹窗 */
async closePannel() { async closePannel() {
sendLog(LOG_TYPE.CLICK,13)
hideAllPanel(); hideAllPanel();
try { try {
const success = await GameMgr.ins.start(); const success = await GameMgr.ins.start();
......
...@@ -4,6 +4,7 @@ import { changeScene } from "db://assets/Module/UIFast"; ...@@ -4,6 +4,7 @@ import { changeScene } from "db://assets/Module/UIFast";
import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene"; import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene";
import GameMgr from "db://assets/Scripts/GameMgr"; import GameMgr from "db://assets/Scripts/GameMgr";
import { MainGame } from "db://assets/Scripts/Scenes/MainGame"; import { MainGame } from "db://assets/Scripts/Scenes/MainGame";
import { LOG_TYPE, sendLog } from "../Utils/WebNet/WebNet";
const {ccclass, property} = _decorator; const {ccclass, property} = _decorator;
...@@ -30,6 +31,7 @@ export default class NoBoxPanel extends Panel { ...@@ -30,6 +31,7 @@ export default class NoBoxPanel extends Panel {
total: Label = null!; total: Label = null!;
async start() { async start() {
sendLog(LOG_TYPE.EXPOSURE,18)
this.ok.on(Button.EventType.CLICK, this.onOk, this); this.ok.on(Button.EventType.CLICK, this.onOk, this);
this.close.on(Button.EventType.CLICK, this.onClose, this); this.close.on(Button.EventType.CLICK, this.onClose, this);
this.cancel.on(Button.EventType.CLICK, this.onClose, this); this.cancel.on(Button.EventType.CLICK, this.onClose, this);
...@@ -44,6 +46,7 @@ export default class NoBoxPanel extends Panel { ...@@ -44,6 +46,7 @@ export default class NoBoxPanel extends Panel {
* 再来一局 * 再来一局
*/ */
onOk = async () => { onOk = async () => {
sendLog(LOG_TYPE.CLICK,18)
this.btnEnable(this.ok, false); this.btnEnable(this.ok, false);
const success = await GameMgr.ins.start(); const success = await GameMgr.ins.start();
this.btnEnable(this.ok, true); this.btnEnable(this.ok, true);
......
...@@ -5,6 +5,7 @@ import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene"; ...@@ -5,6 +5,7 @@ import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene";
import ShareCenter from "../ShareCenter"; import ShareCenter from "../ShareCenter";
import { SHARE_TYPE } from "../const"; import { SHARE_TYPE } from "../const";
import { strFormat } from "../Utils/Utils"; import { strFormat } from "../Utils/Utils";
import { LOG_TYPE, sendLog } from "../Utils/WebNet/WebNet";
const {ccclass, property} = _decorator; const {ccclass, property} = _decorator;
...@@ -34,6 +35,7 @@ export default class PrizePanel extends Panel { ...@@ -34,6 +35,7 @@ export default class PrizePanel extends Panel {
img: Sprite = null!; img: Sprite = null!;
async start() { async start() {
sendLog(LOG_TYPE.EXPOSURE,19)
this.close.on(Button.EventType.CLICK, this.onClose, this); this.close.on(Button.EventType.CLICK, this.onClose, this);
this.get.on(Button.EventType.CLICK, this.onClose, this); this.get.on(Button.EventType.CLICK, this.onClose, this);
this.share.on(Button.EventType.CLICK, this.onShare, this); this.share.on(Button.EventType.CLICK, this.onShare, this);
...@@ -58,6 +60,7 @@ export default class PrizePanel extends Panel { ...@@ -58,6 +60,7 @@ export default class PrizePanel extends Panel {
} }
onShare = () => { onShare = () => {
sendLog(LOG_TYPE.CLICK,19)
// 去炫耀 分享 // 去炫耀 分享
ShareCenter.ins.doShare() ShareCenter.ins.doShare()
} }
......
import Panel from "../../Module/Panel"; import Panel from "../../Module/Panel";
import { _decorator, Button, Label, Node } from "cc"; import { _decorator, Button, Label, Node } from "cc";
import GameMgr from "db://assets/Scripts/GameMgr"; import GameMgr from "db://assets/Scripts/GameMgr";
import { LOG_TYPE, sendLog } from "../Utils/WebNet/WebNet";
const {ccclass, property} = _decorator; const { ccclass, property } = _decorator;
@ccclass('ReviewPanel') @ccclass('ReviewPanel')
export default class ReviewPanel extends Panel { export default class ReviewPanel extends Panel {
...@@ -24,11 +25,12 @@ export default class ReviewPanel extends Panel { ...@@ -24,11 +25,12 @@ export default class ReviewPanel extends Panel {
tip: Label = null!; tip: Label = null!;
async start() { async start() {
sendLog(LOG_TYPE.EXPOSURE, 17)
this.ok.on(Button.EventType.CLICK, this.onOk, this); this.ok.on(Button.EventType.CLICK, this.onOk, this);
this.close.on(Button.EventType.CLICK, this.onClose, this); this.close.on(Button.EventType.CLICK, this.onClose, this);
this.cancel.on(Button.EventType.CLICK, this.onClose, this); this.cancel.on(Button.EventType.CLICK, this.onClose, this);
const {delaySecond, delayConsumeNum} = GameMgr.ins.gameInfo; const { delaySecond, delayConsumeNum } = GameMgr.ins.gameInfo;
this.tip.string = `是否通过消耗${delayConsumeNum}积分\n延长${delaySecond}s游戏时间?`; this.tip.string = `是否通过消耗${delayConsumeNum}积分\n延长${delaySecond}s游戏时间?`;
} }
...@@ -36,6 +38,7 @@ export default class ReviewPanel extends Panel { ...@@ -36,6 +38,7 @@ export default class ReviewPanel extends Panel {
* 确认复活 * 确认复活
*/ */
onOk = () => { onOk = () => {
sendLog(LOG_TYPE.CLICK, 17)
this.data.review(); this.data.review();
this.hidePanel(); this.hidePanel();
} }
......
...@@ -4,7 +4,7 @@ import { showPanel, showToast } from "../../Module/UIFast"; ...@@ -4,7 +4,7 @@ import { showPanel, showToast } from "../../Module/UIFast";
import ToolBuyConfirmPanel from "./ToolBuyConfirmPanel"; import ToolBuyConfirmPanel from "./ToolBuyConfirmPanel";
import store from "../../store/store"; import store from "../../store/store";
import { _asyncThrottle } from "../Utils/Utils"; import { _asyncThrottle } from "../Utils/Utils";
import { sendWebNetWithToken, WebNetName } from "../Utils/WebNet/WebNet"; import { LOG_TYPE, sendLog, sendWebNetWithToken, WebNetName } from "../Utils/WebNet/WebNet";
const {ccclass, property} = _decorator; const {ccclass, property} = _decorator;
...@@ -26,6 +26,7 @@ export default class ToolBuyPanel extends Panel { ...@@ -26,6 +26,7 @@ export default class ToolBuyPanel extends Panel {
async start() { async start() {
sendLog(LOG_TYPE.EXPOSURE,21)
const {buyRichSpCredits} = store.homeInfo; const {buyRichSpCredits} = store.homeInfo;
// this.view["RichText"].getComponent(RichText).string = `<color=#C62F3A>您可消耗</color><color=#fe0114><size=34><b>${buyRichSpCredits}</b></size></color><color=#C62F3A>积分购买道具~</color>`; // this.view["RichText"].getComponent(RichText).string = `<color=#C62F3A>您可消耗</color><color=#fe0114><size=34><b>${buyRichSpCredits}</b></size></color><color=#C62F3A>积分购买道具~</color>`;
...@@ -44,6 +45,7 @@ export default class ToolBuyPanel extends Panel { ...@@ -44,6 +45,7 @@ export default class ToolBuyPanel extends Panel {
// 20240729 去掉二次确认弹窗 // 20240729 去掉二次确认弹窗
/** 确认购买 */ /** 确认购买 */
buyHandle = _asyncThrottle(async () => { buyHandle = _asyncThrottle(async () => {
sendLog(LOG_TYPE.CLICK,21)
const res = await sendWebNetWithToken(WebNetName.buyRichSp); const res = await sendWebNetWithToken(WebNetName.buyRichSp);
if (!res?.success) return; if (!res?.success) return;
......
import { _decorator, Button, easing, Label, Node, Tween, tween, v3 } from 'cc'; import { _decorator, Button, easing, Label, Node, Tween, tween, v3 } from 'cc';
import Scene from "db://assets/Module/Scene"; import Scene from "db://assets/Module/Scene";
import { getWebData, WebNetName } from "db://assets/Scripts/Utils/WebNet/WebNet"; import { getWebData, LOG_TYPE, sendLog, sendLogList, WebNetName } from "db://assets/Scripts/Utils/WebNet/WebNet";
import { MainGame } from "db://assets/Scripts/Scenes/MainGame"; import { MainGame } from "db://assets/Scripts/Scenes/MainGame";
import { changeScene, showPanel, showToast } from "db://assets/Module/UIFast"; import { changeScene, showPanel, showToast } from "db://assets/Module/UIFast";
import GameMgr from "db://assets/Scripts/GameMgr"; import GameMgr from "db://assets/Scripts/GameMgr";
...@@ -85,6 +85,17 @@ export class HomeScene extends Scene { ...@@ -85,6 +85,17 @@ export class HomeScene extends Scene {
this.rankBtn.on(Node.EventType.TOUCH_END, this.clickRank, this); this.rankBtn.on(Node.EventType.TOUCH_END, this.clickRank, this);
this.circleBtn.on(Button.EventType.CLICK, this.clickCircle, this); this.circleBtn.on(Button.EventType.CLICK, this.clickCircle, this);
this.toolBtn.on(Button.EventType.CLICK, this.clickTool, this); this.toolBtn.on(Button.EventType.CLICK, this.clickTool, this);
sendLog(LOG_TYPE.EXPOSURE, 5)
sendLog(LOG_TYPE.EXPOSURE, 6)
sendLog(LOG_TYPE.EXPOSURE, 7)
sendLog(LOG_TYPE.EXPOSURE, 8)
sendLog(LOG_TYPE.EXPOSURE, 9)
sendLog(LOG_TYPE.EXPOSURE, 10)
sendLog(LOG_TYPE.EXPOSURE, 11)
sendLog(LOG_TYPE.EXPOSURE, 12)
} }
async start() { async start() {
...@@ -142,6 +153,7 @@ export class HomeScene extends Scene { ...@@ -142,6 +153,7 @@ export class HomeScene extends Scene {
/** 去挑战 */ /** 去挑战 */
clickStart = async () => { clickStart = async () => {
sendLog(LOG_TYPE.CLICK, 5)
if (!this.checkActStatus()) return false; if (!this.checkActStatus()) return false;
const { const {
remainGameTime = 0, // 剩余挑战次数 remainGameTime = 0, // 剩余挑战次数
...@@ -169,22 +181,26 @@ export class HomeScene extends Scene { ...@@ -169,22 +181,26 @@ export class HomeScene extends Scene {
/** 奖励排行 */ /** 奖励排行 */
clickRank = async () => { clickRank = async () => {
sendLog(LOG_TYPE.CLICK, 8)
await changeScene(RankScene); await changeScene(RankScene);
} }
/** 任务 */ /** 任务 */
clickTask = async () => { clickTask = async () => {
sendLog(LOG_TYPE.CLICK, 7)
if (!this.checkActStatus()) return false if (!this.checkActStatus()) return false
showPanel(TaskPanel, {panelType: "scrollTop"}); showPanel(TaskPanel, {panelType: "scrollTop"});
} }
/** 明细 */ /** 明细 */
clickDetail = async () => { clickDetail = async () => {
sendLog(LOG_TYPE.CLICK, 12)
changeScene(RecordScene); changeScene(RecordScene);
} }
/** 佩戴财富圈 */ /** 佩戴财富圈 */
clickCircle = async () => { clickCircle = async () => {
sendLog(LOG_TYPE.CLICK, 6)
if (!this.checkActStatus()) return false if (!this.checkActStatus()) return false
showPanel(ChangeEquipPanel); showPanel(ChangeEquipPanel);
} }
...@@ -197,6 +213,7 @@ export class HomeScene extends Scene { ...@@ -197,6 +213,7 @@ export class HomeScene extends Scene {
/** 我的奖品 */ /** 我的奖品 */
clickPrize = async () => { clickPrize = async () => {
sendLog(LOG_TYPE.CLICK, 9)
changeScene(PrizeScene); changeScene(PrizeScene);
// setTimeout(() => { // setTimeout(() => {
// window.location.href = `prize.html?appID=${getUrlParam("appID")}&channel=${getUrlParam("channel")}` // window.location.href = `prize.html?appID=${getUrlParam("appID")}&channel=${getUrlParam("channel")}`
...@@ -205,11 +222,13 @@ export class HomeScene extends Scene { ...@@ -205,11 +222,13 @@ export class HomeScene extends Scene {
/** 规则 */ /** 规则 */
clickRule = async () => { clickRule = async () => {
sendLog(LOG_TYPE.CLICK, 11)
showPanel(RulePanel); showPanel(RulePanel);
} }
/** 返回 */ /** 返回 */
clickShare = async () => { clickShare = async () => {
sendLog(LOG_TYPE.CLICK, 10)
if (!this.checkActStatus()) return false; if (!this.checkActStatus()) return false;
await ShareCenter.ins.doShare(); await ShareCenter.ins.doShare();
} }
......
...@@ -31,13 +31,15 @@ import GameChooseHand from "db://assets/Scripts/Panels/GameChooseHand"; ...@@ -31,13 +31,15 @@ import GameChooseHand from "db://assets/Scripts/Panels/GameChooseHand";
import ReviewPanel from "db://assets/Scripts/Panels/ReviewPanel"; import ReviewPanel from "db://assets/Scripts/Panels/ReviewPanel";
import { _asyncThrottle, sleep } from "db://assets/Scripts/Utils/Utils"; import { _asyncThrottle, sleep } from "db://assets/Scripts/Utils/Utils";
import { import {
LOG_TYPE,
sendLog,
sendWebNet, sendWebNet,
sendWebNetWithToken, sendWebNetWithToken,
WebNetName WebNetName
} from "db://assets/Scripts/Utils/WebNet/WebNet"; } from "db://assets/Scripts/Utils/WebNet/WebNet";
import BackPanel from "db://assets/Scripts/Panels/BackPanel"; import BackPanel from "db://assets/Scripts/Panels/BackPanel";
const {ccclass, property} = _decorator; const { ccclass, property } = _decorator;
@ccclass("MainGame") @ccclass("MainGame")
export class MainGame extends Scene { export class MainGame extends Scene {
...@@ -45,7 +47,7 @@ export class MainGame extends Scene { ...@@ -45,7 +47,7 @@ export class MainGame extends Scene {
static skin: string = "MainGame"; static skin: string = "MainGame";
static group: string[] = ["MainGame"]; static group: string[] = ["MainGame"];
@property({type: Prefab}) @property({ type: Prefab })
ipPrefab: Prefab = null; ipPrefab: Prefab = null;
@property(Node) @property(Node)
...@@ -60,41 +62,41 @@ export class MainGame extends Scene { ...@@ -60,41 +62,41 @@ export class MainGame extends Scene {
@property(AudioSource) @property(AudioSource)
bgMusic: AudioSource = null; bgMusic: AudioSource = null;
@property({displayName: "游戏时间", group: "游戏配置"}) @property({ displayName: "游戏时间", group: "游戏配置" })
totalCD = 60; totalCD = 60;
@property({displayName: "手移动速度", group: "游戏配置"}) @property({ displayName: "手移动速度", group: "游戏配置" })
handSpeed = 5; handSpeed = 5;
@property({displayName: "台子旋转速度", group: "游戏配置"}) @property({ displayName: "台子旋转速度", group: "游戏配置" })
rotateSpeed = 50; rotateSpeed = 50;
@property({displayName: "铜圈", group: "圈", type: Prefab}) @property({ displayName: "铜圈", group: "圈", type: Prefab })
cu: Prefab = null!; cu: Prefab = null!;
@property({displayName: "银圈", group: "圈", type: Prefab}) @property({ displayName: "银圈", group: "圈", type: Prefab })
ag: Prefab = null!; ag: Prefab = null!;
@property({displayName: "金圈", group: "圈", type: Prefab}) @property({ displayName: "金圈", group: "圈", type: Prefab })
au: Prefab = null!; au: Prefab = null!;
@property({displayName: "翡翠圈", group: "圈", type: Prefab}) @property({ displayName: "翡翠圈", group: "圈", type: Prefab })
jadeite: Prefab = null!; jadeite: Prefab = null!;
@property({displayName: "财神圈", group: "圈", type: Prefab}) @property({ displayName: "财神圈", group: "圈", type: Prefab })
god: Prefab = null!; god: Prefab = null!;
@property({displayName: "猫手", group: "手", type: Prefab}) @property({ displayName: "猫手", group: "手", type: Prefab })
cat: Prefab = null!; cat: Prefab = null!;
@property({displayName: "龙手", group: "手", type: Prefab}) @property({ displayName: "龙手", group: "手", type: Prefab })
dragon: Prefab = null!; dragon: Prefab = null!;
@property({displayName: "人手", group: "手", type: Prefab}) @property({ displayName: "人手", group: "手", type: Prefab })
human: Prefab = null!; human: Prefab = null!;
@property({displayName: "分数", group: "UI", type: Label}) @property({ displayName: "分数", group: "UI", type: Label })
scoreLabel: Label = null!; scoreLabel: Label = null!;
@property({displayName: "倒计时", group: "UI", type: Label}) @property({ displayName: "倒计时", group: "UI", type: Label })
cdLabel: Label = null!; cdLabel: Label = null!;
@property({displayName: "向上滑动", group: "UI", type: Node}) @property({ displayName: "向上滑动", group: "UI", type: Node })
operationTip: Node = null!; operationTip: Node = null!;
@property({displayName: "闹钟图标", group: "UI", type: Node}) clockIcon: Node = null!; @property({ displayName: "闹钟图标", group: "UI", type: Node }) clockIcon: Node = null!;
loopArr: Prefab[] = []; loopArr: Prefab[] = [];
handArr: Prefab[] = []; handArr: Prefab[] = [];
...@@ -108,6 +110,11 @@ export class MainGame extends Scene { ...@@ -108,6 +110,11 @@ export class MainGame extends Scene {
this._richManNum = v; this._richManNum = v;
this.uiLayer.view["天降财神"].active = v > 0; this.uiLayer.view["天降财神"].active = v > 0;
this.uiLayer.view["天降财神/num"].getComponent(Label).string = v.toString(); this.uiLayer.view["天降财神/num"].getComponent(Label).string = v.toString();
if (v > 0) {
sendLog(LOG_TYPE.EXPOSURE, 16)
}
} }
table: Node = null; // 台子 table: Node = null; // 台子
...@@ -125,7 +132,7 @@ export class MainGame extends Scene { ...@@ -125,7 +132,7 @@ export class MainGame extends Scene {
this._score = v >> 0; this._score = v >> 0;
this.scoreTween = tween(this) this.scoreTween = tween(this)
// @ts-ignore // @ts-ignore
.to(0.66, {_tempScore: this.score}, {progress: this.updateScore}) .to(0.66, { _tempScore: this.score }, { progress: this.updateScore })
.start(); .start();
} }
...@@ -222,7 +229,7 @@ export class MainGame extends Scene { ...@@ -222,7 +229,7 @@ export class MainGame extends Scene {
this.handSpeed += Math.random() * 2 - 1; this.handSpeed += Math.random() * 2 - 1;
const {loopType, handType, rongNum, targetNum, richManNum, isDouble, newGuide} = GameMgr.ins.gameInfo; const { loopType, handType, rongNum, targetNum, richManNum, isDouble, newGuide } = GameMgr.ins.gameInfo;
this.isDouble = isDouble; this.isDouble = isDouble;
this.richManNum = 0; this.richManNum = 0;
...@@ -255,11 +262,13 @@ export class MainGame extends Scene { ...@@ -255,11 +262,13 @@ export class MainGame extends Scene {
async guide1() { async guide1() {
return new Promise<void>((resolve) => { return new Promise<void>((resolve) => {
sendLog(LOG_TYPE.EXPOSURE, 14)
this.gameMask.active = true; this.gameMask.active = true;
this.uiLayer.view["guide1"].active = true; this.uiLayer.view["guide1"].active = true;
input.once( input.once(
Input.EventType.TOUCH_END, Input.EventType.TOUCH_END,
async () => { async () => {
sendLog(LOG_TYPE.CLICK, 14)
this.gameMask.active = false; this.gameMask.active = false;
this.uiLayer.view["guide1"].active = false; this.uiLayer.view["guide1"].active = false;
this.shoot(1, 0); this.shoot(1, 0);
...@@ -273,11 +282,14 @@ export class MainGame extends Scene { ...@@ -273,11 +282,14 @@ export class MainGame extends Scene {
async guide2() { async guide2() {
return new Promise<void>((resolve) => { return new Promise<void>((resolve) => {
sendLog(LOG_TYPE.EXPOSURE, 15)
this.gameMask.active = true; this.gameMask.active = true;
this.uiLayer.view["guide2"].active = true; this.uiLayer.view["guide2"].active = true;
this.uiLayer.view["天降财神"].once( this.uiLayer.view["天降财神"].once(
Button.EventType.CLICK, Button.EventType.CLICK,
() => { () => {
sendLog(LOG_TYPE.CLICK, 16)
sendLog(LOG_TYPE.CLICK, 15)
this.gameMask.active = false; this.gameMask.active = false;
this.uiLayer.view["guide2"].active = false; this.uiLayer.view["guide2"].active = false;
setTimeout(() => { setTimeout(() => {
...@@ -296,7 +308,7 @@ export class MainGame extends Scene { ...@@ -296,7 +308,7 @@ export class MainGame extends Scene {
this.uiLayer.view["gamePre/cd"].on(Svga.EventType.END_FRAME, () => { this.uiLayer.view["gamePre/cd"].on(Svga.EventType.END_FRAME, () => {
this.uiLayer.view["gamePre/cd"].active = false; this.uiLayer.view["gamePre/cd"].active = false;
tween(this.operationTip.getComponent(UIOpacity)) tween(this.operationTip.getComponent(UIOpacity))
.to(0.5, {opacity: 255}) .to(0.5, { opacity: 255 })
.delay(2) .delay(2)
.call(() => { .call(() => {
this.uiLayer.view["gamePre"].active = false; this.uiLayer.view["gamePre"].active = false;
...@@ -337,7 +349,7 @@ export class MainGame extends Scene { ...@@ -337,7 +349,7 @@ export class MainGame extends Scene {
if (this.isOver) return; if (this.isOver) return;
this.isOver = true; this.isOver = true;
const {isUsedDelay} = GameMgr.ins.gameInfo; const { isUsedDelay } = GameMgr.ins.gameInfo;
if (isUsedDelay) { if (isUsedDelay) {
this.submit(); this.submit();
} else { } else {
...@@ -353,7 +365,7 @@ export class MainGame extends Scene { ...@@ -353,7 +365,7 @@ export class MainGame extends Scene {
* 复活 * 复活
*/ */
review = async () => { review = async () => {
const {success, data} = await sendWebNetWithToken(WebNetName.delay); const { success, data } = await sendWebNetWithToken(WebNetName.delay);
if (!success) { if (!success) {
return this.submit(); return this.submit();
} }
...@@ -387,6 +399,7 @@ export class MainGame extends Scene { ...@@ -387,6 +399,7 @@ export class MainGame extends Scene {
* 使用财神道具 * 使用财神道具
*/ */
useGod = async () => { useGod = async () => {
sendLog(LOG_TYPE.CLICK, 16)
if (((!this.isStart || this.isOver) && !this.isGuide) || this.isUseGod || this.richManNum <= 0) return; if (((!this.isStart || this.isOver) && !this.isGuide) || this.isUseGod || this.richManNum <= 0) return;
this.btnEnable(this.uiLayer.view["天降财神"], false); this.btnEnable(this.uiLayer.view["天降财神"], false);
...@@ -429,13 +442,13 @@ export class MainGame extends Scene { ...@@ -429,13 +442,13 @@ export class MainGame extends Scene {
Tween.stopAllByTarget(this.addScoreTip); Tween.stopAllByTarget(this.addScoreTip);
Tween.stopAllByTarget(scoreTipAlpha); Tween.stopAllByTarget(scoreTipAlpha);
tween(this.addScoreTip) tween(this.addScoreTip)
.set({position: v3(0, stopY - moveY, 0)}) .set({ position: v3(0, stopY - moveY, 0) })
.to(duration, {position: v3(0, stopY, 0)}) .to(duration, { position: v3(0, stopY, 0) })
.delay(delay) .delay(delay)
.to(duration, {position: v3(0, stopY + moveY, 0)}) .to(duration, { position: v3(0, stopY + moveY, 0) })
.start(); .start();
tween(scoreTipAlpha).set({opacity: 0}).to(duration, {opacity: 225}).delay(delay).to(duration, {opacity: 0}).start(); tween(scoreTipAlpha).set({ opacity: 0 }).to(duration, { opacity: 225 }).delay(delay).to(duration, { opacity: 0 }).start();
} }
changeHand(type: HAND_TYPE) { changeHand(type: HAND_TYPE) {
......
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
import Scene from "db://assets/Module/Scene"; import Scene from "db://assets/Module/Scene";
import { changeScene } from "db://assets/Module/UIFast"; import { changeScene } from "db://assets/Module/UIFast";
import { ScrollList, SCROLL_VERTICAL } from "db://assets/Scripts/ScrollList/ScrollList"; import { ScrollList, SCROLL_VERTICAL } from "db://assets/Scripts/ScrollList/ScrollList";
import { sendWebNet, WebNetName } from 'db://assets/Scripts/Utils/WebNet/WebNet'; import { LOG_TYPE, sendLog, sendWebNet, WebNetName } from 'db://assets/Scripts/Utils/WebNet/WebNet';
import { HomeScene } from 'db://assets/Scripts/Scenes/HomeScene'; import { HomeScene } from 'db://assets/Scripts/Scenes/HomeScene';
const {ccclass, property} = _decorator; const {ccclass, property} = _decorator;
...@@ -26,6 +26,7 @@ export class PrizeScene extends Scene { ...@@ -26,6 +26,7 @@ export class PrizeScene extends Scene {
empty: Node = null; empty: Node = null;
start() { start() {
sendLog(LOG_TYPE.EXPOSURE,24)
this.getPrizeRecord(); this.getPrizeRecord();
this.backBtn.on(Button.EventType.CLICK, this.clickBackBtn, this); this.backBtn.on(Button.EventType.CLICK, this.clickBackBtn, this);
} }
......
...@@ -19,7 +19,7 @@ import { changeScene } from "db://assets/Module/UIFast"; ...@@ -19,7 +19,7 @@ import { changeScene } from "db://assets/Module/UIFast";
import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene"; import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene";
import { ScrollList, SCROLL_VERTICAL } from "db://assets/Scripts/ScrollList/ScrollList"; import { ScrollList, SCROLL_VERTICAL } from "db://assets/Scripts/ScrollList/ScrollList";
import { strFormat } from "db://assets/Scripts/Utils/Utils"; import { strFormat } from "db://assets/Scripts/Utils/Utils";
import { sendWebNet, WebNetName } from "db://assets/Scripts/Utils/WebNet/WebNet"; import { LOG_TYPE, sendLog, sendWebNet, WebNetName } from "db://assets/Scripts/Utils/WebNet/WebNet";
const {ccclass, property} = _decorator; const {ccclass, property} = _decorator;
...@@ -59,6 +59,7 @@ export class RankScene extends Scene { ...@@ -59,6 +59,7 @@ export class RankScene extends Scene {
} }
start() { start() {
sendLog(LOG_TYPE.EXPOSURE,22)
console.log("%c RankScene", "font-size: 20px"); console.log("%c RankScene", "font-size: 20px");
this.getRankInfo(); this.getRankInfo();
} }
......
...@@ -7,7 +7,7 @@ import { ...@@ -7,7 +7,7 @@ import {
import Scene from "db://assets/Module/Scene"; import Scene from "db://assets/Module/Scene";
import { changeScene } from "db://assets/Module/UIFast"; import { changeScene } from "db://assets/Module/UIFast";
import { ScrollList, SCROLL_VERTICAL } from "db://assets/Scripts/ScrollList/ScrollList"; import { ScrollList, SCROLL_VERTICAL } from "db://assets/Scripts/ScrollList/ScrollList";
import { sendWebNet, WebNetName } from 'db://assets/Scripts/Utils/WebNet/WebNet'; import { LOG_TYPE, sendLog, sendWebNet, WebNetName } from 'db://assets/Scripts/Utils/WebNet/WebNet';
import { HomeScene } from 'db://assets/Scripts/Scenes/HomeScene'; import { HomeScene } from 'db://assets/Scripts/Scenes/HomeScene';
import { appJump } from "../../../AppTool"; import { appJump } from "../../../AppTool";
...@@ -42,6 +42,7 @@ export class RecordScene extends Scene { ...@@ -42,6 +42,7 @@ export class RecordScene extends Scene {
countBg: Node = null; countBg: Node = null;
start() { start() {
sendLog(LOG_TYPE.EXPOSURE,25)
this.getCountRecordInfo(); this.getCountRecordInfo();
} }
...@@ -93,6 +94,7 @@ export class RecordScene extends Scene { ...@@ -93,6 +94,7 @@ export class RecordScene extends Scene {
/** 查看积分明细 */ /** 查看积分明细 */
handleClickPointBtn() { handleClickPointBtn() {
sendLog(LOG_TYPE.CLICK,25)
appJump(window["creditsUrl"], true) appJump(window["creditsUrl"], true)
} }
......
...@@ -507,7 +507,7 @@ export function sendLog(type: LOG_TYPE | 'exposure' | 'click', area: number, dpm ...@@ -507,7 +507,7 @@ export function sendLog(type: LOG_TYPE | 'exposure' | 'click', area: number, dpm
const appID = getUrlParams("appID"); const appID = getUrlParams("appID");
//给个提示 //给个提示
if (!appID) console.error("appID不存在,检查链接") if (!appID) console.error("appID不存在,检查链接")
const channel = getUrlParams("channel"); const channel = getUrlParams("channel") || '1';
const dpm = `${appID || 'appID'}.110.${area}.${channel}`;// TODO appID注意默认写死一个,已防链接没有 const dpm = `${appID || 'appID'}.110.${area}.${channel}`;// TODO appID注意默认写死一个,已防链接没有
const dcm = `202.${projectID || 'projectID'}.${dcm_c}.${dcm_d}`; const dcm = `202.${projectID || 'projectID'}.${dcm_c}.${dcm_d}`;
//看需求 //看需求
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"6c48a": { "6c48a": {
"importer": "texture", "importer": "texture",
"uuid": "2ff03921-0804-417d-849d-93bf9a90c21e@6c48a", "uuid": "2ff03921-0804-417d-849d-93bf9a90c21e@6c48a",
"displayName": "bg", "displayName": "Bg",
"id": "6c48a", "id": "6c48a",
"name": "texture", "name": "texture",
"userData": { "userData": {
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
"f9941": { "f9941": {
"importer": "sprite-frame", "importer": "sprite-frame",
"uuid": "2ff03921-0804-417d-849d-93bf9a90c21e@f9941", "uuid": "2ff03921-0804-417d-849d-93bf9a90c21e@f9941",
"displayName": "bg", "displayName": "Bg",
"id": "f9941", "id": "f9941",
"name": "spriteFrame", "name": "spriteFrame",
"userData": { "userData": {
......
This diff is collapsed.
This diff is collapsed.
{
"name": "cocos-template-3d",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "cocos-template-3d",
"hasInstallScript": true,
"dependencies": {
"@types/crypto-js": "^4.2.2",
"crypto-js": "^4.2.0",
"mobx": "^6.12.3"
}
},
"node_modules/@types/crypto-js": {
"version": "4.2.2",
"resolved": "http://npm.dui88.com:80/@types%2fcrypto-js/-/crypto-js-4.2.2.tgz",
"integrity": "sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ==",
"license": "MIT"
},
"node_modules/crypto-js": {
"version": "4.2.0",
"resolved": "http://npm.dui88.com:80/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==",
"license": "MIT"
},
"node_modules/mobx": {
"version": "6.12.3",
"resolved": "http://npm.dui88.com:80/mobx/-/mobx-6.12.3.tgz",
"integrity": "sha512-c8NKkO4R2lShkSXZ2Ongj1ycjugjzFFo/UswHBnS62y07DMcTc9Rvo03/3nRyszIvwPNljlkd4S828zIBv/piw==",
"license": "MIT",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mobx"
}
}
},
"dependencies": {
"@types/crypto-js": {
"version": "4.2.2",
"resolved": "http://npm.dui88.com:80/@types%2fcrypto-js/-/crypto-js-4.2.2.tgz",
"integrity": "sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ=="
},
"crypto-js": {
"version": "4.2.0",
"resolved": "http://npm.dui88.com:80/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
},
"mobx": {
"version": "6.12.3",
"resolved": "http://npm.dui88.com:80/mobx/-/mobx-6.12.3.tgz",
"integrity": "sha512-c8NKkO4R2lShkSXZ2Ongj1ycjugjzFFo/UswHBnS62y07DMcTc9Rvo03/3nRyszIvwPNljlkd4S828zIBv/piw=="
}
}
}
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"data": { "data": {
"startId": "startId", "startId": "startId",
"isUsedDelay": false, "isUsedDelay": false,
"newGuide": false, "newGuide": true,
"difficultyLevel": 1, "difficultyLevel": 1,
"targetNum": 3, "targetNum": 3,
"rongNum": 8 "rongNum": 8
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"enable": true, "enable": true,
"customSplash": { "customSplash": {
"complete": true, "complete": true,
"form": "https://creator-api.cocos.com/api/form/show?sid=441e6f8e3e7ba0c9581ed7936daee45d" "form": "https://creator-api.cocos.com/api/form/show?sid=ed5f7e7e88978f75ec1dddd4e3508760"
} }
}, },
"removeSplash": { "removeSplash": {
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"enable": true, "enable": true,
"removeSplash": { "removeSplash": {
"complete": true, "complete": true,
"form": "https://creator-api.cocos.com/api/form/show?sid=441e6f8e3e7ba0c9581ed7936daee45d" "form": "https://creator-api.cocos.com/api/form/show?sid=ed5f7e7e88978f75ec1dddd4e3508760"
} }
} }
} }
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
"@types/crypto-js@^4.2.2": "@types/crypto-js@^4.2.2":
version "4.2.2" "integrity" "sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ=="
resolved "http://npm.dui88.com:80/@types%2fcrypto-js/-/crypto-js-4.2.2.tgz#771c4a768d94eb5922cc202a3009558204df0cea" "resolved" "http://npm.dui88.com:80/@types%2fcrypto-js/-/crypto-js-4.2.2.tgz"
integrity sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ== "version" "4.2.2"
crypto-js@^4.2.0: "crypto-js@^4.2.0":
version "4.2.0" "integrity" "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
resolved "http://npm.dui88.com:80/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631" "resolved" "http://npm.dui88.com:80/crypto-js/-/crypto-js-4.2.0.tgz"
integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q== "version" "4.2.0"
mobx@^6.12.3: "mobx@^6.12.3":
version "6.12.3" "integrity" "sha512-c8NKkO4R2lShkSXZ2Ongj1ycjugjzFFo/UswHBnS62y07DMcTc9Rvo03/3nRyszIvwPNljlkd4S828zIBv/piw=="
resolved "http://npm.dui88.com:80/mobx/-/mobx-6.12.3.tgz#b6a0fde4268116be602d50bffb32f1b90a8fb077" "resolved" "http://npm.dui88.com:80/mobx/-/mobx-6.12.3.tgz"
integrity sha512-c8NKkO4R2lShkSXZ2Ongj1ycjugjzFFo/UswHBnS62y07DMcTc9Rvo03/3nRyszIvwPNljlkd4S828zIBv/piw== "version" "6.12.3"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment