Commit 4c72c1fe authored by zjz1994's avatar zjz1994

新增广告处理

parent 9ad2908b
......@@ -991,4 +991,47 @@ export class DataManager extends ABDataManager {
}
// tslint:disable-next-line:max-file-line-count
//新增广告处理
solveAdvertData(data){
var enable = data.enable;
if(enable){//配置了,没东西处理下
var advertList = data.advertList;
if(advertList){
var newAdlist = new Array();
for(var i=0;i<advertList.length;i++){
var iadata = advertList[i];
var iadimg = iadata.img;
var iadurl = iadata.url;
var iadapsClickUrl = iadata.apsClickUrl;
if(iadimg&&iadimg.length>2){
newAdlist.push({
img:iadimg,
apsClickUrl:iadapsClickUrl,
url:iadurl
})
}
}
if(newAdlist.length>0){
return {
enable:true,
advertList:newAdlist
}
}else{
return {
enable:false
}
}
}else{
data.enable = false;
return {
enable:false
}
}
}else{
return {
enable:false
}
}
}
}
\ No newline at end of file
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