Commit 6c6c3f91 authored by wildfirecode's avatar wildfirecode

Merge branch 'dev' of http://gitlab2.dui88.com/wanghongyuan/yyh into dev

parents 9d68ad5f 65bd099a
......@@ -4,7 +4,7 @@ import { IExposureData } from '../data/common/IExposureData';
export class Buried {
private static appId: number;
// private static consumerId: number;
private static consumerId: number;
private static oaId: number;
/**
......@@ -13,23 +13,23 @@ export class Buried {
public static init(): void {
if (DataManager.ins.gameCfgData) {
this.appId = DataManager.ins.gameCfgData.appInfo.appId;
// this.consumerId = DataManager.ins.getInfoData.consumerId;
this.consumerId = DataManager.ins.getInfoData.consumerId;
this.oaId = DataManager.ins.gameCfgData.gameInfo.oaId;
} else if (DataManager.ins.customCfgData) {
this.appId = DataManager.ins.customCfgData.appId;
// this.consumerId = DataManager.ins.customCfgData.consumerId;
this.consumerId = DataManager.ins.customCfgData.consumerId;
this.oaId = DataManager.ins.customCfgData.oaId;
} else if (DataManager.ins.petIndexData && DataManager.ins.petIndexData.appId && DataManager.ins.petIndexData.activityId) {
this.appId = DataManager.ins.petIndexData.appId;
// this.consumerId = DataManager.ins.petIndexData.consumerId;
this.consumerId = DataManager.ins.petIndexData.consumerId;
this.oaId = DataManager.ins.petIndexData.activityId;
} else if (DataManager.ins.petsIndexData && DataManager.ins.petsIndexData.appId && DataManager.ins.petsIndexData.activityId) {
this.appId = DataManager.ins.petsIndexData.appId;
// this.consumerId = DataManager.ins.petsIndexData.consumerId;
this.consumerId = DataManager.ins.petsIndexData.consumerId;
this.oaId = DataManager.ins.petsIndexData.activityId;
} else {
this.appId = window["appId"];
// this.consumerId = window["consumerId"];
this.consumerId = window["consumerId"];
this.oaId = window["projectId"];
}
}
......@@ -42,25 +42,32 @@ export class Buried {
* @returns {{dpm: string; consumerId: number; domain: string; appId: number}}
*/
public static createExposure(dpm: string, dcm: string, dom?: string, embedDomain = '//embedlog.duiba.com.cn'): IExposureData {
const exposure: IExposureData = {
dpm: dpm,
dcm: dcm,
// consumerId: Buried.consumerId,
appId: Buried.appId,
domain: embedDomain
};
if (dom)
exposure.dom = dom;
return exposure;
if(dom){
const exposure: IExposureData = {
dpm: dpm,
dcm: dcm,
dom: dom,
consumerId: Buried.consumerId,
appId: Buried.appId,
domain: embedDomain
};
return exposure;
}else{
const exposure: IExposureData = {
dpm: dpm,
dcm: dcm,
consumerId: Buried.consumerId,
appId: Buried.appId,
domain: embedDomain
};
return exposure;
}
}
/**
* dpm拼接
* @param pageId 页面ID
* @param area 区域
* @param dpm 埋点号
* dom拼接
* @param wayId 渠道ID
* @returns {string}
*/
public static connectDom(wayId: number): string {
......
......@@ -8,6 +8,8 @@ import { DataManager } from "../../libs/tw/manager/DataManager";
import SceneCtrl from "../ctrls/sceneCtrl";
import Waiting from "../waiting/Waiting";
import GameConst from "../GameConst";
import { Buried } from "../../libs/tw/util/Buried";
import { NetManager } from "../../libs/tw/manager/NetManager";
export default class StartScene extends Scene {
......@@ -35,6 +37,11 @@ export default class StartScene extends Scene {
private level;
private startdata;
private type;
private startExposure:any;
private chuandiExposure:any;
private huozhongExposure:any;
private pkExposure:any;
constructor(data){
super();
if(data.type){
......@@ -61,13 +68,40 @@ export default class StartScene extends Scene {
}
initBuired() {
let num:any
if(GameConst.getQueryString("wayId")){
num = GameConst.getQueryString("wayId")
}else{
num = 0;
}
let startDpmIn = Buried.connectDpm(110, 1, 1); // 点击埋点
let startDcmIn = Buried.connectDcm(202, 0, 0); // 曝光埋点
let startDomIn = Buried.connectDom(num)
this.startExposure = Buried.createExposure(startDpmIn, startDcmIn,startDomIn);
NetManager.ins.showLog(this.startExposure);
let chuandiDpmIn = Buried.connectDpm(110, 2, 1); // 点击埋点
let chuandiDcmIn = Buried.connectDcm(202, 0, 0); // 曝光埋点
this.chuandiExposure = Buried.createExposure(chuandiDpmIn, chuandiDcmIn);
NetManager.ins.showLog(this.chuandiExposure);
let huozhongDpmIn = Buried.connectDpm(110, 3, 1); // 点击埋点
let huozhongDcmIn = Buried.connectDcm(202, 0, 0); // 曝光埋点
this.huozhongExposure = Buried.createExposure(huozhongDpmIn, huozhongDcmIn);
NetManager.ins.showLog(this.huozhongExposure);
let pkDpmIn = Buried.connectDpm(110, 4, 1); // 点击埋点
let pkDcmIn = Buried.connectDcm(202, 0, 0); // 曝光埋点
this.pkExposure = Buried.createExposure(pkDpmIn, pkDcmIn);
NetManager.ins.showLog(this.pkExposure);
}
onEnterFrame(){
}
initUI(data) {
this.once(egret.Event.ADDED_TO_STAGE, () => {
this.height = this.stage.stageHeight;
}, this);
......@@ -199,6 +233,7 @@ export default class StartScene extends Scene {
}
GuideFive(){
Waiting.instance.show();
NetManager.ins.clickLog(this.chuandiExposure);
yzwNet.doStart((s)=>{
if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("doStart").message)
......@@ -249,6 +284,7 @@ export default class StartScene extends Scene {
unlockArea(){
if(this.level == 0){
Waiting.instance.show();
NetManager.ins.clickLog(this.chuandiExposure);
yzwNet.doStart((s)=>{
if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("doStart").message)
......@@ -301,10 +337,12 @@ export default class StartScene extends Scene {
}
onTap_chuandi(){
NetManager.ins.clickLog(this.huozhongExposure);
SceneCtrl.instance.change(ModuleTypes.ShareStarterScene);
}
onTap_PKBtn(){
Waiting.instance.show();
NetManager.ins.clickLog(this.pkExposure);
yzwNet.getPkBaseInfo((s)=>{
Waiting.instance.hide();
if(!s){
......
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