增加游戏内上报打点请求
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user