guang.special.js 3.86 KB
webpackJsonp([22],[function(e,n,o){var t=o(1),i=o(6);o(3),i(t("img.lazy"))},,,function(e,n,o){function t(e){var n,o,t=document.cookie;return document.cookie&&""!==document.cookie&&(o=t.indexOf(e+"="),o>-1&&(o+=e.length+1,n=decodeURIComponent(l.trim(t.substring(o,t.indexOf(";",o)))))),n}function i(e,n,o){var t,i,a,r,s="";"undefined"!=typeof n&&(o=o||{},null===n&&(n="",o.expires=-1),o.expires&&("number"==typeof o.expires||o.expires.toUTCString)&&("number"==typeof o.expires?(r=new Date,r.setTime(r.getTime()+24*o.expires*60*60*1e3)):r=o.expires,s="; expires="+r.toUTCString()),t=o.path?"; path="+o.path:"",i=o.domain?"; domain="+o.domain:"",a=o.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(n),s,t,i,a].join(""))}function a(){var e=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||e||(document.cookie="testcookie",e=-1!==document.cookie.indexOf("testcookie")),e}function r(){var e,n=t("_UID");return"undefined"==typeof n?0:(e=n.split("::"),"undefined"==typeof e||e.length<4?0:e)}function s(){var e=r();return 0===e?0:e[1]}function c(){var e=t("_g");return"undefined"==typeof e?"":JSON.parse(e).k}function h(){var e;0!==w.length&&(e=Math.min(l(window).height(),window.screen.availHeight),l("body").height()<=e-parseInt(w.css("height"),0)?w.addClass("bottom"):w.removeClass("bottom"))}function d(e){var n=l(e).outerHeight();e&&w.css("margin-bottom",n+"px")}function u(){var e,n,o=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)e=t[n].split("="),o.push(e[0]),o[e[0]]=e[1];return o}function m(e){return e.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var l=o(1),p=o(4),w=l("#yoho-footer"),f=l(".yoho-page"),g=l(".yoho-header");!function(){var e,n=w.children(".op-row"),o=l(".back-to-top"),t=r();h(),0===t?n.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):n.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),o.length>0&&(e=new p(o[0]),e.on("tap",function(e){return l(window).scrollTop(0),e.srcEvent.preventDefault(),!1})),w.removeClass("hide")}(),function(e,n,o,t,i){var a=n.createElement(o),r=n.getElementsByTagName(o)[0];e.YohoAcquisitionObject=i,e[i]=function(){e[i].p=arguments},a.async=1,a.src=t,r.parentNode.insertBefore(a,r)}(window,document,"script","http://cdn.yoho.cn/yas-jssdk/1.0.14/yas.js","_yas"),function(){var e=s();e=0===e?"":e,window._ozuid=e,window._yas&&window._yas(1*new Date,"1.0.14","yohobuy_m",e,"","")}(),g.on("touchstart","a",function(){g.find("a").removeClass("highlight"),l(this).addClass("highlight")}).on("touchend touchcancel","a",function(){l(this).removeClass("highlight")}),f.on("touchstart",".tap-hightlight",function(){l(this).siblings(".tap-hightlight").removeClass("highlight"),l(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){l(this).removeClass("highlight")}),l(".nav-home").on("touchstart",function(){l(".homebuttom").toggleClass("hide")}),function(){var e,n,o=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!a);n++)e=t[n],i=i||window[e+"RequestAnimationFrame"],a=a||window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"];i&&a||(i=function(e){var n=(new Date).getTime(),t=Math.max(0,16-(n-o)),i=window.setTimeout(function(){e(n+t)},t);return o=n+t,i},a=function(e){window.clearTimeout(e)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),l.extend({queryString:u}),11===w.find(".user-name").text().length&&w.find(".user-name").html(m(w.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=r,window.getUid=s,window.getShoppingKey=c,window.rePosFooter=h,window.reMarginFooter=d,window.queryString=u()}]);