咸鱼的反击
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

241 lines
5.2 KiB

2 months ago
/*
广AD
LoadTime
StayTime
OnHide
Btns
Out
Enter
*/
export enum ENTERTYPE {
XUANGUAN,
TONGGUAN,
TIAOZHUAN,
CHONGWAN,
}
export enum OUTTYPE {
CHENGGONG,
TIAOZHUAN,
FANHUI,
SHIBAI,
}
export const OPER_TYPE = {
AD:"AD",
LoadTime:"LoadTime",
StayTime:"StayTime",
OnHide:"OnHide",
Out:"Out",
Enter:"Enter",
Btns:"Btns",
}
export default class GameReport{
public static loadingTime = 0;
public static isSendLoadingTime = false;
public static loadingFinishTime = 0
public static GamePlatform = "OTHER";
public static GameVersion = "1.0.0";
public static GameName = "BYYDW"; //手动配置
public static UserUuid = null;
public static SubGame = 'default';
public static SubGameRemake = 'default';
public static OperType:string = OPER_TYPE.AD;
public static OperRemake:string|number = null;
public static stayTime = 0;
//OperRemake
/*
OperType
OperType==LoadTime -- 30
OperType==StayTime -- 3000
OperType==OUT
OperType==ENTER
OperType==onHide hide
OperType==BTNS
OperType==AD
*/
public static OperTypeResult:number = 1;
public static onHideState = {
gold:0, //金币
strength:0, //体力
sendCardTimes:0, //发牌次数
unlockLevel:0, //已经解锁关卡
removeTimes:0, //消除次数
default1:0, //默认字段1
default2:0, //默认字段2
default3:0 //默认字段3
}
public static OperateName = 'default';
public static CustomClicks = '';
//
public static tmpUserid = "";
public static PostTime = '';
public static AllowGamePlatform = "OTHER";
public static ReportConfig = null;
public static ReportUrl = null;
public static getReqData = null;
public static postReqData = null;
public static GameTable = "";
public static isReport = false;
public static isRequest = false;
public static checkSendData(){
}
public static ReportSend(OperType, OperRemake,OperTypeResult){
return
}
public static ADReport(OperRemake:string,OperTypeResult=1, OperateName?){
if(OperateName){
this.OperateName = OperateName;
}
this.ReportSend(OPER_TYPE.AD, OperRemake, OperTypeResult)
}
public static LoadTimeReport(OperRemake:number, OperateName?){
}
public static StayTimeReport(OperRemake:number, OperateName?){
}
public static OUTReport(enterType:OUTTYPE = OUTTYPE.FANHUI, OperateName?){
//OperRemake 离开备注
}
public static EnterReport(enterType:ENTERTYPE = ENTERTYPE.XUANGUAN, OperateName?){
//OperRemake进入备注
}
public static BtnsReport( CustomClicks:string, OperRemake ='普通按钮点击集合', OperateName?){
}
public static checkSendBtnsReport(){
}
public static OnHideReport(OperRemake, OperateName? , gold=0, strength=0, sendCardTimes=0, unlockLevel=0, removeTimes=0,default1=0, default2=0,default3=0){
}
public static OnHideReport2(OperRemake, onHideState, OperateName?){
}
public static ReportContent(content,typeInput?){
return
}
public static init(){
return
}
public static initPostReq(reqUrl){
}
public static setLoadingTime(loadingTime){
this.loadingTime = loadingTime
}
public static setLoadingFinishTime(FinishTime){
this.loadingFinishTime = FinishTime
}
public static getLoadingTime(){
return this.loadingTime
}
public static setStayTime(stayTime){
this.stayTime = stayTime
}
public static getStayTime(){
return this.stayTime
}
public static getOpenUserId(){
}
public static SetCurGame(OperateName){
this.OperateName = OperateName;
}
public static SetCurOperateName(OperateName){
this.OperateName = OperateName;
}
public static setSubGame(SubGame){
this.SubGame = SubGame;
}
public static setSubGameRemake(SubGameRemake){
this.SubGameRemake = SubGameRemake;
}
public static SetUserUuid(UserUuid){
this.UserUuid = UserUuid;
}
public static getGameVersion(){
return this.GameVersion
}
public static initOtherPlatformUser(){
let tmpUserid = this.getTempUserId()
this.tmpUserid = tmpUserid;
console.log( this.tmpUserid, 'tmpUserid')
//User.setOtherplatformUserid(this.tmpUserid);
}
public static SetOnHideState(onHideState){
this.onHideState = onHideState;
}
public static getTempUserId(){
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
}