Commit b4cc2486 authored by zjz1994's avatar zjz1994

代码暂存

parent 22d888aa
......@@ -739,7 +739,7 @@ export default class MapScene extends Scene {
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);
}
......
......@@ -5,22 +5,52 @@ export class snpmAdStatic{
* @param from 来源1.icon首页小图标,2.dialog大弹窗广告,3.bottom部分弹窗下挂载的
*/
static snpmAdReport(type:string,from:string,adata:object){
var params:object;
var params = {};
console.log("准备上报",type,from,JSON.stringify(adata));
switch(from){
case 'icon':
params['eleid']='111';
params['saData']={
pageid:"map",
modid:"111",
eleid:"111",
targeturl:adata['apsClickUrl']||adata['url']
}
params['sapmodid'] = '111';
params['targeturl']=adata['apsClickUrl']||adata['url']
break;
case 'dialog':
params['eleid']='222';
params['saData']={
pageid:"dialog",
modid:"222",
eleid:"222",
targeturl:adata['apsClickUrl']||adata['url']
}
params['sapmodid'] = '222';
params['targeturl']=adata['apsClickUrl']||adata['url']
break;
case 'bottom':
params['eleid']='333';
params['saData']={
pageid:"bottom",
modid:"333",
eleid:"333",
targeturl:adata['apsClickUrl']||adata['url']
}
params['sapmodid'] = '333';
params['targeturl']=adata['apsClickUrl']||adata['url']
break;
default:
console.error("未定义snpm上报");
break;
}
if(type=="show"){
this.showAdReport(params);
}else if(type=="click"){
this.showAdReport(params);
if(params){
if(type=="show"){
this.showAdReport(params);
}else if(type=="click"){
this.showAdReport(params);
}
}
}
/**
......@@ -64,6 +94,7 @@ export class snpmAdStatic{
img.src = params.targeturl;
}
if (window['SAUP'] && window['SAUP'].sendLogData) {
console.log("广告点击上报",params.saData.pageid);
//click
//comclick
window['SAUP'].sendLogData('comclick',{
......
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