H1 tags : WWW.QQUP.COM-亲亲优品:安全舒适童装的缔造者,致力于婴幼儿贴身衣物生产销售的网上购物商城。
var Shop = {"set":{"path":"/","buytarget":"3","dragcart":null,"refer_timeout":15},"url":{"addcart":"http://www.qqup.com/?cart-ajaxadd.html","shipping":"http://www.qqup.com/?cart-shipping.html","payment":"http://www.qqup.com/?cart-payment.html","total":"http://www.qqup.com/?cart-total.html","viewcart":"http://www.qqup.com/?cart-view.html","ordertotal":"http://www.qqup.com/?cart-total.html","applycoupon":"http://www.qqup.com/?cart-applycoupon.html","diff":"http://www.qqup.com/?product-diff.html"}};
window.addEvent('domready',function(){
var ReferObj =new Object();
$extend(ReferObj,{
serverTime:1313610546,
init:function(){
var FIRST_REFER=Cookie.get('S[FIRST_REFER]');
var NOW_REFER=Cookie.get('S[NOW_REFER]');
var nowDate=this.time=this.serverTime*1000;
if(!window.location.href.test('#r-')&&!document.referrer||document.referrer.test(document.domain))return;
if(window.location.href.test('#r-'))Cookie.dispose('S[N]');
if(!FIRST_REFER){
if(NOW_REFER){
this.writeCookie('S[FIRST_REFER]',NOW_REFER,this.getTimeOut(JSON.decode(NOW_REFER).DATE));
}else{
this.setRefer('S[FIRST_REFER]',Shop.set.refer_timeout);
}
}
this.setRefer('S[NOW_REFER]',Shop.set.refer_timeout);
this.createGUID();
},
getUid:function(){
var lf=window.location.href,pos=lf.indexOf('#r-');
return pos!=-1?lf.substr(pos+4):'';
},
getRefer:function(){
return document.referrer?document.referrer:'';
},
setRefer:function(referName,timeout){
var uid=this.getUid(),referrer=this.getRefer();
var data={'ID':uid,'REFER':referrer,'DATE':this.time};
if('S[NOW_REFER]'==referName){
var refer=JSON.decode(Cookie.get('S[FIRST_REFER]'));
if(uid!=''&&refer&&refer.ID==''){
var fdata={'ID':uid,'REFER':refer.REFER,'DATE':refer.DATE};
this.writeCookie('S[FIRST_REFER]',JSON.encode(fdata),this.getTimeOut(refer.DATE));
}else if(uid==''){
$extend(data,{'ID':refer.ID});
}
}
Cookie.set(referName,JSON.encode(data),{duration:(Shop.set.refer_timeout||15)});
},
getTimeOut:function(nowDate){
var timeout=nowDate+Shop.set.refer_timeout*24*3600*1000;
var date=new Date(timeout);
return date;
},
writeCookie:function(key,value,timeout){
document.cookie=key+ '=' + value+'; expires=' + timeout.toGMTString();
},
createGUID:function(){
var GUID = (function(){
var S4=function(){
return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
};
return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4()).toUpperCase();
})();
Cookie.set('S[N]',GUID,{duration:3650});
}
});
ReferObj.init();
}); |