Authored by 沈志敏

imgsend 方式时判断 是否是app打开

... ... @@ -25,7 +25,7 @@ var createCORSRequest = function(method, url) {
//发送图片方式
exports.imgSend = function(param, callback) {
if (window.fromApp) {
if (window.fromApp || window.qs.app_version || window.qs.appVersion) {
// 从app中打开的wap页场合,走app的上报逻辑
return;
}
... ...
... ... @@ -78,6 +78,8 @@ var nullFun = function() {};
//入口方法
var _yas = function(initTime, version, tid, uid, geo, selector) {
window.qs = util.queryString();
custInfo.ak = tid;
appInfo.sv = version;
custInfo.ud = uid ? uid : '';
... ... @@ -238,8 +240,6 @@ function send(callback) {
});
}
setTimeout(function() {
// 延迟1s发送
var param = util.genParam(info);
callback = callback ? callback : function() {};
cross.imgSend(param, callback);
... ... @@ -253,7 +253,6 @@ function send(callback) {
});
});
}
}, 1000);
}
function getVisitorId() {
... ... @@ -480,7 +479,6 @@ _yas.sendAppLogs = function(json, asyncindx) {
ev.addEventHandler(document, 'deviceready', function(e) {
window._yasloaded = false;
window.fromApp = true;
window.qs = util.queryString();
window.yohoInterface.triggerEvent(function(data) {
window.indx = data.indx;
... ... @@ -504,9 +502,9 @@ ev.addEventHandler(document, 'deviceready', function(e) {
_yas.sendAppLogs({
appop: 'YB_H5_PAGE_OPEN_L',
param: JSON.stringify({
C_ID: qs.yh_channel || util.getChannel() || 1,
PAGE_URL: location.origin + location.pathname,
PAGE_NAME: qs.title || document.title
C_ID: window.qs.yh_channel || util.getChannel() || 1,
PAGE_URL: location.href,
PAGE_NAME: window.qs.title || document.title
})
}, false);
}, nullFun, {
... ...