Authored by 陈峰

add unionTypeYas

1 { 1 {
2 "name": "yas-jssdk", 2 "name": "yas-jssdk",
3 - "version": "2.4.19", 3 + "version": "2.4.20",
4 "description": "YOHO!采集系统的前端js的开发包", 4 "description": "YOHO!采集系统的前端js的开发包",
5 "keywords": [ 5 "keywords": [
6 "YOHO!", 6 "YOHO!",
@@ -353,7 +353,7 @@ function getMouseEventPosition(e) { @@ -353,7 +353,7 @@ function getMouseEventPosition(e) {
353 } 353 }
354 354
355 function setMktc() { 355 function setMktc() {
356 - var mktc = window.qs.mkt_code || window.qs.union_type || util.getMktcBySeo(); 356 + var mktc = window.qs.mkt_code || window.qs.union_type || cookies('unionTypeYas') || util.getMktcBySeo();
357 if (mktc) { 357 if (mktc) {
358 var options = { 358 var options = {
359 path: "/", 359 path: "/",
@@ -377,7 +377,7 @@ function setMktc() { @@ -377,7 +377,7 @@ function setMktc() {
377 } 377 }
378 378
379 function getMktc() { 379 function getMktc() {
380 - var mktc = cookies('mkt_code') || window.qs.mkt_code || window.qs.union_type; 380 + var mktc = cookies('mkt_code') || window.qs.mkt_code || window.qs.union_type || cookies('unionTypeYas');
381 if (mktc) { 381 if (mktc) {
382 return { 382 return {
383 mktc: mktc 383 mktc: mktc
@@ -387,7 +387,7 @@ function getMktc() { @@ -387,7 +387,7 @@ function getMktc() {
387 } 387 }
388 388
389 function setUnionType() { 389 function setUnionType() {
390 - var mktc = window.qs.mkt_code || window.qs.union_type || util.getMktcBySeo() || cookies('mkt_code') || '100000000000349'; 390 + var mktc = window.qs.mkt_code || window.qs.union_type || cookies('unionTypeYas') || util.getMktcBySeo() || cookies('mkt_code') || '100000000000349';
391 var aDom = document.getElementsByTagName("a"); //获取页面所有a标签 391 var aDom = document.getElementsByTagName("a"); //获取页面所有a标签
392 for (var i = 0; i < aDom.length; i++) { 392 for (var i = 0; i < aDom.length; i++) {
393 var href = aDom[i].getAttribute('href') || ''; 393 var href = aDom[i].getAttribute('href') || '';