|
@@ -31,6 +31,23 @@ export class AdData {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ public updateData(placementId, data) {
|
|
|
|
|
+ mk.console.logSingle("updateADData:" + placementId, data);
|
|
|
|
|
+ this.placementId = placementId;
|
|
|
|
|
+ this.adunit_format = data.adunit_format;
|
|
|
|
|
+ this.network_type = data.network_type;
|
|
|
|
|
+ this.network_placement_id = data.network_placement_id;
|
|
|
|
|
+ this.network_firm_id = data.network_firm_id;
|
|
|
|
|
+ this.adsource_id = data.adsource_id;
|
|
|
|
|
+ this.adsource_index = data.adsource_index;
|
|
|
|
|
+ this.adsource_price = data.adsource_price;
|
|
|
|
|
+ this.adsource_isheaderbidding = data.adsource_isheaderbidding;
|
|
|
|
|
+ this.publisher_revenue = data.publisher_revenue;
|
|
|
|
|
+ this.precision = data.precision;
|
|
|
|
|
+ this.ecpm_level = data.ecpm_level;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
public async watchVideo(type: AdFun) {
|
|
public async watchVideo(type: AdFun) {
|
|
|
this.ad_subType = type;
|
|
this.ad_subType = type;
|
|
|
let data = {
|
|
let data = {
|
|
@@ -41,6 +58,7 @@ export class AdData {
|
|
|
"version": gData.appData.appVersion,
|
|
"version": gData.appData.appVersion,
|
|
|
"tf_channel": gData.appData.tfChannel,
|
|
"tf_channel": gData.appData.tfChannel,
|
|
|
"destoon_ad_place": this.placementId,
|
|
"destoon_ad_place": this.placementId,
|
|
|
|
|
+ "ad_type": 1,
|
|
|
"adunit_format": this.adunit_format,
|
|
"adunit_format": this.adunit_format,
|
|
|
"network_type": this.network_type,
|
|
"network_type": this.network_type,
|
|
|
"network_placement_id": this.network_placement_id,
|
|
"network_placement_id": this.network_placement_id,
|
|
@@ -50,11 +68,14 @@ export class AdData {
|
|
|
"adsource_price": this.adsource_price,
|
|
"adsource_price": this.adsource_price,
|
|
|
"adsource_isheaderbidding": this.adsource_isheaderbidding,
|
|
"adsource_isheaderbidding": this.adsource_isheaderbidding,
|
|
|
"publisher_revenue": this.publisher_revenue,
|
|
"publisher_revenue": this.publisher_revenue,
|
|
|
- "precision": this.precision,
|
|
|
|
|
|
|
+ "precision_ecpm": this.precision,
|
|
|
"ecpm_level": this.ecpm_level,
|
|
"ecpm_level": this.ecpm_level,
|
|
|
|
|
+ "cfg_version": gData.appData.version,
|
|
|
|
|
+ "adsource_ecpm": gData.gameData.adShowConfig.average_ecpm,
|
|
|
"ad_sbuType": this.ad_subType,
|
|
"ad_sbuType": this.ad_subType,
|
|
|
- "ad_type": 1,
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ mk.console.logSingle("updateVideoData:",data);
|
|
|
|
|
+
|
|
|
let response = await mk.http.sendData('updateVideo', data);
|
|
let response = await mk.http.sendData('updateVideo', data);
|
|
|
if (response.errcode != 0) {
|
|
if (response.errcode != 0) {
|
|
|
return;
|
|
return;
|