Commit 45b95f97 authored by zjz1994's avatar zjz1994

代码暂存

parent 2e2fdf22
......@@ -11,6 +11,13 @@
<meta name="screen-orientation" content="portrait" />
<meta name="x5-fullscreen" content="true" />
<meta name="360-fullscreen" content="true" />
<!-- <input type="hidden" id="resourceType" value="inapp">
<meta content="inapp" name="siteid">
<input type="hidden" id="pagename" value="pgcate=10004;tag=100060/null;pgtitle=赚钱消消乐">
<meta content="true" name="autoclick">
<meta content="aNVgWFAAaA" name="pageid">
<script src="libs/sa_simple.js"></script> -->
<style>
html,
body {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5,5 +5,5 @@
<e:Image source="nsad1_png" horizontalCenter="0" y="35"/>
<e:Image id="img" y="44" width="560" height="160" source="{data.img}" anchorOffsetY="0" horizontalCenter="0.5"/>
<e:Image id="adsmask" source="adsmask_png" horizontalCenter="0.5" y="45" width="560" height="160"/>
<e:Image source="nsad2_png" horizontalCenter="-7.5"/>
<e:Image source="nsad2_png" horizontalCenter="-7.5" touchEnabled="false"/>
</e:Skin>
\ No newline at end of file
......@@ -40,7 +40,7 @@ export default class AdSmallComp extends ComponentBase {
snpmAdStatic.snpmAdReport("click","bottom",result);
wait(50).then(() => {
if (result.url != 0) window.location.href = result.url;
// if (result.url != 0) window.location.href = result.url;
});
}, this);
}
......
......@@ -736,10 +736,10 @@ export default class MapScene extends Scene {
snpmAdStatic.snpmAdReport("show","icon",result);
this['adBtn'].source = result.img;
this['adBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(32));
// NetManager.ins.clickLog(getlogItem(32));
snpmAdStatic.snpmAdReport("click","icon",result);
if(result.url!=0){
window.location.href = result.url;
// window.location.href = result.url;
}
}, this);
}
......
......@@ -49,7 +49,7 @@ export class snpmAdStatic{
if(type=="show"){
this.showAdReport(params);
}else if(type=="click"){
this.showAdReport(params);
this.clickAdReport(params);
}
}
}
......@@ -59,6 +59,7 @@ export class snpmAdStatic{
*/
static showAdReport(params){
try{
console.log("曝光上报",JSON.stringify(params));
let elem = document.createElement('div')
params.saData.eleid = params.eleid;
    elem.setAttribute('sa-data', JSON.stringify(params.saData))
......@@ -71,7 +72,16 @@ export class snpmAdStatic{
    if (window['SAUP'] && window['SAUP'].sendLogData) {
//expoManual
//exposure
     window['SAUP'].sendLogData("exposure", elem);
     window['SAUP'].sendLogData("expoManual", elem);
// window['SAUP'].sendLogData("expoManual", {
// tag:elem,
// sapmodid:params.sapmodid,
// event_name:'exposure',
// targeturl:params.targeturl,
// pageid:params.saData.pageid,
// modid:params.saData.modid,
// eleid:params.saData.eleid,
// });
    }
}catch(e){
......@@ -83,6 +93,18 @@ export class snpmAdStatic{
*/
static clickAdReport(params){
try{
console.log('点击上报',JSON.stringify(params));
if(params.targeturl&&params.targeturl.length){
window['$'].ajax({
type:'get',
url:params.targeturl,
dataType:'json',
success:res=>{
},
error:err=>{
}
})
}
let elem = document.createElement('div');
elem.setAttribute('sa-data',JSON.stringify(params.saData));
//广告埋点
......@@ -97,10 +119,14 @@ export class snpmAdStatic{
console.log("广告点击上报",params.saData.pageid);
//click
//comclick
window['SAUP'].sendLogData('comclick',{
window['SAUP'].sendLogData('click',{
tag:elem,
sapmodid:params.sapmodid,
eleid:params.eleid
targeturl:params.targeturl,
event_name:'comclick',
pageid:params.saData.pageid,
modid:params.saData.modid,
eleid:params.saData.eleid,
})
}
elem.setAttribute('sa-data', '{}');
......
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