|
|
@@ -121,8 +121,13 @@ export class GameData {
|
|
|
|
|
|
public welfareOpenLimit = 0;
|
|
|
|
|
|
+ //插屏每日限制
|
|
|
public insertAdLimit = 0;
|
|
|
+ //插屏展示开关
|
|
|
public insertAdSwitch: string[] = [];
|
|
|
+ //全屏插屏展示开关
|
|
|
+ public fullScreenAdSwitch: string[] = [];
|
|
|
+
|
|
|
/**
|
|
|
* 初始化游戏数据:网络配置信息,用户信息
|
|
|
* @returns
|
|
|
@@ -157,13 +162,7 @@ export class GameData {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- data = {};
|
|
|
- response = await mk.http.sendData('user/adShowConfig', data);
|
|
|
- if (response.errcode != 0) {
|
|
|
- return;
|
|
|
- }
|
|
|
- this.adShowConfig = response.data;
|
|
|
- mk.console.logSingle("user/adShowConfig", response.data);
|
|
|
+ this.uploadAverageEcpm();
|
|
|
gData.adData.initEcpmData();
|
|
|
|
|
|
// data = {};
|
|
|
@@ -182,6 +181,18 @@ export class GameData {
|
|
|
this.dataFinish = true;
|
|
|
}
|
|
|
|
|
|
+ public async uploadAverageEcpm(){
|
|
|
+ let data = {};
|
|
|
+ let response = await mk.http.sendData('user/adShowConfig', data);
|
|
|
+ if (response.errcode != 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.adShowConfig = response.data;
|
|
|
+ mk.data.setTAEventUser(0, "average_ecpm", this.adShowConfig.average_ecpm);
|
|
|
+
|
|
|
+ mk.console.logSingle("user/adShowConfig", response.data);
|
|
|
+ }
|
|
|
+
|
|
|
private initConfigs(data) {
|
|
|
// console.log('config ', data);
|
|
|
this.configs = data;
|
|
|
@@ -207,6 +218,7 @@ export class GameData {
|
|
|
|
|
|
gData.gameData.insertAdLimit = parseInt(this.configs.ServerConfig.InsertAdCash);
|
|
|
gData.gameData.insertAdSwitch = this.configs.ServerConfig.InsertAdScene.split(",");
|
|
|
+ gData.gameData.fullScreenAdSwitch = this.configs.ServerConfig.FullScreenAdScene.split(",");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -2328,7 +2340,26 @@ export enum VideoAdType {
|
|
|
export enum InterFullAdType {
|
|
|
interstitial2_init_1 = '点击红包的关闭按钮',
|
|
|
interstitial2_init_2 = '普通收获',
|
|
|
- interstitial2_init_3 = '点击鸟和狗'
|
|
|
+ interstitial2_init_3 = '点击鸟和狗',
|
|
|
+ interstitial2_init_4 = '关闭个人资料页',
|
|
|
+ interstitial2_init_5 = '关闭农场等级奖励界面',
|
|
|
+ interstitial2_init_6 = '关闭红包币提现界面',
|
|
|
+ interstitial2_init_7 = '关闭抽奖界面',
|
|
|
+ interstitial2_init_8 = '关闭任务红包界面',
|
|
|
+ interstitial2_init_9 = '关闭更多游戏界面',
|
|
|
+ interstitial2_init_10 = '关闭图鉴界面',
|
|
|
+ interstitial2_init_11 = '关闭生虫、生病、停电弹窗',
|
|
|
+ interstitial2_init_12 = '关闭全体加速界面',
|
|
|
+ interstitial2_init_13 = '关闭收获弹窗',
|
|
|
+ interstitial2_init_14 = '关闭富翁银行',
|
|
|
+ interstitial2_init_15 = '关闭福利界面',
|
|
|
+ interstitial2_init_16 = '一键生产-关闭领取生产次数弹窗',
|
|
|
+ interstitial2_init_17 = '红包币提现界面,点击提现按钮',
|
|
|
+ interstitial2_init_18 = '福利-点击提现按钮',
|
|
|
+ interstitial2_init_19 = '订单-点击订单提现按钮',
|
|
|
+ interstitial2_init_20 = '任务红包-点击领取按钮',
|
|
|
+ interstitial2_init_21 = '富翁银行-点击开始任务按钮',
|
|
|
+ interstitial2_init_22 = '富翁银行-点击提现按钮',
|
|
|
}
|
|
|
|
|
|
export enum InterAdType {
|