function loadWTScript(a, b) { var c = document.createElement("script"); c.type = "text/javascript", c.async = !0, c.src = a, dcsReady(c, b), document.getElementsByTagName("head")[0].appendChild(c) } function dcsReady(a, b) { a.readyState ? a.onreadystatechange = function () { ("loaded" == a.readyState || "complete" == a.readyState) && (a.onreadystatechange = null, b()) } : a.onload = function () { b() } } loadWTScript('//www.pingan.com/app_js/sdc/prd/sdc9.js', function () { if (typeof(_tag) != "undefined") { _tag.dcsid = "dcs5w0txb10000wocrvqy1nqm_6n1p"; //dcsid参数用于设置日志记录在哪个文件里 _tag.DCSext.platform = "pingan-wap"; //平台名字 var s = _tag.dcsGetIdAsync(); if (s) dcsReady(s, function () { _tag.dcsCollect() }); else _tag.dcsCollect(); } })
function searchArgument(name){ var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); var search = window.location.search.split('?')[1] || ''; var r = search.match(reg)||[]; return r[2]; } function setUrl(selfUrl) { var source = searchArgument('source'); var id = searchArgument('WT.mc_id'); var symbol = '?'; if(/\?/g.test(selfUrl)) { symbol = '&' } var num1, num2; if (source) { num1 = source; } else { num1 = 'jkfmall-kmh'; } if (id) { num2 = id; } else { num2 = 'jkfmall-kmh'; } location.href = selfUrl + symbol + 'source=' + num1 + '&WT.mc_id=' + num2; }