This commit is contained in:
xuhe@fangjia.com
2018-07-05 13:45:21 +08:00
parent 753557cc23
commit a2deb33dc2
2 changed files with 15 additions and 7 deletions
+2 -2
View File
@@ -157,9 +157,9 @@ mui.plusReady(function() {
axios.get("/rest/ad/position",{params:{position : 7}}).then(function (response) {
var data = response.data.data;
if (data) {
document.getElementById("img").setAttribute("src", BASE_PATH+"/img/"+data.imgId);
document.getElementById("img").setAttribute("src", data.imgUrl);
document.getElementById("img").addEventListener("longtap", function(event) {
download(BASE_PATH+"/img/"+data.imgId);
download(data.imgUrl);
})
}
})
+8
View File
@@ -2914,7 +2914,13 @@ function openUrlNew(adUrl, id, type) {
dataMap["type"]=type;
dataMap["newId"]=id;
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
if(type=='广告'){
axios.get("/rest/news/addAdClickCount",{params:{adid:id}}).then(function(response){
}).catch(function(error){
console.log(error)
});
}else{
axios.get("/rest/news/addCount",{params:{newsId:id}}).then(function(response){
if(response.data.code==200){
@@ -2923,6 +2929,8 @@ function openUrlNew(adUrl, id, type) {
}).catch(function(error){
console.log(error)
});
}
clicked('views/webview_embed.html', true,false,{},{url:adUrl})
}