...
|
...
|
@@ -1000,15 +1000,27 @@ function showCaptchaImgPic() { |
|
|
$showCaptchImg = true;
|
|
|
}
|
|
|
|
|
|
function getReferForLogin() {
|
|
|
var vars = {},
|
|
|
hash,
|
|
|
index,
|
|
|
i,
|
|
|
search = window.location.search,
|
|
|
hashes = search ? search.slice(1).split('&') : [];
|
|
|
|
|
|
for (i = 0; i < hashes.length; i++) {
|
|
|
index = hashes[i].indexOf('=');
|
|
|
hash = hashes[i].substring(0, index);
|
|
|
vars[hash] = hashes[i].substring(++index);
|
|
|
}
|
|
|
return vars.refer || '';
|
|
|
}
|
|
|
|
|
|
// 设置 refer 信息
|
|
|
function setRefer() {
|
|
|
var refer = queryString().refer || '', // eslint-disable-line
|
|
|
var refer = getReferForLogin(),
|
|
|
regUrl;
|
|
|
|
|
|
if (refer) {
|
|
|
setCookie('refer', refer, {domain: '.yohobuy.com', path: '/'}); // eslint-disable-line
|
|
|
}
|
|
|
|
|
|
regUrl = (function() {
|
|
|
if (refer) {
|
|
|
return '/reg.html?refer=' + refer;
|
...
|
...
|
|