index.js 59.9 KB
define("index",["jquery","hammer","swiper","lazyload","mlellipsis","iscroll-probe","handlebars","source-map","index"],function(e,a,n){var t;e("js/common"),e("js/category/entry"),e("js/guang/entry"),e("js/home/entry"),e("js/index/entry"),e("js/passport/entry"),e("js/product/entry"),e("js/me/entry"),n.exports=t}),define("js/common",["jquery"],function(e,a,n){function t(e){var a,n,t=document.cookie;return document.cookie&&""!==document.cookie&&(n=t.indexOf(e+"="),n>-1&&(n+=e.length+1,a=decodeURIComponent(l.trim(t.substring(n,t.indexOf(";",n)))))),a}function o(e,a,n){var t,o,i,s,r="";"undefined"!=typeof a&&(n=n||{},null===a&&(a="",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()),t=n.path?"; path="+n.path:"",o=n.domain?"; domain="+n.domain:"",i=n.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(a),r,t,o,i].join(""))}function i(){var e,a=t("_UID");return"undefined"==typeof a?0:(e=a.split("::"),"undefined"==typeof e||e.length<4?0:e)}function s(){var e=i();return 0===e?0:e[1]}function r(){var e=t("_g");return"undefined"==typeof e?"":JSON.parse(e).k}function d(){0!==c.length&&(l("body").height()<=l(window).height()?c.addClass("bottom"):c.removeClass("bottom"))}var l=e("jquery"),c=l("#yoho-footer"),u=l(".yoho-header");!function(){var e=c.children(".op-row"),a=i();l("body").height()<=l(window).height()&&c.addClass("bottom"),0===a?e.prepend('<a href="/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="/reg.html">注册</a>'):e.prepend('Hi,<a class="user-name" href="/home?tmp='+Math.random()+'">'+a[0]+'</a><a href="/passport/signout/index?token='+a[3]+'">退出</a>'),e.find(".back-to-top").on("touchend",function(){return l(window).scrollTop(0),!1}),c.removeClass("hide")}(),function(){var e=s();e=0===e?"":e,window._ozuid=e,window._yas&&window._yas(1*new Date,"1.0.13","yohobuy_m",e,"")}(),u.on("touchstart","a",function(){u.find("a").removeClass("highlight"),l(this).addClass("highlight")}).on("touchend touchcancel","a",function(){l(this).removeClass("highlight")}),function(){var e,a,n=0,t="webkit moz ms o".split(" "),o=window.requestAnimationFrame,i=window.cancelAnimationFrame;for(a=0;a<t.length&&(!o||!i);a++)e=t[a],o=o||window[e+"RequestAnimationFrame"],i=i||window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"];o&&i||(o=function(e,a){var t=(new Date).getTime(),o=Math.max(0,16-(t-n)),i=window.setTimeout(function(){e(t+o)},o);return n=t+o,i},i=function(e){window.clearTimeout(e)}),window.requestAnimationFrame=o,window.cancelAnimationFrame=i}(),window.cookie=t,window.setCookie=o,window.getUser=i,window.getUid=s,window.getShoppingKey=r,window.rePosFooter=d}),define("js/category/entry",["jquery","hammer","swiper","lazyload","index"],function(e,a,n){e("js/category/index"),e("js/category/brand")}),define("js/category/index",["jquery"],function(e,a,n){var t=e("jquery"),o=t(".category-nav"),i=t(".category-container"),s=i.children(".content"),r=i.find(".sub-level li"),d=i.find(".primary-level li"),l=s.not(".hide");!function(){var e=t(".yoho-header"),a=t("#search-input"),n=t(window).height()-e.outerHeight()-a.outerHeight()-o.outerHeight();i.css("min-height",n),s.height(n)}(),t("#search-input").focus(function(){t(this).blur()}),o.bind("contextmenu",function(e){return!1}),t(".category-container").bind("contextmenu",function(e){return!1}),o.on("touchend touchcancel",function(e){var a=t(e.target).closest("li"),n=a.index();a.hasClass("focus")||(o.find("li.focus").removeClass("focus"),a.addClass("focus"),l.addClass("hide"),l=s.eq(n).removeClass("hide"))}),i.on("touchend",function(e){var a,n,o,i=t(e.target);if(n=i.closest(".p-level-item"),n.length>0){if(o=n.index(),a=i.closest(".content").find(".sub-level"),i.hasClass("focus"))return;i.closest(".primary-level").children(".focus").removeClass("focus"),i.addClass("focus"),a.not(".hide").addClass("hide"),a.eq(o).removeClass("hide")}}),i.find(".primary-level").on("touchstart touchend touchcancel","li",function(){d.removeClass("highlight"),t(this).addClass("highlight")}).on("touchend touchcancel","li",function(){t(this).removeClass("highlight")}),i.find(".sub-level").on("touchstart","li",function(){r.removeClass("highlight"),t(this).addClass("highlight")}).on("touchend touchcancel","li",function(){t(this).removeClass("highlight")}),o.on("touchstart","li",function(){o.find("li").removeClass("bytouch"),t(this).addClass("bytouch")}).on("touchend touchcancel","li",function(){o.find("li").removeClass("bytouch")})}),define("js/category/brand",["jquery","hammer","swiper","lazyload","index"],function(e,a,n){function t(){var e=u(".brand-list").find("p");e.on("touchstart",function(){e.css("background","#fff"),u(this).css("background","#eee")}).on("touchend touchcancel",function(){u(this).css("background","#fff")})}function o(){var e=(l.val()+"").toLowerCase(),a={},n=0,o="";""!==e&&(u.each(d,function(n,t){u.isArray(t)&&u.each(t,function(t,o){o.name.toLowerCase().indexOf(e)>-1&&(a[n]=a[n]||[],a[n].push(o))})}),u.each(a,function(e,a){var t=['<div class="brand-list bar-',n,'">'];n++,t.push('<div class="title-bar"><h2>'),t.push(e),t.push("</h2></div>"),u.each(a,function(e,a){t.push('<p><a href="'+a.url+'">'+a.name),a.isNew&&t.push('<i class="icon-hot">HOT</i>'),a.isHot&&t.push('<i class="icon-new">NEW</i>'),t.push("</a></p>")}),t.push("</div>"),o+=t.join("")})),u(".search-result").html(o),t()}var i,s,r,d,l,c,u=e("jquery"),h=e("hammer"),p=e("swiper"),f=e("lazyload"),g=u(".brand-list"),m=u(".search-icon"),v=u(".newbrand-search").outerHeight(),w=u(".yoho-header").outerHeight(),y=parseInt(v)+parseInt(w)-1;i=new p(".swiper-container",{lazyLoading:!0,loop:!0,autoplay:3e3,pagination:".swiper-pagination .pagination-inner"}),f(u("img.lazy")),u(".yoho-header").css({"z-index":2,position:"fixed",top:0}),s=u('<div class="title-bar fixed-title-bar"><h2></h2></div>'),s.css({position:"fixed",top:y}).hide(),r=y+u(".hot-brand").outerHeight()+u(".banner-top").outerHeight(),g.last().append(s),u(window).scroll(function(){var e=u(window).scrollTop();g.eq(0).offset().top<r&&s.hide(),g.each(function(){var a=u(this).offset().top-y;e>=a&&s.css({display:"block"}).find("h2").html(u(this).find(".title-bar").text())})}),t(),u(".brand-search-page").length&&(d=u.parseJSON(u("#brands-data").html()),l=u("#keyword"),l.on("input",function(){l.val().length?(m.css("color","#000"),u(this).closest(".search-box").css("width","11.25rem"),u(".search-action").show()):(m.css("color","#b2b2b2"),u(this).closest(".search-box").css("width","12.5rem"),u(".search-action").hide()),o()}).focus(),c=new h(u(".clear-text")[0]),c.on("tap",function(e){e.preventDefault(),u(".search-result").html(""),u("#keyword").val("").trigger("input"),e.srcEvent.stopPropagation()}),u("form.search-box").on("submit",function(){return!1}))}),define("js/guang/entry",["jquery","lazyload","swiper","hammer","mlellipsis","iscroll-probe","index"],function(e,a,n){e("js/guang/plus-star/list"),e("js/guang/plus-star/detail"),e("js/guang/home"),e("js/guang/list"),e("js/guang/detail")}),define("js/guang/plus-star/list",["jquery","lazyload","swiper","index"],function(e,a,n){var t,o=e("jquery"),i=e("lazyload"),s=e("swiper"),r=o("#nav-tab > li"),d=o("#ps-content > .content");i(o("img.lazy")),t=new s(".swiper-container",{lazyLoading:!0,pagination:".swiper-pagination"}),o("#nav-tab").bind("contextmenu",function(e){return!1}),o("#nav-tab").on("touchend touchcancel",function(e){var a=o(e.target).closest("li");a.hasClass("focus")||(r.toggleClass("focus"),d.toggleClass("hide"),o(document).trigger("scroll"))}),o("#nav-tab").on("touchstart",function(e){var a=e.target||e.srcElement;a.className="bytouch "+a.className}).on("touchend touchcancel",function(){r.removeClass("bytouch")})}),define("js/guang/plus-star/detail",["jquery","hammer","mlellipsis","lazyload"],function(e,a,n){var t,o,i,s,r=e("jquery"),d=e("hammer"),l=e("mlellipsis"),c=e("lazyload"),u=r("#intro"),h=r("#intro-more-txt"),p=r("#related-infos-container"),f=e("js/guang/info"),g=e("js/plugin/tip"),m=r("#brand-info").data("id"),v=r("#jump-to-app").val();e("js/plugin/wx-share"),l.init(),c(r("img.lazy")),u[0].mlellipsis(3),setTimeout(function(){t=u.text(),o=u.attr("title")}),f.initInfosEvt(p),i=new d(document.getElementById("more-intro")),i.on("tap",function(e){var a=r(e.target).closest("#more-intro");a.toggleClass("spread"),a.hasClass("spread")?(u.text(o),h.text("收起")):(u.text(t),h.text("more"),r(window).scrollTop(0,400)),e.preventDefault()}),s=new d(document.getElementById("brand-like")),s.on("tap",function(e){var a="ok",n=r(e.target);"1"!==v&&(e.preventDefault(),n.hasClass("like")&&(a="cancel"),r.ajax({type:"POST",url:"/guang/opt/favoriteBrand",data:{id:m,opt:a},success:function(e){200===e.code?n.toggleClass("like"):400===e.code||412===e.code?location.href=e.data:g.show(e.message)},error:function(){g.show("网络断开连接了~")}}))})}),define("js/guang/info",["jquery","hammer","mlellipsis","lazyload"],function(e,a,n){function t(e){l(e.find("img.lazy")),e.each(function(){var e=s(this),a=e.find(".info-title"),n=e.find(".info-text");a[0].mlellipsis(2),n[0].mlellipsis(2)})}function o(e){var a;"undefined"!=typeof e&&(a=new r(e[0]),a.on("tap",function(e){var a,n,t=s(e.target),o="ok";return a=t.closest(".like-btn"),a.length>0?(e.preventDefault(),a.hasClass("like")&&(o="cancel"),n=t.closest(".guang-info"),void s.ajax({type:"POST",url:"/guang/opt/praiseArticle",data:{id:n.data("id"),opt:o},success:function(e){var n=e.code;200===n&&(a.next(".like-count").text(e.data),a.toggleClass("like"))},error:function(){c.show("网络断开连接了~")}})):(a=t.closest(".collect-btn"),void(a.length>0&&(e.preventDefault(),a.hasClass("collected")&&(o="cancel"),n=t.closest(".guang-info"),s.ajax({type:"POST",url:"/guang/opt/collectArticle",data:{id:n.data("id"),opt:o},success:function(e){e.code&&200===e.code&&a.toggleClass("collected")},error:function(){c.show("网络断开连接了~")}}))))}),t(e.find(".guang-info")))}function i(e,a,n){var o;g||a.end||(1===a.page&&u.showLoadingMask(),o=e.find(".guang-info").length,g=!0,s.ajax({type:"GET",url:n?n:"/guang/index/page",data:a,success:function(n){var i;return" "===n?(a.end=!0,g=!1,p.addClass("hide"),void f.removeClass("hide")):(e.append(n),i=o>0?e.find(".guang-info:gt("+(o-1)+")"):e.find(".guang-info"),t(i),1===a.page&&(u.hideLoadingMask(),p.removeClass("hide"),window.rePosFooter()),a.page++,void(g=!1))},error:function(){c.show("网络断开连接了~"),g=!1}}))}var s=e("jquery"),r=e("hammer"),d=e("mlellipsis"),l=e("lazyload"),c=e("js/plugin/tip"),u=e("js/plugin/loading"),h=s("#load-more-info"),p=s(""),f=s(""),g=!1;d.init(),h.length>0&&(p=h.children(".loading"),f=h.children(".no-more")),a.initInfosEvt=o,a.setLazyLoadAndMellipsis=t,a.loadMore=i}),define("js/plugin/tip",["jquery"],function(e,a,n){function t(e,a){var n,t;"undefined"!=typeof e&&(n=e.toString(),t=a&&a>0?a:2e3,o.text(n).show(),i=setTimeout(function(){"block"===o.css("display")&&o.hide()},t))}var o,i,s=e("jquery");!function(){var e='<div id="yoho-tip" class="yoho-tip"></div>';s(".yoho-page").append(e),o=s("#yoho-tip"),o.on("touchend",function(){o.hide(),clearTimeout(i)})}(),a.show=t}),define("js/plugin/loading",["jquery"],function(e,a,n){function t(e){var a='<div class="loading-mask hide"><div class="loading"></div></div>';l=!0,void 0===e&&(e=d),e.append(a),s=e.children(".loading-mask")}function o(){l||(t(),l=!0),s.removeClass("hide")}function i(){s.addClass("hide")}var s,r=e("jquery"),d=r(".yoho-page"),l=!1;a.init=t,a.showLoadingMask=o,a.hideLoadingMask=i}),define("js/plugin/wx-share",["jquery"],function(e,a,n){var t=e("jquery");n.exports=function(){var e="http://www.yohoshow.com/api/wechat/getSignPackage";t.getJSON(e+"?pageurl="+encodeURIComponent(location.href.split("#")[0])+"&callback=?",function(e){var a,n,t,o;void 0!==e&&""!==e&&(a=e.appId.toString(),n=e.timestamp,t=e.nonceStr.toString(),o=e.signature.toString(),wx.config({debug:!1,appId:a,timestamp:n,nonceStr:t,signature:o,jsApiList:["checkJsApi","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ","onMenuShareWeibo","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","translateVoice","startRecord","stopRecord","onRecordEnd","playVoice","pauseVoice","stopVoice","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","closeWindow","scanQRCode","chooseWXPay","openProductSpecificView","addCard","chooseCard","openCard"]}))}),wx.ready(function(){var e=t("#shareTitle").val(),a=t("#shareImg").val(),n=t("#shareDesc").val(),o=t("#shareLink").val(),i={title:e,desc:n,imgUrl:a,link:o};wx.onMenuShareAppMessage(i),wx.onMenuShareTimeline(i),wx.onMenuShareQQ(i),wx.onMenuShareWeibo(i)})}}),define("js/guang/home",["jquery","swiper","hammer","mlellipsis","lazyload","index"],function(e,a,n){var t,o=e("jquery"),i=e("swiper"),s=e("js/guang/info"),r=s.loadMore,d=o("#load-more-info"),l=o(""),c=o(""),u=o(window).height(),h=o("#info-list"),p=h.children(".info-list"),f=o("#guang-nav"),g=f.children(".focus"),m=g.data("type"),v={};d.length>0&&(l=d.children(".loading"),c=d.children(".no-more")),t=new i(".swiper-container",{lazyLoading:!0,pagination:".swiper-pagination",autoplay:3e3}),s.initInfosEvt(h),function(){var e=o("#gender").val();f.children(".guang-nav-item").each(function(){var a=o(this).data("type"),n=o(this).hasClass("focus");v[a]={page:n?2:1,gender:e,type:a,end:!1}})}(),f.bind("contextmenu",function(e){return!1}),f.on("touchend touchcancel",function(e){var a,n,t=o(e.target).closest(".guang-nav-item");t.hasClass("focus")||(n=t.index(),t.addClass("focus"),g.removeClass("focus"),a=p.eq(n),g=t,m=t.data("type"),1===v[m].page?(l.addClass("hide"),c.addClass("hide"),r(a,v[m])):v[m].end?(l.addClass("hide"),c.removeClass("hide")):(l.removeClass("hide"),c.addClass("hide")),p.not(".hide").addClass("hide"),a.removeClass("hide"),1===v[m].page&&window.rePosFooter())}),o(document).scroll(function(){var e=p.not(".hide");o(window).scrollTop()+u>=o(document).height()-.25*e.height()&&r(e,v[m])}),f.on("touchstart",function(e){var a=e.target||e.srcElement;a.className="bytouch "+a.className}).on("touchend touchcancel",function(){f.find("li").removeClass("bytouch")})}),define("js/guang/list",["jquery","hammer","mlellipsis","lazyload"],function(e,a,n){var t=e("jquery"),o=e("js/guang/info"),i=o.loadMore,s=t(window).height(),r=t("#author-infos"),d=t("#tag"),l=t("#gender"),c=t("#isApp"),u={page:2,end:!1},h=t("#info-list");o.initInfosEvt(h),r.length>0&&t.extend(u,{authorId:r.data("id"),isApp:c.val()}),d.length>0&&t.extend(u,{tag:d.val(),gender:l.val(),isApp:c.val()}),t(document).scroll(function(){t(window).scrollTop()+s>=t(document).height()-.25*h.height()&&i(h,u)})}),define("js/guang/detail",["jquery","mlellipsis","lazyload","iscroll-probe"],function(e,a,n){function t(e){var a=e.offset().left,n=-C+a+y/2+"px";r.css({backgroundPosition:n+" bottom"}),v&&b.css({backgroundPosition:n+" bottom"})}function o(e){var a,n,o,i=h(e.currentTarget),p=i.index();i.hasClass("focus")||(d.filter(".focus").removeClass("focus"),v&&(a=i.closest(".fixed-thumb-container").length>0?r:b,n=a.find(".thumb").eq(p),b.find(".thumb.focus").removeClass("focus"),n.addClass("focus")),i.addClass("focus"),t(i),l.not(".hide").addClass("hide"),o=l.eq(p),o.removeClass("hide"),f(o.find(".lazy")),v?u&&u.scrollToElement(c,400):h("body").animate({scrollTop:s.offset().top},400),u&&u.refresh())}function i(){var e,a,n,t,o,i=h("#scroller"),d=h(".yoho-header"),l=0;return d.length>0&&(l=d.outerHeight()),u=new g("#wrapper",{probeType:3,mouseWheel:!0,click:!0}),document.addEventListener("touchmove",function(e){e.preventDefault()},!1),w?(e=h(window).height()-l,o=b[0],a=r.outerHeight(),n=s.outerHeight(),t=s.offset().top-l,void u.on("scroll",function(){var s=-this.y,r=o.className;t-e+a>=s?-1===r.indexOf("fixed-bottom")&&b.addClass("fixed-bottom").removeClass("hide"):t>=s?-1===r.indexOf("hide")&&b.addClass("hide").removeClass("fixed-bottom fixed-top"):t+n-a>=s?-1===r.indexOf("fixed-top")&&b.addClass("fixed-top").removeClass("hide absolute").css("top",""):t+n>=s?(-1===r.indexOf("absolute")&&b.addClass("absolute").removeClass("fixed-top hide"),o.style.top=t+l+n-a-s+"px"):s>t+n&&-1===r.indexOf("hide")&&b.addClass("hide").removeClass("absolute"),i.trigger("scroll")})):void u.on("scroll",function(){i.trigger("scroll")})}var s,r,d,l,c,u,h=e("jquery"),p=e("mlellipsis"),f=e("lazyload"),g=e("iscroll-probe"),m=h(".author .intro"),v=!1,w=h(".collocation-block").length>0?!0:!1,y=0,b=h(""),c=document.querySelector("#wrapper .collocation-block"),C=h(window).width();e("js/plugin/wx-share")(),window.onload=function(){u&&u.refresh()},a.i=function(e){var a=navigator.userAgent.indexOf("iPhone")>0?!0:!1;v=a&&e,p.init(),f(h(".lazy")),h(".info-list .title, .one-good .reco-name").each(function(){this.mlellipsis(2)}),m.offset()&&parseInt(m.offset().left,10)===parseInt(m.css("margin-left"),10)&&m.css("padding-top",0),v&&(h(".yoho-header").length>0?h("#wrapper").addClass("ios has-head"):h("#wrapper").addClass("ios")),w&&(s=h(".collocation-block"),r=s.children(".thumb-container"),d=r.find("li"),l=s.find(".prod"),y=d.width(),v&&(b=h("#wrapper").after(r.clone().addClass("fixed-thumb-container fixed-bottom")).next(".thumb-container"),f(b.find(".lazy"),{event:"sporty"})),t(d.filter(".focus")),r.delegate(".thumb","touchend",o),v&&b.delegate(".thumb","touchend",o)),v&&i()}}),define("js/home/entry",["jquery","hammer","swiper","lazyload","index"],function(e,a,n){e("js/home/home"),e("js/home/maybe-like")}),define("js/home/home",["jquery","hammer","swiper","lazyload","index"],function(e,a,n){function t(){b.hasClass("menu-open")&&(b.removeClass("menu-open"),m(".overlay").hide(),m(".sub-nav").removeClass("show"),j.removeClass("on"),m("body").css({height:"auto",overflow:"auto"}))}function o(){k+=10,q.css({transform:"rotateX("+k+"deg)","-webkit-transform":"rotateX("+k+"deg)","-moz-transform":"rotateX("+k+"deg)"}),k/90%2===1&&(z?(q.addClass("animate"),z=!1):(q.removeClass("animate"),z=!0)),k/90%2===0&&k%360!==0?window.setTimeout(o,3e3):k%360===0?window.setTimeout(o,6e4):c(function(){o()})}var i,s,r,d,l,c,u,h,p,f,g,m=e("jquery"),v=e("hammer"),w=e("swiper"),y=e("lazyload"),b=m(".mobile-wrap"),C=m(".overlay"),j=m(".side-nav"),x=m(".sub-nav"),k=0,q=m(".home-header .logo"),z=!0;e("js/home/maybe-like"),y(m("img.lazy")),g=new v(m(".nav-btn")[0]),g.on("tap",function(e){return e.preventDefault(),b.addClass("menu-open"),C.show().css("opacity",.3),j.addClass("on"),m("body").css({height:m(window).height(),width:m(window).width(),overflow:"hidden"}),e.srcEvent.stopPropagation(),!1}),m(".overlay").on("touchstart",function(e){return t(),!1}),j.on("touchstart","li",function(e){return m(this).find(".sub-nav").size()>0&&(m(".sub-nav").removeClass("show"),m(this).find(".sub-nav").addClass("show")),e.stopPropagation(),e.target.pathname===location.pathname?(t(),!1):void 0}),x.each(function(){m(this).find("li").eq(0).on("touchstart",function(e){return m(".sub-nav").removeClass("show"),e.stopPropagation(),!1})}).on("touchstart",function(e){e.currentTarget!==e.target&&x.find("li").removeClass("current")}),j.children("ul").children("li").on("touchstart",function(){j.children("ul").children("li").css("background","#fff"),m(this).css("background","#eee")}).on("touchend touchcancel",function(){m(this).css("background","#fff")}),m(".banner-swiper").find("li").size()>1&&(i=new w(".banner-swiper",{lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!1,paginationClickable:!0,slideElement:"li",pagination:".banner-top .pagination-inner"})),r=new w(".brands-swiper",{grabCursor:!0,slidesPerView:"auto",wrapperClass:"brands-list",slideElement:"li"}),s=new w(".recommend-swiper",{grabCursor:!0,slidesPerView:"auto",wrapperClass:"recommend-list",slideElement:"li"}),m(".trend-topic-swiper").find("li").size()>1&&(d=new w(".trend-topic-swiper",{loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!1,paginationClickable:!0,slideElement:"li",pagination:".trend-topic-content .pagination-inner"})),m(".category-swiper").each(function(e,a){p="category-swiper"+e,m(this).addClass(p),m("."+p).find(".swiper-slide").size()>1&&(l=new w("."+p,{loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!1,paginationClickable:!0,slideElement:"li",pagination:"."+p+" .pagination-inner"}))}),c=function(){var e=null,a=["webkit","moz","ms"];for(h=0;h<a.length;h++)u=a[h]+"RequestAnimationFrame",window[u]&&(f=!0,e=u);return f?function(a){window[e](a)}:function(e){window.setTimeout(e,67)}}(),setTimeout(o,3e3),m(".home-header .iconfont").on("touchstart",function(){m(this).addClass("highlight")}).on("touchend touchcancel",function(){m(this).removeClass("highlight")}),m("#yoho-footer").css({"margin-bottom":"2.5rem"}),a.set=function(e){window.setCookie("_Channel",e,{expires:365,domain:".m.yohobuy.com"})}}),define("js/home/maybe-like",["jquery","hammer","lazyload"],function(e,a,n){function t(){m||(m=!0,h.showLoadingMask(),l.ajax({type:"GET",url:s,data:{page:v+1},success:function(e){return" "===e?(m=!1,h.hideLoadingMask(),void(w&&(s="1,3"===w?"/boys/bottomBanner":"/girls/bottomBanner",l.ajax({type:"GET",url:s,success:function(e){e&&e.img&&(l("#load-more-img").show(),l("#load-more-img a").attr("href",e.url),l("#load-more-img a > img").attr("src",e.img))},error:function(){}})))):(i=g.find(".good-info").length,g.append(e),p(0===i?g.find(".good-info").find("img.lazy"):g.find(".good-info:gt("+(i-1)+")").find("img.lazy")),m=!1,h.hideLoadingMask(),void v++)},error:function(){u.show("网络断开连接了~"),m=!1,h.hideLoadingMask()}}))}var o,i,s,r,d,l=e("jquery"),c=e("hammer"),u=e("js/plugin/tip"),h=e("js/plugin/loading"),p=e("lazyload"),f=l(window).height(),g=l("#goods-list"),m=!1,v=0,w=null,y=l(".mobile-wrap").hasClass("kids-wrap")?!0:!1,b=l(".mobile-wrap").hasClass("lifestyle-wrap")?!0:!1,C=l("#maybe-like-nav");y?s="/product/recom/maylikekids":b?s="/product/recom/maylikelife":(w=l(".mobile-wrap").hasClass("boys-wrap")?"1,3":"2,3",s="/product/recom/maylike?gender="+w),r=C.children(".focus"),b&&(o=new c(C[0]),o.on("tap",function(e){var a,n=l(e.target).closest("li"),t=l(".goods-list");e.preventDefault(),n.hasClass("focus")||(d=n.index(),n.addClass("focus"),r.removeClass("focus"),t.not(".hide").addClass("hide"),a=t.eq(d),a.removeClass("hide"),r=n,l(document).trigger("scroll"),e.srcEvent.stopPropagation())})),h.init(l(".maybe-like")),l(".maybe-like p").on("touchstart",function(e){t()}),l(window).scroll(function(){l(window).scrollTop()+f>=l(document).height()-50&&t()})}),define("js/index/entry",["jquery","hammer"],function(e,a,n){e("js/index/search"),e("js/index/footer"),e("js/index/channel")}),define("js/index/search",["jquery","hammer"],function(e,a,n){var t,o,i=e("jquery"),s=e("hammer"),r=i("#search-input input"),d=i("#search-input .clear-input"),l=i(".search-icon"),c=i("#search-form"),u=i(".history"),h=i("#clear-history"),p=e("js/index/write-search"),f=p.getRanToken();t=new s(h[0]),t.on("tap",function(){localStorage.removeItem("historys"),u.html("")}),r.on("input",function(){""===r.val()?(l.css("color","#b2b2b2"),d.addClass("hide")):(l.css("color","#666"),d.removeClass("hide"))}),o=new s(d[0]),o.on("tap",function(){r.val("").trigger("input")}),i("#search").on("touchend",function(){return i(this).closest("form").submit(),!1}),function(){var e,a,n,t="";if(localStorage&&(a=localStorage.getItem("historys"),a&&a.length>0)){for(a=a.split(f),n=0;n<a.length;n++)e=a[n],""!==e&&(t+='<li><a href="/?query='+e+'">'+e+"</li>");u.html(t),h.removeClass("hide")}}(),p.bindWirteLocal(c)}),define("js/index/write-search",[],function(e,a,n){function t(){return i}function o(e){e.on("submit",function(){var e,a=this.query.value;if(localStorage){if(e=localStorage.getItem("historys"),e=e?e:"",e.indexOf(i+a+i)>-1)return;""===e&&(a=i+a),e+=a+i,localStorage.setItem("historys",e)}})}var i=" ??++ ";a.getRanToken=t,a.bindWirteLocal=o}),define("js/index/footer",["jquery","hammer"],function(e,a,n){function t(){var e="http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445",a=new Date;setTimeout(function(){new Date-a<2e3&&(window.location=e)},500)}var o,i=e("jquery"),s=e("hammer");e("js/common"),i("#float-layer-close").on("touchend",function(e){return i("#float-layer-app").hide(),window.setCookie("_float-layer-app","id490655927",{domain:".yohobuy.com"}),window.setCookie("_float-layer-app-close",1,{domain:".yohobuy.com",expires:1}),!1}),i("#float-layer-btn")&&i("#float-layer-btn")[0]&&(o=new s(i("#float-layer-btn")[0]),o.on("tap",function(e){t("bottom"),e.srcEvent.stopPropagation()}),"function"!=typeof window.cookie||window.cookie("_float-layer-app")?i("#float-layer-app").hide():i("#float-layer-app").show())}),define("js/index/channel",["jquery"],function(e,a,n){var t=e("jquery"),o=t(".search-box"),i=t(".box"),s=t(".index-search"),r=t(".index-logo"),d=t(".index-channel a"),l=o.children('input[type="text"]'),c=i.children(".no-search"),u=o.children(".search-icon");e("js/common"),l.on("focus",function(){i.addClass("action"),r.addClass("action")}).on("input",function(){""===l.val()?u.addClass("empty"):u.removeClass("empty")}),c.on("touchend",function(){return i.removeClass("action"),r.removeClass("action"),l.blur(),!1}),o.children(".clear-text").on("touchstart",function(){l.val("").focus().trigger("input")}),o.children(".search-icon").on("touchstart",function(){s.submit()}),t(".index-channel img").on("load error",function(){window.rePosFooter&&window.rePosFooter()}),d.on("touchstart",function(){d.css({background:"#000",color:"#fff",borderColor:"#fff"}),t(this).css({background:"rgba(255, 255, 255, 0.5)",color:"#000",borderColor:"#000"})}).on("touchend touchcancel",function(){t(this).css({background:"#000",color:"#fff",borderColor:"#fff"})})}),define("js/passport/entry",["jquery"],function(e,a,n){e("js/passport/register/register"),e("js/passport/register/code"),e("js/passport/register/password"),e("js/passport/login/login"),e("js/passport/login/international"),e("js/passport/back/mobile"),e("js/passport/back/code"),e("js/passport/back/email"),e("js/passport/back/email-success"),e("js/passport/back/new-password")}),define("js/passport/register/register",["jquery"],function(e,a,n){var t=e("jquery"),o=t("#phone-num"),i=t("#country-select"),s=t("#area-code"),r=t("#btn-next"),d=e("js/passport/api"),l=e("js/plugin/tip"),c=t.trim,u=l.show;d.selectCssHack(t("#country-select")),d.bindClearEvt(),o.bind("input",function(){""===c(o.val())?r.addClass("disable"):r.removeClass("disable")}),i.change(function(){s.text(i.val())}),r.on("touchstart",function(){var e=c(o.val()),a=i.val();r.hasClass("disable")||(d.phoneRegx[a].test(e)?t.ajax({url:"/passport/reg/verifymobile",type:"POST",data:{areaCode:a.replace("+",""),phoneNum:e},success:function(e){200===e.code?location.href=e.data:u(e.message)}}):u("手机号格式不正确,请重新输入"))})}),define("js/passport/api",["jquery"],function(e,a,n){function t(e){var a,n=r(".has-eye");e&&"open"===e.status?n.append('<div class="eye"></div>'):n.append('<div class="eye close"></div>'),a=n.children(".eye"),a.on("touchstart",function(e){var a=r(this),n=a.siblings(".pwd");e.preventDefault(),a.toggleClass("close"),a.hasClass("close")?n.attr("type","password"):n.attr("type","text"),n.focus()})}function o(){var e,a=r(".has-clear");a.append('<div class="clear-input"></div>'),e=a.children(".clear-input"),e.on("touchstart",function(a){var n=e.siblings(".input");n.val("").trigger("input").focus(),a.preventDefault()}),a.children(".input").bind("input",function(){var e=r(this),a=e.siblings(".clear-input"),n=d(e.val());""===n?a.hide():a.show()})}function i(e){return e.length>=6&&e.length<=20?!0:!1}function s(e){function a(){var a=e.find("option:selected").text().length;switch(a){case 2:e.outerWidth(90);break;case 3:e.outerWidth(110);break;default:e.outerWidth(130)}}var n=navigator.userAgent;n.match(/uc/i)&&n.match(/android/i)?e.change(function(){a()}):e.removeClass("in-android-uc")}var r=e("jquery"),d=r.trim,l=/^([a-zA-Z0-9]+[_|\_|\.|-]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.|-]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/,c={"+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][0-9]{8}$/,"+81":/^0[9|8|7][0-9]{9}$/,"+61":/^[0-9]{11}$/};n.exports={emailRegx:l,phoneRegx:c,bindEyesEvt:t,bindClearEvt:o,pwdValidate:i,selectCssHack:s}}),define("js/passport/register/code",["jquery"],function(e,a,n){e("js/passport/code")(!0)}),define("js/passport/code",["jquery"],function(e,a,n){var t=e("jquery");n.exports=function(a){function n(){var e,a=59;e=setInterval(function(){0===a?(s.text("重发验证码").removeClass("disable"),clearInterval(e)):s.text("重发验证码 ("+a--+"秒)")},1e3)}var o=t("#captcha"),i=t("#btn-next"),s=t("#captcha-tip"),r=t("#phone-num").val(),d=t("#area-code").val().replace("+",""),l=e("js/passport/api"),c=e("js/plugin/tip"),u=t.trim,h=c.show,p=a?"reg":"back";l.bindClearEvt(),o.bind("input",function(){""!==u(o.val())?i.removeClass("disable"):i.addClass("disable")}),s.on("touchstart",function(){s.hasClass("disable")||t.ajax({type:"POST",url:"/passport/"+p+"/sendcode",data:{phoneNum:r,areaCode:d},success:function(e){200===e.code?(s.text("重发验证码 (60秒)").addClass("disable"),n()):h(e.message)}})}),i.on("touchstart",function(){i.hasClass("disable")||t.ajax({type:"POST",url:"/passport/"+p+"/verifycode",data:{phoneNum:r,areaCode:d,code:u(o.val()),token:t("#token").val()},success:function(e){200===e.code?location.href=e.data:h(e.message)}})}),n()}}),define("js/passport/register/password",["jquery"],function(e,a,n){var t=e("jquery"),o=t("#pwd"),i=t("#btn-sure"),s=e("js/passport/api"),r=e("js/plugin/tip"),d=t.trim,l=r.show;s.bindEyesEvt({status:"open"}),o.bind("input",function(){""===d(o.val())?i.addClass("disable"):i.removeClass("disable")}),i.on("touchstart",function(){var e=d(o.val());i.hasClass("disable")||(s.pwdValidate(e)===!1?l("密码6-20位,请重新输入"):t.ajax({type:"POST",url:"/passport/reg/setpassword",data:{password:e,phoneNum:t("#phone-num").val(),areaCode:t("#area-code").val(),token:t("#token").val()},success:function(e){200===e.code?(l("注册成功"),setTimeout(function(){location.href=e.data},1e3)):l(e.message)}}))})}),define("js/passport/login/login",["jquery"],function(e,a,n){function t(){h&&p?l.removeClass("disable"):l.addClass("disable")}function o(){c.show(),u.show()}function i(){c.hide(),u.hide()}var s=e("jquery"),r=s("#account"),d=s("#pwd"),l=s("#btn-login"),c=s("#retrive-pwd-mask"),u=s("#retrive-pwd-ways"),h=!1,p=!1,f=e("js/passport/api"),g=e("js/plugin/tip"),m=s.trim,v=g.show;f.bindEyesEvt(),f.bindClearEvt(),r.bind("input",function(){h=""!==m(r.val())?!0:!1,t()}),d.bind("input",function(){p=""===m(d.val())?!1:!0,t()}),l.on("touchstart",function(){var e=m(r.val()),a=m(d.val());l.hasClass("disable")||((/^[0-9]+$/.test(e)||f.emailRegx.test(e))&&f.pwdValidate(a)?s.ajax({type:"POST",url:"/passport/login/auth",data:{account:e,password:a},success:function(e){200===e.code?(v("登录成功"),setTimeout(function(){location.href=e.data},1e3)):v(e.message)},error:function(){v("网络断开连接啦~")}}):v("账号或密码有错误,请重新输入"))}),s("#forget-pwd").on("touchstart",function(){o()}),c.on("touchstart",function(){i()}),s("#cancel-retrive").on("touchstart",function(e){e.preventDefault(),i()}),r.trigger("input"),d.trigger("input")}),define("js/passport/login/international",["jquery"],function(e,a,n){function t(){c&&u?l.removeClass("disable"):l.addClass("disable")}var o=e("jquery"),i=o("#phone-num"),s=o("#country-select"),r=o("#area-code"),d=o("#pwd"),l=o("#btn-login"),c=!1,u=!1,h=e("js/passport/api"),p=e("js/plugin/tip"),f=o.trim,g=p.show;h.selectCssHack(s),h.bindEyesEvt(),h.bindClearEvt(),i.bind("input",function(){c=""===f(i.val())?!1:!0,t()}),d.bind("input",function(){var e=f(d.val());u=""===e?!1:!0,t()}),s.change(function(){r.text(s.val())}),l.on("touchstart",function(){var e=f(i.val()),a=s.val(),n=f(d.val());l.hasClass("disable")||(h.phoneRegx[a].test(e)&&h.pwdValidate(n)?o.ajax({
type:"POST",url:"/passport/login/auth",data:{areaCode:a.replace("+",""),account:e,password:n},success:function(e){200===e.code?(g("登录成功"),setTimeout(function(){location.href=e.data},1e3)):g(e.message)},error:function(){g("网络断开连接啦~")}}):g("账号或密码有错误,请重新输入"))}),i.trigger("input"),d.trigger("input")}),define("js/passport/back/mobile",["jquery"],function(e,a,n){var t=e("jquery"),o=t("#phone-num"),i=t("#country-select"),s=t("#area-code"),r=t("#btn-next"),d=e("js/passport/api"),l=e("js/plugin/tip"),c=t.trim,u=l.show;d.selectCssHack(t("#country-select")),d.bindClearEvt(),o.bind("input",function(){""===c(o.val())?r.addClass("disable"):r.removeClass("disable")}),i.change(function(){s.text(i.val())}),r.on("touchstart",function(){var e=c(o.val()),a=i.val();r.hasClass("disable")||(d.phoneRegx[a].test(e)?t.ajax({url:"/passport/back/sendcode",type:"POST",data:{areaCode:a.replace("+",""),phoneNum:e},success:function(e){200===e.code?location.href=e.data:u(e.message)}}):u("手机号格式不正确,请重新输入"))})}),define("js/passport/back/code",["jquery"],function(e,a,n){e("js/passport/code")(!1)}),define("js/passport/back/email",["jquery"],function(e,a,n){var t=e("jquery"),o=t("#email"),i=t("#btn-sure"),s=e("js/passport/api"),r=e("js/plugin/tip"),d=t.trim,l=r.show;s.bindClearEvt(),o.bind("input",function(){""===d(o.val())?i.addClass("disable"):i.removeClass("disable")}),i.on("touchstart",function(){var e=d(o.val());i.hasClass("disable")||(s.emailRegx.test(e)?t.ajax({url:"/passport/back/sendemail",type:"POST",data:{email:e},success:function(e){200===e.code?location.href=e.data:l(e.message)}}):l("邮箱格式不正确,请重新输入"))})}),define("js/passport/back/email-success",["jquery"],function(e,a,n){var t=e("jquery"),o=t("#resend"),i=e("js/plugin/tip"),s=i.show;o.on("touchstart",function(e){e.preventDefault(),t.ajax({url:o.data("url"),type:"GET",success:function(e){s(200===e.code?e.message:e.message)}})})}),define("js/passport/back/new-password",["jquery"],function(e,a,n){var t=e("jquery"),o=t("#pwd"),i=t("#btn-ok"),s=e("js/passport/api"),r=e("js/plugin/tip"),d=t.trim,l=r.show,c=t("#phone-num");s.bindEyesEvt({status:"open"}),o.bind("input",function(){""===d(o.val())?i.addClass("disable"):i.removeClass("disable")}),i.on("touchstart",function(){var e,a,n=d(o.val()),r=!0;i.hasClass("disable")||(e={password:n},0===c.length&&(r=!1),r?(t.extend(e,{phoneNum:c.val(),areaCode:t("#areaCode").val(),token:t("#token").val()}),a="/passport/back/passwordByMobile"):(t.extend(e,{code:t("#email-code").val()}),a="/passport/back/passwordByEmail"),s.pwdValidate(n)?t.ajax({type:"POST",url:a,data:e,success:function(e){200===e.code?(l("密码修改成功"),setTimeout(function(){location.href=e.data},1e3)):l(e.message)}}):l("密码6-20位,请重新输入"))})}),define("js/product/entry",["jquery","swiper","lazyload","hammer","index"],function(e,a,n){e("js/product/newsale/newarrival"),e("js/product/newsale/discount"),e("js/product/list"),e("js/product/detail/detail"),e("js/product/detail/desc")}),define("js/product/newsale/newarrival",["jquery","swiper","lazyload","index"],function(e,a,n){function t(e){var a,n,t,o,c,p,g={};if(!d){if(e){for(n in q)q.hasOwnProperty(n)&&(q[n].reload=!0);switch(k.children(".active").removeClass("active"),z.addClass("active"),e.type){case"gender":a={gender:e.id};break;case"brand":a={brand:e.id};break;case"sort":a={sort:e.id};break;case"color":a={color:e.id};break;case"size":a={size:e.id};break;case"price":a={price:e.id};break;case"discount":a={discount:e.id};break;case"limit":a={limit:e.id};break;case"channel":a={channel:e.id};break;case"p_d":a={p_d:e.id}}l.extend(y,a)}if(z.hasClass("today")?(o="today",c=1):z.hasClass("week")?(o="week",c=2):z.hasClass("sale")&&(o="sale",c=3),t=q[o],p=t.page+1,t.reload)p=1;else if(t.end)return;l.extend(g,y,{dayLimit:c,page:p}),d=!0,f.showLoadingMask(),l.ajax({type:"GET",url:"/product/newsale/selectNewSale",data:g,success:function(e){var a,n;switch(o){case"today":a=i;break;case"week":a=s;break;case"sale":a=r}" "===e?(t.end=!0,t.reload&&a.html(w)):t.reload?(a.html(e),u(a.find(".lazy"))):(n=a.find(".good-info").length,a.append(e),u(a.find(".good-info:gt("+(n-1)+") .lazy"))),t.reload=!1,t.page=p,d=!1,f.hideLoadingMask(),window.rePosFooter()},error:function(){h.show("网络断开连接了~"),d=!1,f.hideLoadingMask()}})}}var o,i,s,r,d,l=e("jquery"),c=e("swiper"),u=e("lazyload"),h=e("js/plugin/tip"),p=e("js/plugin/filter"),f=e("js/plugin/loading"),g=l("#goods-container"),m=g.children(),i=l(m.get(0)),s=l(m.get(1)).addClass("hide"),r=l(m.get(2)).addClass("hide"),v=l(window).height(),w='<p class="no-result">未找到相关搜索结果</p>',y=e("js/product/extract-url"),b=l.extend({},y),C=new Date,j=C.getMonth()+1,x=C.getDate(),k=l("#list-nav"),q={today:{reload:!0,page:0,end:!1},week:{reload:!0,page:0,end:!1},sale:{reload:!0,page:0,end:!1}},z=k.find(".active");e("js/product/suspend-cart"),l("#today a").text(j+"月"+x+"号"),l(".swiper-container .swiper-slide").length>1&&(o=new c(".swiper-container",{lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!0,paginationClickable:!0,pagination:".banner-top .pagination-inner"})),l.ajax({type:"GET",url:"/product/newsale/filter",data:y,success:function(e){g.append(e),p.initFilter({fCbFn:t,hCbFn:function(){z.addClass("active"),z.siblings(".filter").removeClass("active")}})}}),u(l(".lazy")),k.bind("contextmenu",function(e){return!1}),k.on("touchend touchcancel",function(e){var a,n,o,d=l(e.target).closest("li");if(e.preventDefault(),d.hasClass("filter"))d.hasClass("active")?(p.hideFilter(),z.addClass("active"),d.removeClass("active")):(z=d.siblings(".active"),z.removeClass("active"),d.addClass("active"),p.showFilter());else{if(d.hasClass("today")?n="today":d.hasClass("week")?n="week":d.hasClass("sale")&&(n="sale"),a=q[n],!d.hasClass("active")){if(o=d.siblings(".active"),z=d,o.hasClass("filter"))p.hideFilter();else{switch(g.children(".container:not(.hide)").addClass("hide"),n){case"today":i.removeClass("hide");break;case"week":s.removeClass("hide");break;case"sale":r.removeClass("hide")}p.resetFilter(),y=l.extend({},b)}o.removeClass("active"),d.addClass("active")}a.reload&&t()}e.stopPropagation()}),l(window).scroll(function(){l(window).scrollTop()+v>l(document).height()-.25*g.height()-50&&void 0!==z&&t()}),t(),k.on("touchstart","li",function(e){l(this).addClass("bytouch")}).on("touchend touchcancel",function(){k.find("li").removeClass("bytouch")})}),define("js/plugin/filter",["jquery"],function(e,a,n){function t(){h.addClass("hide")}function o(){h.removeClass("hide")}function i(){var e=m(".filter-body .classify");e.on("touchstart",".shower",function(){e.removeClass("highlight"),m(this).addClass("highlight")}).on("touchend touchcancel",".shower",function(){m(this).removeClass("highlight")})}function s(){var e=m(".filter-body .sub-item");e.on("touchstart",function(){e.removeClass("highlight"),m(this).addClass("highlight")}).on("touchend touchcancel",function(){m(this).removeClass("highlight")})}function r(e){e.hasClass("active")||(e.siblings(".active").removeClass("active"),e.addClass("active"))}function d(e){var a,n,t=e.closest(".sub-classify"),o=t.siblings(".shower");return e.hasClass("chosed")?t:(t.children(".chosed").removeClass("chosed"),e.addClass("chosed"),a=m.trim(e.html()),n=m.trim(o.html()),o.html(n.substring(0,n.indexOf("</span>")+7)+a.substring(0,a.indexOf("<i"))),0===e.index()?o.addClass("default"):o.removeClass("default"),t)}function l(e){var a,n=e.data("id");a=d(e),p&&p({type:a.data("type"),id:n}),t()}function c(e){p=e.fCbFn,f=e.hCbFn,g=e.missStatus,i(),s(),h=m(".filter-mask"),h.on("touchend",function(e){var a,n=m(e.target);e.preventDefault(),n.closest(".filter-body").length>0?(a=n.closest(".sub-item"),a.length>0?(a=n.closest("li"),l(a)):(a=n.closest(".classify-item"),e.stopPropagation(),r(a))):(t(),f&&f())})}function u(){"undefined"!=typeof h&&(m(".sub-classify").each(function(){d(m(this).children(":first-child"))}),r(m(".classify > :first-child")))}var h,p,f,g,m=e("jquery");a.initFilter=c,a.showFilter=o,a.hideFilter=t,a.resetFilter=u}),define("js/product/extract-url",[],function(e,a,n){var t,o,i,s={},r=window.location.search.split("?")[1],d=r.split("&");for(t=d.length;t>0;t--)switch(o=d[t-1].split("="),i=o[1],o=o[0]){case"gender":s.gender=i;break;case"brand":s.brand=i;break;case"sort":s.sort=i;break;case"msort":s.msort=i;break;case"misort":s.misort=i;break;case"color":s.color=i;break;case"size":s.size=i;break;case"price":s.price=i;break;case"discount":s.discount=i;break;case"query":s.query=i;break;case"style":s.style=i;break;case"limit":s.limit=i;break;case"channel":s.channel=i;break;case"p_d":s.p_d=i;break;case"dayLimit":s.dayLimit=i}n.exports=s}),define("js/product/suspend-cart",["jquery"],function(e,a,n){var t=e("jquery"),o=t("#suspend-cart");t.ajax({type:"GET",url:"/cart/index/count",success:function(e){200===e.code&&o.find(".cart-count").html(e.data.cart_goods_count).removeClass("hide")}})}),define("js/product/newsale/discount",["jquery","swiper","lazyload","index"],function(e,a,n){function t(e){var a,n,t,o,r,c={};if(!i){if(e){for(n in C)C.hasOwnProperty(n)&&(C[n].reload=!0);switch(b.children(".active").removeClass("active"),j.addClass("active"),e.type){case"gender":a={gender:e.id};break;case"brand":a={brand:e.id};break;case"sort":a={sort:e.id};break;case"color":a={color:e.id};break;case"size":a={size:e.id};break;case"price":a={price:e.id};break;case"discount":a={discount:e.id}}s.extend(y,a)}if(j.hasClass("new")?o="newest":j.hasClass("price")?o="price":j.hasClass("discount")&&(o="discount"),t=C[o],r=t.page+1,t.reload)r=1;else if(t.end)return;s.extend(c,y,{type:o,order:t.order,page:r}),i=!0,u.showLoadingMask(),s.ajax({type:"GET",url:"/product/newsale/selectNewSale",data:c,success:function(e){var a,n;switch(o){case"newest":a=f;break;case"price":a=g;break;case"discount":a=m}" "===e?(t.end=!0,t.reload&&a.html(w)):t.reload?(a.html(e),d(a.find(".lazy"))):(n=a.find(".good-info").length,a.append(e),d(a.find(".good-info:gt("+(n-1)+") .lazy"))),t.reload=!1,t.page=r,i=!1,u.hideLoadingMask(),window.rePosFooter()},error:function(){l.show("网络断开连接了~"),i=!1,u.hideLoadingMask()}})}}var o,i,s=e("jquery"),r=e("swiper"),d=e("lazyload"),l=e("js/plugin/tip"),c=e("js/plugin/filter"),u=e("js/plugin/loading"),h=s("#goods-container"),p=h.children(),f=s(p.get(0)),g=s(p.get(1)),m=s(p.get(2)),v=s(window).height(),w='<p class="no-result">未找到相关搜索结果</p>',y=e("js/product/extract-url"),b=s("#list-nav"),C={newest:{order:1,reload:!0,page:0,end:!1},price:{order:0,reload:!0,page:0,end:!1},discount:{order:0,reload:!0,page:0,end:!1}},j=b.find(".active");e("js/product/suspend-cart"),s(".swiper-container .swiper-slide").length>1&&(o=new r(".swiper-container",{lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!0,paginationClickable:!0,pagination:".banner-top .pagination-inner"})),s.ajax({type:"GET",url:"/product/newsale/filter",data:y,success:function(e){h.append(e),c.initFilter({fCbFn:t,hCbFn:function(){j.addClass("active"),j.siblings(".filter").removeClass("active")},missStatus:!0})}}),d(s(".lazy")),b.bind("contextmenu",function(e){return!1}),b.on("touchend touchcancel",function(e){var a,n,o,i=s(e.target).closest("li");if(e.preventDefault(),"undefined"!=typeof i&&0!==i.length){if(i.hasClass("filter"))i.hasClass("active")?(c.hideFilter(),j.addClass("active"),i.removeClass("active")):(j=i.siblings(".active"),j.removeClass("active"),i.addClass("active"),c.showFilter());else{if(i.hasClass("new")?n="newest":i.hasClass("price")?n="price":i.hasClass("discount")&&(n="discount"),a=C[n],i.hasClass("active")){if(i.hasClass("new"))return;(i.hasClass("price")||i.hasClass("discount"))&&(i.find(".icon > .iconfont").toggleClass("cur"),j=i,a.reload=!0,a.order=0===a.order?1:0)}else{if(o=i.siblings(".active"),j=i,o.hasClass("filter"))c.hideFilter();else switch(h.children(".container:not(.hide)").addClass("hide"),n){case"newest":f.removeClass("hide");break;case"price":g.removeClass("hide");break;case"discount":m.removeClass("hide")}o.removeClass("active"),i.addClass("active")}a.reload&&t()}e.stopPropagation()}}),s(window).scroll(function(){s(window).scrollTop()+v>s(document).height()-.25*h.height()-50&&void 0!==j&&t()}),t(),b.on("touchstart","li",function(e){s(this).addClass("bytouch")}).on("touchend touchcancel",function(){b.find("li").removeClass("bytouch")})}),define("js/product/list",["jquery","hammer","lazyload"],function(e,a,n){function t(e){var a,n,t,i,s,r={};if(!o){if(e){for(n in T)T.hasOwnProperty(n)&&(T[n].reload=!0);switch(z.children(".active").removeClass("active"),E.addClass("active"),e.type){case"gender":a={gender:e.id};break;case"brand":a={brand:e.id};break;case"sort":a={sort:e.id};break;case"color":a={color:e.id};break;case"size":a={size:e.id};break;case"price":a={price:e.id};break;case"discount":a={discount:e.id}}d.extend(q,a)}if(E.hasClass("new")?i="newest":E.hasClass("price")?i="price":E.hasClass("discount")&&(i="discount"),t=T[i],s=t.page+1,t.reload)s=1;else if(t.end)return;d.extend(r,q,{type:i,order:t.order,page:s}),o=!0,m.showLoadingMask(),d.ajax({type:"GET",url:"/index/search/search",data:r,success:function(e){var a,n,r='<p class="no-result">未找到相关搜索结果</p>';switch(i){case"newest":n=w;break;case"price":n=y;break;case"discount":n=b}" "===e?(t.end=!0,t.reload&&n.html(r)):t.reload?(n.html(e),c(n.find(".lazy"))):(a=n.find(".good-info").length,n.append(e),c(n.find(".good-info:gt("+(a-1)+") .lazy"))),t.reload=!1,t.page=s,o=!1,m.hideLoadingMask(),window.rePosFooter()}})}}var o,i,s,r,d=e("jquery"),l=e("hammer"),c=e("lazyload"),u=d("#brand-header"),h=d("#intro-box"),p=e("js/plugin/filter"),f=e("js/index/write-search"),g=e("js/plugin/tip"),m=e("js/plugin/loading"),v=d("#goods-container"),w=v.children(".new-goods"),y=v.children(".price-goods"),b=v.children(".discount-goods"),C=d(window).height(),j=d("#search-input input"),x=d(".search-icon"),k=d("#search-input .clear-input"),q=e("js/product/extract-url"),z=d("#list-nav"),T={newest:{order:1,reload:!0,page:0,end:!1},price:{order:0,reload:!0,page:0,end:!1},discount:{order:0,reload:!0,page:0,end:!1}},E=z.find(".active");j.on("input",function(){""===j.val()?(x.css("color","#b2b2b2"),k.addClass("hide")):(x.css("color","#666"),k.removeClass("hide"))}),k.on("touchend",function(){j.val("").trigger("input")}),d("#search").on("touchend",function(){return d(this).closest("form").submit(),!1}),e("js/product/suspend-cart"),d.ajax({type:"GET",url:"/search/filter",data:q,success:function(e){v.append(e),p.initFilter({fCbFn:t,hCbFn:function(){E.addClass("active"),E.siblings(".filter").removeClass("active")}})}}),c(d(".lazy")),f.bindWirteLocal(d("#search-form")),z.bind("contextmenu",function(e){return!1}),z.on("touchend touchcancel",function(e){var a,n,o,i=d(e.target).closest("li");if(i.hasClass("filter"))i.hasClass("active")?(p.hideFilter(),E.addClass("active"),i.removeClass("active")):(E=i.siblings(".active"),E.removeClass("active"),i.addClass("active"),p.showFilter());else{if(i.hasClass("new")?n="newest":i.hasClass("price")?n="price":i.hasClass("discount")&&(n="discount"),a=T[n],i.hasClass("active")){if(i.hasClass("new"))return;(i.hasClass("price")||i.hasClass("discount"))&&(i.find(".icon > .iconfont").toggleClass("cur"),E=i,a.reload=!0,a.order=0===a.order?1:0)}else{if(o=i.siblings(".active"),E=i,o.hasClass("filter"))p.hideFilter();else switch(v.children(".container:not(.hide)").addClass("hide"),n){case"newest":w.removeClass("hide");break;case"price":y.removeClass("hide");break;case"discount":b.removeClass("hide")}o.removeClass("active"),i.addClass("active")}a.reload&&t()}}),d(window).scroll(function(){d(window).scrollTop()+C>d(document).height()-.25*v.height()&&t()}),u.length>0&&(i=new l(u.children(".btn-intro")[0]),i.on("tap",function(){h.removeClass("hide"),d("body").addClass("overflow-hidden")}),s=new l(document.getElementById("intro-box")),s.on("tap",function(e){var a=d(e.target);e.srcEvent.preventDefault(),(0===a.closest("#brand-intro").length||a.hasClass("close-intro"))&&(h.addClass("hide"),d("body").removeClass("overflow-hidden"))}),r=new l(u.children(".btn-col")[0]),r.on("tap",function(e){var a,n=d(e.target).closest(".btn-col"),t=u.data("id");a=n.hasClass("coled")?"cancel":"ok",d.ajax({type:"POST",url:"/product/opt/favoriteBrand",data:{id:t,opt:a},success:function(e){200===e.code?n.toggleClass("coled"):400===e.code?location.href=e.data:g.show(e.message)},error:function(){g.show("网络断开连接了~")}})})),t(),z.on("touchstart","li",function(){z.find("li").removeClass("bytouch"),d(this).addClass("bytouch")}).on("touchend touchcancel","li",function(){z.find("li").removeClass("bytouch")})}),define("js/product/detail/detail",["jquery","swiper","lazyload","hammer","index"],function(e,a,n){var t,o=e("jquery"),i=e("swiper"),s=e("lazyload");e("js/product/detail/desc"),e("js/product/detail/comments-consults"),e("js/product/detail/like"),s(o("img.lazy")),t=new i(".banner-swiper",{lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,paginationClickable:!0,pagination:".banner-top .pagination-inner",nextButton:".my-swiper-button-next",prevButton:".my-swiper-button-prev"}),function(){0===o(".goods-discount .discount-folder").children().length&&(o(".goods-discount .discount-folder").css("display","none"),o(".goods-discount .first-item span").html(""))}(),o(".goodsDiscount .dropdown").on("click",function(){o(".goodsDiscount .discount-folder").is(":hidden")?(o(".goodsDiscount .first-item span").removeClass("icon-down"),o(".goodsDiscount .first-item span").addClass("icon-up"),o(".goodsDiscount .first-item span").html("&#xe608;"),o(".goodsDiscount .discount-folder").slideDown()):(o(".goodsDiscount .first-item span").removeClass("icon-up"),o(".goodsDiscount .first-item span").addClass("icon-down"),o(".goodsDiscount .first-item span").html("&#xe609;"),o(".goodsDiscount .discount-folder").slideUp())})}),define("js/product/detail/desc",["jquery","lazyload","swiper","index"],function(e,a,n){function t(){g||m||(g=!0,u.showLoadingMask(),d.ajax({type:"GET",url:p,success:function(e){i=d("#productDesc"),i.append(e),l(i.find("img.lazy")),s=new c("#size-swiper-container",{slidesPerView:"auto"}),r=new c("#reference-swiper-container",{slidesPerView:"auto"}),g=!1,m=!0,u.hideLoadingMask()},error:function(){h.show("网络断开连接了~"),g=!1,u.hideLoadingMask()}}))}function o(){(!m||d(window).scrollTop()+f>=d(document).height()-50)&&t()}var i,s,r,d=e("jquery"),l=e("lazyload"),c=e("swiper"),u=e("js/plugin/loading"),h=e("js/plugin/tip"),p=d("#introUrl").val(),f=d(window).height(),g=!1,m=!1;e("js/product/recommend-for-you"),d(window).scroll(function(){window.requestAnimationFrame(o)})}),define("js/product/recommend-for-you",["swiper","jquery","index"],function(e,a,n){var t,o=e("swiper"),i=e("jquery"),s=i(".recommend-for-you");i.get("/home/preference").then(function(e){s.html(e),i("#swiper-recommend").length&&(t=new o("#swiper-recommend",{slidesPerView:"auto",grabCursor:!0,slideElement:"a",lazyLoading:!0,watchSlidesVisibility:!0}))}).fail(function(){s.hide()})}),define("js/product/detail/comments-consults",["jquery"],function(e,a,n){var t,o=e("jquery"),i=e("js/plugin/tip");!function(){var e=o("#nav-tab .consults-num").html()-0;t=o("#nav-tab .comments-num").html()-0,o("#nav-tab li").each(function(){o(this).removeClass("focus")}),o("#feedback-content .content").each(function(){o(this).addClass("hide")}),0!==t?(o("#nav-tab .comment-nav").addClass("focus"),o("#feedback-content .comment-content").removeClass("hide")):0!==e&&(o("#nav-tab .consult-nav").addClass("focus"),o("#feedback-content .consult-content").removeClass("hide"))}(),o("#nav-tab li").on("touchend",function(){var e=o(this).index();o(this).hasClass("comment-nav")&&0===t?i.show("暂无商品评价"):o(this).hasClass("focus")||(o("#nav-tab li").each(function(){o(this).removeClass("focus")}),o("#feedback-content .content").each(function(){o(this).addClass("hide")}),o(this).addClass("focus"),o("#feedback-content .content:eq("+e+")").removeClass("hide"))})}),define("js/product/detail/like",["jquery","hammer"],function(e,a,n){var t=e("jquery"),o=e("hammer"),i=e("js/plugin/tip"),s=new o(document.getElementById("likeBtn"));s.on("tap",function(e){var a,n=t("#productId").val(),o=t(this);a=o.hasClass("liked")?"cancel":"ok",t.ajax({type:"POST",url:"/product/opt/favoriteProduct",data:{id:n,opt:a},success:function(e){200===e.code?o.toggleClass("liked"):400===e.code?location.href=e.data:i.show(e.message)},error:function(){i.show("网络断开连接了~")}})})}),define("js/me/entry",["jquery","hammer","lazyload","swiper","handlebars","source-map","index"],function(e,a,n){e("js/me/order"),e("js/me/order-detail"),e("js/me/fav"),e("js/me/index"),e("js/me/coupons"),e("js/me/online-service"),e("js/me/address")}),define("js/me/order",["jquery","hammer","lazyload"],function(e,a,n){function t(e){var a={type:h,page:p.page+1},n=e&&e.showLoadingMask;f||(f=!0,n&&g.showLoadingMask(),i.ajax({type:"GET",url:"/home/getOrders",data:a,success:function(e){var t;" "!==e?(p.page=a.page,1===a.page?(c.html(e),r(c.find(".lazy"))):(t=c.children(".order").length,c.append(e),r(c.children(".order:gt("+(t-1)+")").find(".lazy"))),window.rePosFooter()):p.end=!0,f=!1,n&&g.hideLoadingMask()}}))}var o,i=e("jquery"),s=e("hammer"),r=e("lazyload"),d=i("#order-nav > li"),l=i("#order-container"),c=l.children(".orders:not(.hide)"),u=i(window).height(),h=d.filter(".active").data("type"),p={page:0,end:!1},f=!1,g=e("js/plugin/loading");r(),function(){var e=d.length;4!==e&&d.width(100/e+"%")}(),g.init(i("body")),o=new s(document.getElementById("order-container")),o.on("tap",function(e){var a,n,t,o=i(e.target);o.closest(".locHref").length>0||(a=o.closest(".order"),n=a.data("id"),o.closest(".del").length>0?i.ajax({type:"GET",url:"/home/delOrder",data:{id:n},success:function(e){200===e.code&&(location.href=location.href)}}):o.closest(".cancel").length>0?i.ajax({type:"GET",url:"/home/cancelOrder",data:{id:n},success:function(e){200===e.code&&(location.href=location.href)}}):(t=a.data("href"),location.href=t))}),i(window).scroll(function(){p.end===!1&&i(window).scrollTop()+u>i(document).height()-.25*l.height()&&t({noLoadingMask:!0})}),t()}),define("js/me/order-detail",["jquery","lazyload","hammer"],function(e,a,n){var t,o=e("jquery"),i=e("lazyload"),s=e("hammer"),r=o("#order-detail").data("id");i(),t=new s(document.getElementsByClassName("opt")[0]),t.on("tap",function(e){var a=o(e.target);a.hasClass("btn-del")?confirm("确定删除订单吗?")&&o.ajax({type:"GET",url:"/home/delOrder",data:{id:r}}):a.hasClass("btn-cancel")&&confirm("确定取消订单吗?")&&o.ajax({type:"GET",url:"/home/cancelOrder",data:{id:r}})})}),define("js/me/fav",["jquery","hammer","swiper","handlebars","source-map","index"],function(e,a,n){function t(e){var a,n;if(c.filter(".active").removeClass("active"),c.eq(e).addClass("active"),u.filter(".show").removeClass("show"),u.eq(e).addClass("show"),1===e)for(a=0;a<h.length;a++)n=h.eq(a).attr("data-id"),p[n]=new d("#swiper-container-"+n,{slidesPerView:"auto",grabCursor:!0,slideElement:"li",wrapperClass:"swiper-wrapper-"+n,lazyLoading:!0,watchSlidesVisibility:!0})}var o,i,s=e("jquery"),r=e("hammer"),d=e("swiper"),l=e("js/me/dialog"),c=s("#fav-tab > li"),u=s(".fav-content > .fav-type"),h=s(".swiper-container"),p={};t(s("#fav-tab").hasClass("brand-tab")?1:0),o=new r(document.getElementById("fav-tab")),o.on("tap",function(e){var a,n=s(e.target).closest("li");0===n.length||n.hasClass("active")||(a=n.index(),t(a))}),i=new r(document.getElementById("fav-content")),i.on("tap",function(e){var a="";s(e.target).hasClass("del-fav")&&l.showDialog({dialogText:"您确定要取消收藏吗?",hasFooter:{leftBtnText:"取消",rightBtnText:"确定"}},function(){a=s(e.target).closest("li").attr("data-id"),s.ajax({method:"post",url:"/home/favoriteDel",data:{id:a}}).then(function(a){200===a.code?(l.showDialog({autoHide:!0,fast:!0,dialogText:"已经取消收藏"}),s(e.target).closest("li").remove()):400===a.code?l.showDialog({autoHide:!0,fast:!0,dialogText:a.message}):l.showDialog({autoHide:!0,fast:!0,dialogText:"取消收藏失败"})}).fail(function(){})})})}),define("js/me/dialog",["jquery","handlebars","source-map","hammer"],function(e,a,n){var t,o,i=e("jquery"),s=e("handlebars"),r=e("hammer");t='<div id="dialog-wrapper" class="dialog-wrapper"><div class="dialog-box">{{# hasHeader}}{{/ hasHeader}}<div class="dialog-content">{{dialogText}}</div>{{# hasFooter}}<div class="dialog-footer">{{# leftBtnText}}<span class="dialog-left-btn">{{.}}</span>{{/ leftBtnText}}{{# rightBtnText}}<span class="dialog-right-btn">{{.}}</span>{{/ rightBtnText}}</div>{{/ hasFooter}}</div></div>',o=s.compile(t),a.showDialog=function(e,a){var n,t,s,d=o(e);i(".dialog-wrapper").remove(),i("body").append(i(d)),n=i(".dialog-box"),t=i(".dialog-wrapper"),s=new r(document.getElementById("dialog-wrapper")),e.fast?t.css({display:"block"}):t.fadeIn(),n.css({top:"50%",marginTop:-(n.height()/2)}),e.autoHide&&setTimeout(function(){t.fadeOut()},1e3),s.on("tap",function(e){i(e.target).hasClass("dialog-left-btn")?t.fadeOut():i(e.target).hasClass("dialog-right-btn")&&a()})}}),define("js/me/index",["jquery","swiper","index"],function(e,a,n){var t,o=e("jquery"),i=o(".user-avatar"),s=o(".list-item"),r=new Image;e("js/product/recommend-for-you"),e("js/product/suspend-cart"),t=i.data("avatar"),r.src=t,r.onload=function(){i.css("background-image","url("+t+")")},o(".yoho-page").on("touchstart",".list-item, .type-item",function(){s.removeClass("highlight"),o(this).addClass("highlight")}).on("touchend touchcancel",".list-item, .type-item",function(){o(this).removeClass("highlight")})}),define("js/me/coupons",["jquery","hammer"],function(e,a,n){var t,o=e("jquery"),i=e("hammer");o(".employ span").each(function(e){t=new i(o(".employ span")[e]),t.on("tap",function(a){o(".employ-list").addClass("none").eq(e).removeClass("none"),o(".employ span").removeClass("active").eq(e).addClass("active")})})}),define("js/me/online-service",["jquery"],function(e,a,n){var t=e("jquery"),o=t(".question-tab .tab-item");o.on("touchend",function(){var e=t(this).data("tab");e='[data-tab-name="'+e+'"]',o.removeClass("current"),t(this).addClass("current"),t(".question-list").removeClass("current"),t(e).addClass("current")})}),define("js/me/address",["jquery"],function(e,a,n){function t(e){e=e||{},l.find('[name="id"]').val(e.id||""),l.find('[name="consignee"]').val(e.consignee||""),l.find('[name="mobile"]').val(e.mobile||""),l.find('[name="area_code"]').val(e.areaCode||""),l.find('[name="area"]').val(e.area||""),l.find('[name="address"]').val(e.address||""),y="edit",g.hide(),v.hide(),h.show()}var o,i,s=e("jquery"),r=e("js/plugin/tip"),d=s(".action"),l=s(".edit-address"),c=s(".submit"),u=s(".add-address"),h=s(".my-edit-address-page"),p=s(".my-address-list-page"),f=s(".area"),g=s("#yoho-footer"),m=s(".confim-mask"),v=s(".page-wrap"),w=s(".nav-back"),y="address",b=[];w.attr("href","javascript:void(0);"),w.on("touchend",function(e){"edit"===y?(v.hide(),v.first().show(),e.preventDefault(),y="address"):"list"===y?(v.hide(),h.show(),e.preventDefault(),y="edit"):window.history.go(-1)}),m.on("touchend",".cancel",function(){i=null,m.hide()}).on("touchend",".confim",function(){s.ajax({method:"POST",url:"/home/deladdress",data:{id:i}}).then(function(e){"object"!==s.type(e)&&(e={}),200!==e.code?r.show(e.message||"网络出了点问题~"):window.location.reload()}).fail(function(){r.show("网络出了点问题~")}).always(function(){i=null,m.hide()})}),u.on("touchend",function(){t()}),d.on("touchend",".edit",function(){t(s(this).data())}).on("touchend",".del",function(){i=s(this).data("id"),m.show()}),c.on("touchend",function(){return l.submit(),!1}),l.on("submit",function(){return o?!1:s(this).find('[name="consignee"]').val()?s(this).find('[name="mobile"]').val()?s(this).find('[name="area_code"]').val()&&s(this).find('[name="area"]').val()?s(this).find('[name="address"]').val()?(o=!0,s.ajax({method:"POST",url:"/home/saveaddress",data:s(this).serialize()}).then(function(e){"object"!==s.type(e)&&(e={}),200!==e.code?r.show(e.message||"网络出了点问题~"):window.location.reload()}).fail(function(){r.show("网络出了点问题~")}).always(function(){o=!1}),!1):(r.show("地址不能为空"),s(this).find('[name="address"]').focus(),!1):(r.show("省市区不能为空"),!1):(r.show("手机号不能为空"),s(this).find('[name="mobile"]').focus(),!1):(r.show("收件人不能为空"),s(this).find('[name="consignee"]').focus(),!1)}),f.on("touchend",function(){g.hide(),v.hide(),p.show(),y="list"}),p.on("touchend",".address",function(){var e=s(this).children(".caption").text();return b.push(e),s(this).siblings().hide(),s(this).children("ul").show(),!1}).on("touchend",".address-last",function(){return b.push(s(this).children(".caption").text()),s('[name="area"]').val(b.join(" ")),s('[name="area_code"]').val(s(this).data("id")),h.show(),y="edit",p.hide(),p.find("ul").hide(),p.children("ul").show().children("li").show(),b=[],!1})});