Authored by hf

code review by huanbao.wang: do feature brands and plusstar

This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
define("index",["jquery","handlebars","source-map","index","lazyload","jquery.placeholder"],function(e,t,i){var n;e("js/common"),e("js/header"),e("js/simple-header"),e("js/product/entry"),e("js/home/entry"),e("js/passport/entry"),i.exports=n}),define("js/common",["jquery"],function(e,t,i){function n(e){var t=new RegExp(e+"=([^;$]*)","i"),i="$1";return t.test(decodeURIComponent(document.cookie))?RegExp[i]:""}function o(e,t,i){var n,o,a,s,r="";"undefined"!=typeof t&&(i=i||{},null===t&&(t="",i.expires=-1),i.expires&&("number"==typeof i.expires||i.expires.toUTCString)&&("number"==typeof i.expires?(s=new Date,s.setTime(s.getTime()+24*i.expires*60*60*1e3)):s=i.expires,r="; expires="+s.toUTCString()),n=i.path?"; path="+i.path:"",o=i.domain?"; domain="+i.domain:"",a=i.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(t),r,n,o,a].join(""))}function a(){var e,t=n("_UID");return"undefined"==typeof t?0:(e=t.split("::"),"undefined"==typeof e||e.length<4?0:e)}function s(){var e=a();return 0===e?0:e[1]}function r(){var e=n("_g");return"undefined"==typeof e?"":JSON.parse(e).k}var l=e("jquery"),c=l("body");e("js/footer"),function(e,t,i,n,o){var a=t.createElement(i),s=t.getElementsByTagName(i)[0];e.YohoAcquisitionObject=o,e[o]=function(){e[o].p=arguments},a.async=1,a.src=n,s.parentNode.insertBefore(a,s)}(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_web",e,"","")}(),l(window).on("resize",function(){var e=l(this).width();1360>e?l(".return-top").addClass("min"):l(".return-top").removeClass("min"),1180>e?c.addClass("min-screen"):c.removeClass("min-screen")}).trigger("resize"),window.cookie=n,window.setCookie=o,window.getUser=a,window.getUid=s,window.getShoppingKey=r}),define("js/footer",["jquery"],function(e,t,i){function n(){var e=s("#subscriber-box"),t=s("#subscriber-btn"),i=/^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/,n={mail:"&#xe61b;",tick:"&#xe61a"};e.focus(function(){s(this).val("").css("color",""),t.removeClass("done").html(n.mail)}),t.click(function(){var o=s.trim(e.val());if(""!==o&&i.test(o))try{s.ajax({url:"http://www.yohobuy.com/common/emailsubscriber",dataType:"jsonp",data:{email:o,tmp:Math.random(),uid:window.getUid()},success:function(i){1===i.data.result?(e.val("已订阅到:"+o),t.addClass("done").html(n.tick)):e.css("color","red")}})}catch(a){console.log(a.message)}else e.css("color","red")})}function o(){var e=s(".vote"),t=s("#feed-back-page"),i=e.children("li").length;t.on("click","span",function(){var t=s(this);t.hasClass("cur")||(t.siblings(".cur").removeClass("cur"),t.addClass("cur"),e.children().not(".hide").addClass("hide").end().eq(t.index()).removeClass("hide"))}),e.on("click",".feed-back-btn",function(){var n=s(this),o=n.closest("li"),a=o.index(),r=[],l=o.find(".feedback-answer").val(),c=o.find(".feedback-id").val(),d=o.find(".question-id").val();o.find(":checked").each(function(){r.push(s(this).val())}),s.ajax({url:"http://www.yohobuy.com/common/suggestfeedback",dataType:"jsonp",data:{feedback_id:c||0,question_id:d||0,answer:l||"",solution:r.join(",")},success:function(n){var s=a+1;if(1===~~n.data.result){if(a===i-1)return void alert("感谢您的参与!");o.addClass("hide"),e.children(":eq("+(a+1)+")").removeClass("hide"),t.children(".cur").removeClass("cur"),t.children(":eq("+s+")").addClass("cur")}}})})}function a(){s(window).height()<s(document).height()?r.removeClass("hide"):r.addClass("hide")}var s=e("jquery"),r=s(".return-top");r.click(function(){s("html,body").animate({scrollTop:0},500)}),s(window).scroll(function(){0===s(window).scrollTop()?r.addClass("hide"):r.removeClass("hide")}),a(),r.hasClass("hide")&&s("img").load(a),n(),o(),window.rePosReturnTop=a}),define("js/header",["jquery","handlebars","source-map","index"],function(e,t,i){function n(e,t,i){try{ee.push({louceng:e,weizhi:t,event:i})}catch(n){}}function o(){var e=L("#nav_keyword").text(),t="vans",i=L("#query_key");""!==e?(i.css({color:"#000"}),i.val(e)):(i.css({color:"#e0e0e0"}),i.val(t),i.on("focus",function(e){i.css({color:"#000"}),i.val("")}))}function a(){var e={cookie:"_g",cartNum:""},t="",i="",n=0,o=0,a=0,s=0,r="";L.fn.miniCart=function(n){if(t=L.extend(e,n),"undefined"==typeof window.cookie(t.cookie))i=null;else if(t.cookie)try{i=G.parse(window.cookie(t.cookie))}catch(o){}null!==i&&""!==i&&(s=parseInt(i._nac)+parseInt(i._ac),0===s?L("#icart-num").attr("class","icart-num icart-none"):L("#icart-num").attr("class","icart-num"),L(t.cartNum).html(s))},L.fn.search=function(e){function t(t){var i=L.trim(L(t).val());return i=i.replace(new RegExp("'","gm"),""),""===i?(L(".search-list").hide(),!1):(i=encodeURI(i),void L.get(e+"?query="+i,function(e){L(".search-list").html(e.data),n=L(".search-list").children("li").length,o=-1,n>0?L(".search-list").show():L(".search-list").hide(),L(".search-list").find("a").hover(function(){L(this).css("background-color","#eee")},function(){L(this).css("background-color","#fff")})},"jsonp"))}function i(e){L(".search-list li:eq("+a+")").children("a").css("background-color","#fff"),L(".search-list li:eq("+o+")").children("a").css("background-color","#eee"),r=L(".search-list li:eq("+o+")").children("a").attr("title"),L("#query_key").val(r)}return this.each(function(){L(this).keyup(function(e){if(38===e.which){if(0===n)return!1;-1===o&&(o=0),a=o,o=(o-1+n)%n,i(this)}else if(40===e.which){if(0===n)return!1;a=o,o=(o+1)%n,i(this)}else 13===e.which?window.submitSearch():t(this)})})},L.extend({getData:function(e,t,i){var n={page:1,method:"",v:1,return_type:"jsonp",open_key:"12345",tmp:Math.random()},o="";if(void 0===typeof e||""===e)return!1;if(o=L.extend(n,t),o.page=o.page||1,""===o.method)return!1;try{L.getJSON(e+"/?callback=?",o,function(e){return""!==i?("undefined"!=typeof i(e.data)&&G.parse(i(e.data)),!1):void 0})}catch(a){console.log(a.message)}},getShoppingKey:function(){var e=window.cookie("_g"),t=G.parse(e);return"undefined"==typeof e||null===e?"":t._k}})}function s(e){var t;200===+e.code&&"object"==typeof e.data&&(t=""!==e.data.url?'<a target="_blank" href="'+e.data.url+'" class="page-top-banner"style="height:36px;border:none;background-image:url('+window.unescape(e.data.src)+');background-position: center;display:block;">&nbsp;</a>':'<div class="noticewrapper"><div class="noticecontainer"><h1 class="noticetitle">关于系统升级的公告</h1><div class="noticecontent"><p class="tips">尊敬的顾客:</p><p class="detail">您好!为了向您提供更优质的服务,目前系统正在升级,请耐心等待。</p><p class="detail">系统升级期间,部分地区用户体验会有暂时中断,如遇紧急事宜,欢迎垂询客服热线:400-889-9646 09:00-22:30(周一至周日)。稍后系统将恢复正常</p><p class="detail">使用,欢迎您继续光顾YOHO!BUY有货!带来不便之处深表歉意,请您谅解!</p></div></div></div>',L("body").prepend(t))}function r(e){var t=document.createElement("script");t.src="http://www.yohobuy.com/common/getbanner?content_code="+e+"&client_type=web&callback=JsonPCallBack",document.getElementsByTagName("head")[0].appendChild(t)}function l(e,t){var i,n;L(e).hover(function(e){e.preventDefault(),i=L(this),n=L(t)[0],""===n.style.display?(i.addClass("acttags"),n.style.display="block"):(i.removeClass("acttags"),n.style.display="")})}function c(){var e,t,i=[{sourceClass:".myyoho",targetClass:".myyoho-info"},{sourceClass:".phone",targetClass:".qr"}];for(t=0;t<i.length;t++)e=i[t],l(e.sourceClass,e.targetClass)}function d(){var e;L(".yohogroup").mouseenter(function(){e=L(this),e.text(e.attr("cn"))}),L(".yohogroup").mouseleave(function(){e=L(this),e.text(e.attr("en"))})}function h(){var e,t,i=["webkit","moz","ms"];for(t=0;t<i.length;t++)return e=i[t]+"RequestAnimationFrame",window[e]?!0:!1}function u(){var e=["webkit","moz","ms"],t=e[0]+"RequestAnimationFrame",i=e[1]+"RequestAnimationFrame",n=e[2]+"RequestAnimationFrame";return window[t]?function(e){requestAnimationFrame(e)}:window[i]?function(e){window[i](e)}:window[n]?function(e){window[n](e)}:function(e){window.setTimeout(e,67)}}function f(){ie+=10,ne.css({transform:"rotateX("+ie+"deg)","-webkit-transform":"rotateX("+ie+"deg)","-moz-transform":"rotateX("+ie+"deg)"}),ie/90%2===1&&(oe?(ne.css("background-image","url(http://static.yohobuy.com/newheader/img/logo1.png)"),oe=!1):(ne.css("background-image","url(http://static.yohobuy.com/newheader/img/logo_e.png)"),oe=!0)),ie/90%2===0&&ie%360!==0?window.setTimeout(f,3e3):ie%360===0?window.setTimeout(f,6e4):te(function(){f()})}function p(){M&&window.clearTimeout(M),ne.fadeOut(ae,function(){oe=!1,ne.css("background-image","url(http://static.yohobuy.com/newheader/img/logo.png)"),ne.fadeIn(ae,function(){N=window.setTimeout(function(){ne.fadeOut(ae,function(){window.clearTimeout(N),oe=!0,ne.css("background-image","url(http://static.yohobuy.com/newheader/img/logo_e.png)"),ne.fadeIn(ae,function(){M=window.setTimeout(p,6e4)})})},3e3)})})}function m(){h()?(te=u(),window.setTimeout(f,3e3)):window.setTimeout(p,3e3)}function g(e){var t=L(e);t.find(".thirdnavbar").each(function(){var e=L(this),t=e.find("a"),i=t.attr("href"),n="hot"===t.attr("hot")?!0:!1,o={};o=e.hasClass("category-title")?{type:"title",height:49,content:e.text(),index:window.valueIndex,href:i,hot:!1}:{type:"catlist",height:36,content:t.text(),index:window.valueIndex,href:i,hot:n},window.valueIndex++,window.newArr.push(o)})}function w(){var e=window.newArr.length,t=0,i=[],n=[],o=[],a=[],s="",r="",l="",c=0,d=0,h=0;for(t;e>t;t++){if(i=window.newArr[t],0===window.gindex&&(window.oh1=window.oh1+i.height,window.oh1>=340&&t!==e-1&&(window.targetArr1=window.newArr.slice(0,i.index+1),window.nowIndex=i.index+1,window.gindex++),t===e-1)){window.targetArr1=window.newArr.slice(0,e+1);break}if(1===window.gindex&&(window.oh2=window.oh2+i.height,window.oh2>=340&&t!==e-1&&(window.targetArr2=window.newArr.slice(window.nowIndex,i.index+1),window.nowIndex=i.index+1,window.gindex++),t===e-1)){window.targetArr2=window.newArr.slice(window.nowIndex,e+1);break}if(2===window.gindex){if(window.oh3=window.oh3+i.height,window.oh3>=340&&t!==e-1){window.targetArr3=window.newArr.slice(window.nowIndex,i.index+1),window.nowIndex=i.index+1,window.gindex++;break}if(t===e-1){window.targetArr3=window.newArr.slice(window.nowIndex,e+1);break}}}for(c;c<window.targetArr1.length;c++)n=window.targetArr1[c]||{},"title"===n.type?window.inner1=window.inner1+'<li class="cattitle"><h3><a href="'+n.href+'">'+n.content+"</a></h3></li>":n.hot===!0?window.inner1=window.inner1+'<li class="catdetail"><a class="thirdcatelink hot" href="'+n.href+'">'+n.content+"</a></li>":window.inner1=window.inner1+'<li class="catdetail"><a class="thirdcatelink" href="'+n.href+'">'+n.content+"</a></li>";for(d;d<window.targetArr2.length;d++)o=window.targetArr2[d]||{},"title"===o.type?window.inner2=window.inner2+'<li class="cattitle"><h3><a href="'+o.href+'">'+o.content+"</a></h3></li>":o.hot===!0?window.inner2=window.inner2+'<li class="catdetail"><a class="thirdcatelink hot" href="'+o.href+'">'+o.content+"</a></li>":window.inner2=window.inner2+'<li class="catdetail"><a class="thirdcatelink" href="'+o.href+'">'+o.content+"</a></li>";for(h;h<window.targetArr3.length;h++)a=window.targetArr3[h]||{},"title"===a.type?window.inner3=window.inner3+'<li class="cattitle"><h3><a href="'+a.href+'">'+a.content+"</a></h3></li>":a.hot===!0?window.inner3=window.inner3+'<li class="catdetail"><a class="thirdcatelink hot" href="'+a.href+'">'+a.content+"</a></li>":window.inner3=window.inner3+'<li class="catdetail"><a class="thirdcatelink" href="'+a.href+'">'+a.content+"</a></li>";""!==window.inner1&&(s='<ul class="cate_row1 cate_row">'+window.inner1+"</ul>"),""!==window.inner2&&(r='<ul class="cate_row2 cate_row">'+window.inner2+"</ul>"),""!==window.inner3&&(l='<ul class="cate_row3 cate_row">'+window.inner3+"</ul>"),window.finalresult=s+r+l,L("#"+window.wrapperindex).empty().append(window.finalresult)}function v(){L(".categorywrapper").each(function(e){window.wrapperindex=L(this).attr("id"),window.newArr=[],window.gindex=0,window.targetArr1=[],window.targetArr2=[],window.targetArr3=[],window.oh1=0,window.oh2=0,window.oh3=0,window.valueIndex=0,window.nowIndex=0,window.inner1="",window.inner2="",window.inner3="",g(L(this).find(".category")),w()})}function y(){var e={},t="",i="http://www.yohobuy.com/common/getbanner?content_code=",n="",o="",a="",s="";L(document).on("mouseenter",".sub-nav-item",function(){t=L(this).find(".showdetail").attr("data-code"),t&&(e[t]||(e[t]=t,n=L(this).find(".showdetail").find("img"),o=L(this).find(".showdetail").find(".title"),a=L(this).find(".showdetail").find("a"),L.get(i+t+"&width=337&height=250&client_type=web",function(e){n.attr("src",e.data.src),a.attr("href",e.data.url),o.text(e.data.title)},"jsonp")))}),s=L(".cure").find(".name-cn").find("a").attr("href"),L(".main-link").attr("href",s)}function b(){var e=L("#cover");e.remove()}function C(){var e,t=window.cookie("_Gender"),i="",o="",a="",s="";("undefined"==typeof t||""===t||null===t)&&L.get("http://www.yohobuy.com/index/guide",function(t){i=document.createElement("div"),i.id="cover",i.innerHTML=t,document.body.appendChild(i),o=L(window).height(),a=L(".guide-box").height(),e=o/2-a/2,s=L(".guide-box .clear").find("li").length,L(".guide-box").css({width:200*s+"px",top:e+"px"}),L("#cover").bind("click",function(e){window.setCookie("_Gender","1,3",{path:"/",domain:".yohobuy.com",expires:90}),window.setCookie("_Channel","boys",{path:"/",domain:".yohobuy.com",expires:7}),b()}),L("#cover .guide-box .close").bind("click",function(e){n("弹窗","CLOSE","homepage_man"),window.setCookie("_Gender","1,3",{path:"/",domain:".yohobuy.com",expires:90}),window.setCookie("_Channel","boys",{path:"/",domain:".yohobuy.com",expires:7}),b()}),L(".boys img , .boys .go").bind("click",function(e){n("弹窗","BOYS","homepage_man"),window.setCookie("_Gender","1,3",{path:"/",domain:".yohobuy.com",expires:90}),window.setCookie("_Channel","boys",{path:"/",domain:".yohobuy.com",expires:7}),b()}),L(".girls img, .girls .go").bind("click",function(e){n("弹窗","GIRLS","homepage_woman"),window.setCookie("_Gender","2,3",{path:"/",domain:".yohobuy.com",expires:90}),window.setCookie("_Channel","girls",{path:"/",domain:".yohobuy.com",expires:7})}),L(".lifestyle img, .lifestyle .go").bind("click",function(e){window.setCookie("_Channel","lifestyle",{path:"/",domain:".yohobuy.com",expires:7}),n("弹窗","LIEFSTYLE","homepage_lifestyle")}),L("#cover .guide-box").bind("click",function(e){e.stopPropagation()})})}function o(){var e=L("#nav_keyword").text(),t="vans",i=L("#query_key");""!==e?(i.css({color:"#000"}),i.val(e)):(i.css({color:"#e0e0e0"}),i.val(t),i.on("focus",function(e){i.css({color:"#000"}),i.val("")}))}function x(){var e=window.cookie("_Gender"),t=L(".cure");"undefined"!=typeof e&&""!==e&&window.setCookie("_Gender",1,{path:"/",domain:".yohobuy.com",expires:7}),"男生"===t.find(".name-cn a").text()&&(window.setCookie("_Gender","1,3",{path:"/",domain:".yohobuy.com",expires:7}),window.setCookie("_Channel","boys",{path:"/",domain:".yohobuy.com",expires:7})),"女生"===t.find(".name-cn a").text()&&(window.setCookie("_Gender","2,3",{path:"/",domain:".yohobuy.com",expires:7}),window.setCookie("_Channel","girls",{path:"/",domain:".yohobuy.com",expires:7})),"创意生活"===t.find(".name-cn a").text()&&window.setCookie("_Channel","lifestyle",{path:"/",domain:".yohobuy.com",expires:7}),"潮童"===t.find(".name-cn a").text()&&window.setCookie("_Channel","kids",{path:"/",domain:".yohobuy.com",expires:7})}function k(){var e,t,i,n=document.cookie,o=n.split(";");for(e=0;e<o.length;e++)t=o[e].split("="),"undefined"!=typeof t[0]&&(i=t[0].replace(/\s/g,""),re[i]=t[1])}function _(){L("#miniCartBox").miniCart({cartNum:".ic-infomation"})}function j(){var e,t,i;L.getData(X,{method:"open.Shoppingcart.getCartData",shopping_key:L.getShoppingKey()},function(n){""===J&&(J=Y.compile(L("#mini-cart-tpl").html())),L("#miniCartBox").children(".gobuy-wrapper").html(J({carData:n})),0===parseInt(L(".ic-infomation").html())&&L("#miniCartBox .gobuy-wrapper").html('<div class="gobuy-empty"><h3 class="information">您的购物车暂无商品</h3></div>'),L("#miniCartBox .goods-list li").length<1&&(e=window.cookie("_g"),t=G.parse(e),null!==t&&(i='{"_k":"'+t._k+'","_nac":0,"_ac":0,"_r":0}',window.setCookie("_g",i,{path:"/",domain:".yohobuy.com"})),L(".ic-infomation").html(0),L("#miniCartBox .gobuy-wrapper").html('<div class="gobuy-empty"><h3 class="information">您的购物车暂无商品</h3></div>'))})}function q(e,t){L.getData(X,{method:"open.Shoppingcart.delone",shopping_key:L.getShoppingKey(),id:e,isreduce:t},function(e){var t=window.cookie("_g"),i=G.parse(t),n='{"_k":"'+i._k+'","_nac":'+e.total_goods_num+',"_ac":0,"_r":0}';window.setCookie("_g",n,{path:"/",domain:".yohobuy.com"}),j(),_()})}function T(){var e,t,i;L(document).on("click",".goodscardelete",function(n){e=L(this),t=e.attr("goodsid"),i=e.attr("cheapest"),q(t,i)})}function A(){var e;L(document).on("click",".mycart_i_down",function(t){e=L(this),e.toggleClass("mycart_i_up"),L("#mycartmore").slideToggle(300)})}function I(){var e,t="http://www.yohobuy.com/shopping/cart";L("#miniCartBox").on("click",function(i){e=L(i.target),e.hasClass("gobuy")&&(window.location.href=t)})}function z(e){1===e?(L("#miniCartBox").addClass("list-cur"),L(".gobuy-wrapper").show(),0!==parseInt(L(".ic-infomation").html())?(L("#miniCartBox .gobuy-wrapper").html('<div class="gobuy-loading"><h3 class="information">加载中,请稍后</h3></div>'),j()):L("#miniCartBox .gobuy-wrapper").html('<div class="gobuy-empty"><h3 class="information">您的购物车暂无商品</h3></div>')):(L("#miniCartBox").removeClass("list-cur"),L(".gobuy-wrapper").hide())}function O(){var e;L("#miniCartBox").mouseenter(function(t){e=L(t.target),("miniCartBox"===e.attr("id")||"ic-infomation"===e.attr("class"))&&z(1)}),L("#miniCartBox").mouseleave(function(e){z(0)})}function S(){var e,t="indexkids",i="indexlifestyle",n="indexboys",o="indexgirls",a="uniquebrand",s=window.location.href,l=window.location.host,c="";-1!==s.indexOf("search")&&(c=se["search"+re._Channel]),-1!==s.indexOf("list")&&(c=se["list"+re._Channel]),-1!==s.indexOf("brands")&&(c=se["brands"+re._Channel]),-1!==s.indexOf("new")&&(c=se["new"+re._Channel]),-1!==s.indexOf("sale")&&(c=se["sale"+re._Channel]),-1!==s.indexOf("home")&&(c=se["home"+re._Channel]),-1!==s.indexOf("kids")&&(c=se[t]),(-1!==s.indexOf("woman")||-1!==s.indexOf("girls"))&&(c=se[o]),-1!==s.indexOf("lifestyle")&&(c=se[i]),-1!==s.indexOf("www.yohobuy.com")&&"/"===window.location.pathname&&(c=se[n]),e=l.split(".")[0],"list"!==e&&"search"!==e&&"www"!==e&&"new"!==e&&"item"!==e&&"guang"!==e&&(c=se[a+re._Channel]),r(c)}function E(e){L(".hot-brands").find("ul").stop().animate({opacity:0,"z-index":1},200).eq(e).animate({opacity:1,"z-index":2},200)}function P(){var e,t=0;L(".hot-brands").size()>0&&(e=L(".hot-brands").find("ul").size(),L(".hot-brands").find("ul").eq(0).css({opacity:1,"z-index":2}),L(".brands-control").on("click",".next",function(){t===e-1?t=0:t++,E(t)}),L(".brands-control").on("click",".prev",function(){0===t?t=e-1:t--,E(t)}))}function $(){setInterval(_,2e3)}function B(){var e=L("#goodcartempwarpper"),t="";e&&e.html()&&(t=L("#goodcartempwarpper").html().replace(/\\/g,""),L("#goodcartempwarpper").html(t),Z=Y.compile(L("#tmpl-my-login-new").html()))}function U(){var e="http://search.yohobuy.com/api/suggest";L("#query_key").search(e)}function D(e){var t=(new Date).getTime(),i='<span>Hi~</span>[<a href="http://www.yohobuy.com/signin.html" class="list-a login-out ">请登录</a>]&nbsp;[<a href="http://www.yohobuy.com/reg.html" class="list-a login-out" onclick="">免费注册</a>]',n='<span>Hi~<a href="http://www.yohobuy.com/home?t='+t+'">{{user_name}}</a></span>&nbsp;{{#equalone islogin}}[<a href="{{logout}}" class="list-a login-out">退出</a>]{{else}}[<a href="http://www.yohobuy.com/signin.html" class="list-a login-out">请登录</a>]&nbsp;[<a href="http://www.yohobuy.com/reg.html" onclick="" class="list-a login-out">免费注册</a>]{{/equalone}}',o=L("#loginBox"),a=window.cookie("_UID"),s=e.data.profile_name,r=0,l=0,c="",d=a.split("::"),h=d[0]||" ",u="http://www.yohobuy.com/logout_",f="1",p=0,m={user_name:s,logout:u+e.data.token+".html",random:Math.random()};if(W=Y.compile(n),"undefined"==typeof a||null===a)return o.html(i),!1;if("undefined"==typeof d||d.length<4)return o.html(i),!1;for(l;l<h.length;l++)c=h.substr(l,1),r+=/.*[\u4e00-\u9fa5]+.*$/.test(c)?2:1;if(10>=r)s=h;else{for(p=0,l;l<h.length;l++)10>p&&(c=h.substr(l,1),"*"!==c&&(p+=/.*[\u4e00-\u9fa5]+.*$/.test(c)?2:1),s+=c);s.length<h.length&&(s+="...")}u=/http:\/\//.test(d[3])?d[3].replace("www.yohobuy.com","www.yohobuy.com"):"http://www.yohobuy.com/logout_"+d[3]+".html",-1===e.result&&(f="-1"),m.islogin=f,o.html(W(m))}function R(e){var t=e.data,i="";if(1===e.result){if(void 0===typeof t||t.length<1)return!1;"3"===t.vip.curVipInfo.curLevel&&(t.vip3=!0),L("#myYohoBox").mouseenter(function(){return L(this).addClass("acttags"),L("#myYohoBox .myyoho-info").show().html(Z(t)),i=L(".myyoho-photo img").attr("data-url"),1===L._checkUrlState?void L(".myyoho-photo").show().find("img").attr("src",i):void(""!==i&&""===L._checkUrl&&L.ajax({url:i,type:"GET",complete:function(e){(200===e.status||0===e.status)&&(L(".myyoho-photo").show().find("img").attr("src",i),L._checkUrlState=1),L._checkUrl=i}}))}),L("#myYohoBox").mouseleave(function(){L(this).removeClass("acttags"),L("#myYohoBox .myyoho-info").hide()})}}function F(){var e={method:"open.passport.get"};L.getData(X,e,function(e){-1!==e.result&&(D(e),R(e))})}function H(){v(),y(),B(),C(),x(),k(),a(),d(),c(),m(),S(),P(),o(),O(),_(),$(),U(),I(),T(),A(),F(),o()}var M,N,L=e("jquery"),Y=e("handlebars"),G=e("index"),Z=null,W=null,X=L("#api-domain").val(),J="",K=/^[\^\!\+\-\(\)\:\[\]\\\{\}\~\*\?\|\&\;\/\s]{0,}$/g,Q="",V="",ee=[],te=null,ie=0,ne=L(".icon-logo"),oe=!0,ae=500,se={listboys:"4f78b0f418fc42314d8b6e791cfb7fa8",listgirls:"00c1f025a51b6b597dc37925951ea27d",listkids:"b02df11184727701ade1b6de9737d08c",listlifestyle:"fd35c52dced0c880976ba858346d1fc5",searchboys:"9fb8986ea700cc27a8057361c3924394",searchgirls:"e3e207a1443ca60c8037fe52a5560c18",searchkids:"620fc77f479da8feaeb06f2324e5d0bb",searchlifestyle:"a3c93301c6ffaf3ed0f36a4a451be36d",uniquebrandboys:"2ebb0810c0d1a67e5229149c9c3aba7d",uniquebrandgirls:"99e23385f4ba4b65f406b7e2968ac821",uniquebrandkids:"a74ebc9b17840c91b9ea46568111fe6b",uniquebrandlifestyle:"0e8c81ead53f56302baa4d0ad967f527",brandsboys:"77b352db07129c76a9d532acad149f9f",brandsgirls:"bf047f16e52ebc38be5ce9c7623831e6",brandskids:"e3ae1ce9b5e13c6d271ef3eccb831652",brandslifestyle:"e4ac8029c30f65d7f1af030980d140fe",newboys:"869d3c5f3b450fb52101d00a61ce87cb",newgirls:"d953b6dfdac02483d1dcce8d96055954",newkids:"0874cb6d75df8e0e78f2d475e53ecc08",newlifestyle:"43e8fc8e178115c262bbce2bd0012db7",saleboys:"c846e3165c994769b4201d8c32f3ae9b",salegirls:"52b1d389edcbc62d65de71b80c4d6ad0",salekids:"ad8b1703c761ba00973868ab5199cc27",salelifestyle:"7acc64905c70ac91846f43fb2cec4bbd",homeboys:"b0856a771ef1b59ab1234c74688fa42d",homegirls:"2bd61fa12e4933211518f70fe5ce3c48",homekids:"895c59e8c64b40399c9533509507320c",homelifestyle:"2e037d4e25d2767352ca3e0a4627f7bd",indexboys:"0c911d3000f52e8ca7cffb74f5864c29",indexgirls:"b645b8980c423ab30485e0a9d08c2ef7",indexkids:"17f6d5d5d454d2c507bc5fcbc90f7756",indexlifestyle:"735cd393e841762af8793c346abbbc36"},re={};L("#api-domain").remove(),window.submitSearch=function(){var e,t,i=L("#query_key").val(),o="Search",a="Head Search",s="Search";if(e=L.trim(Q.toLowerCase()),t=L.trim(i.toLowerCase()),n(o,a,s),""!==V&&""!==Q&&e===t)location.href=V.replace("'","");else{if(!K.test(i))return L("#searchForm").submit(),!1;location.href="http://search.yohobuy.com/error?query="+i+"&result=error"}},Y.registerHelper("equalone",function(e,t){return"1"===e?t.fn(this):t.inverse(this)}),Y.registerHelper("timestamp",function(){return(new Date).getTime()}),Y.registerHelper("headerimg",function(e){return""===e?"http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100":e}),Y.registerHelper("equallevelthree",function(e,t){return"3"===e?t.fn(this):t.inverse(this)}),Y.registerHelper("equalzero",function(e,t){return"0"===e?t.fn(this):t.inverse(this)}),window.JsonPCallBack=s,window.newArr=[],window.wrapperindex=0,window.gindex=0,window.targetArr1=[],window.targetArr2=[],window.targetArr3=[],window.oh1=0,window.oh2=0,window.oh3=0,window.valueIndex=0,window.nowIndex=0,window.inner1="",window.inner2="",window.inner3="",window.finalresult="",H()}),define("js/simple-header",["jquery"],function(e,t,i){function n(e){var t,i,n,o=0,a=0;for(n=0;n<e.length;n++)i=e.substr(n,1),a+=/.*[\u4e00-\u9fa5]+.*$/.test(i)?2:1;if(10>=a)t=e;else{for(o=0,t="",n=0;n<e.length;n++)10>o&&(i=e.substr(n,1),"*"!==i&&(o+=/.*[\u4e00-\u9fa5]+.*$/.test(i)?2:1),t+=i);t.length<e.length&&(t+="...")}return t}function o(e){var t,i;e&&e.href&&e.href.user?(i=n(e.href.user),t='<span>Hi~</span><a href="">'+i+'</a>&nbsp;<a href="'+e.href.logout+'">[退出]</a>'):(i=n(e.user),t='<span>Hi~</span><a href="">'+i+'</a>&nbsp;<a href="http://www.yohobuy.com/signin.html">[请登录]</a><a href="http://www.yohobuy.com/reg.html">[免费注册]</a>'),r(".header-tool li").eq(0).html(t)}function a(){r.ajax({type:"GET",url:"/common/getSimpleHeader",data:{},success:function(e){200===e.code&&o(e.data)}})}function s(){a()}var r=e("jquery");r(".simple-header").size()>0&&r(".tool-options").on("mouseenter",function(){r(this).find(".tool-select").fadeIn()}).on("mouseleave",function(){r(this).find(".tool-select").fadeOut()}),s()}),define("js/product/entry",["jquery","handlebars","source-map","lazyload"],function(e,t,i){e("js/product/list"),e("js/product/brand"),e("js/product/hotrank")}),define("js/product/list",["jquery","handlebars","source-map","lazyload"],function(e,t,i){e("js/product/filter"),e("js/product/sort-pager"),e("js/product/latest-walk"),e("js/product/product")}),define("js/product/filter",["jquery","handlebars","source-map"],function(e,t,i){function n(e){e.removeClass("checked").html(v.unchecked)}function o(){b.addClass("hide"),C.removeClass("hide")}function a(){C.addClass("hide"),b.removeClass("hide")}function s(e,t){var i,n=decodeURIComponent(window.location.search),o=e+"="+t;i=""===n?"?"+o:n+"&"+o,window.location.href=i}function r(e){A.children(".senior-sub:eq("+m+")").addClass("hide"),I.children(".attr:eq("+m+")").removeClass("hover"),m=-1}var l,c,d,h,u,f,p,m,g=e("jquery"),w=e("handlebars"),v={unchecked:"&#xe613;",checked:"&#xe612;"},y={up:"&#xe610;",down:"&#xe600;"},b=g(".brand .default"),C=g(".brand .brand-panel"),x=C.find(".attr"),k=g("#brand-more"),_=g("#brand-multi"),j=g(".ud-price-range"),q=/^\d+$/,T=g(".sort-sub-wrap"),A=g(".senior-sub-wrap"),I=g(".senior-attr-wrap"),z='{{# size}}<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">{{name}}</a>{{/ size}}',O={},S=g(".filter-box .size");z=w.compile(z),g(".filter-box").on("selectstart",".attr, .brands-index span",function(){return!1}),g(".sort-pre").on("click","li",function(){var e=g(this),t=e.index(),i=e.data("id");return e.hasClass("active")?(e.removeClass("active"),T.children(":eq("+t+")").addClass("hide"),void S.addClass("hide")):(e.siblings(".active").removeClass("active"),e.addClass("active"),T.children(":not(.hide)").addClass("hide"),T.children(":eq("+t+")").removeClass("hide"),void(S.data("load")||(O[i]?(S.find(".attr-content").html(O[i]),S.removeClass("hide")):g.ajax({url:"/product/search/sortSize",data:{msort:i}}).then(function(e){"array"===g.type(e)&&e.length?(O[i]=z({size:e}),S.find(".attr-content").html(O[i]),S.removeClass("hide")):S.addClass("hide")}))))}),k.length>0&&(l=k.children("em"),c=k.children(".iconfont")),_.click(function(){"none"===C.css("display")&&k.trigger("click"),o(),C.removeClass("hide").addClass("multi"),g(this).addClass("hide")}),k.click(function(){var e=g(this);e.hasClass("more")?(a(),l.text("更多"),c.html(y.down)):(o(),l.text("收起"),c.html(y.up)),g(this).toggleClass("more")}),g(".brands-index").on("mouseenter","span",function(){var e=g(this),t=e.data("index");e.hasClass("hover")||(e.siblings("span.hover").removeClass("hover"),e.addClass("hover"),0===e.index()?x.removeClass("hide"):x.addClass("hide").filter("[data-index="+t+"]").removeClass("hide"))}),g("#brand-search-input").keyup(function(){var e=g(this).val().toLowerCase();""===e?x.removeClass("hide"):x.addClass("hide").filter('[data-key*="'+e+'"]').removeClass("hide")}),g("#brand-multi-ok").click(function(){var e="";g(this).hasClass("dis")||(C.find(".checked").each(function(){var t=g(this).data("id");e+=""===e?t:","+t}),s("brand",e))}),g(".multi-select-cancel").click(function(){var e=g(this).closest(".multi");e.hasClass("brand-panel")&&(_.removeClass("hide"),k.trigger("click")),e.addClass("hide").removeClass("multi"),a(),n(e.find(".checkbox.checked"))}),g(".check-container").on("click",".attr",function(){var e=g(this),t=e.find(".checkbox"),i=e.closest(".brand-panel, .senior-sub").find(".multi-select-ok");t.toggleClass("checked"),t.hasClass("checked")?t.html(v.checked):t.html(v.unchecked),t.hasClass("checked")||e.siblings(".attr").find(".checked").length>0?i.removeClass("dis"):i.addClass("dis")}),g(".brand, .senior").on("click",".attr > a",function(e){g(this).closest(".multi").length>0&&e.preventDefault()}),j.length>0&&(d=j.find(".limit"),h=d.filter(".min"),u=d.filter(".max"),f=j.find(".price-sure"),d.keyup(function(){var e=g.trim(h.val()),t=g.trim(u.val()),i=q.test(e),n=q.test(t);n&&(""===e||i)||i&&(""===t||n)?f.removeClass("hide"):f.addClass("hide")}),f.click(function(){var e,t=g.trim(h.val()),i=g.trim(u.val());""!==t&&""!==i&&+t>+i&&(e=i,i=t,t=e),s("price",t+","+i)})),I.on("mouseenter",".attr",function(){var e=g(this),t=e.index();e.hasClass("no-sub")||(e.addClass("hover").siblings().removeClass("hover"),A.children(".senior-sub:eq("+t+")").removeClass("hide").siblings().addClass("hide"))}).on("mouseleave",".attr",function(){var e=g(this),t=e.index();e.hasClass("no-sub")||(m=t,p=setTimeout(function(){r()},100))}),g(".senior-sub").on("click",".multi-select",function(){g(this).closest(".senior-sub").addClass("multi")}).on("click",".multi-select-ok",function(){var e=g(this),t=e.closest(".senior-sub"),i="";e.hasClass("dis")||(t.find(".checked").each(function(){var e=g(this).data("id");i+=""===i?e:","+e}),s(t.data("attr"),i))}).on("mouseenter",function(){clearTimeout(p)}).on("mouseleave",function(){r()})}),define("js/product/sort-pager",["jquery"],function(e,t,i){var n=e("jquery"),o=n("#count-per-page"),a=o.next("ul"),s=200;n(document).click(function(e){n(e.target).closest(".page-count").length>0||a&&a.slideUp(s)}),o.click(function(){"none"===a.css("display")?a.slideDown(s):a.slideUp(s)})}),define("js/product/latest-walk",["jquery","handlebars","source-map","lazyload"],function(e,t,i){var n=e("jquery"),o=e("handlebars"),a=e("lazyload"),s=n("#latest-walk-count");!function(){var e;0!==s.length&&(e=o.compile(n("#latest-walk-tpl").html()),n.ajax({url:"http://itemapi.yohobuy.com/item/item/recentreview",dataType:"jsonp",data:{limit:s.val()},success:function(t){var i,o,s,r=[];if(200===t.code){for(i=t.data,o=0;o<i.length;o++)s=i[o],r.push({href:s.url,img:s.pic_url,name:s.product_name,salePrice:s.price,marketPrice:s.market_price});r.length>0&&(n("#latest-walk-goods").html(e({latestWalk:r})),a(n("#latest-walk-goods .lazy")))}}}))}()}),define("js/product/product",["jquery","lazyload"],function(e,t,i){var n,o=e("jquery"),a=e("lazyload"),s=e("js/common/product-event"),r=o(".goods-container"),l=r.find(".good-info"),c=r.find(".good-item-wrapper"),d=r.find(".good-info-main"),h=r.find(".good-select-color"),u=o(".product-list-nav");a(o("img.lazy")),t.init=function(e){function t(e){var t,i,n,o="",a=e.length,s=4,r=Math.ceil(a/s),l=0;for(t=0;r>t;t++)for(o+="<ul>",i=0;s>i&&(n=t*s+i,n!==a);i++)o+='<li><a href="'+e[t*s+i].url+'"><img src="'+e[t*s+i].src+'" data-cover="'+e[t*s+i].coverImg+'" /></a></li>',i===s-1&&(o+="</ul>",l++);return r>l&&(o+="</ul>"),{colorListStr:o,ulNum:r}}function i(){d.html(""),h.html(""),c.css({display:"none"})}n=null,l.unbind(),n=s(l,e),n.addHandler("MouseEnter",function(e){var n,a,s,l,u,f,p,m,g=10,w=35,v="";o.ajax({type:"POST",url:"/product/list/getProductPic",dataType:"json",data:{skn:e.target.attr("data-skn")}}).then(function(y){i(),
v=t(y.pics).colorListStr,n=t(y.pics).ulNum,d.append(e.targetDuplicate),h.append(o(v)),y.isFavorite?d.find(".col-btn").addClass("coled"):d.find(".col-btn").removeClass("coled"),f=c.css("paddingLeft"),p=c.css("paddingTop"),m=r.css("paddingTop"),a=10+65*n+e.targetWidth,l=(e.targetX-1)*(e.targetWidth+g)-(parseInt(f)+1),u=(e.targetY-1)*(e.targetHeight+w)+parseInt(m)-(parseInt(p)+1),s=e.offsetR-(65*n+25),0>=s&&(l=l+s-25),c.css({width:a,left:l,top:u,display:"inline-block"}),y.pics[0]&&y.pics[0].src&&d.find(".good-thumb img").attr("src",y.pics[0].src)})}),c.mouseleave(function(){i()})},o(document).on("hover",".good-select-color li",function(){var e=o(this).find("img").attr("data-cover"),t=o(this).closest(".good-item-wrapper").find(".good-detail-img").find("img");t.attr("src",e)}),d.on("click",".col-btn",function(){var e=o(this);o.ajax({type:"POST",url:"/product/list/changeFavorite",data:{skn:e.closest(".good-info").data("skn"),isFavorite:e.hasClass("coled")}}).then(function(t){200===t.code?e.toggleClass("coled"):403===t.code&&(location.href="http://www.yohobuy.com/signin.html?refer="+encodeURIComponent(location.href))})}),u.find("h3").click(function(e){var t=o(this).closest(".product-list-nav");t.hasClass("active")?t.find(".sort-child-list").stop(!0,!0).slideUp():t.find(".sort-child-list").stop(!0,!0).slideDown(),t.toggleClass("active")})}),define("js/common/product-event",["jquery"],function(e,t,i){function n(){this.handlers={}}var o=e("jquery");n.prototype={constructor:n,addHandler:function(e,t){"undefined"==typeof this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t)},fire:function(e){var t,i;if(e.target||(e.target=this),this.handlers[e.type]instanceof Array)for(t=this.handlers[e.type],i=0;i<t.length;i++)t[i](e)},removeHandler:function(e,t){var i,n;if(this.handlers[e]instanceof Array){for(i=this.handlers[e],n=0;n<i.length&&i[n]!==t;n++);i.splice(n,1)}}},i.exports=function(e,t){function i(e){var i,n=0,c=0,d=t,h=0,u="",f=0,p=0;switch(e.type){case"mouseenter":i=o(this),u=i.clone(),h=i.index()+1,n=h%d===0?d:h%d,c=Math.ceil(h/d),f=i.offset().left,p=l-(f+s),a.fire({type:"MouseEnter",target:i,targetWidth:s,targetHeight:r,targetX:n,targetY:c,rowWidth:d,activeIndex:h,targetDuplicate:u,offsetL:f,offsetR:p});break;case"mouseleave":a.fire({type:"MouseLeave"})}}var a=new n,s=e.eq(0).width(),r=e.eq(0).height(),l=o(window).width();return e.bind("mouseenter",i),a}}),define("js/product/brand",["jquery"],function(e,t,i){var n=e("jquery");n("#brand-favor").on("click",function(){var e=n(this),t=window.getUid();n.ajax({type:"post",url:"/product/index/favoriteBrand",data:{uid:t,brandId:e.data("id")}}).then(function(t){200===t.code?"add"===t.message?e.find("i").addClass("coled"):e.find("i").removeClass("coled"):403===t.code&&(location.href="http://www.yohobuy.com/signin.html?refer="+encodeURIComponent(location.href))})})}),define("js/product/hotrank",["jquery","handlebars","source-map","lazyload"],function(e,t,i){var n=e("jquery"),o=e("handlebars"),a=e("lazyload");e("js/common/slider"),e("js/common/logo-brand"),a(n("img.lazy")),n(".slide-container").slider(),n(".logo-brand").logoBrand({showNum:10,url:n(".logo-brand").data("url")}),function(e){function t(t,i){var l={};l=i?{sid:t,page:i}:{sid:t},e.ajax({type:"GET",dataType:"json",url:"/product/index/getdata",data:l,success:function(t){var l;200===t.code&&(l={list:t.data},s=o.compile(n),i?(e(".hot-week-list").append(s(l)),r.css({position:"fixed",marginTop:-r.height()/2,top:"50%"})):e(".hot-week-list").html(s(l)),a(e("img.lazy")),h=!1)}})}var i,n,s,r=e(".hot-week").find(".floatlayer"),l=e(".hot-cate").find("li").eq(0).data("sid"),c=1,d=0,h=!1;n='{{# list}}<div class="good-info"><div class="item-img"><a class="good-thumb" target="_blank" href="{{url}}"><img class="lazy" data-original="{{thumb}}"></a></div><div class="good-detail-text"><a target="_blank" href="{{url}}">{{name}}</a><p class="price"><span class="sale-price{{#unless marketPrice}}prime-cost{{/unless}}">¥{{salePrice}}</span>{{# marketPrice}}<span class="market-price">¥{{.}}</span>{{/ marketPrice}}</p></div></div>{{/ list}}',e(window).on("scroll",function(){var n=i+e(".hot-week").outerHeight();i=e(".hot-week").offset().top,e(this).scrollTop()>=i-e(window).height()/2?r.offset().top+r.outerHeight()>=n?r.css({position:"absolute",marginTop:0,top:e(".hot-week").outerHeight()-r.outerHeight()}):r.css({marginTop:-r.height()/2}).stop().animate({opacity:1},200,function(){r.show()}):r.stop().animate({opacity:0},200,function(){r.hide()}),r.offset().top>=e(this).scrollTop()+(e(window).height()-r.outerHeight())/2&&r.css({position:"fixed",marginTop:-r.height()/2,top:"50%"}),e(this).scrollTop()>=i+e(".hot-week").height()-e(window).height()&&(h||(c++,h=!0,t(l,c)))}),e(".hot-cate").find("li").each(function(t){var i=e(".hot-cate").width();i>=d&&(d+=e(this).width(),d>=i&&e(".floatlayer").find("li").eq(t).hide().nextAll().hide())}),e(".hot-cate").on("click","li",function(){var n=e(this).index(),o=e(this).data("sid");e(this).hasClass("current")||(e(this).addClass("current").siblings().removeClass("current"),e(".floatlayer").find("li").removeClass("current").eq(n).addClass("current"),e("body,html").stop().animate({scrollTop:i-110},500),t(o),c=1)}),e(".floatlayer").on("click","li",function(){var t=e(this).index();e(this).hasClass("current")||(e(".hot-cate").find("li").eq(t).trigger("click"),e(this).addClass("current").siblings().removeClass("current"),e(".hot-cate").find("li").removeClass("current").eq(t).addClass("current"))}),e(".hot-cate").find("li").eq(0).addClass("current"),e(".floatlayer").find("li").eq(0).addClass("current")}(n)}),define("js/common/slider",["jquery","lazyload"],function(e,t,i){var n=e("jquery"),o=e("lazyload");!function(e){var t=function(t,i){this.$element=e(t),this.options=e.extend({},e.fn.slider.defaults,i),this.bigItem=this.$element.find(".slide-wrapper").find("li"),this.smallItem=null,this.len=this.bigItem.size(),this.index=0,this.timer=null,this.init()};t.prototype={init:function(){if(this.$element){if(this.len<=1)return void o(this.$element.find("img.lazy"));this.options.pagination?this.smallItem=e(this.options.pagination).find("li"):this._createPage(),this.options.orient&&this._createOrient(),this._slideShow(),this._bindEvent(),this._autoplay()}},_createOrient:function(){var e='<div class="slide-switch"><a class="prev" href="javascript:;"><span class="iconfont">&#xe60c;</span></a><a class="next" href="javascript:;"><span class="iconfont">&#xe60b;</span></a></div>';this.$element.find(".slide-switch").length>0||this.$element.append(e)},_createPage:function(){var t='<div class="slide-pagination"><div class="slide-pagination-inner"><div class="slide-shade"></div><div class="slide-pagination-last">',i=0;if(!(this.len<=1)){for(i=0;i<this.len;i++)t+="<span></span>";t+="</div></div></div>",this.$element.append(e(t)),this.smallItem=e(".slide-pagination-inner").find("span")}},_bindEvent:function(){var t=this;this.$element.find(".slide-switch").on("click",".next",function(){t._nextSlide(),clearInterval(t.timer),t.timer=setInterval(function(){t._nextSlide()},t.options.time)}).on("click",".prev",function(){t._prevSlide(),clearInterval(t.timer),t.timer=setInterval(function(){t._nextSlide()},t.options.time)}),this.smallItem.on("mouseenter",function(){t.index=e(this).index(),clearInterval(t.timer),t._slideShow()}).on("mouseleave",function(){t._autoplay()}),this.$element.on("mouseenter",function(){e(this).find(".slide-switch").addClass("show")}).on("mouseleave",function(){e(this).find(".slide-switch").removeClass("show")})},_nextSlide:function(){this.index===this.len-1?this.index=0:this.index++,this._slideShow()},_prevSlide:function(){0===this.index?this.index=this.len-1:this.index--,this._slideShow()},_slideShow:function(){var t=this.bigItem.eq(this.index).find("img.lazy");t.attr("src")!==t.data("original")&&(o(t,{event:"sporty"}),t.trigger("sporty")),this.smallItem.eq(this.index).addClass("focus").siblings().removeClass("focus"),this.bigItem.eq(this.index).show().stop().animate({opacity:1}).siblings().stop().animate({opacity:0},function(){e(this).hide()})},_autoplay:function(){var e=this;clearInterval(this.timer),this.timer=setInterval(function(){e._nextSlide()},this.options.time)}},e.fn.slider=function(i){return this.each(function(){var n=e(this),o=n.data("Slider"),a="object"==typeof i&&i;o||n.data("Slider",o=new t(this,a)),"string"==typeof i&&o[i]()})},e.fn.slider.Constructor=t,e.fn.slider.defaults={time:5e3,orient:!0,pagination:null}}(n)}),define("js/common/logo-brand",["jquery","handlebars","source-map","lazyload"],function(e,t,i){var n=e("jquery"),o=e("handlebars"),a=e("lazyload");!function(e){var t=function(t,i){this.$element=e(t),this.options=e.extend({},e.fn.logoBrand.defaults,i),this.init()};t.prototype={init:function(){this.$element.addClass("logos-"+this.options.showNum),this._sendRequest()},_createHelper:function(){var e=this.options.showNum;o.registerHelper("brandList",function(t,i){var n="<ul>",o=0,a=null,s=0;if(t.length%e!==0)for(s=e-t.length%e,o=0;s>o;o++)t.push({href:"javascript:;",img:""});for(o=0;o<t.length;o++)a=i.fn(t[o]),n=o%e===5||5===o?n+'<li class="logo-brand-switch" data-page="'+Math.floor(o/e)+'"><a class="prev iconfont" href="javascript:;">&#xe60f;</a><a class="next iconfont" href="javascript:;">&#xe60e;</a></li><li data-page="'+Math.floor(o/e)+'">'+a+"</li>":0!==o&&o%e===0?n+'<li class="brand-more" data-page="'+Math.floor(o/(e+1))+'"><a href="javascript:;" target="_blank">MORE ></a></li><li data-page="'+Math.floor(o/e)+'">'+a+"</li>":n+'<li data-page="'+Math.floor(o/e)+'">'+a+"</li>";return n+'<li class="brand-more" data-page="'+Math.floor(o/(e+1))+'"><a href="javascript:;" target="_blank">MORE ></a></li></ul>'})},_sendRequest:function(){var t=this;e.ajax({type:"GET",url:t.options.url,dataType:"json",success:function(e){var i,n;e&&0!==e.length&&(t._createHelper(),n='{{#brandList logoBrand}}<a href="{{href}}" target="_blank"><img class="lazy" data-original="{{img}}" alt=""></a>{{/brandList}}',i=o.compile(n),t.$element.html(i(e)),t.$element.find(".brand-more a").attr("href",e.moreBrand),a(t.$element.find("img.lazy")),t._bindEvent())}})},_brandShow:function(t,i){var n=this;a(e("li[data-page="+i+"]").find("img.lazy").trigger("appear")),n.$element.find("li[data-page="+t+"]").find("img").fadeOut("normal",function(){n.$element.find("li").hide(),n.$element.find("li[data-page="+i+"]").show().find("img").fadeIn()})},_bindEvent:function(){var t=this;t.$element.on("click",".next",function(){var i=e(this).parent().data("page"),n=0,o=Math.ceil(t.$element.find("li").size()/(t.options.showNum+2))-1;n=i===o?0:i+1,t._brandShow(i,n)}),t.$element.on("click",".prev",function(){var i=e(this).parent().data("page"),n=0,o=Math.ceil(t.$element.find("li").size()/(t.options.showNum+2))-1;n=0===i?o:i-1,t._brandShow(i,n)})}},e.fn.logoBrand=function(i){return this.each(function(){var n=e(this),o=n.data("LogoBrand"),a="object"==typeof i&&i;o||n.data("LogoBrand",o=new t(this,a)),"string"==typeof i&&o[i]()})},e.fn.logoBrand.Constructor=t,e.fn.logoBrand.defaults={showNum:16,url:"/boys/getBrand"}}(n)}),define("js/home/entry",["jquery","lazyload","handlebars","source-map"],function(e,t,i){e("js/home/home")}),define("js/home/home",["jquery","lazyload","handlebars","source-map"],function(e,t,i){var n=e("jquery"),o=e("lazyload"),a=n(".home-page").data("page"),s=n(".logo-brand").data("url");e("js/common/slider"),e("js/common/slider2"),e("js/common/logo-brand"),e("js/common/accordion"),n(document).on("mouseenter",".imgopacity a img",function(){n(this).css("opacity",.8)}),n(document).on("mouseout",".imgopacity a img",function(){n(this).css("opacity",1)}),"brands"===a&&e("js/home/brands"),n.inArray(a,["boys","girls","kids","lifestyle"])>-1&&(e("js/common/new-arrivls")({type:a,url:"/common/getNewArrival",count:"boys"===a||"lifestyle"===a?5:4,rows:[5,3]}),window.setCookie("_Channel",a,{domain:".yohobuy.com",path:"/",expires:365})),o(n("img.lazy")),"boys"===a?n(".slide-container").slider({pagination:".thumb-pagination"}):(n(".center-col").slider(),n(".slide-container").slider()),"boys"===a?(n(".logo-brand").logoBrand({url:s}),n(".img-brand").slider2()):(n(".logo-brand").logoBrand({showNum:10,url:s}),n(".img-slider-wrapper").slider2())}),define("js/common/slider2",["jquery"],function(e,t,i){var n=e("jquery");!function(e){e.fn.slider2=function(t){function i(t,i,o){o===!0?(e(".next").trigger("click"),t===i-3?n(--t,i,!1):n(++t,i,!0)):(e(".prev").trigger("click"),0===t?n(++t,i,!0):n(--t,i,!1))}function n(t,n,o){window.setTimeout(i,e.fn.slider2.defaults.delaytime,t,n,o)}function o(t,i,n){var o=-(t*i);e(".img-list").animate({"margin-left":o+"px"},"slow",n)}return e.fn.slider2.defaults={index:0,shownum:3,autoplay:!1,delaytime:3e3},this.each(function(){var i=e.extend({},e.fn.slider2.defaults,t),a=parseInt(e(".img-item").css("margin-right")),s=e(".img-item"),r=[],l=s.outerWidth()+a,c=s.length,d=0;if(3>=c)return void e(this).find(".img-brand-switch").hide();for(d=0;d<s.length;d++)r.push(s[d]);c=r.length,e(this).find(".img-list").css({width:l*c}),e(this).find(".next").on("click",function(t){var i=0,n=null;t.preventDefault(),o(3,l,function(){for(i=0;3>i;i++)n=r.shift(),e(".img-item").parent().append(n.outerHTML),r.push(n);e(".img-item").first().remove(),e(".img-item").first().remove(),e(".img-item").first().remove(),e(".img-list").css({"margin-left":"0"})})}),e(this).find(".prev").on("click",function(t){var i=0,n=null,a="";for(t.preventDefault(),i=0;3>i;i++)n=r.pop(),e(".img-item").parent().prepend(n.outerHTML),r.unshift(n);a=3*l,e(".img-item").last().remove(),e(".img-item").last().remove(),e(".img-item").last().remove(),e(".img-list").css({"margin-left":-a+"px"}),o(0,l)}),i.autoplay===!0&&n(i.index,c,!0)})}}(n)}),define("js/common/accordion",["jquery"],function(e,t,i){function n(e){l.each(function(t){s(this).css("zIndex",t),e>=t?s(this).stop().animate({left:t*d},400):s(this).stop().animate({left:e*d+c+d*(t-e-1)},400)})}var o,a=e("js/common/yohoui/YH.slide"),s=e("jquery"),r=s(".slide-accordion"),l=r.find("li"),c=l.width(),d=1150===parseInt(s(".home-page").width())?125:107;n(0),o=new a({length:5,loop:!1,auto:!1,timeout:2,index:0}),o.on("change",function(e){n(e.to)}),l.mouseover(function(){o.go(s(this).index())}),o.init()}),define("js/common/yohoui/YH.slide",[],function(e,t,i){var n=e("js/common/yohoui/YH.base"),o=function(e){this.__lastTime=null,this.__isStop=!1,e=n.extend(this.defaults,e),o.superclass.constructor.call(this,e)};n.inherit(o,n.assembly),o.prototype.oninit=function(){var e=this,t=e.options;return t.auto&&e.play(),e.go(t.index),this},o.prototype.go=function(e,t){var i,n,o,a,s,r,l,c,d=this,h=d.options;d.__lastTime&&(clearTimeout(d.__lastTime),d.__lastTime=null),t="undefined"==typeof t?h.index:t,i=e===t?0:e>t?1:-1,n=h.loop,a=h.length-1,s=e,e=n?e>a?e-a-1:0>e?e+a+1:e:e>a?a:0>e?0:e,o=h.index=e,r={from:t,to:e,originalto:s,direction:i};for(l in d.registerEvent)if(d.registerEvent[l].length>0)for(c in d.registerEvent[l])d.registerEvent[l].hasOwnProperty(c)&&d.registerEvent[l][c](r);o!==a||e?!d.__isStop&&h.auto&&d.play():d.__lastTime&&clearTimeout(d.__lastTime)},o.prototype.play=function(){var e=this,t=e.options;return e.__lastTime=setTimeout(function(){e.next()},1e3*t.timeout),this},o.prototype.next=function(){var e=this,t=e.options,i=t.index,n=i+t.step;e.go(n,i)},o.prototype.prev=function(){var e=this,t=e.options,i=t.index,n=i-t.step;e.go(n,i)},o.prototype.pause=function(){var e=this;e.__lastTime&&clearTimeout(e.__lastTime),e.__isStop=!0},o.prototype.resume=function(){var e=this;e.__isStop=!1,e.play()},o.prototype.defaults={index:0,timeout:5,step:1,per:1,auto:!1,loop:!1},i.exports=o}),define("js/common/yohoui/YH.base",[],function(e,t,i){var n,o={"[object Array]":"array","[object Boolean]":"boolean","[object Date]":"date","[object Function]":"function","[object Number]":"number","[object Object]":"object","[object RegExp]":"regexp","[object String]":"string"},a={__Index:0,list:[],get:function(e){return void 0===e?this.list:this.list[e]},fn:function(){},inherit:function(e,t){var i=a.fn;i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e,e.superclass=t.prototype,e.prototype.constructor===Object.prototype.constructor&&(e.prototype.constructor=t)},extend:function(e,t){var i;for(i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},copy:function(e,t,i){var n,o,s;if("object"!=typeof t)return t;if(n=t.valueOf(),t!==n)return new t.constructor(n);if(t instanceof t.constructor&&t.constructor!==Object){o=e?new e:a.clone(t.constructor.prototype);for(s in t)(e||t.hasOwnProperty(s))&&(o[s]=t[s])}else{o={};for(s in t)o.hasOwnProperty(s)&&(o[s]=t[s])}if(i)for(s in i)o.hasOwnProperty(s)&&(o[s]=i[s]);return o},clone:function(e){return a.__cloneFunc.prototype=e,new a.__cloneFunc},__cloneFunc:function(){},delegate:function(e,t){var i;return t=t||window,arguments.length>2?(i=Array.prototype.slice.call(arguments,2),function(){return e.apply(t,i)}):function(){return e.call(t)}},dom:function(e,t){var i,n,o=e,a={wrap:o},s=o[0].getElementsByTagName("*"),r=s.length;for(n=0;r>n;n++)i=s[n].className,i.indexOf(t)>-1&&(i=i.split(t)[1]),i&&(a[i]=o.find(s[n]));return a},template:function(){var e,t,i,n,o=arguments;if(o.length>0&&a.isString(o[0]))if(e=o[0],2===o.length&&a.isObject(o[1]))for(t in o[1])void 0!==o[1][t]&&(i=new RegExp("({"+t+"})","g"),e=e.replace(i,o[1][t]));else for(n=1;n<o.length;n++)void 0!==o[n]&&(i=new RegExp("({["+(n-1)+"]})","g"),e=e.replace(i,o[n]));return e},__type:function(e){return null==e?String(e):o[Object.prototype.toString.call(e)]||"object"},isObject:function(e){return this.isFunction(e)||!(!e||"object"!=typeof e)},isFunction:function(e){return"function"===this.__type(e)},isArray:Array.isArray||function(e){return"array"===this.__type(e)},isNum:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isString:function(e){return"string"===this.__type(e)},each:function(e,t,i){var n,o;if(a.isArray(e))for(n=0,o=e.length;o>n&&t.call(e[n],n,e[n],i)!==!1;n++);else for(n in e)if(t.call(e[n],n,e[n],i)===!1)break},funManager:{__loadList:{},__loadFun:function(e,t,i){e.methord&&a.isFunction(e.methord())&&(i=i||window,e.methord()(e,function(){t()},i))},load:function(e,t,i,n){n=n||0,e[n]&&a.funManager.__loadFun(e[n],function(){a.funManager.load(e,t,i,n+1)},i),t(n,i)},get:function(e){return this.__loadList[e]}},log:function(e){var t=window.console||{log:function(){}};t.log(e)},Event:{mousewheel:function(e){var t=e.originalEvent,i=t.detail?-1*t.detail:t.wheelDelta/40,n=0>i?-1:1;return{direction:n,unit:i}},__:function(e,t,i,n){var o;for(o in e)if(window[e[o].validator]){t[e[o].validator](e[o].prefix+i,n,!1);break}},add:function(e,t,i){var n=[{validator:"addEventListener",prefix:""},{validator:"attachEvent",prefix:"on"}];this.__(n,e,t,i)},remove:function(e,t,i){var n=[{validator:"removeEventListener",prefix:""},{validator:"detachEvent",prefix:"on"}];this.__(n,e,t,i)}},getUid:function(e){return a.template("me-{0}{1}-{2}",e,(new Date).getTime(),a.__Index++)},Browser:{isTouch:function(){var e=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture;return"ontouchstart"in window||e||window.DocumentTouch?!0:!1},Prefix:function(){var e,t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"],i=document.createElement("div");for(e in t)if(void 0!==i.style[t[e]])return a.template("-{0}-",t[e].replace("Perspective","").toLowerCase())},parseURL:function(e){var t,i,n,o,a,s=document.createElement("a");return s.href=e,{source:e,protocol:s.protocol.replace(":",""),host:s.hostname,port:s.port,query:s.search,params:function(){for(t={},i=s.search.replace(/^\?/,"").split("&"),n=i.length,o=0,a;n>o;o++)i[o]&&(a=i[o].split("="),t[a[0]]=a[1]);return t}(),file:(s.pathname.match(/\/([^\/?#]+)$/i)||[null,""])[1],hash:s.hash.replace("#",""),path:s.pathname.replace(/^([^\/])/,"/$1"),relative:(s.href.match(/tps?:\/\/[^\/]+(.+)/)||[null,""])[1],segments:s.pathname.replace(/^\//,"").split("/")}}},Array:{indexOf:function(e,t){var i;for(i=0;i<e.length;i++)if(this[i]===t)return i;return-1},remove:function(e,t){var i=this.indexOf(e,t);return i>-1&&e.splice(i,1),e}}};n=function(e){this.initialized=!1,this.registerEvent={before:[],change:[],after:[]},this.options=e,this.init(e)},n.output=function(){a.log(a.list)},n.prototype.oninit=a.fn,n.prototype.init=function(e){this.initialized=!0,this.__Uid=a.getUid("me"),this.oninit(e),a.list[this.__Uid]=this},n.prototype.destory=function(){this.initialized=!1,delete a.list[this.__Uid]},n.prototype.getUid=function(){return this.__Uid},n.prototype.getOptions=function(){return this.options},n.prototype.config=function(){if(!(arguments.length>0))return this.options;if("string"==typeof arguments[0]){if(!(arguments.length>1))return this.options[name];this.options[arguments[0]]=arguments[1]}},n.prototype.on=function(e,t){var i=this,n=i.registerEvent[e];return n&&n.push(t),n},n.prototype.off=function(e,t){var i=this,n=i.registerEvent[e],o=[];a.each(n,function(e,i){i===t&&o.push(e)}),a.each(o.reverse(),function(e,t){n.splice(t,1)})},a.assembly=n,i.exports=a}),define("js/home/brands",["jquery","handlebars","source-map"],function(e,t,i){function n(e,t,i){var n,o=e,r={width:o.width(),left:o.offset().left,right:parseFloat(a(window).width())-parseFloat(o.offset().left)-parseFloat(o.width())};l.find(".brands-layer").remove(),n=s.compile(i),o.parent("li").find(".brands-dialog").html(n(t)),r.right-350<0&&o.parent("li").find(".brands-layer").addClass("brands-layer-right").css("left",-330-r.width)}var o,a=e("jquery"),s=e("handlebars"),r=a(".brands-tabs"),l=a(".brands-list"),c=a(".brands-category"),d=l.find("li>a"),h=c.find("a"),u=r.find("li>a"),f=r.find(".hoverarr"),p=h.height(),m=h.offset()?h.offset().top:0,g={},w='<div class="brands-layer">';w+=' <div class="layer-content">',w+=' <div class="title">{{title}}</div>',w+=' <div class="clearfix desc">',w+=' <img src="{{icon}}">',w+=' <p class="right">{{content}}</p>',w+=" </div> ",w+=' <div class="featured">',w+=" <p>{{subtitle}}</p> ",w+=' <div class="clearfix"> ',w+=" {{#each imgs}}",w+=' <img src="{{src}}">',w+=" {{/each}}",w+=" </div>",w+=" </div>",w+=" </div>",w+="</div>",a.easing.easeOutQuint=function(e,t,i,n,o){return n*((t=t/o-1)*t*t*t*t+1)+i},u.eq(0).parent("li").find(".brands-content").css("z-index","1"),u.hover(function(){var e=a(this);clearTimeout(o),o=setTimeout(function(){var t=parseFloat(e.offset().left)-parseFloat(r.offset().left);f.animate({left:t},200,"easeOutQuint")},200),r.find(".brands-content").removeAttr("style"),e.parent("li").find(".brands-content").css("z-index","1")},function(){clearTimeout(o)}),a(window).scroll(function(){a(this).scrollTop()>m?c.addClass("category-fix"):c.removeClass("category-fix")}),h.click(function(){var e=a(this).attr("href").split("#")[1],t=l.find("[name="+e+"]").offset().top-p;return a("html,body").animate({scrollTop:t},200),!1}),d.hover(function(){var e=a(this),t=e.attr("data-key"),i={url:"/brands/brandinfo",type:"get",success:function(t){200===t.code&&t.brand&&(g.hasOwnProperty(t.brand.key)||(g[t.brand.key]=t.brand),n(e,g[t.brand.key],w))}};clearTimeout(o),o=setTimeout(function(){g.hasOwnProperty(t)?n(e,g[t],w):a.ajax(i)},200)},function(){clearTimeout(o),l.find(".brands-layer").remove()})}),define("js/common/new-arrivls",["jquery","lazyload","handlebars","source-map"],function(e,t,i){function n(e){var t={index:0,isload:!0,isrun:!0,offset:{height:null,width:null}};return this.registerEvent={before:[],change:[],after:[]},this.options=o.extend(!0,{},t,e),this}var o=e("jquery"),a=e("lazyload"),s=e("handlebars");n.prototype.on=function(e,t){var i=this,n=i.registerEvent[e];return n&&n.push(t),n},n.prototype.exect=function(e,t){var i,n=this;if(n.registerEvent[e]&&n.registerEvent[e].length>0)for(i in n.registerEvent[e])n.registerEvent[e].hasOwnProperty(i)&&n.registerEvent[e][i](t)},n.prototype.init=function(){function e(){i.isrun&&i.isload&&t.__directionCalculation()&&(i.isload=!1,i.index++,t.exect("after",i)),t.exect("change",i)}var t=this,i=this.options;t.exect("before",i),o(window).scroll(e)},n.prototype.emit=function(){var e=this.options;e.isload=!0},n.prototype.stop=function(){var e=this.options;e.isrun=!1,e.isload=!1},n.prototype.__directionCalculation=function(){var e=this.options;return e.offset.height&&e.offset.height()>0&&o(window).scrollTop()+o(window).height()>=e.offset.height()?!0:!1},i.exports=function(e){var t,i=o("#newarrivals .goods-container"),r=o(".loading a"),l=new n({index:1,isload:!1,offset:{height:function(){return parseFloat(i.offset().top)+parseFloat(i.height())-200}}}),c=e.url,d=e.count,h=e.rows;e.pageIndex=0,delete e.url,delete e.count,delete e.rows,t=function(e,t,n){var c={type:"POST",url:e,success:function(e){var o,c,d,h=e.code;200===h?(c=e.goods.length%n,d=e.goods.length-c-1,e.goods.splice(d,c),o=s.compile(l.tpl),i.append(o(e.goods)),t.pageIndex=t.pageIndex+e.goods.length,a(i.find("img.lazy")),l.emit()):(l.stop(),r.html("查看更多"))},error:function(){l.stop(),r.html("网络断开连接了~")}};c.data=t,o.ajax(c)},l.on("after",function(i){e.pageCount=d*h[1],t(c,e)}),l.on("before",function(i){l.tpl="{{#each this}}",l.tpl+='<div class="good-info imgopacity" data-skn="{{skn}}">',l.tpl+=' <div class="tag-container clearfix">',l.tpl+=" {{# tags}}",l.tpl+=" {{# isNew}}",l.tpl+=' <span class="good-tag new-tag">NEW</span>',l.tpl+=" {{/ isNew}}",l.tpl+=" {{# isReNew}}",l.tpl+=' <span class="good-tag renew-tag">再到着</span>',l.tpl+=" {{/ isReNew}}",l.tpl+=" {{# isSale}}",l.tpl+=' <span class="good-tag sale-tag">SALE</span>',l.tpl+=" {{/ isSale}}",l.tpl+=" {{# isNewFestival}}",l.tpl+=' <span class="good-tag new-festival-tag">新品节</span>',l.tpl+=" {{/ isNewFestival}}",l.tpl+=" {{# isLimit}}",l.tpl+=' <span class="good-tag limit-tag">限量商品</span>',l.tpl+=" {{/ isLimit}}",l.tpl+=" {{# isYearEndPromotion}}",l.tpl+=' <span class="good-tag yep-tag">年终大促</span>',l.tpl+=" {{/ isYearEndPromotion}}",l.tpl+=" {{# isYearMidPromotion}}",l.tpl+=' <span class="good-tag ymp-tag">年中热促</span>',l.tpl+=" {{/ isYearMidPromotion}}",l.tpl+=" {{/ tags}}",l.tpl+=" </div>",l.tpl+=' <div class="good-detail-img">',l.tpl+=' <a class="good-thumb" href="{{url}}" target= "_blank">',l.tpl+=' <img class="lazy" data-original="{{thumb}}">',l.tpl+=" </a>",l.tpl+=" {{# isFew}}",l.tpl+=' <p class="few-tag">即将售罄</p>',l.tpl+=" {{/ isFew}}",l.tpl+=" {{#if showColBtn}}",l.tpl+=' <span class="col-btn iconfont{{#if coled}} coled{{/if}}">&#xe616;</span>',l.tpl+=" {{/if}}",l.tpl+=" </div>",l.tpl+=' <div class="good-detail-text">',l.tpl+=' <a href="{{url}}" target= "_blank">{{name}}</a>',l.tpl+=' <p class="price">',l.tpl+=' <span class="sale-price{{#unless marketPrice}}prime-cost{{/unless}}">',l.tpl+=" ¥{{salePrice}}",l.tpl+=" </span>",l.tpl+=" {{# marketPrice}}",l.tpl+=' <span class="market-price">¥{{.}}</span>',l.tpl+=" {{/ marketPrice}}",l.tpl+=" </p>",l.tpl+=" </div>",l.tpl+="</div>",l.tpl+="{{/each}}",e.pageCount=d*h[0],t(c,e,e.count)}),l.init()}}),define("js/passport/entry",["jquery","jquery.placeholder"],function(e,t,i){e("js/passport/reg"),e("js/passport/back"),e("js/passport/login"),e("js/passport/reset"),e("js/passport/vertification"),e("js/passport/thirdlogin")}),define("js/passport/reg",["jquery"],function(e,t,i){function n(e,t){var i,n;"reg"===e?(i="/passport/register/checkmobile",n={mobile:x.val(),area:I.text().split("+")[1]}):"third"===e&&(i="/passport/autouserinfo/bindCheck",n={mobile:x.val(),area:I.text().split("+")[1],openId:h("#open-id").val(),sourceType:h("#source-type").val()}),h.ajax({url:i,type:"POST",data:n}).then(function(e){switch(e.code){case 200:C[0].message="",C[0].status=!0;break;case 400:C[0].message=e.message,C[0].status=!1}t()})}function o(e,t){var i;"reg"===e?i="/passport/register/piccaptcha":"third"===e&&(i="/passport/autouserinfo/checkPicCode"),h.ajax({type:"POST",url:i,data:{verifyCode:q.val()}}).then(function(e){switch(e.code){case 200:C[1].message="",C[1].status=!0;break;case 400:C[1].message="图形验证码错误",C[1].status=!1}t()})}function a(e,t){var i;"reg"===e?i="/passport/register/msgcaptcha":"third"===e&&(i="/passport/autouserinfo/checkBindMsg"),h.ajax({type:"POST",url:i,data:{code:k.val(),mobile:x.val(),area:I.text().split("+")[1]}}).then(function(e){switch(e.code){case 200:C[2].message="",C[2].status=!0;break;case 400:C[2].message="短信验证码错误",C[2].status=!1}t()})}function s(e,t,i){var s,r=h.trim(t.val()),l=/^([a-zA-Z0-9\-\+_!@\#$%\^&\*\(\)\:\;\.=\[\]\\\',\?]){6,20}$/gi;t.hasClass("phone-num")?(s=I.text(),""===r?(C[0].message="请输入手机号码",C[0].status=!1,i()):u.phoneRegx[s].test(r)?n(e,i):(C[0].message="手机号码格式不正确,请重新输入",C[0].status=!1,i())):t.hasClass("captcha")?""===r?(C[1].message="请输入图形验证码",C[1].status=!1,i()):r.length<=3?(C[1].message="图形验证码为4位",C[1].status=!1,i()):C[0].status?o(e,i):(C[1].message="图形验证码错误",C[1].status=!1,i()):t.hasClass("msg-captcha")?""===r?(C[2].message="请输入短信验证码",C[2].status=!1,i()):r.length<=3?(C[2].message="短信验证码错误",C[2].status=!1,i()):C[1].status?a(e,i):(C[2].message="短信验证码错误",C[2].status=!1,i()):t.hasClass("pwd")?(""===r?(C[3].message="请输入密码",C[3].status=!1):r.length<6||r.length>20?(C[3].message="密码只支持6-20位字符",C[3].status=!1):l.test(t.val())?(C[3].message="",C[3].status=!0):(C[3].message="密码只能包含字母,数字,半角标点符号",C[3].status=!1),i()):t.hasClass("repwd")&&(""===r?(C[4].message="请输入密码确认",C[4].status=!1):_.val()!==r?(C[4].message="与密码不一致,请重新输入",C[4].status=!1):(C[4].message="",C[4].status=!0),i())}function r(){var e,t,i,n=!1,o=C.length;for(i=0;o>i;i++)n||(C[i].message?(w.find("span").text(C[i].message),t=h("#"+C[i].id),e=t.offset(),w.css({top:e.top-40,left:e.left}).removeClass("hide"),n=!0):w.addClass("hide"))}function l(){var e,t,i=C.length;for(t=0;i>t;t++)C[t].message?(e=h("#"+C[t].id),e.addClass("error")):(e=h("#"+C[t].id),e.removeClass("error"))}function c(e){var t=e.val(),i=f(t),n=0;switch(n=0===i?0:10>=i?1:20>=i?2:3){case 0:A.removeClass("red yellow green"),T.removeClass("color");break;case 1:A.addClass("red").removeClass("yellow green"),T.filter(".low").addClass("color"),T.filter(".mid,.high").removeClass("color");break;case 2:A.addClass("yellow").removeClass("red green"),T.filter(".low,.mid").addClass("color"),T.filter(".high").removeClass("color");break;case 3:A.addClass("green").removeClass("yellow red"),T.addClass("color")}""===t?g.removeClass("red yes no").addClass("default"):t.length<6||t.length>20?g.removeClass("default yes").addClass("no red"):g.removeClass("default no red").addClass("yes")}var d,h=e("jquery"),u=e("js/passport/mail-phone-regx"),f=e("js/passport/pwd-strength"),p=h(".register-page"),m=h("#pwd-tips"),g=m.find("#pwd-tip1"),w=h("#err-tip"),v=h("#register-btn"),y=h("#send-captcha"),b=4,C=[],x=h("#phone-num"),k=h("#msg-captcha"),_=h("#pwd"),j=h("#repwd"),q=h("#captcha"),T=h(".pwd-intensity"),A=T.closest(".pwd-intensity-container"),I=h("#country-code"),z=h("#region"),O=!1;setTimeout(function(){x.val(""),k.val(""),_.val(""),j.val(""),q.val("")},100),q.attr("maxlength",b),_.focus(function(e){m.removeClass("hide"),O=!0,d=h(this).val()}).blur(function(){m.addClass("hide"),O=!1}),C=[{id:"phone-num",message:"",status:!1},{id:"captcha",message:"",status:!1},{id:"msg-captcha",message:"",status:!1},{id:"pwd",message:"",status:!1},{id:"repwd",message:"",status:!1}],t.init=function(e){h("#agree-terms").click(function(){h(this).attr("notchecked")?(h(this).removeAttr("notchecked"),v.addClass("disable").attr("disabled","true")):(h(this).attr("notchecked","true"),v.removeClass("disable").removeAttr("disabled"))}),p.on("keydown",function(e){
var t=e.which;13===t&&v.click()}),p.find(".va").keyup(function(){var t,i=0,n=C.length,o=h(this);s(e,h(this),function(){for(r(),l(),t=0;n>t;t++)C[t].status&&i++;4!==i||h("#agree-terms").attr("notchecked")?v.addClass("disable").attr("disabled","true"):v.removeClass("disable").removeAttr("disabled"),C[1].status?y.removeClass("disable"):y.addClass("disable")}),o.hasClass("pwd")&&c(o)}).blur(function(){}),z.change(function(){I.text(h("#region").val()),s(e,x,r)}),y.click(function(){var t,i,n=20;h(this).hasClass("disable")||("reg"===e?i="/passport/register/sendBindMsg":"third"===e&&(i="/passport/autouserinfo/sendBindMsg"),h.ajax({type:"POST",url:i,data:{area:I.text().split("+")[1],mobile:x.val(),verifyCode:q.val()}}).then(function(e){200===e.code&&(t=setInterval(function(){return 0>=n?(y.removeClass("disable").val("获取短信验证码"),void clearInterval(t)):void y.addClass("disable").val(n--+"秒可重新发送")},1e3))}))}),_[0].onpaste=function(){return!1},v.click(function(){var t;"reg"===e?t="/passport/register/mobileregister":"third"===e&&(t="/passport/autouserinfo/bindMobile"),h(this).hasClass("disable")||h.ajax({type:"POST",url:t,data:{area:I.text().split("+")[1],mobile:x.val(),verifyCode:q.val(),code:k.val(),password:_.val()}}).then(function(e){var t,i,n=0;200===e.code?(i=e.data.href,t=setTimeout(function(){n++},1e3),h.ajax({type:"GET",url:e.data.session}).then(function(e){200===e.code&&3>t&&(clearInterval(t),location.href=i)}),t>=3&&(clearInterval(t),location.href=i)):console.log("网络超时~")})}),h(".change-captcha").click(function(){var e=new Date,t=h(".captcha-img"),i=t.attr("src").split("?")[0];t.attr("src",i+"?t="+e.getTime())})}}),define("js/passport/mail-phone-regx",[],function(e,t,i){var n={"+86":/^1[35847]{1}[0-9]{9}$/,"+852":/^[965]{1}[0-9]{7}$/,"+853":/^[0-9]{8}$/,"+886":/^[0-9]{10}$/,"+65":/^[98]{1}[0-9]{7}$/,"+60":/^1[1234679]{1}[0-9]{8}$/,"+1":/^[0-9]{10}$/,"+82":/^01[0-9]{9}$/,"+44":/^7[789]{1}[0-9]{8}$/,"+81":/^0[9|8|7][0-9]{9}$/,"+61":/^[0-9]{11}$/},o=/^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/;t.phoneRegx=n,t.emailRegx=o}),define("js/passport/pwd-strength",[],function(e,t,i){function n(e,t){return e.charCodeAt(t)>=48&&e.charCodeAt(t)<=57?1:e.charCodeAt(t)>=97&&e.charCodeAt(t)<=122?2:e.charCodeAt(t)>=65&&e.charCodeAt(t)<=90?3:4}function o(e,t,i){var n=e.charCodeAt(0),o=t.charCodeAt(0);return n-o===0?!0:4===i||n-o!==1&&n-o!==-1?!1:!0}function a(e,t){return 0===t||e===t?0:4===e||4===t?2:1}function s(e){var t,i,s=0,r=e.length,l="",c=0,d=0;for(d=0;r>d;d++)t=e.charAt(d),i=n(e,d),c===i&&o(t,l,i)||(s+=i+a(i,c)),l=t,c=i;return s}i.exports=s}),define("js/passport/back",["jquery","jquery.placeholder"],function(e,t,i){function n(){var e=new Date,t=l("#captcha-img"),i=t.attr("src").split("?")[0];l("#captcha-img").attr("src",i+"?t="+e.getTime())}function o(){x&&k?v.removeClass("disable").prop("disabled",!1):v.addClass("disable").prop("disabled",!0)}function a(e){var t=!0,i="";return e=l.trim(e),""!==e?/^[0-9]+$/.test(e)?c[d.val()].test(e)?t=!0:(i="手机号码格式不正确, 请重新输入",t=!1):p.test(e)?t=!0:(i="邮箱格式不正确, 请重新输入",t=!1):(i="账户名不能为空",t=!1),x=t,{pass:t,errTxt:i}}function s(){var e=l.trim(u.val());return""===e||e.length<C?(k=!1,void o()):void l.ajax({type:"POST",url:"/passport/back/authcode",data:{verifyCode:e,phoneNum:l("#phone-num").val(),area:l("#country-code-hide").val()}}).then(function(e){200===e.code?k=!0:(k=!1,n()),o()})}var r,l=e("jquery"),c=e("js/passport/mail-phone-regx").phoneRegx,d=l("#country-code-hide"),h=l("#phone-num"),u=l("#captcha"),f=l("#tip-panel"),p=/^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/,m=[["qq.com","163.com","126.com","sina.com","gmail.com","sohu.com","hotmail.com","139.com","189.com"],["gmail.com","qq.com","163.com","126.com","sina.com","sohu.com","hotmail.com","139.com","189.com"]],g=l("#country-code-list"),w=l("#country-code"),v=l("#find-btn"),y=l("#account-err"),b=l("#captcha-err"),C=4,x=!1,k=!1;e("jquery.placeholder"),u.attr("maxlength",C),l("input").placeholder(),l("#change-captcha, #captcha-img").on("click",function(){n()}),w.on("click",function(e){e.stopPropagation(),"block"===g.css("style")?g.slideUp("fast"):g.slideDown("fast")}),g.delegate("li","click",function(e){var t,i=l(this),n=i.data("cc");e.stopPropagation(),d.val(n),w.find("em").html(i.text()),""!==l.trim(h.val())&&(t=a(h.val()),o(),x?(y.addClass("hide"),h.removeClass("error")):(y.removeClass("hide").text(t.errTxt),h.addClass("error"))),g.slideUp("fast")}),l(document).click(function(){"block"===f.css("display")&&f.slideUp(),"block"===g.css("display")&&g.slideUp()}),h.keyup(function(){var e,t,i=l.trim(l(this).val()),n="";if(-1!==i.indexOf("@")&&i.lastIndexOf("@")===i.indexOf("@")){for(e=/^[0-9]*@$/.test(i)?m[0]:m[1],t=0;t<e.length;t++)n+="<li>"+i.slice(0,i.indexOf("@"))+"@"+e[t]+"</li>";f.html(n).slideDown()}else f.slideUp();a(i),o()}).blur(function(){r=setTimeout(function(){var e=a(h.val());e.pass?(y.addClass("hide"),h.removeClass("error")):(y.removeClass("hide").find("em").text(e.errTxt),h.addClass("error"))},170)}).focus(function(){l(this).removeClass("error"),y.addClass("hide")}),u.blur(function(){var e=""===l.trim(u.val())?"验证码不能为空":"验证码不正确";k?(b.addClass("hide"),u.removeClass("error")):(b.removeClass("hide").find("em").text(e),u.addClass("error"),n())}).focus(function(){l(this).removeClass("error"),b.addClass("hide")}).keyup(function(){s()}),f.delegate("li","click",function(e){var t,i=l(this).text();e.stopPropagation(),h.val(i),r&&(clearTimeout(r),t=a(i),o(),t.pass?(y.addClass("hide"),h.removeClass("error")):(y.removeClass("hide").find("em").text(t.errTx),h.addClass("error")),r=null),f.slideUp()}),l("#find-btn").click(function(e){return/^[0-9]+$/.test(l.trim(h.val()))&&l("#find-form").attr("action","/passport/back/mobile"),l(this).hasClass("disable")?void 0:k&&x?void 0:(e.preventDefault(),!0)})}),define("js/passport/login",["jquery","jquery.placeholder"],function(e,t,i){function n(){var e,t=!1,i=r.trim(c.val());return""!==i?/^[0-9]+$/.test(i)?v.phoneRegx[p.val()].test(i)?t=!0:(t=!1,e="手机号码不正确,请重新输入"):v.emailRegx.test(i)?t=!0:(t=!1,e="邮箱格式不正确,请重新输入"):e="请输入账户名",t?(h.addClass("hide"),c.removeClass("error")):(h.removeClass("hide").children("em").text(e),c.addClass("error")),t}function o(){var e,t=!1,i=r.trim(d.val());return""!==i?i.length<6?e="请输入长度为6-20字符的密码":t=!0:e="请输入密码",t?(u.addClass("hide"),d.removeClass("error")):(u.removeClass("hide").children("em").text(e),d.addClass("error")),t}function a(){var e=!0,t=r.trim(c.val()),i=r.trim(d.val());return""!==t?e=n()&&o():(e=!1,c.addClass("error"),""===i?(h.addClass("both-error").removeClass("hide").children("em").text("请输入账户名和密码"),u.addClass("hide"),d.addClass("error")):h.removeClass("hide").children("em").text("请输入账户名")),e}var s,r=e("jquery"),l={num:["qq.com","163.com","126.com","sina.com","gmail.com","sohu.com","hotmail.com","139.com","189.com"],other:["gmail.com","qq.com","163.com","126.com","sina.com","sohu.com","hotmail.com","139.com","189.com"]},c=r("#account"),d=r("#password"),h=c.siblings(".err-tip"),u=d.siblings(".err-tip"),f=r("#caps-lock"),p=r("#country-code-hide"),m=r("#country-code > em"),g=r("#country-list"),w=r("#email-autocomplete"),v=e("js/passport/mail-phone-regx"),y=r(".remember-me"),b={checked:"&#xe612;",unchecked:"&#xe613;"},C=!1;e("jquery.placeholder"),r("[placeholder]").placeholder(),r("#country-code").on("click",function(){"none"===g.css("display")&&g.slideDown()}),g.on("click","li",function(){var e=r(this),t=e.data("cc");m.html(e.html()),p.val(t),g.slideUp()}),r(document).on("click",function(e){r(e.target).closest("#country-code").length>0||"block"===g.css("display")&&g.slideUp()}),c.on("keyup",function(){var e,t,i,n,o=r.trim(r(this).val()),a="";if(o.indexOf("@")>0){for(e=o.match(/^[0-9]+@(.*)/),e?(i=l.num,t=e[1]):(i=l.other,t=o.match(/@(.*)/)[1]),n=0;n<i.length;n++)i[n].indexOf(t)>-1&&(a+="<li>"+o.slice(0,o.indexOf("@"))+"@"+i[n]+"</li>");""!==a&&/.com$/.test(o)===!1?w.html(a).removeClass("hide"):w.html("").addClass("hide")}}).on("blur",function(){s=setTimeout(function(){w.addClass("hide"),n()},200)}),d.on("blur",function(){o(),f.hasClass("hide")||f.addClass("hide")}).on("keypress",function(e){var t=e.which;return t>=65&&90>=t?void f.removeClass("hide"):void f.addClass("hide")}),w.on("click","li",function(){clearTimeout(s),c.val(r(this).text()).focus(),w.addClass("hide")}),y.on("click",function(){var e=r(this);e.toggleClass("checked"),e.hasClass("checked")?e.children("i").html(b.checked):e.children("i").html(b.unchecked)}),r(".va").on("focus",function(){var e=r(this);e.removeClass("error"),e.siblings(".err-tip").addClass("hide")}),r("#login-btn").on("click",function(){var e=a();e&&C===!1&&(C=!0,r.ajax({url:"/passport/login/auth",type:"POST",data:{areaCode:p.val().replace("+",""),account:r.trim(c.val()),password:r.trim(d.val()),isRemember:y.hasClass("checked")?!0:!1},success:function(e){200===e.code?e.data&&(location.href=e.data.session):(u.removeClass("hide").children("em").html(e.message),d.addClass("error").val(""))},complete:function(){C=!1}}))})}),define("js/passport/reset",["jquery","jquery.placeholder"],function(e,t,i){function n(e,t){return e.charCodeAt(t)>=48&&e.charCodeAt(t)<=57?1:e.charCodeAt(t)>=97&&e.charCodeAt(t)<=122?2:e.charCodeAt(t)>=65&&e.charCodeAt(t)<=90?3:4}function o(e,t,i){var n=e.charCodeAt(0),o=t.charCodeAt(0);return n-o===0?!0:4===i||n-o!==1&&n-o!==-1?!1:!0}function a(e,t){return 0===t||e===t?0:4===e||4===t?2:1}function s(e){var t,i,s=0,r=e.length,l="",c=0,d=0;for(d=0;r>d;d++)t=e.charAt(d),i=n(e,d),c===i&&o(t,l,i)||(s+=i+a(i,c)),l=t,c=i;return s}function r(){var e=c.val(),t=s(e),i=0;switch(i=0===t?0:10>=t?1:20>=t?2:3){case 0:w.removeClass("red yellow green"),g.removeClass("color");break;case 1:w.addClass("red").removeClass("yellow green"),g.filter(".low").addClass("color"),g.filter(".mid,.high").removeClass("color");break;case 2:w.addClass("yellow").removeClass("red green"),g.filter(".low,.mid").addClass("color"),g.filter(".high").removeClass("color");break;case 3:w.addClass("green").removeClass("yellow red"),g.addClass("color")}""===e?(m=!1,v.removeClass("red yes no").addClass("default")):e.length<6||e.length>20?(m=!1,v.text("密码只支持6-20位字符").removeClass("default yes").addClass("no red")):/[0-9a-zA-Z]{6,20}$/.test(e)?(m=!0,v.text("密码只支持6-20位字符").removeClass("default no red").addClass("yes")):(m=!1,v.text("不能包含特殊字符").removeClass("default yes").addClass("no red"))}var l=e("jquery"),c=l("#pwd"),d=l("#re-input"),h=l("#reset-pwd-btn"),u=l("#pwd-err"),f=l("#repwd-err"),p=l("#pwd-tips"),m=!1,g=l(".pwd-intensity"),w=g.closest(".pwd-intensity-container"),v=l("#pwd-tip1");e("jquery.placeholder"),l("input").placeholder(),l(".va").keyup(function(){var e=!0;l(this).hasClass("pwd")?r():""===l(this).val()&&(e=!1),e=e&&m&&c.val()===d.val()?!0:!1,e?h.removeClass("disable").prop("disabled",!1):h.addClass("disable").prop("disabled",!0)}).blur(function(){var e=l(this).val();l(this).hasClass("pwd")?""===e?(l(this).addClass("error"),u.removeClass("hide").find("em").text("请输入密码")):e.length<6||e.length>20?(l(this).addClass("error"),u.removeClass("hide").find("em").text("密码只支持6-20位")):(u.addClass("hide"),""!==d.val()&&(e!==d.val()?(d.addClass("error"),f.removeClass("hide").find("em").text("两次密码输入不一致,请重新输入")):(d.removeClass("error"),f.addClass("hide")))):""===e?(l(this).addClass("error"),f.removeClass("hide").find("em").text("请输入密码确认")):""!==c.val()&&e!==c.val()?(l(this).addClass("error"),f.removeClass("hide").find("em").text("两次密码输入不一致,请重新输入")):(l(this).removeClass("error"),f.addClass("hide"))}).focus(function(){l(this).removeClass("error"),l(this).hasClass("pwd")?u.addClass("hide"):f.addClass("hide")}),c.focus(function(){u.addClass("hide"),p.removeClass("hide")}).blur(function(){p.addClass("hide")}),l("#pwd, #repwd").keydown(function(e){var t=e.keyCode||e.which;return 32===t?void e.preventDefault():void 0})}),define("js/passport/vertification",["jquery"],function(e,t,i){var n,o,a=e("jquery"),s=a("#send-captcha"),r=a("#captcha-tip"),l=a("#err-tip"),c=a("#next-step");s.click(function(){a.post("/passport/back/sendbackmobile",{mobile:a("#mobile").val(),area:a("#area").val(),verifyCode:a("#captchaPic").val()},function(e){if(200===e.code){if(l.hide(),a(this).hasClass("disable"))return;n=60,s.addClass("disable").attr("disabled",!0),r.removeClass("hide"),s.val(n--+"秒后可重新操作"),o=setInterval(function(){0===n?(clearInterval(o),s.val("发送验证码").removeClass("disable").removeAttr("disabled")):s.val(n--+"秒后可重新操作")},1e3)}else a(this).addClass("error"),l.removeClass("hide").text("发送失败")})}),a(this).hasClass("disable")||(n=60,s.addClass("disable").attr("disabled",!0),r.removeClass("hide"),s.val(n--+"秒后可重新操作"),o=setInterval(function(){0===n?(clearInterval(o),s.val("发送验证码").removeClass("disable").removeAttr("disabled")):s.val(n--+"秒后可重新操作")},1e3),a("#captcha").keyup(function(){var e=a.trim(a(this).val()),t=this;4===e.length&&a.ajax({type:"POST",url:"/passport/back/backmobile",dataType:"json",data:{code:a("#captcha").val(),verifyCode:a("#captchaPic").val(),area:a("#area").val(),mobile:a("#mobile").val()},success:function(e){200===e.code?(c.removeClass("disable").attr("href",e.data),l.addClass("hide"),a(t).removeClass("error")):(c.addClass("disable"),l.removeClass("hide").find("em").text("验证码输入错误"),a(t).addClass("error"))}})}).blur(function(){var e=a.trim(a(this).val());""===e&&(a(this).addClass("error"),l.removeClass("hide").text("请输入验证码"))}).focus(function(){a(this).removeClass("error")}))}),define("js/passport/thirdlogin",["jquery"],function(e,t,i){function n(){h(".choosetag").on("change",function(){h(this).attr("checked")?h(".choosewrapper").css({"background-image":'url("http://webstatic.dev.yohobuy.com/img/passport/choosed.png")'}):h(".choosewrapper").css({"background-image":"none"})})}function o(){h(".optionshow").on("click",function(){h(".optionslist").toggleClass("hide")})}function a(){h(document).on("click","body",function(e){var t=h(e.target);t.hasClass("yohoselectarea")||t.hasClass("yohoselectarea")||t.hasClass("areaname")||t.hasClass("righttag")||t.hasClass("optionslist")||t.hasClass("optionitem")||h(".optionslist").addClass("hide")})}function s(){h(".optionitem").on("click",function(){var e=h(this),t=e.attr("areanum"),i=e.text();h("#areaname").text(i),h("#areanum").text(t),h("#areacode").val(t),h(".optionslist").addClass("hide")})}function r(){return h(".choosetag").attr("checked")}function l(){var e;h(document).on("click","#alreayregist",function(t){e=h(t.target),(e.hasClass("mask")||e.hasClass("backdrop"))&&h("#alreayregist").hide()})}function c(){var e="",t="",i="",n="";h("#bindfirststep").on("click",function(o){return o.preventDefault(),i=h(".phonenum").val(),n=h(".areanum").text(),""===i?void alert("手机号码不能为空"):r()?(e=h("#openId").val()||"29803EC6D4AAC3AAB8ABDB6AE829D579",t=h("#sourceType").val()||"qq",void h.ajax({type:"post",url:"/passport/autouserinfo/bindCheck",data:{mobile:i,area:n,openId:e,sourceType:t},dataType:"json",success:function(e){200===e.code?0===e.data.isReg?(h("#bindmobileform").attr("action","/passport/thirdlogin/noregist"),h("#bindmobileform").submit()):h("#alreayregist").show():alert(e.message)}})):void alert("请先同意我们的协议")})}function d(){n(),s(),o(),a(),c(),l()}var h=e("jquery");d()});
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
define("index",["jquery","handlebars","source-map","index","lazyload","jquery.placeholder"],function(e,t,n){var i;e("js/common"),e("js/header"),e("js/simple-header"),e("js/product/entry"),e("js/home/entry"),e("js/passport/entry"),n.exports=i}),define("js/common",["jquery"],function(e,t,n){function i(e){var t=new RegExp(e+"=([^;$]*)","i"),n="$1";return t.test(decodeURIComponent(document.cookie))?RegExp[n]:""}function a(e,t,n){var i,a,o,s,r="";"undefined"!=typeof t&&(n=n||{},null===t&&(t="",n.expires=-1),n.expires&&("number"==typeof n.expires||n.expires.toUTCString)&&("number"==typeof n.expires?(s=new Date,s.setTime(s.getTime()+24*n.expires*60*60*1e3)):s=n.expires,r="; expires="+s.toUTCString()),i=n.path?"; path="+n.path:"",a=n.domain?"; domain="+n.domain:"",o=n.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(t),r,i,a,o].join(""))}function o(){var e,t=i("_UID");return"undefined"==typeof t?0:(e=t.split("::"),"undefined"==typeof e||e.length<4?0:e)}function s(){var e=o();return 0===e?0:e[1]}function r(){var e=i("_g");return"undefined"==typeof e?"":JSON.parse(e).k}function l(){var e,t,n={},i=window.location.search,a=i?decodeURIComponent(i).slice(1).split("&"):[];for(t=0;t<a.length;t++)e=a[t].split("="),n[e[0]]=e[1];return n}var d=e("jquery"),c=d("body");e("js/footer"),function(e,t,n,i,a){var o=t.createElement(n),s=t.getElementsByTagName(n)[0];e.YohoAcquisitionObject=a,e[a]=function(){e[a].p=arguments},o.async=1,o.src=i,s.parentNode.insertBefore(o,s)}(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_web",e,"","")}(),d(window).on("resize",function(){var e=d(this).width();1360>e?d(".return-top").addClass("min"):d(".return-top").removeClass("min"),1180>e?c.addClass("min-screen"):c.removeClass("min-screen")}).trigger("resize"),window.cookie=i,window.setCookie=a,window.getUser=o,window.getUid=s,window.getShoppingKey=r,window.queryString=l}),define("js/footer",["jquery"],function(e,t,n){function i(){var e=s("#subscriber-box"),t=s("#subscriber-btn"),n=/^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/,i={mail:"&#xe61b;",tick:"&#xe61a"};e.focus(function(){s(this).val("").css("color",""),t.removeClass("done").html(i.mail)}),t.click(function(){var a=s.trim(e.val());if(""!==a&&n.test(a))try{s.ajax({url:"http://new.yohobuy.com/common/emailsubscriber",dataType:"jsonp",data:{email:a,tmp:Math.random(),uid:window.getUid()},success:function(n){1===n.data.result?(e.val("已订阅到:"+a),t.addClass("done").html(i.tick)):e.css("color","red")}})}catch(o){console.log(o.message)}else e.css("color","red")})}function a(){var e=s(".vote"),t=s("#feed-back-page"),n=e.children("li").length;t.on("click","span",function(){var t=s(this);t.hasClass("cur")||(t.siblings(".cur").removeClass("cur"),t.addClass("cur"),e.children().not(".hide").addClass("hide").end().eq(t.index()).removeClass("hide"))}),e.on("click",".feed-back-btn",function(){var i=s(this),a=i.closest("li"),o=a.index(),r=[],l=a.find(".feedback-answer").val(),d=a.find(".feedback-id").val(),c=a.find(".question-id").val();a.find(":checked").each(function(){r.push(s(this).val())}),s.ajax({url:"http://new.yohobuy.com/common/suggestfeedback",dataType:"jsonp",data:{feedback_id:d||0,question_id:c||0,answer:l||"",solution:r.join(",")},success:function(i){var s=o+1;if(1===~~i.data.result){if(o===n-1)return void alert("感谢您的参与!");a.addClass("hide"),e.children(":eq("+(o+1)+")").removeClass("hide"),t.children(".cur").removeClass("cur"),t.children(":eq("+s+")").addClass("cur")}}})})}function o(){s(window).height()>s(document).height()&&r.addClass("hide")}var s=e("jquery"),r=s(".return-top");r.click(function(){s("html,body").animate({scrollTop:0},500)}),s(window).scroll(function(){0===s(window).scrollTop()?r.addClass("hide"):r.removeClass("hide")}),r.hasClass("hide")&&s("img").load(o),i(),a(),window.rePosReturnTop=o}),define("js/header",["jquery","handlebars","source-map","index"],function(e,t,n){function i(e,t,n){try{ee.push({louceng:e,weizhi:t,event:n})}catch(i){}}function a(){var e=N("#nav_keyword").text(),t="vans",n=N("#query_key");""!==e?(n.css({color:"#000"}),n.val(e)):(n.css({color:"#e0e0e0"}),n.val(t),n.on("focus",function(e){n.css({color:"#000"}),n.val("")}))}function o(){var e={cookie:"_g",cartNum:""},t="",n="",i=0,a=0,o=0,s=0,r="";N.fn.miniCart=function(i){if(t=N.extend(e,i),"undefined"==typeof window.cookie(t.cookie))n=null;else if(t.cookie)try{n=G.parse(window.cookie(t.cookie))}catch(a){}null!==n&&""!==n&&(s=parseInt(n._nac)+parseInt(n._ac),0===s?N("#icart-num").attr("class","icart-num icart-none"):N("#icart-num").attr("class","icart-num"),N(t.cartNum).html(s))},N.fn.search=function(e){function t(t){var n=N.trim(N(t).val());return n=n.replace(new RegExp("'","gm"),""),""===n?(N(".search-list").hide(),!1):(n=encodeURI(n),void N.get(e+"?query="+n,function(e){N(".search-list").html(e.data),i=N(".search-list").children("li").length,a=-1,i>0?N(".search-list").show():N(".search-list").hide(),N(".search-list").find("a").hover(function(){N(this).css("background-color","#eee")},function(){N(this).css("background-color","#fff")})},"jsonp"))}function n(e){N(".search-list li:eq("+o+")").children("a").css("background-color","#fff"),N(".search-list li:eq("+a+")").children("a").css("background-color","#eee"),r=N(".search-list li:eq("+a+")").children("a").attr("title"),N("#query_key").val(r)}return this.each(function(){N(this).keyup(function(e){if(38===e.which){if(0===i)return!1;-1===a&&(a=0),o=a,a=(a-1+i)%i,n(this)}else if(40===e.which){if(0===i)return!1;o=a,a=(a+1)%i,n(this)}else 13===e.which?window.submitSearch():t(this)})})},N.extend({getData:function(e,t,n){var i={page:1,method:"",v:1,return_type:"jsonp",open_key:"12345",tmp:Math.random()},a="";if(void 0===typeof e||""===e)return!1;if(a=N.extend(i,t),a.page=a.page||1,""===a.method)return!1;try{N.getJSON(e+"/?callback=?",a,function(e){return""!==n?("undefined"!=typeof n(e.data)&&G.parse(n(e.data)),!1):void 0})}catch(o){console.log(o.message)}},getShoppingKey:function(){var e=window.cookie("_g"),t=G.parse(e);return"undefined"==typeof e||null===e?"":t._k}})}function s(e){var t;200===+e.code&&"object"==typeof e.data&&(t=""!==e.data.url?'<a target="_blank" href="'+e.data.url+'" class="page-top-banner"style="height:36px;border:none;background-image:url('+window.unescape(e.data.src)+');background-position: center;display:block;">&nbsp;</a>':'<div class="noticewrapper"><div class="noticecontainer"><h1 class="noticetitle">关于系统升级的公告</h1><div class="noticecontent"><p class="tips">尊敬的顾客:</p><p class="detail">您好!为了向您提供更优质的服务,目前系统正在升级,请耐心等待。</p><p class="detail">系统升级期间,部分地区用户体验会有暂时中断,如遇紧急事宜,欢迎垂询客服热线:400-889-9646 09:00-22:30(周一至周日)。稍后系统将恢复正常</p><p class="detail">使用,欢迎您继续光顾YOHO!BUY有货!带来不便之处深表歉意,请您谅解!</p></div></div></div>',N("body").prepend(t))}function r(e){var t=document.createElement("script");t.src=le+e+"&client_type=web&callback=JsonPCallBack",document.getElementsByTagName("head")[0].appendChild(t)}function l(e,t){var n,i;N(e).hover(function(e){e.preventDefault(),n=N(this),i=N(t)[0],""===i.style.display?(n.addClass("acttags"),i.style.display="block"):(n.removeClass("acttags"),i.style.display="")})}function d(){var e,t,n=[{sourceClass:".myyoho",targetClass:".myyoho-info"},{sourceClass:".phone",targetClass:".qr"}];for(t=0;t<n.length;t++)e=n[t],l(e.sourceClass,e.targetClass)}function c(){var e;N(".yohogroup").mouseenter(function(){e=N(this),e.text(e.attr("cn"))}),N(".yohogroup").mouseleave(function(){e=N(this),e.text(e.attr("en"))})}function u(){var e,t,n=["webkit","moz","ms"];for(t=0;t<n.length;t++)return e=n[t]+"RequestAnimationFrame",window[e]?!0:!1}function h(){var e=["webkit","moz","ms"],t=e[0]+"RequestAnimationFrame",n=e[1]+"RequestAnimationFrame",i=e[2]+"RequestAnimationFrame";return window[t]?function(e){requestAnimationFrame(e)}:window[n]?function(e){window[n](e)}:window[i]?function(e){window[i](e)}:function(e){window.setTimeout(e,67)}}function f(){ne+=10,ie.css({transform:"rotateX("+ne+"deg)","-webkit-transform":"rotateX("+ne+"deg)","-moz-transform":"rotateX("+ne+"deg)"}),ne/90%2===1&&(ae?(ie.css("background-image","url(http://static.yohobuy.com/newheader/img/logo1.png)"),ae=!1):(ie.css("background-image","url(http://static.yohobuy.com/newheader/img/logo_e.png)"),ae=!0)),ne/90%2===0&&ne%360!==0?window.setTimeout(f,3e3):ne%360===0?window.setTimeout(f,6e4):te(function(){f()})}function p(){H&&window.clearTimeout(H),ie.fadeOut(oe,function(){ae=!1,ie.css("background-image","url(http://static.yohobuy.com/newheader/img/logo.png)"),ie.fadeIn(oe,function(){L=window.setTimeout(function(){ie.fadeOut(oe,function(){window.clearTimeout(L),ae=!0,ie.css("background-image","url(http://static.yohobuy.com/newheader/img/logo_e.png)"),ie.fadeIn(oe,function(){H=window.setTimeout(p,6e4)})})},3e3)})})}function m(){u()?(te=h(),window.setTimeout(f,3e3)):window.setTimeout(p,3e3)}function g(e){var t=N(e);t.find(".thirdnavbar").each(function(){var e=N(this),t=e.find("a"),n=t.attr("href"),i="hot"===t.attr("hot")?!0:!1,a={};a=e.hasClass("category-title")?{type:"title",height:49,content:e.text(),index:window.valueIndex,href:n,hot:!1}:{type:"catlist",height:36,content:t.text(),index:window.valueIndex,href:n,hot:i},window.valueIndex++,window.newArr.push(a)})}function v(){var e=window.newArr.length,t=0,n=[],i=[],a=[],o=[],s="",r="",l="",d=0,c=0,u=0;for(t;e>t;t++){if(n=window.newArr[t],0===window.gindex&&(window.oh1=window.oh1+n.height,window.oh1>=340&&t!==e-1&&(window.targetArr1=window.newArr.slice(0,n.index+1),window.nowIndex=n.index+1,window.gindex++),t===e-1)){window.targetArr1=window.newArr.slice(0,e+1);break}if(1===window.gindex&&(window.oh2=window.oh2+n.height,window.oh2>=340&&t!==e-1&&(window.targetArr2=window.newArr.slice(window.nowIndex,n.index+1),window.nowIndex=n.index+1,window.gindex++),t===e-1)){window.targetArr2=window.newArr.slice(window.nowIndex,e+1);break}if(2===window.gindex){if(window.oh3=window.oh3+n.height,window.oh3>=340&&t!==e-1){window.targetArr3=window.newArr.slice(window.nowIndex,n.index+1),window.nowIndex=n.index+1,window.gindex++;break}if(t===e-1){window.targetArr3=window.newArr.slice(window.nowIndex,e+1);break}}}for(d;d<window.targetArr1.length;d++)i=window.targetArr1[d]||{},"title"===i.type?window.inner1=window.inner1+'<li class="cattitle"><h3><a href="'+i.href+'">'+i.content+"</a></h3></li>":i.hot===!0?window.inner1=window.inner1+'<li class="catdetail"><a class="thirdcatelink hot" href="'+i.href+'">'+i.content+"</a></li>":window.inner1=window.inner1+'<li class="catdetail"><a class="thirdcatelink" href="'+i.href+'">'+i.content+"</a></li>";for(c;c<window.targetArr2.length;c++)a=window.targetArr2[c]||{},"title"===a.type?window.inner2=window.inner2+'<li class="cattitle"><h3><a href="'+a.href+'">'+a.content+"</a></h3></li>":a.hot===!0?window.inner2=window.inner2+'<li class="catdetail"><a class="thirdcatelink hot" href="'+a.href+'">'+a.content+"</a></li>":window.inner2=window.inner2+'<li class="catdetail"><a class="thirdcatelink" href="'+a.href+'">'+a.content+"</a></li>";for(u;u<window.targetArr3.length;u++)o=window.targetArr3[u]||{},"title"===o.type?window.inner3=window.inner3+'<li class="cattitle"><h3><a href="'+o.href+'">'+o.content+"</a></h3></li>":o.hot===!0?window.inner3=window.inner3+'<li class="catdetail"><a class="thirdcatelink hot" href="'+o.href+'">'+o.content+"</a></li>":window.inner3=window.inner3+'<li class="catdetail"><a class="thirdcatelink" href="'+o.href+'">'+o.content+"</a></li>";""!==window.inner1&&(s='<ul class="cate_row1 cate_row">'+window.inner1+"</ul>"),""!==window.inner2&&(r='<ul class="cate_row2 cate_row">'+window.inner2+"</ul>"),""!==window.inner3&&(l='<ul class="cate_row3 cate_row">'+window.inner3+"</ul>"),window.finalresult=s+r+l,N("#"+window.wrapperindex).empty().append(window.finalresult)}function w(){N(".categorywrapper").each(function(e){window.wrapperindex=N(this).attr("id"),window.newArr=[],window.gindex=0,window.targetArr1=[],window.targetArr2=[],window.targetArr3=[],window.oh1=0,window.oh2=0,window.oh3=0,window.valueIndex=0,window.nowIndex=0,window.inner1="",window.inner2="",window.inner3="",g(N(this).find(".category")),v()})}function y(){var e={},t="",n="",i="",a="",o="";N(document).on("mouseenter",".sub-nav-item",function(){t=N(this).find(".showdetail").attr("data-code"),t&&(e[t]||(e[t]=t,n=N(this).find(".showdetail").find("img"),i=N(this).find(".showdetail").find(".title"),a=N(this).find(".showdetail").find("a"),N.get(le+t+"&width=337&height=250&client_type=web",function(e){n.attr("src",e.data.src),a.attr("href",e.data.url),i.text(e.data.title)},"jsonp")))}),o=N(".cure").find(".name-cn").find("a").attr("href"),N(".main-link").attr("href",o)}function b(){var e=N("#cover");e.remove()}function C(){var e,t=window.cookie("_Gender"),n="",a="",o="",s="";"http://www.yohobuy.com/"!==window.location.href||"undefined"!=typeof t&&""!==t&&null!==t||N.get("http://www.yohobuy.com/index/guide",function(t){n=document.createElement("div"),n.id="cover",n.innerHTML=t,document.body.appendChild(n),a=N(window).height(),o=N(".guide-box").height(),e=a/2-o/2,s=N(".guide-box .clear").find("li").length,N(".guide-box").css({width:200*s+"px",top:e+"px"}),N("#cover").bind("click",function(e){window.setCookie("_Gender","1,3",{path:"/",domain:".yohobuy.com",expires:90}),window.setCookie("_Channel","boys",{path:"/",domain:".yohobuy.com",expires:7}),b()}),N("#cover .guide-box .close").bind("click",function(e){i("弹窗","CLOSE","homepage_man"),window.setCookie("_Gender","1,3",{path:"/",domain:".yohobuy.com",expires:90}),window.setCookie("_Channel","boys",{path:"/",domain:".yohobuy.com",expires:7}),b()}),N(".boys img , .boys .go").bind("click",function(e){i("弹窗","BOYS","homepage_man"),window.setCookie("_Gender","1,3",{path:"/",domain:".yohobuy.com",expires:90}),window.setCookie("_Channel","boys",{path:"/",domain:".yohobuy.com",expires:7}),b()}),N(".girls img, .girls .go").bind("click",function(e){i("弹窗","GIRLS","homepage_woman"),window.setCookie("_Gender","2,3",{path:"/",domain:".yohobuy.com",expires:90}),window.setCookie("_Channel","girls",{path:"/",domain:".yohobuy.com",expires:7})}),N(".lifestyle img, .lifestyle .go").bind("click",function(e){window.setCookie("_Channel","lifestyle",{path:"/",domain:".yohobuy.com",expires:7}),i("弹窗","LIEFSTYLE","homepage_lifestyle")}),N("#cover .guide-box").bind("click",function(e){e.stopPropagation()})})}function a(){var e=N("#nav_keyword").text(),t="vans",n=N("#query_key");""!==e?(n.css({color:"#000"}),n.val(e)):(n.css({color:"#e0e0e0"}),n.val(t),n.on("focus",function(e){n.css({color:"#000"}),n.val("")}))}function x(){var e=window.cookie("_Gender"),t=N(".cure");"undefined"!=typeof e&&""!==e&&window.setCookie("_Gender",1,{path:"/",domain:".yohobuy.com",expires:7}),"男生"===t.find(".name-cn a").text()&&(window.setCookie("_Gender","1,3",{path:"/",domain:".yohobuy.com",expires:7}),window.setCookie("_Channel","boys",{path:"/",domain:".yohobuy.com",expires:7})),"女生"===t.find(".name-cn a").text()&&(window.setCookie("_Gender","2,3",{path:"/",domain:".yohobuy.com",expires:7}),window.setCookie("_Channel","girls",{path:"/",domain:".yohobuy.com",expires:7})),"创意生活"===t.find(".name-cn a").text()&&window.setCookie("_Channel","lifestyle",{path:"/",domain:".yohobuy.com",expires:7}),"潮童"===t.find(".name-cn a").text()&&window.setCookie("_Channel","kids",{path:"/",domain:".yohobuy.com",expires:7})}function k(){var e,t,n,i=document.cookie,a=i.split(";");for(e=0;e<a.length;e++)t=a[e].split("="),"undefined"!=typeof t[0]&&(n=t[0].replace(/\s/g,""),re[n]=t[1])}function _(){N("#miniCartBox").miniCart({cartNum:".ic-infomation"})}function j(){var e,t,n;N.getData(X,{method:"open.Shoppingcart.getCartData",shopping_key:N.getShoppingKey()},function(i){""===J&&(J=Y.compile(N("#mini-cart-tpl").html())),N("#miniCartBox").children(".gobuy-wrapper").html(J({carData:i})),0===parseInt(N(".ic-infomation").html())&&N("#miniCartBox .gobuy-wrapper").html('<div class="gobuy-empty"><h3 class="information">您的购物车暂无商品</h3></div>'),N("#miniCartBox .goods-list li").length<1&&(e=window.cookie("_g"),t=G.parse(e),null!==t&&(n='{"_k":"'+t._k+'","_nac":0,"_ac":0,"_r":0}',window.setCookie("_g",n,{path:"/",domain:".yohobuy.com"})),N(".ic-infomation").html(0),N("#miniCartBox .gobuy-wrapper").html('<div class="gobuy-empty"><h3 class="information">您的购物车暂无商品</h3></div>'))})}function q(e,t){N.getData(X,{method:"open.Shoppingcart.delone",shopping_key:N.getShoppingKey(),id:e,isreduce:t},function(e){var t=window.cookie("_g"),n=G.parse(t),i='{"_k":"'+n._k+'","_nac":'+e.total_goods_num+',"_ac":0,"_r":0}';window.setCookie("_g",i,{path:"/",domain:".yohobuy.com"}),j(),_()})}function T(){var e,t,n;N(document).on("click",".goodscardelete",function(i){e=N(this),t=e.attr("goodsid"),n=e.attr("cheapest"),q(t,n)})}function A(){var e;N(document).on("click",".mycart_i_down",function(t){e=N(this),e.toggleClass("mycart_i_up"),N("#mycartmore").slideToggle(300)})}function I(){var e,t="http://www.yohobuy.com/shopping/cart";N("#miniCartBox").on("click",function(n){e=N(n.target),e.hasClass("gobuy")&&(window.location.href=t)})}function S(e){1===e?(N("#miniCartBox").addClass("list-cur"),N(".gobuy-wrapper").show(),0!==parseInt(N(".ic-infomation").html())?(N("#miniCartBox .gobuy-wrapper").html('<div class="gobuy-loading"><h3 class="information">加载中,请稍后</h3></div>'),j()):N("#miniCartBox .gobuy-wrapper").html('<div class="gobuy-empty"><h3 class="information">您的购物车暂无商品</h3></div>')):(N("#miniCartBox").removeClass("list-cur"),N(".gobuy-wrapper").hide())}function O(){var e;N("#miniCartBox").mouseenter(function(t){e=N(t.target),("miniCartBox"===e.attr("id")||"ic-infomation"===e.attr("class"))&&S(1)}),N("#miniCartBox").mouseleave(function(e){S(0)})}function z(){var e,t="indexkids",n="indexlifestyle",i="indexboys",a="indexgirls",o="uniquebrand",s=window.location.href,l=window.location.host,d="";-1!==s.indexOf("search")&&(d=se["search"+re._Channel]),-1!==s.indexOf("list")&&(d=se["list"+re._Channel]),-1!==s.indexOf("brands")&&(d=se["brands"+re._Channel]),-1!==s.indexOf("new")&&(d=se["new"+re._Channel]),-1!==s.indexOf("sale")&&(d=se["sale"+re._Channel]),-1!==s.indexOf("home")&&(d=se["home"+re._Channel]),-1!==s.indexOf("kids")&&(d=se[t]),(-1!==s.indexOf("woman")||-1!==s.indexOf("girls"))&&(d=se[a]),-1!==s.indexOf("lifestyle")&&(d=se[n]),-1!==s.indexOf("www.yohobuy.com")&&"/"===window.location.pathname&&(d=se[i]),e=l.split(".")[0],"list"!==e&&"search"!==e&&"www"!==e&&"new"!==e&&"item"!==e&&"guang"!==e&&(d=se[o+re._Channel]),r(d)}function P(e){N(".hot-brands").find("ul").stop().animate({opacity:0,"z-index":1},200).eq(e).animate({opacity:1,"z-index":2},200)}function E(){var e,t=0;N(".hot-brands").size()>0&&(e=N(".hot-brands").find("ul").size(),N(".hot-brands").find("ul").eq(0).css({opacity:1,"z-index":2}),N(".brands-control").on("click",".next",function(){t===e-1?t=0:t++,P(t)}),N(".brands-control").on("click",".prev",function(){0===t?t=e-1:t--,P(t)}))}function B(){setInterval(_,2e3)}function $(){var e=N("#goodcartempwarpper"),t="";e&&e.html()&&(t=N("#goodcartempwarpper").html().replace(/\\/g,""),N("#goodcartempwarpper").html(t),Z=Y.compile(N("#tmpl-my-login-new").html()))}function M(){var e="http://search.yohobuy.com/api/suggest";N("#query_key").search(e)}function U(e){var t=(new Date).getTime(),n='<span>Hi~</span>[<a href="http://www.yohobuy.com/signin.html" class="list-a login-out ">请登录</a>]&nbsp;[<a href="http://www.yohobuy.com/reg.html" class="list-a login-out" onclick="">免费注册</a>]',i='<span>Hi~<a href="http://www.yohobuy.com/home?t='+t+'">{{user_name}}</a></span>&nbsp;{{#equalone islogin}}[<a href="{{logout}}" class="list-a login-out">退出</a>]{{else}}[<a href="http://www.yohobuy.com/signin.html" class="list-a login-out">请登录</a>]&nbsp;[<a href="http://www.yohobuy.com/reg.html" onclick="" class="list-a login-out">免费注册</a>]{{/equalone}}',a=N("#loginBox"),o=window.cookie("_UID"),s=e.data.profile_name,r=0,l=0,d="",c=o.split("::"),u=c[0]||" ",h="http://www.yohobuy.com/logout_",f="1",p=0,m={user_name:s,logout:h+e.data.token+".html",random:Math.random()};if(W=Y.compile(i),"undefined"==typeof o||null===o)return a.html(n),!1;if("undefined"==typeof c||c.length<4)return a.html(n),!1;for(l;l<u.length;l++)d=u.substr(l,1),r+=/.*[\u4e00-\u9fa5]+.*$/.test(d)?2:1;if(10>=r)s=u;else{for(p=0,l;l<u.length;l++)10>p&&(d=u.substr(l,1),"*"!==d&&(p+=/.*[\u4e00-\u9fa5]+.*$/.test(d)?2:1),s+=d);s.length<u.length&&(s+="...")}h=/http:\/\//.test(c[3])?c[3].replace("www.yohobuy.com","www.yohobuy.com"):"http://www.yohobuy.com/logout_"+c[3]+".html",-1===e.result&&(f="-1"),m.islogin=f,a.html(W(m))}function D(e){var t=e.data,n="";if(1===e.result){if(void 0===typeof t||t.length<1)return!1;"3"===t.vip.curVipInfo.curLevel&&(t.vip3=!0),N("#myYohoBox").mouseenter(function(){return N(this).addClass("acttags"),N("#myYohoBox .myyoho-info").show().html(Z(t)),n=N(".myyoho-photo img").attr("data-url"),1===N._checkUrlState?void N(".myyoho-photo").show().find("img").attr("src",n):void(""!==n&&""===N._checkUrl&&N.ajax({url:n,type:"GET",complete:function(e){(200===e.status||0===e.status)&&(N(".myyoho-photo").show().find("img").attr("src",n),N._checkUrlState=1),N._checkUrl=n}}))}),N("#myYohoBox").mouseleave(function(){N(this).removeClass("acttags"),N("#myYohoBox .myyoho-info").hide()})}}function R(){var e={method:"open.passport.get"};N.getData(X,e,function(e){-1!==e.result&&(U(e),D(e))})}function F(){w(),y(),$(),C(),x(),k(),o(),c(),d(),m(),z(),E(),a(),O(),_(),B(),M(),I(),T(),A(),R(),a()}var H,L,N=e("jquery"),Y=e("handlebars"),G=e("index"),Z=null,W=null,X=N("#api-domain").val(),J="",K=/^[\^\!\+\-\(\)\:\[\]\\\{\}\~\*\?\|\&\;\/\s]{0,}$/g,Q="",V="",ee=[],te=null,ne=0,ie=N(".icon-logo"),ae=!0,oe=500,se={listboys:"4f78b0f418fc42314d8b6e791cfb7fa8",listgirls:"00c1f025a51b6b597dc37925951ea27d",listkids:"b02df11184727701ade1b6de9737d08c",listlifestyle:"fd35c52dced0c880976ba858346d1fc5",searchboys:"9fb8986ea700cc27a8057361c3924394",searchgirls:"e3e207a1443ca60c8037fe52a5560c18",searchkids:"620fc77f479da8feaeb06f2324e5d0bb",searchlifestyle:"a3c93301c6ffaf3ed0f36a4a451be36d",uniquebrandboys:"2ebb0810c0d1a67e5229149c9c3aba7d",uniquebrandgirls:"99e23385f4ba4b65f406b7e2968ac821",uniquebrandkids:"a74ebc9b17840c91b9ea46568111fe6b",uniquebrandlifestyle:"0e8c81ead53f56302baa4d0ad967f527",brandsboys:"77b352db07129c76a9d532acad149f9f",brandsgirls:"bf047f16e52ebc38be5ce9c7623831e6",brandskids:"e3ae1ce9b5e13c6d271ef3eccb831652",brandslifestyle:"e4ac8029c30f65d7f1af030980d140fe",newboys:"869d3c5f3b450fb52101d00a61ce87cb",newgirls:"d953b6dfdac02483d1dcce8d96055954",newkids:"0874cb6d75df8e0e78f2d475e53ecc08",newlifestyle:"43e8fc8e178115c262bbce2bd0012db7",saleboys:"c846e3165c994769b4201d8c32f3ae9b",salegirls:"52b1d389edcbc62d65de71b80c4d6ad0",salekids:"ad8b1703c761ba00973868ab5199cc27",salelifestyle:"7acc64905c70ac91846f43fb2cec4bbd",homeboys:"b0856a771ef1b59ab1234c74688fa42d",homegirls:"2bd61fa12e4933211518f70fe5ce3c48",homekids:"895c59e8c64b40399c9533509507320c",homelifestyle:"2e037d4e25d2767352ca3e0a4627f7bd",indexboys:"0c911d3000f52e8ca7cffb74f5864c29",indexgirls:"b645b8980c423ab30485e0a9d08c2ef7",indexkids:"17f6d5d5d454d2c507bc5fcbc90f7756",indexlifestyle:"735cd393e841762af8793c346abbbc36"},re={},le="http://new.yohobuy.com/common/getbanner?content_code=";N("#api-domain").remove(),window.submitSearch=function(){var e,t,n=N("#query_key").val(),a="Search",o="Head Search",s="Search";if(e=N.trim(Q.toLowerCase()),t=N.trim(n.toLowerCase()),i(a,o,s),""!==V&&""!==Q&&e===t)location.href=V.replace("'","");else{if(!K.test(n))return N("#searchForm").submit(),!1;location.href="http://search.yohobuy.com/error?query="+n+"&result=error"}},Y.registerHelper("equalone",function(e,t){return"1"===e?t.fn(this):t.inverse(this)}),Y.registerHelper("timestamp",function(){return(new Date).getTime()}),Y.registerHelper("headerimg",function(e){return""===e?"http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100":e}),Y.registerHelper("equallevelthree",function(e,t){return"3"===e?t.fn(this):t.inverse(this)}),Y.registerHelper("equalzero",function(e,t){return"0"===e?t.fn(this):t.inverse(this)}),window.JsonPCallBack=s,window.newArr=[],window.wrapperindex=0,window.gindex=0,window.targetArr1=[],window.targetArr2=[],window.targetArr3=[],window.oh1=0,window.oh2=0,window.oh3=0,window.valueIndex=0,window.nowIndex=0,window.inner1="",window.inner2="",window.inner3="",window.finalresult="",F()}),define("js/simple-header",["jquery"],function(e,t,n){function i(e){var t,n,i,a=0,o=0;for(i=0;i<e.length;i++)n=e.substr(i,1),o+=/.*[\u4e00-\u9fa5]+.*$/.test(n)?2:1;if(10>=o)t=e;else{for(a=0,t="",i=0;i<e.length;i++)10>a&&(n=e.substr(i,1),"*"!==n&&(a+=/.*[\u4e00-\u9fa5]+.*$/.test(n)?2:1),t+=n);t.length<e.length&&(t+="...")}return t}function a(e){var t,n;e&&e.href&&e.href.user?(n=i(e.href.user),t='<span>Hi~</span><a href="">'+n+'</a>&nbsp;<a href="'+e.href.logout+'">[退出]</a>'):(n=i(e.user),t='<span>Hi~</span><a href="">'+n+'</a>&nbsp;<a href="http://www.yohobuy.com/signin.html">[请登录]</a><a href="http://www.yohobuy.com/reg.html">[免费注册]</a>'),r(".header-tool li").eq(0).html(t)}function o(){r.ajax({type:"GET",url:"/common/getSimpleHeader",data:{},success:function(e){200===e.code&&a(e.data)}})}function s(){o()}var r=e("jquery");r(".simple-header").size()>0&&r(".tool-options").on("mouseenter",function(){r(this).find(".tool-select").fadeIn()}).on("mouseleave",function(){r(this).find(".tool-select").fadeOut()}),s()}),define("js/product/entry",["jquery","handlebars","source-map","lazyload"],function(e,t,n){e("js/product/list"),e("js/product/brand"),e("js/product/hotrank")}),define("js/product/list",["jquery","handlebars","source-map","lazyload"],function(e,t,n){e("js/product/filter"),e("js/product/sort-pager"),e("js/product/latest-walk"),e("js/product/product")}),define("js/product/filter",["jquery","handlebars","source-map"],function(e,t,n){function i(e){e.removeClass("checked").html(w.unchecked)}function a(){b.addClass("hide"),C.removeClass("hide")}function o(){C.addClass("hide"),b.removeClass("hide")}function s(e,t){var n,i=window.queryString();i[e]=t,n="?"+decodeURIComponent(g.param(i)),window.location.href=n}function r(e){A.children(".senior-sub:eq("+m+")").addClass("hide"),I.children(".attr:eq("+m+")").removeClass("hover"),m=-1}var l,d,c,u,h,f,p,m,g=e("jquery"),v=e("handlebars"),w={unchecked:"&#xe613;",checked:"&#xe612;"},y={up:"&#xe610;",down:"&#xe600;"},b=g(".brand .default"),C=g(".brand .brand-panel"),x=C.find(".attr"),k=g("#brand-more"),_=g("#brand-multi"),j=g(".ud-price-range"),q=/^\d+$/,T=g(".sort-sub-wrap"),A=g(".senior-sub-wrap"),I=g(".senior-attr-wrap"),S='{{# size}}<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">{{name}}</a>{{/ size}}',O={},z=g(".filter-box .size");S=v.compile(S),g(".filter-box").on("selectstart",".attr, .brands-index span",function(){return!1}),g(".sort-pre").on("click","li",function(){var e=g(this),t=e.index(),n=e.data("id");return e.hasClass("active")?(e.removeClass("active"),T.children(":eq("+t+")").addClass("hide"),void z.addClass("hide")):(e.siblings(".active").removeClass("active"),e.addClass("active"),T.children(":not(.hide)").addClass("hide"),T.children(":eq("+t+")").removeClass("hide"),void(z.data("load")||(O[n]?(z.find(".attr-content").html(O[n]),z.removeClass("hide")):g.ajax({url:"/product/search/sortSize",data:{msort:n}}).then(function(e){"array"===g.type(e)&&e.length?(O[n]=S({size:e}),z.find(".attr-content").html(O[n]),z.removeClass("hide")):z.addClass("hide")}))))}),k.length>0&&(l=k.children("em"),d=k.children(".iconfont")),_.click(function(){"none"===C.css("display")&&k.trigger("click"),a(),C.removeClass("hide").addClass("multi"),g(this).addClass("hide")}),k.click(function(){var e=g(this);e.hasClass("more")?(o(),l.text("更多"),d.html(y.down)):(a(),l.text("收起"),d.html(y.up)),g(this).toggleClass("more")}),g(".brands-index").on("mouseenter","span",function(){var e=g(this),t=e.data("index");e.hasClass("hover")||(e.siblings("span.hover").removeClass("hover"),e.addClass("hover"),0===e.index()?x.removeClass("hide"):x.addClass("hide").filter("[data-index="+t+"]").removeClass("hide"))}),g("#brand-search-input").keyup(function(){var e=g(this).val().toLowerCase();""===e?x.removeClass("hide"):x.addClass("hide").filter('[data-key*="'+e+'"]').removeClass("hide")}),g("#brand-multi-ok").click(function(){var e=[];g(this).hasClass("dis")||(C.find(".checked").each(function(){e.push(g(this).data("id"))}),s("brand",e.join(",")))}),g(".multi-select-cancel").click(function(){var e=g(this).closest(".multi");e.hasClass("brand-panel")&&(_.removeClass("hide"),k.trigger("click")),e.addClass("hide").removeClass("multi"),o(),i(e.find(".checkbox.checked"))}),g(".check-container").on("click",".attr",function(){var e=g(this),t=e.find(".checkbox"),n=e.closest(".brand-panel, .senior-sub").find(".multi-select-ok");t.toggleClass("checked"),t.hasClass("checked")?t.html(w.checked):t.html(w.unchecked),t.hasClass("checked")||e.siblings(".attr").find(".checked").length>0?n.removeClass("dis"):n.addClass("dis")}),g(".brand, .senior").on("click",".attr > a",function(e){g(this).closest(".multi").length>0&&e.preventDefault()}),j.length>0&&(c=j.find(".limit"),u=c.filter(".min"),h=c.filter(".max"),f=j.find(".price-sure"),c.keyup(function(){var e=g.trim(u.val()),t=g.trim(h.val()),n=q.test(e),i=q.test(t);i&&(""===e||n)||n&&(""===t||i)?f.removeClass("hide"):f.addClass("hide")}),f.click(function(){var e,t=g.trim(u.val()),n=g.trim(h.val());""!==t&&""!==n&&+t>+n&&(e=n,n=t,t=e),s("price",t+","+n)})),I.on("mouseenter",".attr",function(){var e=g(this),t=e.index();e.hasClass("no-sub")||(e.addClass("hover").siblings().removeClass("hover"),A.children(".senior-sub:eq("+t+")").removeClass("hide").siblings().addClass("hide"))}).on("mouseleave",".attr",function(){var e=g(this),t=e.index();e.hasClass("no-sub")||(m=t,p=setTimeout(function(){r()},100))}),g(".senior-sub").on("click",".multi-select",function(){g(this).closest(".senior-sub").addClass("multi")}).on("click",".multi-select-ok",function(){var e=g(this),t=e.closest(".senior-sub"),n=[];e.hasClass("dis")||(t.find("span.checked").each(function(){n.push(g(this).data("id"))}),s(t.data("attr"),n.join(",")))}).on("mouseenter",function(){clearTimeout(p)}).on("mouseleave",function(){r()})}),define("js/product/sort-pager",["jquery"],function(e,t,n){var i=e("jquery"),a=i("#count-per-page"),o=a.next("ul"),s=200;i(document).click(function(e){i(e.target).closest(".page-count").length>0||o&&o.slideUp(s)}),a.click(function(){"none"===o.css("display")?o.slideDown(s):o.slideUp(s)})}),define("js/product/latest-walk",["jquery","handlebars","source-map","lazyload"],function(e,t,n){var i=e("jquery"),a=e("handlebars"),o=e("lazyload"),s=i("#latest-walk-count");!function(){var e;0!==s.length&&(e=a.compile(i("#latest-walk-tpl").html()),i.ajax({url:"http://itemapi.yohobuy.com/item/item/recentreview",dataType:"jsonp",data:{limit:s.val()},success:function(t){var n,a,s,r=[];if(200===t.code){for(n=t.data,a=0;a<n.length;a++)s=n[a],r.push({href:s.url,img:s.pic_url,name:s.product_name,salePrice:s.price,marketPrice:s.market_price});r.length>0&&(i("#latest-walk-goods").html(e({latestWalk:r})),o(i("#latest-walk-goods .lazy")))}}}))}()}),define("js/product/product",["jquery","lazyload"],function(e,t,n){var i,a=e("jquery"),o=e("lazyload"),s=e("js/common/product-event"),r=a(".goods-container"),l=r.find(".good-info"),d=r.find(".good-item-wrapper"),c=r.find(".good-info-main"),u=r.find(".good-select-color"),h=a(".product-list-nav");o(a("img.lazy")),t.init=function(e){function t(e){var t,n,i,a="",o=e.length,s=4,r=Math.ceil(o/s),l=0;for(t=0;r>t;t++)for(a+="<ul>",n=0;s>n&&(i=t*s+n,i!==o);n++)a+='<li><a href="'+e[t*s+n].url+'"><img src="'+e[t*s+n].src+'" data-cover="'+e[t*s+n].coverImg+'" /></a></li>',n===s-1&&(a+="</ul>",l++);return r>l&&(a+="</ul>"),{colorListStr:a,ulNum:r}}function n(){c.html(""),u.html(""),d.css({display:"none"})}i=null,l.unbind(),i=s(l,e),i.addHandler("MouseEnter",function(e){var i,o,s,l,h,f,p,m,g=10,v=35,w="";
a.ajax({type:"POST",url:"/product/list/getProductPic",dataType:"jsonp",jsonp:"callback",data:{skn:e.target.attr("data-skn")}}).then(function(y){var b=y.data;n(),w=t(b.pics).colorListStr,i=t(b.pics).ulNum,c.append(e.targetDuplicate),u.append(a(w)),b.isFavorite?c.find(".col-btn").addClass("coled"):c.find(".col-btn").removeClass("coled"),f=d.css("paddingLeft"),p=d.css("paddingTop"),m=r.css("paddingTop"),o=10+65*i+e.targetWidth,l=(e.targetX-1)*(e.targetWidth+g)-(parseInt(f)+1),h=(e.targetY-1)*(e.targetHeight+v)+parseInt(m)-(parseInt(p)+1),s=e.offsetR-(65*i+25),0>=s&&(l=l+s-25),d.css({width:o,left:l,top:h,display:"inline-block"}),b.pics[0]&&b.pics[0].src&&c.find(".good-thumb img").attr("src",b.pics[0].src)})}),d.mouseleave(function(){n()})},a(document).on("hover",".good-select-color li",function(){var e=a(this).find("img").attr("data-cover"),t=a(this).closest(".good-item-wrapper").find(".good-detail-img").find("img");t.attr("src",e)}),c.on("click",".col-btn",function(){var e=a(this);a.ajax({type:"POST",url:"/product/list/changeFavorite",data:{skn:e.closest(".good-info").data("skn"),isFavorite:e.hasClass("coled")}}).then(function(t){200===t.code?e.toggleClass("coled"):403===t.code&&(location.href="http://www.yohobuy.com/signin.html?refer="+encodeURIComponent(location.href))})}),h.find("h3").click(function(e){var t=a(this).closest(".product-list-nav");t.hasClass("active")?t.find(".sort-child-list").stop(!0,!0).slideUp():t.find(".sort-child-list").stop(!0,!0).slideDown(),t.toggleClass("active")})}),define("js/common/product-event",["jquery"],function(e,t,n){function i(){this.handlers={}}var a=e("jquery");i.prototype={constructor:i,addHandler:function(e,t){"undefined"==typeof this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t)},fire:function(e){var t,n;if(e.target||(e.target=this),this.handlers[e.type]instanceof Array)for(t=this.handlers[e.type],n=0;n<t.length;n++)t[n](e)},removeHandler:function(e,t){var n,i;if(this.handlers[e]instanceof Array){for(n=this.handlers[e],i=0;i<n.length&&n[i]!==t;i++);n.splice(i,1)}}},n.exports=function(e,t){function n(e){var n,i=0,d=0,c=t,u=0,h="",f=0,p=0;switch(e.type){case"mouseenter":n=a(this),h=n.clone(),u=n.index()+1,i=u%c===0?c:u%c,d=Math.ceil(u/c),f=n.offset().left,p=l-(f+s),o.fire({type:"MouseEnter",target:n,targetWidth:s,targetHeight:r,targetX:i,targetY:d,rowWidth:c,activeIndex:u,targetDuplicate:h,offsetL:f,offsetR:p});break;case"mouseleave":o.fire({type:"MouseLeave"})}}var o=new i,s=e.eq(0).width(),r=e.eq(0).height(),l=a(window).width();return e.bind("mouseenter",n),o}}),define("js/product/brand",["jquery"],function(e,t,n){var i=e("jquery");i("#brand-favor").on("click",function(){var e=i(this),t=window.getUid();i.ajax({type:"post",url:"/product/index/favoriteBrand",data:{uid:t,brandId:e.data("id")}}).then(function(t){200===t.code?"add"===t.message?e.find("i").addClass("coled"):e.find("i").removeClass("coled"):403===t.code&&(location.href="http://www.yohobuy.com/signin.html?refer="+encodeURIComponent(location.href))})})}),define("js/product/hotrank",["jquery","handlebars","source-map","lazyload"],function(e,t,n){var i=e("jquery"),a=e("handlebars"),o=e("lazyload");e("js/common/slider"),e("js/common/logo-brand"),o(i("img.lazy")),i(".slide-container").slider(),i(".logo-brand").logoBrand({showNum:10,url:i(".logo-brand").data("url")}),function(e){function t(t,n){var l={};l=n?{sid:t,page:n}:{sid:t},e.ajax({type:"GET",dataType:"json",url:"/product/index/getdata",data:l,success:function(t){var l;200===t.code&&(l={list:t.data},s=a.compile(i),n?(e(".hot-week-list").append(s(l)),r.css({position:"fixed",marginTop:-r.height()/2,top:"50%"})):e(".hot-week-list").html(s(l)),o(e("img.lazy")),u=!1)}})}var n,i,s,r=e(".hot-week").find(".floatlayer"),l=e(".hot-cate").find("li").eq(0).data("sid"),d=1,c=0,u=!1;i='{{# list}}<div class="good-info"><div class="item-img"><a class="good-thumb" target="_blank" href="{{url}}"><img class="lazy" data-original="{{thumb}}"></a></div><div class="good-detail-text"><a target="_blank" href="{{url}}">{{name}}</a><p class="price"><span class="sale-price{{#unless marketPrice}}prime-cost{{/unless}}">¥{{salePrice}}</span>{{# marketPrice}}<span class="market-price">¥{{.}}</span>{{/ marketPrice}}</p></div></div>{{/ list}}',e(window).on("scroll",function(){var i=n+e(".hot-week").outerHeight();n=e(".hot-week").offset().top,e(this).scrollTop()>=n-e(window).height()/2?r.offset().top+r.outerHeight()>=i?r.css({position:"absolute",marginTop:0,top:e(".hot-week").outerHeight()-r.outerHeight()}):r.css({marginTop:-r.height()/2}).stop().animate({opacity:1},200,function(){r.show()}):r.stop().animate({opacity:0},200,function(){r.hide()}),r.offset().top>=e(this).scrollTop()+(e(window).height()-r.outerHeight())/2&&r.css({position:"fixed",marginTop:-r.height()/2,top:"50%"}),e(this).scrollTop()>=n+e(".hot-week").height()-e(window).height()&&(u||(d++,u=!0,t(l,d)))}),e(".hot-cate").find("li").each(function(t){var n=e(".hot-cate").width();n>=c&&(c+=e(this).width(),c>=n&&e(".floatlayer").find("li").eq(t).hide().nextAll().hide())}),e(".hot-cate").on("click","li",function(){var i=e(this).index(),a=e(this).data("sid");e(this).hasClass("current")||(e(this).addClass("current").siblings().removeClass("current"),e(".floatlayer").find("li").removeClass("current").eq(i).addClass("current"),e("body,html").stop().animate({scrollTop:n-110},500),t(a),d=1)}),e(".floatlayer").on("click","li",function(){var t=e(this).index();e(this).hasClass("current")||(e(".hot-cate").find("li").eq(t).trigger("click"),e(this).addClass("current").siblings().removeClass("current"),e(".hot-cate").find("li").removeClass("current").eq(t).addClass("current"))}),e(".hot-cate").find("li").eq(0).addClass("current"),e(".floatlayer").find("li").eq(0).addClass("current")}(i)}),define("js/common/slider",["jquery","lazyload"],function(e,t,n){var i=e("jquery"),a=e("lazyload");!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.slider.defaults,n),this.bigItem=this.$element.find(".slide-wrapper").find("li"),this.smallItem=null,this.len=this.bigItem.size(),this.index=0,this.timer=null,this.init()};t.prototype={init:function(){if(this.$element){if(this.len<=1)return void a(this.$element.find("img.lazy"));this.options.pagination?this.smallItem=e(this.options.pagination).find("li"):this._createPage(),this.options.orient&&this._createOrient(),this._slideShow(),this._bindEvent(),this._autoplay()}},_createOrient:function(){var e='<div class="slide-switch"><a class="prev" href="javascript:;"><span class="iconfont">&#xe60c;</span></a><a class="next" href="javascript:;"><span class="iconfont">&#xe60b;</span></a></div>';this.$element.find(".slide-switch").length>0||this.$element.append(e)},_createPage:function(){var t='<div class="slide-pagination"><div class="slide-pagination-inner"><div class="slide-shade"></div><div class="slide-pagination-last">',n=0;if(!(this.len<=1)){for(n=0;n<this.len;n++)t+="<span></span>";t+="</div></div></div>",this.$element.append(e(t)),this.smallItem=e(".slide-pagination-inner").find("span")}},_bindEvent:function(){var t=this;this.$element.find(".slide-switch").on("click",".next",function(){t._nextSlide(),clearInterval(t.timer),t.timer=setInterval(function(){t._nextSlide()},t.options.time)}).on("click",".prev",function(){t._prevSlide(),clearInterval(t.timer),t.timer=setInterval(function(){t._nextSlide()},t.options.time)}),this.smallItem.on("mouseenter",function(){t.index=e(this).index(),clearInterval(t.timer),t._slideShow()}).on("mouseleave",function(){t._autoplay()}),this.$element.on("mouseenter",function(){e(this).find(".slide-switch").addClass("show")}).on("mouseleave",function(){e(this).find(".slide-switch").removeClass("show")})},_nextSlide:function(){this.index===this.len-1?this.index=0:this.index++,this._slideShow()},_prevSlide:function(){0===this.index?this.index=this.len-1:this.index--,this._slideShow()},_slideShow:function(){var t=this.bigItem.eq(this.index).find("img.lazy");t.attr("src")!==t.data("original")&&(a(t,{event:"sporty"}),t.trigger("sporty")),this.smallItem.eq(this.index).addClass("focus").siblings().removeClass("focus"),this.bigItem.eq(this.index).show().stop().animate({opacity:1}).siblings().stop().animate({opacity:0},function(){e(this).hide()})},_autoplay:function(){var e=this;clearInterval(this.timer),this.timer=setInterval(function(){e._nextSlide()},this.options.time)}},e.fn.slider=function(n){return this.each(function(){var i=e(this),a=i.data("Slider"),o="object"==typeof n&&n;a||i.data("Slider",a=new t(this,o)),"string"==typeof n&&a[n]()})},e.fn.slider.Constructor=t,e.fn.slider.defaults={time:5e3,orient:!0,pagination:null}}(i)}),define("js/common/logo-brand",["jquery","handlebars","source-map","lazyload"],function(e,t,n){var i=e("jquery"),a=e("handlebars"),o=e("lazyload");!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.logoBrand.defaults,n),this.init()};t.prototype={init:function(){this.$element.addClass("logos-"+this.options.showNum),this._sendRequest()},_createHelper:function(){var e=this.options.showNum;a.registerHelper("brandList",function(t,n){var i="<ul>",a=0,o=null,s=0;if(t.length%e!==0)for(s=e-t.length%e,a=0;s>a;a++)t.push({href:"javascript:;",img:""});for(a=0;a<t.length;a++)o=n.fn(t[a]),i=a%e===5||5===a?i+'<li class="logo-brand-switch" data-page="'+Math.floor(a/e)+'"><a class="prev iconfont" href="javascript:;">&#xe60f;</a><a class="next iconfont" href="javascript:;">&#xe60e;</a></li><li data-page="'+Math.floor(a/e)+'">'+o+"</li>":0!==a&&a%e===0?i+'<li class="brand-more" data-page="'+Math.floor(a/(e+1))+'"><a href="javascript:;" target="_blank">MORE ></a></li><li data-page="'+Math.floor(a/e)+'">'+o+"</li>":i+'<li data-page="'+Math.floor(a/e)+'">'+o+"</li>";return i+'<li class="brand-more" data-page="'+Math.floor(a/(e+1))+'"><a href="javascript:;" target="_blank">MORE ></a></li></ul>'})},_sendRequest:function(){var t=this;e.ajax({type:"GET",url:t.options.url,dataType:"json",success:function(e){var n,i;e&&0!==e.length&&(t._createHelper(),i='{{#brandList logoBrand}}<a href="{{href}}" target="_blank"><img class="lazy" data-original="{{img}}" alt=""></a>{{/brandList}}',n=a.compile(i),t.$element.html(n(e)),t.$element.find(".brand-more a").attr("href",e.moreBrand),o(t.$element.find("img.lazy")),t._bindEvent())}})},_brandShow:function(t,n){var i=this;o(e("li[data-page="+n+"]").find("img.lazy").trigger("appear")),i.$element.find("li[data-page="+t+"]").find("img").fadeOut("normal",function(){i.$element.find("li").hide(),i.$element.find("li[data-page="+n+"]").show().find("img").fadeIn()})},_bindEvent:function(){var t=this;t.$element.on("click",".next",function(){var n=e(this).parent().data("page"),i=0,a=Math.ceil(t.$element.find("li").size()/(t.options.showNum+2))-1;i=n===a?0:n+1,t._brandShow(n,i)}),t.$element.on("click",".prev",function(){var n=e(this).parent().data("page"),i=0,a=Math.ceil(t.$element.find("li").size()/(t.options.showNum+2))-1;i=0===n?a:n-1,t._brandShow(n,i)})}},e.fn.logoBrand=function(n){return this.each(function(){var i=e(this),a=i.data("LogoBrand"),o="object"==typeof n&&n;a||i.data("LogoBrand",a=new t(this,o)),"string"==typeof n&&a[n]()})},e.fn.logoBrand.Constructor=t,e.fn.logoBrand.defaults={showNum:16,url:"/boys/getBrand"}}(i)}),define("js/home/entry",["jquery","lazyload","handlebars","source-map"],function(e,t,n){e("js/home/home")}),define("js/home/home",["jquery","lazyload","handlebars","source-map"],function(e,t,n){var i=e("jquery"),a=e("lazyload"),o=i(".home-page").data("page"),s=i(".logo-brand").data("url");e("js/common/slider"),e("js/common/slider2"),e("js/common/logo-brand"),e("js/common/accordion"),i(document).on("mouseenter",".imgopacity a img",function(){i(this).css("opacity",.8)}),i(document).on("mouseout",".imgopacity a img",function(){i(this).css("opacity",1)}),"brands"===o&&e("js/home/brands"),i.inArray(o,["boys","girls","kids","lifestyle"])>-1&&(e("js/common/new-arrivls")({type:o,url:"/common/getNewArrival",count:"boys"===o||"lifestyle"===o?5:4,rows:[5,3]}),window.setCookie("_Channel",o,{domain:".yohobuy.com",path:"/",expires:365})),a(i("img.lazy")),"boys"===o?i(".slide-container").slider({pagination:".thumb-pagination"}):(i(".center-col").slider(),i(".slide-container").slider()),"boys"===o?(i(".logo-brand").logoBrand({url:s}),i(".img-brand").slider2()):(i(".logo-brand").logoBrand({showNum:10,url:s}),i(".img-slider-wrapper").slider2())}),define("js/common/slider2",["jquery"],function(e,t,n){var i=e("jquery");!function(e){e.fn.slider2=function(t){function n(t,n,a){a===!0?(e(".next").trigger("click"),t===n-3?i(--t,n,!1):i(++t,n,!0)):(e(".prev").trigger("click"),0===t?i(++t,n,!0):i(--t,n,!1))}function i(t,i,a){window.setTimeout(n,e.fn.slider2.defaults.delaytime,t,i,a)}function a(t,n,i){var a=-(t*n);e(".img-list").animate({"margin-left":a+"px"},"slow",i)}return e.fn.slider2.defaults={index:0,shownum:3,autoplay:!1,delaytime:3e3},this.each(function(){var n=e.extend({},e.fn.slider2.defaults,t),o=parseInt(e(".img-item").css("margin-right")),s=e(".img-item"),r=[],l=s.outerWidth()+o,d=s.length,c=0;if(3>=d)return void e(this).find(".img-brand-switch").hide();for(c=0;c<s.length;c++)r.push(s[c]);d=r.length,e(this).find(".img-list").css({width:l*d}),e(this).find(".next").on("click",function(t){var n=0,i=null;t.preventDefault(),a(3,l,function(){for(n=0;3>n;n++)i=r.shift(),e(".img-item").parent().append(i.outerHTML),r.push(i);e(".img-item").first().remove(),e(".img-item").first().remove(),e(".img-item").first().remove(),e(".img-list").css({"margin-left":"0"})})}),e(this).find(".prev").on("click",function(t){var n=0,i=null,o="";for(t.preventDefault(),n=0;3>n;n++)i=r.pop(),e(".img-item").parent().prepend(i.outerHTML),r.unshift(i);o=3*l,e(".img-item").last().remove(),e(".img-item").last().remove(),e(".img-item").last().remove(),e(".img-list").css({"margin-left":-o+"px"}),a(0,l)}),n.autoplay===!0&&i(n.index,d,!0)})}}(i)}),define("js/common/accordion",["jquery"],function(e,t,n){function i(e){l.each(function(t){s(this).css("zIndex",t),e>=t?s(this).stop().animate({left:t*c},400):s(this).stop().animate({left:e*c+d+c*(t-e-1)},400)})}var a,o=e("js/common/yohoui/YH.slide"),s=e("jquery"),r=s(".slide-accordion"),l=r.find("li"),d=l.width(),c=1150===parseInt(s(".home-page").width())?125:107;i(0),a=new o({length:5,loop:!1,auto:!1,timeout:2,index:0}),a.on("change",function(e){i(e.to)}),l.mouseover(function(){a.go(s(this).index())}),a.init()}),define("js/common/yohoui/YH.slide",[],function(e,t,n){var i=e("js/common/yohoui/YH.base"),a=function(e){this.__lastTime=null,this.__isStop=!1,e=i.extend(this.defaults,e),a.superclass.constructor.call(this,e)};i.inherit(a,i.assembly),a.prototype.oninit=function(){var e=this,t=e.options;return t.auto&&e.play(),e.go(t.index),this},a.prototype.go=function(e,t){var n,i,a,o,s,r,l,d,c=this,u=c.options;c.__lastTime&&(clearTimeout(c.__lastTime),c.__lastTime=null),t="undefined"==typeof t?u.index:t,n=e===t?0:e>t?1:-1,i=u.loop,o=u.length-1,s=e,e=i?e>o?e-o-1:0>e?e+o+1:e:e>o?o:0>e?0:e,a=u.index=e,r={from:t,to:e,originalto:s,direction:n};for(l in c.registerEvent)if(c.registerEvent[l].length>0)for(d in c.registerEvent[l])c.registerEvent[l].hasOwnProperty(d)&&c.registerEvent[l][d](r);a!==o||e?!c.__isStop&&u.auto&&c.play():c.__lastTime&&clearTimeout(c.__lastTime)},a.prototype.play=function(){var e=this,t=e.options;return e.__lastTime=setTimeout(function(){e.next()},1e3*t.timeout),this},a.prototype.next=function(){var e=this,t=e.options,n=t.index,i=n+t.step;e.go(i,n)},a.prototype.prev=function(){var e=this,t=e.options,n=t.index,i=n-t.step;e.go(i,n)},a.prototype.pause=function(){var e=this;e.__lastTime&&clearTimeout(e.__lastTime),e.__isStop=!0},a.prototype.resume=function(){var e=this;e.__isStop=!1,e.play()},a.prototype.defaults={index:0,timeout:5,step:1,per:1,auto:!1,loop:!1},n.exports=a}),define("js/common/yohoui/YH.base",[],function(e,t,n){var i,a={"[object Array]":"array","[object Boolean]":"boolean","[object Date]":"date","[object Function]":"function","[object Number]":"number","[object Object]":"object","[object RegExp]":"regexp","[object String]":"string"},o={__Index:0,list:[],get:function(e){return void 0===e?this.list:this.list[e]},fn:function(){},inherit:function(e,t){var n=o.fn;n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.superclass=t.prototype,e.prototype.constructor===Object.prototype.constructor&&(e.prototype.constructor=t)},extend:function(e,t){var n;for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},copy:function(e,t,n){var i,a,s;if("object"!=typeof t)return t;if(i=t.valueOf(),t!==i)return new t.constructor(i);if(t instanceof t.constructor&&t.constructor!==Object){a=e?new e:o.clone(t.constructor.prototype);for(s in t)(e||t.hasOwnProperty(s))&&(a[s]=t[s])}else{a={};for(s in t)a.hasOwnProperty(s)&&(a[s]=t[s])}if(n)for(s in n)a.hasOwnProperty(s)&&(a[s]=n[s]);return a},clone:function(e){return o.__cloneFunc.prototype=e,new o.__cloneFunc},__cloneFunc:function(){},delegate:function(e,t){var n;return t=t||window,arguments.length>2?(n=Array.prototype.slice.call(arguments,2),function(){return e.apply(t,n)}):function(){return e.call(t)}},dom:function(e,t){var n,i,a=e,o={wrap:a},s=a[0].getElementsByTagName("*"),r=s.length;for(i=0;r>i;i++)n=s[i].className,n.indexOf(t)>-1&&(n=n.split(t)[1]),n&&(o[n]=a.find(s[i]));return o},template:function(){var e,t,n,i,a=arguments;if(a.length>0&&o.isString(a[0]))if(e=a[0],2===a.length&&o.isObject(a[1]))for(t in a[1])void 0!==a[1][t]&&(n=new RegExp("({"+t+"})","g"),e=e.replace(n,a[1][t]));else for(i=1;i<a.length;i++)void 0!==a[i]&&(n=new RegExp("({["+(i-1)+"]})","g"),e=e.replace(n,a[i]));return e},__type:function(e){return null==e?String(e):a[Object.prototype.toString.call(e)]||"object"},isObject:function(e){return this.isFunction(e)||!(!e||"object"!=typeof e)},isFunction:function(e){return"function"===this.__type(e)},isArray:Array.isArray||function(e){return"array"===this.__type(e)},isNum:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isString:function(e){return"string"===this.__type(e)},each:function(e,t,n){var i,a;if(o.isArray(e))for(i=0,a=e.length;a>i&&t.call(e[i],i,e[i],n)!==!1;i++);else for(i in e)if(t.call(e[i],i,e[i],n)===!1)break},funManager:{__loadList:{},__loadFun:function(e,t,n){e.methord&&o.isFunction(e.methord())&&(n=n||window,e.methord()(e,function(){t()},n))},load:function(e,t,n,i){i=i||0,e[i]&&o.funManager.__loadFun(e[i],function(){o.funManager.load(e,t,n,i+1)},n),t(i,n)},get:function(e){return this.__loadList[e]}},log:function(e){var t=window.console||{log:function(){}};t.log(e)},Event:{mousewheel:function(e){var t=e.originalEvent,n=t.detail?-1*t.detail:t.wheelDelta/40,i=0>n?-1:1;return{direction:i,unit:n}},__:function(e,t,n,i){var a;for(a in e)if(window[e[a].validator]){t[e[a].validator](e[a].prefix+n,i,!1);break}},add:function(e,t,n){var i=[{validator:"addEventListener",prefix:""},{validator:"attachEvent",prefix:"on"}];this.__(i,e,t,n)},remove:function(e,t,n){var i=[{validator:"removeEventListener",prefix:""},{validator:"detachEvent",prefix:"on"}];this.__(i,e,t,n)}},getUid:function(e){return o.template("me-{0}{1}-{2}",e,(new Date).getTime(),o.__Index++)},Browser:{isTouch:function(){var e=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture;return"ontouchstart"in window||e||window.DocumentTouch?!0:!1},Prefix:function(){var e,t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"],n=document.createElement("div");for(e in t)if(void 0!==n.style[t[e]])return o.template("-{0}-",t[e].replace("Perspective","").toLowerCase())},parseURL:function(e){var t,n,i,a,o,s=document.createElement("a");return s.href=e,{source:e,protocol:s.protocol.replace(":",""),host:s.hostname,port:s.port,query:s.search,params:function(){for(t={},n=s.search.replace(/^\?/,"").split("&"),i=n.length,a=0,o;i>a;a++)n[a]&&(o=n[a].split("="),t[o[0]]=o[1]);return t}(),file:(s.pathname.match(/\/([^\/?#]+)$/i)||[null,""])[1],hash:s.hash.replace("#",""),path:s.pathname.replace(/^([^\/])/,"/$1"),relative:(s.href.match(/tps?:\/\/[^\/]+(.+)/)||[null,""])[1],segments:s.pathname.replace(/^\//,"").split("/")}}},Array:{indexOf:function(e,t){var n;for(n=0;n<e.length;n++)if(this[n]===t)return n;return-1},remove:function(e,t){var n=this.indexOf(e,t);return n>-1&&e.splice(n,1),e}}};i=function(e){this.initialized=!1,this.registerEvent={before:[],change:[],after:[]},this.options=e,this.init(e)},i.output=function(){o.log(o.list)},i.prototype.oninit=o.fn,i.prototype.init=function(e){this.initialized=!0,this.__Uid=o.getUid("me"),this.oninit(e),o.list[this.__Uid]=this},i.prototype.destory=function(){this.initialized=!1,delete o.list[this.__Uid]},i.prototype.getUid=function(){return this.__Uid},i.prototype.getOptions=function(){return this.options},i.prototype.config=function(){if(!(arguments.length>0))return this.options;if("string"==typeof arguments[0]){if(!(arguments.length>1))return this.options[name];this.options[arguments[0]]=arguments[1]}},i.prototype.on=function(e,t){var n=this,i=n.registerEvent[e];return i&&i.push(t),i},i.prototype.off=function(e,t){var n=this,i=n.registerEvent[e],a=[];o.each(i,function(e,n){n===t&&a.push(e)}),o.each(a.reverse(),function(e,t){i.splice(t,1)})},o.assembly=i,n.exports=o}),define("js/home/brands",["jquery","handlebars","source-map"],function(e,t,n){function i(e,t,n){var i,a=e,r={width:a.width(),left:a.offset().left,right:parseFloat(o(window).width())-parseFloat(a.offset().left)-parseFloat(a.width())};l.find(".brands-layer").remove(),i=s.compile(n),a.parent("li").find(".brands-dialog").html(i(t)),r.right-350<0&&a.parent("li").find(".brands-layer").addClass("brands-layer-right").css("left",-330-r.width)}var a,o=e("jquery"),s=e("handlebars"),r=o(".brands-tabs"),l=o(".brands-list"),d=o(".brands-category"),c=l.find("li>a"),u=d.find("a"),h=r.find("li>a"),f=r.find(".hoverarr"),p=u.height(),m=u.offset()?u.offset().top:0,g={},v='<div class="brands-layer">';v+=' <div class="layer-content">',v+=' <div class="title">{{title}}</div>',v+=' <div class="clearfix desc">',v+=' <img src="{{icon}}">',v+=' <p class="right">{{content}}</p>',v+=" </div> ",v+=' <div class="featured">',v+=" <p>{{subtitle}}</p> ",v+=' <div class="clearfix"> ',v+=" {{#each imgs}}",v+=' <img src="{{src}}">',v+=" {{/each}}",v+=" </div>",v+=" </div>",v+=" </div>",v+="</div>",o.easing.easeOutQuint=function(e,t,n,i,a){return i*((t=t/a-1)*t*t*t*t+1)+n},h.eq(0).parent("li").find(".brands-content").css("z-index","1"),h.hover(function(){var e=o(this);clearTimeout(a),a=setTimeout(function(){var t=parseFloat(e.offset().left)-parseFloat(r.offset().left);f.animate({left:t},200,"easeOutQuint")},200),r.find(".brands-content").removeAttr("style"),e.parent("li").find(".brands-content").css("z-index","1")},function(){clearTimeout(a)}),o(window).scroll(function(){o(this).scrollTop()>m?d.addClass("category-fix"):d.removeClass("category-fix")}),u.click(function(){var e=o(this).attr("href").split("#")[1],t=l.find("[name="+e+"]").offset().top-p;return o("html,body").animate({scrollTop:t},200),!1}),c.hover(function(){var e=o(this),t=e.attr("data-key"),n={url:"/brands/brandinfo",type:"get",success:function(t){200===t.code&&t.brand&&(g.hasOwnProperty(t.brand.key)||(g[t.brand.key]=t.brand),i(e,g[t.brand.key],v))}};clearTimeout(a),a=setTimeout(function(){g.hasOwnProperty(t)?i(e,g[t],v):o.ajax(n)},200)},function(){clearTimeout(a),l.find(".brands-layer").remove()})}),define("js/common/new-arrivls",["jquery","lazyload","handlebars","source-map"],function(e,t,n){function i(e){var t={index:0,isload:!0,isrun:!0,offset:{height:null,width:null}};return this.registerEvent={before:[],change:[],after:[]},this.options=a.extend(!0,{},t,e),this}var a=e("jquery"),o=e("lazyload"),s=e("handlebars");i.prototype.on=function(e,t){var n=this,i=n.registerEvent[e];return i&&i.push(t),i},i.prototype.exect=function(e,t){var n,i=this;if(i.registerEvent[e]&&i.registerEvent[e].length>0)for(n in i.registerEvent[e])i.registerEvent[e].hasOwnProperty(n)&&i.registerEvent[e][n](t)},i.prototype.init=function(){function e(){n.isrun&&n.isload&&t.__directionCalculation()&&(n.isload=!1,n.index++,t.exect("after",n)),t.exect("change",n)}var t=this,n=this.options;t.exect("before",n),a(window).scroll(e)},i.prototype.emit=function(){var e=this.options;e.isload=!0},i.prototype.stop=function(){var e=this.options;e.isrun=!1,e.isload=!1},i.prototype.__directionCalculation=function(){var e=this.options;return e.offset.height&&e.offset.height()>0&&a(window).scrollTop()+a(window).height()>=e.offset.height()?!0:!1},n.exports=function(e){var t,n=a("#newarrivals .goods-container"),r=a(".loading a"),l=new i({index:1,isload:!1,offset:{height:function(){return parseFloat(n.offset().top)+parseFloat(n.height())-200}}}),d=e.url,c=e.count,u=e.rows;e.pageIndex=0,delete e.url,delete e.count,delete e.rows,t=function(e,t,i){var d={type:"POST",url:e,success:function(e){var a,d,c,u=e.code;200===u?(d=e.goods.length%i,c=e.goods.length-d-1,e.goods.splice(c,d),a=s.compile(l.tpl),n.append(a(e.goods)),t.pageIndex=t.pageIndex+e.goods.length,o(n.find("img.lazy")),l.emit()):(l.stop(),r.html("查看更多"))},error:function(){l.stop(),r.html("网络断开连接了~")}};d.data=t,a.ajax(d)},l.on("after",function(n){e.pageCount=c*u[1],t(d,e)}),l.on("before",function(n){l.tpl="{{#each this}}",l.tpl+='<div class="good-info imgopacity" data-skn="{{skn}}">',l.tpl+=' <div class="tag-container clearfix">',l.tpl+=" {{# tags}}",l.tpl+=" {{# isNew}}",l.tpl+=' <span class="good-tag new-tag">NEW</span>',l.tpl+=" {{/ isNew}}",l.tpl+=" {{# isReNew}}",l.tpl+=' <span class="good-tag renew-tag">再到着</span>',l.tpl+=" {{/ isReNew}}",l.tpl+=" {{# isSale}}",l.tpl+=' <span class="good-tag sale-tag">SALE</span>',l.tpl+=" {{/ isSale}}",l.tpl+=" {{# isNewFestival}}",l.tpl+=' <span class="good-tag new-festival-tag">新品节</span>',l.tpl+=" {{/ isNewFestival}}",l.tpl+=" {{# isLimit}}",l.tpl+=' <span class="good-tag limit-tag">限量商品</span>',l.tpl+=" {{/ isLimit}}",l.tpl+=" {{# isYearEndPromotion}}",l.tpl+=' <span class="good-tag yep-tag">年终大促</span>',l.tpl+=" {{/ isYearEndPromotion}}",l.tpl+=" {{# isYearMidPromotion}}",l.tpl+=' <span class="good-tag ymp-tag">年中热促</span>',l.tpl+=" {{/ isYearMidPromotion}}",l.tpl+=" {{/ tags}}",l.tpl+=" </div>",l.tpl+=' <div class="good-detail-img">',l.tpl+=' <a class="good-thumb" href="{{url}}" target= "_blank">',l.tpl+=' <img class="lazy" data-original="{{thumb}}">',l.tpl+=" </a>",l.tpl+=" {{# isFew}}",l.tpl+=' <p class="few-tag">即将售罄</p>',l.tpl+=" {{/ isFew}}",l.tpl+=" {{#if showColBtn}}",l.tpl+=' <span class="col-btn iconfont{{#if coled}} coled{{/if}}">&#xe616;</span>',l.tpl+=" {{/if}}",l.tpl+=" </div>",l.tpl+=' <div class="good-detail-text">',l.tpl+=' <a href="{{url}}" target= "_blank">{{name}}</a>',l.tpl+=' <p class="price">',l.tpl+=' <span class="sale-price{{#unless marketPrice}}prime-cost{{/unless}}">',l.tpl+=" ¥{{salePrice}}",l.tpl+=" </span>",l.tpl+=" {{# marketPrice}}",l.tpl+=' <span class="market-price">¥{{.}}</span>',l.tpl+=" {{/ marketPrice}}",l.tpl+=" </p>",l.tpl+=" </div>",l.tpl+="</div>",l.tpl+="{{/each}}",e.pageCount=c*u[0],t(d,e,e.count)}),l.init()}}),define("js/passport/entry",["jquery","jquery.placeholder"],function(e,t,n){e("js/passport/reg"),e("js/passport/back"),e("js/passport/login"),e("js/passport/reset"),e("js/passport/vertification"),e("js/passport/thirdlogin"),e("js/passport/enablePerfectInformation")}),define("js/passport/reg",["jquery"],function(e,t,n){function i(e,t){var n,i;"reg"===e?(n="/passport/register/checkmobile",i={mobile:x.val(),area:I.text().split("+")[1]}):"third"===e&&(n="/passport/autouserinfo/bindCheck",i={mobile:x.val(),area:I.text().split("+")[1],openId:u("#open-id").val(),sourceType:u("#source-type").val()}),u.ajax({url:n,type:"POST",data:i}).then(function(e){switch(e.code){case 200:C[0].message="",C[0].status=!0;break;case 400:C[0].message=e.message,C[0].status=!1}t()})}function a(e,t){var n;"reg"===e?n="/passport/register/piccaptcha":"third"===e&&(n="/passport/autouserinfo/checkPicCode"),u.ajax({type:"POST",url:n,data:{verifyCode:q.val()}}).then(function(e){switch(e.code){case 200:C[1].message="",C[1].status=!0;break;case 400:C[1].message="图形验证码错误",C[1].status=!1}t()})}function o(e,t){var n;"reg"===e?n="/passport/register/msgcaptcha":"third"===e&&(n="/passport/autouserinfo/checkBindMsg"),u.ajax({type:"POST",url:n,data:{code:k.val(),mobile:x.val(),area:I.text().split("+")[1]}}).then(function(e){switch(e.code){case 200:C[2].message="",C[2].status=!0;break;case 400:C[2].message="短信验证码错误",C[2].status=!1}t()})}function s(e,t,n){var s,r=u.trim(t.val()),l=/^([a-zA-Z0-9\-\+_!@\#$%\^&\*\(\)\:\;\.=\[\]\\\',\?]){6,20}$/gi;t.hasClass("phone-num")?(s=I.text(),""===r?(C[0].message="请输入手机号码",C[0].status=!1,n()):h.phoneRegx[s].test(r)?i(e,n):(C[0].message="手机号码格式不正确,请重新输入",C[0].status=!1,n())):t.hasClass("captcha")?""===r?(C[1].message="请输入图形验证码",C[1].status=!1,n()):r.length<=3?(C[1].message="图形验证码为4位",C[1].status=!1,n()):C[0].status?a(e,n):(C[1].message="图形验证码错误",C[1].status=!1,n()):t.hasClass("msg-captcha")?""===r?(C[2].message="请输入短信验证码",C[2].status=!1,n()):r.length<=3?(C[2].message="短信验证码错误",C[2].status=!1,n()):C[1].status?o(e,n):(C[2].message="短信验证码错误",C[2].status=!1,n()):t.hasClass("pwd")?(""===r?(C[3].message="请输入密码",C[3].status=!1):r.length<6||r.length>20?(C[3].message="密码只支持6-20位字符",C[3].status=!1):l.test(t.val())?(C[3].message="",C[3].status=!0):(C[3].message="密码只能包含字母,数字,半角标点符号",C[3].status=!1),n()):t.hasClass("repwd")&&(""===r?(C[4].message="请输入密码确认",C[4].status=!1):_.val()!==r?(C[4].message="与密码不一致,请重新输入",C[4].status=!1):(C[4].message="",C[4].status=!0),n())}function r(){var e,t,n,i=!1,a=C.length;for(n=0;a>n;n++)i||(C[n].message?(v.find("span").text(C[n].message),t=u("#"+C[n].id),e=t.offset(),v.css({top:e.top-40,left:e.left}).removeClass("hide"),i=!0):v.addClass("hide"))}function l(){var e,t,n=C.length;for(t=0;n>t;t++)C[t].message?(e=u("#"+C[t].id),e.addClass("error")):(e=u("#"+C[t].id),e.removeClass("error"))}function d(e){var t=e.val(),n=f(t),i=0;switch(i=0===n?0:10>=n?1:20>=n?2:3){case 0:A.removeClass("red yellow green"),T.removeClass("color");break;case 1:A.addClass("red").removeClass("yellow green"),T.filter(".low").addClass("color"),T.filter(".mid,.high").removeClass("color");break;case 2:A.addClass("yellow").removeClass("red green"),T.filter(".low,.mid").addClass("color"),T.filter(".high").removeClass("color");break;case 3:A.addClass("green").removeClass("yellow red"),T.addClass("color")}""===t?g.removeClass("red yes no").addClass("default"):t.length<6||t.length>20?g.removeClass("default yes").addClass("no red"):g.removeClass("default no red").addClass("yes")}var c,u=e("jquery"),h=e("js/passport/mail-phone-regx"),f=e("js/passport/pwd-strength"),p=u(".register-page"),m=u("#pwd-tips"),g=m.find("#pwd-tip1"),v=u("#err-tip"),w=u("#register-btn"),y=u("#send-captcha"),b=4,C=[],x=u("#phone-num"),k=u("#msg-captcha"),_=u("#pwd"),j=u("#repwd"),q=u("#captcha"),T=u(".pwd-intensity"),A=T.closest(".pwd-intensity-container"),I=u("#country-code"),S=u("#region"),O=!1;setTimeout(function(){x.val(""),k.val(""),_.val(""),j.val(""),q.val("")},100),q.attr("maxlength",b),_.focus(function(e){m.removeClass("hide"),O=!0,c=u(this).val()}).blur(function(){m.addClass("hide"),O=!1}),C=[{id:"phone-num",message:"",status:!1},{id:"captcha",message:"",status:!1},{id:"msg-captcha",message:"",status:!1},{id:"pwd",message:"",status:!1},{id:"repwd",message:"",status:!1}],t.init=function(e){u("#agree-terms").click(function(){
u(this).attr("notchecked")?(u(this).removeAttr("notchecked"),w.addClass("disable").attr("disabled","true")):(u(this).attr("notchecked","true"),w.removeClass("disable").removeAttr("disabled"))}),p.on("keydown",function(e){var t=e.which;13===t&&w.click()}),p.find(".va").keyup(function(){var t,n=0,i=C.length,a=u(this);s(e,u(this),function(){for(r(),l(),t=0;i>t;t++)C[t].status&&n++;4!==n||u("#agree-terms").attr("notchecked")?w.addClass("disable").attr("disabled","true"):w.removeClass("disable").removeAttr("disabled"),C[1].status?y.removeClass("disable"):y.addClass("disable")}),a.hasClass("pwd")&&d(a)}).blur(function(){}),S.change(function(){I.text(u("#region").val()),s(e,x,r)}),y.click(function(){var t,n,i=20;u(this).hasClass("disable")||("reg"===e?n="/passport/register/sendBindMsg":"third"===e&&(n="/passport/autouserinfo/sendBindMsg"),u.ajax({type:"POST",url:n,data:{area:I.text().split("+")[1],mobile:x.val(),verifyCode:q.val()}}).then(function(e){200===e.code&&(t=setInterval(function(){return 0>=i?(y.removeClass("disable").val("获取短信验证码"),void clearInterval(t)):void y.addClass("disable").val(i--+"秒可重新发送")},1e3))}))}),_[0].onpaste=function(){return!1},w.click(function(){var t;"reg"===e?t="/passport/register/mobileregister":"third"===e&&(t="/passport/autouserinfo/bindMobile"),u(this).hasClass("disable")||u.ajax({type:"POST",url:t,data:{area:I.text().split("+")[1],mobile:x.val(),verifyCode:q.val(),code:k.val(),password:_.val()}}).then(function(e){var t,n,i=0;200===e.code?(n=e.data.href,t=setTimeout(function(){i++},1e3),u.ajax({type:"GET",url:e.data.session}).then(function(e){200===e.code&&3>t&&(clearInterval(t),location.href=n)}),t>=3&&(clearInterval(t),location.href=n)):console.log("网络超时~")})}),u(".change-captcha").click(function(){var e=new Date,t=u(".captcha-img"),n=t.attr("src").split("?")[0];t.attr("src",n+"?t="+e.getTime())})}}),define("js/passport/mail-phone-regx",[],function(e,t,n){var i={"+86":/^1[35847]{1}[0-9]{9}$/,"+852":/^[965]{1}[0-9]{7}$/,"+853":/^[0-9]{8}$/,"+886":/^[0-9]{10}$/,"+65":/^[98]{1}[0-9]{7}$/,"+60":/^1[1234679]{1}[0-9]{8}$/,"+1":/^[0-9]{10}$/,"+82":/^01[0-9]{9}$/,"+44":/^7[789]{1}[0-9]{8}$/,"+81":/^0[9|8|7][0-9]{9}$/,"+61":/^[0-9]{11}$/},a=/^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/;t.phoneRegx=i,t.emailRegx=a}),define("js/passport/pwd-strength",[],function(e,t,n){function i(e,t){return e.charCodeAt(t)>=48&&e.charCodeAt(t)<=57?1:e.charCodeAt(t)>=97&&e.charCodeAt(t)<=122?2:e.charCodeAt(t)>=65&&e.charCodeAt(t)<=90?3:4}function a(e,t,n){var i=e.charCodeAt(0),a=t.charCodeAt(0);return i-a===0?!0:4===n||i-a!==1&&i-a!==-1?!1:!0}function o(e,t){return 0===t||e===t?0:4===e||4===t?2:1}function s(e){var t,n,s=0,r=e.length,l="",d=0,c=0;for(c=0;r>c;c++)t=e.charAt(c),n=i(e,c),d===n&&a(t,l,n)||(s+=n+o(n,d)),l=t,d=n;return s}n.exports=s}),define("js/passport/back",["jquery","jquery.placeholder"],function(e,t,n){function i(){var e=new Date,t=l("#captcha-img"),n=t.attr("src").split("?")[0];l("#captcha-img").attr("src",n+"?t="+e.getTime())}function a(){x&&k?w.removeClass("disable").prop("disabled",!1):w.addClass("disable").prop("disabled",!0)}function o(e){var t=!0,n="";return e=l.trim(e),""!==e?/^[0-9]+$/.test(e)?d[c.val()].test(e)?t=!0:(n="手机号码格式不正确, 请重新输入",t=!1):p.test(e)?t=!0:(n="邮箱格式不正确, 请重新输入",t=!1):(n="账户名不能为空",t=!1),x=t,{pass:t,errTxt:n}}function s(){var e=l.trim(h.val());return""===e||e.length<C?(k=!1,void a()):void l.ajax({type:"POST",url:"/passport/back/authcode",data:{verifyCode:e,phoneNum:l("#phone-num").val(),area:l("#country-code-hide").val()}}).then(function(e){200===e.code?k=!0:(k=!1,i()),a()})}var r,l=e("jquery"),d=e("js/passport/mail-phone-regx").phoneRegx,c=l("#country-code-hide"),u=l("#phone-num"),h=l("#captcha"),f=l("#tip-panel"),p=/^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/,m=[["qq.com","163.com","126.com","sina.com","gmail.com","sohu.com","hotmail.com","139.com","189.com"],["gmail.com","qq.com","163.com","126.com","sina.com","sohu.com","hotmail.com","139.com","189.com"]],g=l("#country-code-list"),v=l("#country-code"),w=l("#find-btn"),y=l("#account-err"),b=l("#captcha-err"),C=4,x=!1,k=!1;e("jquery.placeholder"),h.attr("maxlength",C),l("input").placeholder(),l("#change-captcha, #captcha-img").on("click",function(){i()}),v.on("click",function(e){e.stopPropagation(),"block"===g.css("style")?g.slideUp("fast"):g.slideDown("fast")}),g.delegate("li","click",function(e){var t,n=l(this),i=n.data("cc");e.stopPropagation(),c.val(i),v.find("em").html(n.text()),""!==l.trim(u.val())&&(t=o(u.val()),a(),x?(y.addClass("hide"),u.removeClass("error")):(y.removeClass("hide").text(t.errTxt),u.addClass("error"))),g.slideUp("fast")}),l(document).click(function(){"block"===f.css("display")&&f.slideUp(),"block"===g.css("display")&&g.slideUp()}),u.keyup(function(){var e,t,n=l.trim(l(this).val()),i="";if(-1!==n.indexOf("@")&&n.lastIndexOf("@")===n.indexOf("@")){for(e=/^[0-9]*@$/.test(n)?m[0]:m[1],t=0;t<e.length;t++)i+="<li>"+n.slice(0,n.indexOf("@"))+"@"+e[t]+"</li>";f.html(i).slideDown()}else f.slideUp();o(n),a()}).blur(function(){r=setTimeout(function(){var e=o(u.val());e.pass?(y.addClass("hide"),u.removeClass("error")):(y.removeClass("hide").find("em").text(e.errTxt),u.addClass("error"))},170)}).focus(function(){l(this).removeClass("error"),y.addClass("hide")}),h.blur(function(){var e=""===l.trim(h.val())?"验证码不能为空":"验证码不正确";k?(b.addClass("hide"),h.removeClass("error")):(b.removeClass("hide").find("em").text(e),h.addClass("error"),i())}).focus(function(){l(this).removeClass("error"),b.addClass("hide")}).keyup(function(){s()}),f.delegate("li","click",function(e){var t,n=l(this).text();e.stopPropagation(),u.val(n),r&&(clearTimeout(r),t=o(n),a(),t.pass?(y.addClass("hide"),u.removeClass("error")):(y.removeClass("hide").find("em").text(t.errTx),u.addClass("error")),r=null),f.slideUp()}),l("#find-btn").click(function(e){return/^[0-9]+$/.test(l.trim(u.val()))&&l("#find-form").attr("action","/passport/back/mobile"),l(this).hasClass("disable")?void 0:k&&x?void 0:(e.preventDefault(),!0)})}),define("js/passport/login",["jquery","jquery.placeholder"],function(e,t,n){function i(){var e,t=!1,n=r.trim(d.val());return""!==n?/^[0-9]+$/.test(n)?w.phoneRegx[p.val()].test(n)?t=!0:(t=!1,e="手机号码不正确,请重新输入"):w.emailRegx.test(n)?t=!0:(t=!1,e="邮箱格式不正确,请重新输入"):e="请输入账户名",t?(u.addClass("hide"),d.removeClass("error")):(u.removeClass("hide").children("em").text(e),d.addClass("error")),t}function a(){var e,t=!1,n=r.trim(c.val());return""!==n?n.length<6?e="请输入长度为6-20字符的密码":t=!0:e="请输入密码",t?(h.addClass("hide"),c.removeClass("error")):(h.removeClass("hide").children("em").text(e),c.addClass("error")),t}function o(){var e=!0,t=r.trim(d.val()),n=r.trim(c.val());return""!==t?e=i()&&a():(e=!1,d.addClass("error"),""===n?(u.addClass("both-error").removeClass("hide").children("em").text("请输入账户名和密码"),h.addClass("hide"),c.addClass("error")):u.removeClass("hide").children("em").text("请输入账户名")),e}var s,r=e("jquery"),l={num:["qq.com","163.com","126.com","sina.com","gmail.com","sohu.com","hotmail.com","139.com","189.com"],other:["gmail.com","qq.com","163.com","126.com","sina.com","sohu.com","hotmail.com","139.com","189.com"]},d=r("#account"),c=r("#password"),u=d.siblings(".err-tip"),h=c.siblings(".err-tip"),f=r("#caps-lock"),p=r("#country-code-hide"),m=r("#country-code > em"),g=r("#country-list"),v=r("#email-autocomplete"),w=e("js/passport/mail-phone-regx"),y=r(".remember-me"),b={checked:"&#xe612;",unchecked:"&#xe613;"},C=!1;e("jquery.placeholder"),r("[placeholder]").placeholder(),r("#country-code").on("click",function(){"none"===g.css("display")&&g.slideDown()}),g.on("click","li",function(){var e=r(this),t=e.data("cc");m.html(e.html()),p.val(t),g.slideUp()}),r(document).on("click",function(e){r(e.target).closest("#country-code").length>0||"block"===g.css("display")&&g.slideUp()}),d.on("keyup",function(){var e,t,n,i,a=r.trim(r(this).val()),o="";if(a.indexOf("@")>0){for(e=a.match(/^[0-9]+@(.*)/),e?(n=l.num,t=e[1]):(n=l.other,t=a.match(/@(.*)/)[1]),i=0;i<n.length;i++)n[i].indexOf(t)>-1&&(o+="<li>"+a.slice(0,a.indexOf("@"))+"@"+n[i]+"</li>");""!==o&&/.com$/.test(a)===!1?v.html(o).removeClass("hide"):v.html("").addClass("hide")}}).on("blur",function(){s=setTimeout(function(){v.addClass("hide"),i()},200)}),c.on("blur",function(){a(),f.hasClass("hide")||f.addClass("hide")}).on("keypress",function(e){var t=e.which;return t>=65&&90>=t?void f.removeClass("hide"):void f.addClass("hide")}),v.on("click","li",function(){clearTimeout(s),d.val(r(this).text()).focus(),v.addClass("hide")}),y.on("click",function(){var e=r(this);e.toggleClass("checked"),e.hasClass("checked")?e.children("i").html(b.checked):e.children("i").html(b.unchecked)}),r(".va").on("focus",function(){var e=r(this);e.removeClass("error"),e.siblings(".err-tip").addClass("hide")}),r("#login-btn").on("click",function(){var e=o();e&&C===!1&&(C=!0,r.ajax({url:"/passport/login/auth",type:"POST",data:{areaCode:p.val().replace("+",""),account:r.trim(d.val()),password:r.trim(c.val()),isRemember:y.hasClass("checked")?!0:!1},success:function(e){200===e.code?e.data&&(location.href=e.data.session):(h.removeClass("hide").children("em").html(e.message),c.addClass("error").val(""))},complete:function(){C=!1}}))})}),define("js/passport/reset",["jquery","jquery.placeholder"],function(e,t,n){function i(e,t){return e.charCodeAt(t)>=48&&e.charCodeAt(t)<=57?1:e.charCodeAt(t)>=97&&e.charCodeAt(t)<=122?2:e.charCodeAt(t)>=65&&e.charCodeAt(t)<=90?3:4}function a(e,t,n){var i=e.charCodeAt(0),a=t.charCodeAt(0);return i-a===0?!0:4===n||i-a!==1&&i-a!==-1?!1:!0}function o(e,t){return 0===t||e===t?0:4===e||4===t?2:1}function s(e){var t,n,s=0,r=e.length,l="",d=0,c=0;for(c=0;r>c;c++)t=e.charAt(c),n=i(e,c),d===n&&a(t,l,n)||(s+=n+o(n,d)),l=t,d=n;return s}function r(){var e=d.val(),t=s(e),n=0;switch(n=0===t?0:10>=t?1:20>=t?2:3){case 0:v.removeClass("red yellow green"),g.removeClass("color");break;case 1:v.addClass("red").removeClass("yellow green"),g.filter(".low").addClass("color"),g.filter(".mid,.high").removeClass("color");break;case 2:v.addClass("yellow").removeClass("red green"),g.filter(".low,.mid").addClass("color"),g.filter(".high").removeClass("color");break;case 3:v.addClass("green").removeClass("yellow red"),g.addClass("color")}""===e?(m=!1,w.removeClass("red yes no").addClass("default")):e.length<6||e.length>20?(m=!1,w.text("密码只支持6-20位字符").removeClass("default yes").addClass("no red")):/[0-9a-zA-Z]{6,20}$/.test(e)?(m=!0,w.text("密码只支持6-20位字符").removeClass("default no red").addClass("yes")):(m=!1,w.text("不能包含特殊字符").removeClass("default yes").addClass("no red"))}var l=e("jquery"),d=l("#pwd"),c=l("#re-input"),u=l("#reset-pwd-btn"),h=l("#pwd-err"),f=l("#repwd-err"),p=l("#pwd-tips"),m=!1,g=l(".pwd-intensity"),v=g.closest(".pwd-intensity-container"),w=l("#pwd-tip1");e("jquery.placeholder"),l("input").placeholder(),l(".va").keyup(function(){var e=!0;l(this).hasClass("pwd")?r():""===l(this).val()&&(e=!1),e=e&&m&&d.val()===c.val()?!0:!1,e?u.removeClass("disable").prop("disabled",!1):u.addClass("disable").prop("disabled",!0)}).blur(function(){var e=l(this).val();l(this).hasClass("pwd")?""===e?(l(this).addClass("error"),h.removeClass("hide").find("em").text("请输入密码")):e.length<6||e.length>20?(l(this).addClass("error"),h.removeClass("hide").find("em").text("密码只支持6-20位")):(h.addClass("hide"),""!==c.val()&&(e!==c.val()?(c.addClass("error"),f.removeClass("hide").find("em").text("两次密码输入不一致,请重新输入")):(c.removeClass("error"),f.addClass("hide")))):""===e?(l(this).addClass("error"),f.removeClass("hide").find("em").text("请输入密码确认")):""!==d.val()&&e!==d.val()?(l(this).addClass("error"),f.removeClass("hide").find("em").text("两次密码输入不一致,请重新输入")):(l(this).removeClass("error"),f.addClass("hide"))}).focus(function(){l(this).removeClass("error"),l(this).hasClass("pwd")?h.addClass("hide"):f.addClass("hide")}),d.focus(function(){h.addClass("hide"),p.removeClass("hide")}).blur(function(){p.addClass("hide")}),l("#pwd, #repwd").keydown(function(e){var t=e.keyCode||e.which;return 32===t?void e.preventDefault():void 0})}),define("js/passport/vertification",["jquery"],function(e,t,n){var i,a,o=e("jquery"),s=o("#send-captcha"),r=o("#captcha-tip"),l=o("#err-tip"),d=o("#next-step");s.click(function(){o.post("/passport/back/sendbackmobile",{mobile:o("#mobile").val(),area:o("#area").val(),verifyCode:o("#captchaPic").val()},function(e){if(200===e.code){if(l.hide(),o(this).hasClass("disable"))return;i=60,s.addClass("disable").attr("disabled",!0),r.removeClass("hide"),s.val(i--+"秒后可重新操作"),a=setInterval(function(){0===i?(clearInterval(a),s.val("发送验证码").removeClass("disable").removeAttr("disabled")):s.val(i--+"秒后可重新操作")},1e3)}else o(this).addClass("error"),l.removeClass("hide").text("发送失败")})}),o(this).hasClass("disable")||(i=60,s.addClass("disable").attr("disabled",!0),r.removeClass("hide"),s.val(i--+"秒后可重新操作"),a=setInterval(function(){0===i?(clearInterval(a),s.val("发送验证码").removeClass("disable").removeAttr("disabled")):s.val(i--+"秒后可重新操作")},1e3),o("#captcha").keyup(function(){var e=o.trim(o(this).val()),t=this;4===e.length&&o.ajax({type:"POST",url:"/passport/back/backmobile",dataType:"json",data:{code:o("#captcha").val(),verifyCode:o("#captchaPic").val(),area:o("#area").val(),mobile:o("#mobile").val()},success:function(e){200===e.code?(d.removeClass("disable").attr("href",e.data),l.addClass("hide"),o(t).removeClass("error")):(d.addClass("disable"),l.removeClass("hide").find("em").text("验证码输入错误"),o(t).addClass("error"))}})}).blur(function(){var e=o.trim(o(this).val());""===e&&(o(this).addClass("error"),l.removeClass("hide").text("请输入验证码"))}).focus(function(){o(this).removeClass("error")}))}),define("js/passport/thirdlogin",["jquery"],function(e,t,n){function i(){b(".choosetag").on("change",function(){"checked"===b(this).attr("checked")?b(".choosewrapper").css({"background-image":'url("http://webstatic.dev.yohobuy.com/img/passport/choosed.png")'}):b(".choosewrapper").css({"background-image":"none"})})}function a(){return"checked"===b(".choosetag").attr("checked")}function o(){b(".optionshow").on("click",function(){b(".optionslist").toggleClass("hide")})}function s(){var e="";b(document).on("keyup","#validatenum",function(){e=b(this).val(),4===e.length&&(j||(j=!0,b.ajax({type:"POST",url:"/passport/autouserinfo/checkBindMsg",data:{code:e,mobile:b("#mobile").val(),area:b("#area").val()}}).then(function(e){j=!1,200===e.code?q=!0:alert(e.message)})))})}function r(){b(".optionitem").on("click",function(){var e=b(this),t=e.attr("areanum"),n=e.text();b("#areaname").text(n),b("#areanum").text(t),b("#areacode").val(t),b(".optionslist").addClass("hide")})}function l(){b(document).on("click","body",function(e){var t=b(e.target);t.hasClass("yohoselectarea")||t.hasClass("areaname")||t.hasClass("righttag")||t.hasClass("optionslist")||t.hasClass("optionitem")||b(".optionslist").addClass("hide")})}function d(){var e="",t="";b(".optionitem").each(function(){e=b(this),t=e.attr("areanum").replace(/\+/g,""),e.attr("areanum",t)})}function c(){var e;b(document).on("click","#alreayregist",function(t){e=b(t.target),(e.hasClass("mask")||e.hasClass("backdrop"))&&b("#alreayregist").hide()}),b(document).on("click","#bindconfirm",function(t){e=b(t.target),(e.hasClass("mask")||e.hasClass("backdrop"))&&b("#bindconfirm").hide()})}function u(){b(document).on("click","#yohobindbtn",function(e){b(".phonenum").val(""),b("#bindconfirm").hide()}),b(document).on("click","#yohobindbtn2",function(e){b(".phonenum").val(""),b("#alreayregist").hide()})}function h(){return _-=1,0>_?(_=60,C=!0,void b(".validatewrapper").html(k)):(b(".second").text(_),void window.setTimeout(h,1e3))}function f(e){C&&(b(".validatewrapper").html(x),window.setTimeout(h,1e3))}function p(){b(document).on("click","#sendmessage",function(){"disabled"!==b("#sendmessage").attr("disabled")&&(f(b("#mobile").val()),b.ajax({type:"POST",url:"/passport/autouserinfo/sendBindMsg",data:{mobile:b("#mobile").val(),area:b("#area").val()}}).then(function(e){200===e.code?T=!0:alert(e.message)}))})}function m(){var e="",t="";t=b("#area").val(),e=b("#mobile").val(),b.ajax({type:"POST",url:"/passport/autouserinfo/bindMobile",data:{area:t,openId:b("#openId").val(),sourceType:b("#sourceType").val(),mobile:e}}).then(function(e){201===e.code?window.location.href="/passport/thirdlogin/bindsuccess":alert(e.message)})}function g(){b(document).on("click","#gotobindphone",function(){q===!0?(b("#inarea").val(b("#areanum").val()),b("#inmobile").val(b("#mobile").val()),m()):alert("请输入正确验证码")})}function v(){var e="",t="";e=b("#mobile").val(),t=b("#areanum").text(),b.ajax({type:"POST",url:"/passport/autouserinfo/sendBindMsg",data:{mobile:e,area:t}}).then(function(e){200===e.code?T=!0:alert(e.message)})}function w(){var e="",t="",n="",i="",o="",s="";b("#bindfirststep").on("click",function(r){return r.preventDefault(),n=b(".phonenum").val(),i=b("#areanum").text(),""===n?void alert("手机号码不能为空"):a()?(e=b("#openId").val()||"29803EC6D4AAC3AAB8ABDB6AE829D579",t=b("#sourceType").val()||"qq",void b.ajax({type:"post",url:"/passport/autouserinfo/bindCheck",data:{mobile:n,area:i,openId:e,sourceType:t},dataType:"json",success:function(e){200===e.code&&(b("#bindmobileform").attr("action","/passport/thirdlogin/noregist"),v(),b("#bindmobileform").submit()),506===e.code&&(o=e.data.user.username,s=e.data.user.headImg,b("#registphone").text(n),b("#username").text(o),b("#userphoto").attr("src",s),b("#logindirectly2").attr("href",e.data.user.bindLogin),b("#alreayregist").show()),505===e.code&&(o=e.data.user.username,s=e.data.user.headImg,b("#registphone").text(n),b("#username1").text(o),b("#userphoto1").attr("src",s),b("#logindirectly").attr("href",e.data.user.bindLogin),b("#bindconfirm").show())}})):void alert("请先同意我们的协议")})}function y(){d(),p(),i(),r(),o(),l(),w(),c(),u(),g(),s()}var b=e("jquery"),C=!0,x=b("#nopermissionmessage").html(),k=b(".validatewrapper").html(),_=+b(".second").text(),j=!1,q=!1,T=!1;y()}),define("js/passport/enablePerfectInformation",["jquery"],function(e,t,n){function i(e,t){return e.charCodeAt(t)>=48&&e.charCodeAt(t)<=57?1:e.charCodeAt(t)>=97&&e.charCodeAt(t)<=122?2:e.charCodeAt(t)>=65&&e.charCodeAt(t)<=90?3:4}function a(e,t,n){var i=e.charCodeAt(0),a=t.charCodeAt(0);return i-a===0?!0:4===n||i-a!==1&&i-a!==-1?!1:!0}function o(e,t){return 0===t||e===t?0:4===e||4===t?2:1}function s(e){var t=0,n=e.length,s="",r=0,l=0,d="",c="";for(l;n>l;l++)d=e.charAt(l),c=i(e,l),r===c&&a(d,s,c)||(t+=c+o(c,r)),s=d,r=c;return t}function r(){return _-=1,0>_?(_=60,C=!0,void b(".validatewrapper").html(q)):(b(".second").text(_),void window.setTimeout(r,1e3))}function l(e){C&&(b(".validatewrapper").html(j),window.setTimeout(r,1e3))}function d(){var e="",t="";b(document).on("click","#sendmessage",function(){"disabled"!==b("#sendmessage").attr("disabled")&&(e=b("#mobile").val(),t=b("#area").val(),l(b("#mobile").val()),b.ajax({type:"POST",url:"/passport/autouserinfo/sendBindMsg",data:{mobile:e,area:t}}).then(function(e){200!==e.code&&alert(e.message)}))})}function c(){var e="",t=!1;b(document).on("keyup","#validatenum",function(){e=b(this).val(),4===e.length&&(t||(t=!0,b.ajax({type:"POST",url:"/passport/autouserinfo/checkBindMsg",data:{code:e,mobile:b("#mobile").val(),area:b("#area").val()}}).then(function(e){t=!1,200!==e.code?alert(e.message):x=!0})))})}function u(){var e=g.val(),t=s(e),n=0;switch(n=0===t?0:10>=t?1:20>=t?2:3){case 0:v.removeClass("red yellow green"),y.removeClass("color");break;case 1:v.addClass("red").removeClass("yellow green"),y.filter(".low").addClass("color"),y.filter(".mid,.high").removeClass("color");break;case 2:v.addClass("yellow").removeClass("red green"),y.filter(".low,.mid").addClass("color"),y.filter(".high").removeClass("color");break;case 3:v.addClass("green").removeClass("yellow red"),y.addClass("color")}""===e?(k=!1,w.removeClass("red yes no").addClass("default")):e.length<6||e.length>20?(k=!1,w.removeClass("default yes").addClass("no red")):(k=!0,w.removeClass("default no red").addClass("yes"))}function h(){b(document).on("keyup",".pwdcontent",function(){u(b(this))}),b(document).on("focus",".pwdcontent",function(){b("#pwd-tips").removeClass("hide")}),b(document).on("blur",".pwdcontent",function(){b("#pwd-tips").addClass("hide")})}function f(){var e="",t="",n="",i="";t=b("#area").val(),n=b("#pwd").val(),e=b("#mobile").val(),i=b("#validatenum").val(),b.ajax({type:"POST",url:"/passport/autouserinfo/bindMobile",data:{area:t,openId:b("#openId").val(),sourceType:b("#sourceType").val(),mobile:e,password:n,code:i}}).then(function(e){200===e.code?window.location.href="/passport/thirdlogin/bindsuccess":alert(e.message)})}function p(){var e="",t="";b("#confirmsubmit").on("click",function(){return e=b("#validatenum").val(),t=b("#pwd").val(),""===e?void alert("短信验证码不能为空"):""===t?void alert("密码不能为空"):x===!1?void alert("请输入正确的验证码"):k===!1?void alert("请输入符合强度的密码"):void f()})}function m(){g=b("#pwd"),v=b(".safelevel"),y=b(".pwd-intensity"),w=b("#pwd-tip1"),d(),c(),h(),p()}var g,v,w,y,b=e("jquery"),C=!0,x=!1,k=!1,_="",j="",q="";j=b("#nopermissionmessage").html(),q=b(".validatewrapper").html(),_=+b(".second").text(),m()});
\ No newline at end of file
This diff could not be displayed because it is too large.
{
"name": "web-yohobuy",
"version": "0.0.6",
"version": "0.0.8",
"description": "web yohobuy static",
"keywords": [],
"homepage": "",
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "0.0.7"
application.version = "0.0.8"
; 网站SEO信息
application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "0.0.7"
application.version = "0.0.8"
; 网站SEO信息
application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "0.0.7"
application.version = "0.0.8"
; 网站SEO信息
application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "0.0.7"
application.version = "0.0.8"
; 网站SEO信息
application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...