...
|
...
|
@@ -356,14 +356,26 @@ function getMktc() { |
|
|
|
|
|
function setUnionType() {
|
|
|
var mktc = window.qs.mkt_code || window.qs.union_type || util.getMktcBySeo();
|
|
|
if (mktc) {
|
|
|
var aDom = document.getElementsByTagName("a"); //获取页面所有a标签
|
|
|
for (var i = 0; i < aDom.length; i++) {
|
|
|
var href = aDom[i].getAttribute('href') || '';
|
|
|
if (href.indexOf('union.yoho.cn/union/downapp.html') > -1 && href.indexOf('union_type') === -1) {
|
|
|
aDom[i].setAttribute('href', href + '?union_type=' + mktc);
|
|
|
var aDom = document.getElementsByTagName("a"); //获取页面所有a标签
|
|
|
for (var i = 0; i < aDom.length; i++) {
|
|
|
var href = aDom[i].getAttribute('href') || '';
|
|
|
|
|
|
if (href.indexOf('union.yoho.cn/union/downapp.html') > -1) {
|
|
|
if (mktc && href.indexOf('union_type') === -1) {
|
|
|
href += '?union_type=' + mktc;
|
|
|
aDom[i].setAttribute('href', href);
|
|
|
}
|
|
|
|
|
|
ev.addEventHandler(aDom[i], 'click', function(e) {
|
|
|
_yas.sendCustomInfo && _yas.sendCustomInfo({
|
|
|
op: 'YB_DOWNLOAD_C',
|
|
|
param: JSON.stringify({
|
|
|
C_ID: window.qs.yh_channel || util.getChannel() || 1,
|
|
|
TO_URL: e.target.getAttribute('href')
|
|
|
})
|
|
|
}, true);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -498,7 +510,7 @@ _yas.sendMouseEvent = function(e, flag) { |
|
|
* 1. wap中的事件上报
|
|
|
* 2. app和wap中都需要的事件上报
|
|
|
*/
|
|
|
_yas.sendCustomInfo = function(json, flag) {
|
|
|
_yas.sendCustomInfo = function(json, flag, callback) {
|
|
|
if (window.appBaseLogs && json.appop) {
|
|
|
// 从app中打开的wap页
|
|
|
json.op = json.appop;
|
...
|
...
|
@@ -524,7 +536,7 @@ _yas.sendCustomInfo = function(json, flag) { |
|
|
info = util.merge(info, mktc);
|
|
|
}
|
|
|
var param = util.genParam(info);
|
|
|
cross.imgSend(param, function() {});
|
|
|
cross.imgSend(param, callback);
|
|
|
}
|
|
|
}
|
|
|
};
|
...
|
...
|
|