Authored by htoooth

fix query string bug

... ... @@ -142,16 +142,19 @@ $(window).on('resize', function() {
}
}).trigger('resize');
// 对特殊的情况进行处理
function queryString() {
var vars = {},
hash,
index,
i,
search = window.location.search,
hashes = search ? decodeURIComponent(search).slice(1).split('&') : [];
for (i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars[hash[0]] = hash[1];
index = hashes[i].indexOf('=');
hash = hashes[i].substring(0, index);
vars[hash] = hashes[i].substring(index);
}
return vars;
}
... ...
... ... @@ -917,7 +917,7 @@ function setRefer() {
var refer = queryString().refer || '', // eslint-disable-line
regUrl;
setCookie('refer', refer); // eslint-disable-line
setCookie('refer', refer, {domain: '.yohobuy.com'}); // eslint-disable-line
regUrl = (function() {
if (refer) {
... ...