增加游戏内上报打点请求

This commit is contained in:
jtx
2025-10-16 11:19:07 +08:00
parent a7ef288b2d
commit 8d5d9eea0e
5 changed files with 38 additions and 0 deletions
+13
View File
@@ -15,6 +15,7 @@ import {
ProgressBar,
Sprite,
SpriteFrame,
sys,
Vec3,
VideoPlayer,
} from "cc";
@@ -326,8 +327,20 @@ export class PreloadUI extends Component {
const deviceId = DeviceIdService.I.id;
const os = MachineInfoService.I.getMachineOs();
// 获取fbCode,如果有则表示从落地页进来的
const qs = new URLSearchParams(window.location.search);
const fbCode = qs.get("fbCode");
// 保存fbCode到本地
if (fbCode) {
sys.localStorage.setItem("fbCode", fbCode);
// 上报事件
const reqData = {
point: 4, // 4: 进入游戏
fbCode: fbCode,
};
AuthService.I.pointEvent(reqData);
}
const reqData = {
platType: "guest",
userId: fbCode ? fbCode : deviceId,