common.error.js
3.88 KB
webpackJsonp([30],[function(e,n,o){o(3)},,,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(p.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(p(window).height(),window.screen.availHeight),p("body").height()<=e-parseInt(w.css("height"),0)?w.addClass("bottom"):w.removeClass("bottom"))}function d(e){var n=p(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 p=o(1),l=o(4),w=p("#yoho-footer"),f=p(".yoho-page"),g=p(".yoho-header");!function(){var e,n=w.children(".op-row"),o=p(".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 l(o[0]),e.on("tap",function(e){return p(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",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var e=s();e=0===e?"":e,window._ozuid=e,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",e,"","")}(),g.on("touchstart","a",function(){g.find("a").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel","a",function(){p(this).removeClass("highlight")}),f.on("touchstart",".tap-hightlight",function(){p(this).siblings(".tap-hightlight").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){p(this).removeClass("highlight")}),p(".nav-home").on("touchstart",function(){p(".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}(),p.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()}]);