channel.index.js 5.67 KB
webpackJsonp([28],{0:function(o,n,e){var t=e(1),i=e(45),r=t(".search-box"),a=t(".box"),c=t(".index-search"),s=t(".index-logo"),u=t(".index-channel a:not(#yohood)"),h=r.children('input[type="text"]'),d=a.children(".no-search"),l=r.children(".search-icon");e(3),h.on("focus",function(){a.addClass("action"),s.addClass("action")}).on("input",function(){""===h.val()?l.addClass("empty"):l.removeClass("empty")}),d.on("touchend",function(){return a.removeClass("action"),s.removeClass("action"),h.blur(),!1}),r.children(".clear-text").on("touchstart",function(){h.val("").focus().trigger("input")}),r.children(".search-icon").on("touchstart",function(){return i.hasDangerInput()?!1:void c.submit()}),r.keyup(function(o){if(13===o.keyCode){if(i.hasDangerInput())return!1;c.submit()}}),t(".index-channel img").on("load error",function(){window.rePosFooter&&window.rePosFooter()}),u.on("touchstart",function(){u.css({background:"#000",color:"#fff",borderColor:"#fff"}),t(this).css({background:"rgba(255, 255, 255, 0.5)",color:"#000",borderColor:"#000"})}).on("touchend touchcancel",function(){t(this).css({background:"#000",color:"#fff",borderColor:"#fff"})})},2:function(o,n,e){function t(o,n){var e,t;"undefined"!=typeof o&&(e=o.toString(),t=n&&n>0?n:2e3,i.text(e).show(),r=setTimeout(function(){"block"===i.css("display")&&i.hide()},t))}var i,r,a=e(1);!function(){var o='<div id="yoho-tip" class="yoho-tip"></div>';a(".yoho-page").append(o),i=a("#yoho-tip"),i.on("touchend",function(){i.hide(),clearTimeout(r)})}(),n.show=t},3:function(o,n,e){function t(o){var n,e,t=document.cookie;return document.cookie&&""!==document.cookie&&(e=t.indexOf(o+"="),e>-1&&(e+=o.length+1,n=decodeURIComponent(f.trim(t.substring(e,t.indexOf(";",e)))))),n}function i(o,n,e){var t,i,r,a,c="";"undefined"!=typeof n&&(e=e||{},null===n&&(n="",e.expires=-1),e.expires&&("number"==typeof e.expires||e.expires.toUTCString)&&("number"==typeof e.expires?(a=new Date,a.setTime(a.getTime()+24*e.expires*60*60*1e3)):a=e.expires,c="; expires="+a.toUTCString()),t=e.path?"; path="+e.path:"",i=e.domain?"; domain="+e.domain:"",r=e.secure?"; secure":"",document.cookie=[o,"=",encodeURIComponent(n),c,t,i,r].join(""))}function r(){var o=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||o||(document.cookie="testcookie",o=-1!==document.cookie.indexOf("testcookie")),o}function a(){var o,n=t("_UID");return"undefined"==typeof n?0:(o=n.split("::"),"undefined"==typeof o||o.length<4?0:o)}function c(){var o=a();return 0===o?0:o[1]}function s(){var o=t("_g");return"undefined"==typeof o?"":JSON.parse(o).k}function u(){var o;0!==m.length&&(o=Math.min(f(window).height(),window.screen.availHeight),f("body").height()<=o-parseInt(m.css("height"),0)?m.addClass("bottom"):m.removeClass("bottom"))}function h(o){var n=f(o).outerHeight();o&&m.css("margin-bottom",n+"px")}function d(){var o,n,e=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)o=t[n].split("="),e.push(o[0]),e[o[0]]=o[1];return e}function l(o){return o.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var f=e(1),p=e(4),m=f("#yoho-footer"),g=f(".yoho-page"),w=f(".yoho-header");!function(){var o,n=m.children(".op-row"),e=f(".back-to-top"),t=a();u(),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>'),e.length>0&&(o=new p(e[0]),o.on("tap",function(o){return f(window).scrollTop(0),o.srcEvent.preventDefault(),!1})),m.removeClass("hide")}(),function(o,n,e,t,i){var r=n.createElement(e),a=n.getElementsByTagName(e)[0];o.YohoAcquisitionObject=i,o[i]=function(){o[i].p=arguments},r.async=1,r.src=t,a.parentNode.insertBefore(r,a)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var o=c();o=0===o?"":o,window._ozuid=o,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",o,"","")}(),w.on("touchstart","a",function(){w.find("a").removeClass("highlight"),f(this).addClass("highlight")}).on("touchend touchcancel","a",function(){f(this).removeClass("highlight")}),g.on("touchstart",".tap-hightlight",function(){f(this).siblings(".tap-hightlight").removeClass("highlight"),f(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){f(this).removeClass("highlight")}),f(".nav-home").on("touchstart",function(){f(".homebuttom").toggleClass("hide")}),function(){var o,n,e=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,r=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!r);n++)o=t[n],i=i||window[o+"RequestAnimationFrame"],r=r||window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"];i&&r||(i=function(o){var n=(new Date).getTime(),t=Math.max(0,16-(n-e)),i=window.setTimeout(function(){o(n+t)},t);return e=n+t,i},r=function(o){window.clearTimeout(o)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=r}(),f.extend({queryString:d}),11===m.find(".user-name").text().length&&m.find(".user-name").html(l(m.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=r,window.getUser=a,window.getUid=c,window.getShoppingKey=s,window.rePosFooter=u,window.reMarginFooter=h,window.queryString=d()},45:function(o,n,e){function t(o){var n,e,t,a=i("input[type!=hidden], textarea"),c=/['"<>&\|]|--/g,s=a.length,u="undefined"==typeof o||"boolean"!=typeof o?!0:o;for(e=0;s>e;e++)if(n=a.eq(e).val(),c.test(n))return u?a.eq(e).val(n.replace(c," ")):(t=n.match(c).join(" "),r.show("不可以输入 "+t+" 哦!")),!u&&!0;return!1}var i=e(1),r=e(2);n.hasDangerInput=t}});