推送修改

This commit is contained in:
尹吉欢
2018-06-25 15:06:13 +08:00
parent 719c953093
commit 9a9438f8be
3 changed files with 62 additions and 92 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

+4 -4
View File
@@ -26,9 +26,9 @@ function savePageLog() {
baidu_lng = p.coords.longitude;
baidu_lat = p.coords.latitude;
baidu_address = p.address.street;
doSavePageLog({page:page, lng:baidu_lng, lat:baidu_lat, province:baidu_province, city:baidu_city, region:baidu_region, address:baidu_address, device:device, model:model, pushClientId:pushClientId});
doSavePageLog({page:page, lng:baidu_lng, lat:baidu_lat, province:baidu_province, city:baidu_city, region:baidu_region, address:baidu_address, device:device, model:model, pushClientId:pushClientId,channel:YOUFANG_CHANNEL});
}, function(e){
doSavePageLog({page:page, device:device, model:model, pushClientId:pushClientId});
doSavePageLog({page:page, device:device, model:model, pushClientId:pushClientId,channel:YOUFANG_CHANNEL});
},
{
provider:'baidu',
@@ -61,9 +61,9 @@ function saveBehaviorLog(event,dataMap) {
baidu_lng = p.coords.longitude;
baidu_lat = p.coords.latitude;
baidu_address = p.address.street;
doSaveBehaviorLog({page:page, lng:baidu_lng, lat:baidu_lat, province:baidu_province, city:baidu_city, region:baidu_region, address:baidu_address, device:device, model:model,event:event,businessData:dataMap});
doSaveBehaviorLog({page:page, lng:baidu_lng, lat:baidu_lat, province:baidu_province, city:baidu_city, region:baidu_region, address:baidu_address, device:device, model:model,event:event,businessData:dataMap,channel:YOUFANG_CHANNEL});
}, function(e){
doSaveBehaviorLog({page:page, device:device, model:model,event:event,businessData:dataMap});
doSaveBehaviorLog({page:page, device:device, model:model,event:event,businessData:dataMap,channel:YOUFANG_CHANNEL});
},
{
provider:'baidu',
-30
View File
@@ -32,9 +32,6 @@ document.addEventListener("plusready", function() {
if (payload.type == "0") {
plus.ui.alert(title+"\n"+content);
} else if (payload.type == "1") {
plus.nativeUI.confirm(content, function(e){
if (e.index==0) {
if(plus.webview.getWebviewById('H5693FF3D')==null){
plus.webview.show(plus.webview.getWebviewById("HBuilder"));
}else{
@@ -50,24 +47,13 @@ document.addEventListener("plusready", function() {
current.classList.remove('mui-active');
defaultTab.classList.add('mui-active');
}
}
}, title, ["查看","忽略"] );
} else if (payload.type == "2") {
if (payload.url.startWith("http")) {
plus.nativeUI.confirm(content, function(e){
if (e.index==0) {
clicked('views/webview_embed.html', true,false,{},{url:payload.url})
}
}, title, ["查看","忽略"] );
} else {
// 处理打开app中的二级页面,一级页面在type=1中已经处理了,如果有http的地址就是打开外部页面
// 否则就是打开app内部页面
plus.nativeUI.confirm(content, function(e){
if (e.index==0) {
var url = payload.url;
var sindex = url.indexOf('?') == -1 ? url.length : url.indexOf('?');
var openUrl = url.substring(0, sindex);
@@ -83,8 +69,6 @@ document.addEventListener("plusready", function() {
}
}
clicked(openUrl,true,false,{},jsonData)
}
}, title, ["查看","忽略"] );
}
}
@@ -92,8 +76,6 @@ document.addEventListener("plusready", function() {
if (payload.type == "0") {
plus.ui.alert(content);
} else if (payload.type == "1") {
plus.nativeUI.confirm(content, function(e){
if (e.index==0) {
if(plus.webview.getWebviewById('H5693FF3D')==null){
plus.webview.show(plus.webview.getWebviewById("HBuilder"));
}else{
@@ -109,23 +91,13 @@ document.addEventListener("plusready", function() {
current.classList.remove('mui-active');
defaultTab.classList.add('mui-active');
}
}
}, title, ["查看","忽略"] );
} else if (payload.type == "2") {
if (payload.url.startWith("http")) {
plus.nativeUI.confirm(content, function(e){
if (e.index==0) {
clicked('views/webview_embed.html', true,false,{},{url:payload.url})
}
}, title, ["查看","忽略"] );
} else {
// 处理打开app中的二级页面,一级页面在type=1中已经处理了,如果有http的地址就是打开外部页面
// 否则就是打开app内部页面
plus.nativeUI.confirm(content, function(e){
if (e.index==0) {
var url = payload.url;
var sindex = url.indexOf('?') == -1 ? url.length : url.indexOf('?');
var openUrl = url.substring(0, sindex);
@@ -141,8 +113,6 @@ document.addEventListener("plusready", function() {
}
}
clicked(openUrl,true,false,{},jsonData)
}
}, title, ["查看","忽略"] );
}