Authored by 王水玲

Merge branch 'release/4.8' of git.yoho.cn:fe/yohobuywap-node into release/4.8

... ... @@ -2,11 +2,10 @@
const mRoot = '../models';
const recommendForYouModel = require(`${mRoot}/recommend-for-you`); // 领取优惠券 model
const _ = require('lodash');
exports.userCenter = (req, res, next) => {
var udid = req.sessionID,
uid = _.isEmpty(req.user.uid) ? null : req.user.uid,
uid = req.user.uid || 0,
yhChannel = req.query.yh_channel || '1',
limit = 30;
... ... @@ -32,7 +31,7 @@ exports.userCenter = (req, res, next) => {
exports.cart = (req, res, next) => {
var udid = req.sessionID,
uid = _.isEmpty(req.user.uid) ? null : req.user.uid,
uid = req.user.uid || 0,
yhChannel = req.query.yh_channel || '1',
limit = 30;
... ...
This diff could not be displayed because it is too large.
webpackJsonp([25],{0:function(e,t,n){n(30)},2:function(e,t,n){function a(e,t){var n,a;"undefined"!=typeof e&&(n=e.toString(),a=t&&t>0?t:2e3,i.text(n).show(),s=setTimeout(function(){"block"===i.css("display")&&i.hide()},a))}var i,s,o=n(1);!function(){var e='<div id="yoho-tip" class="yoho-tip"></div>';o(".yoho-page").append(e),i=o("#yoho-tip"),i.on("touchend",function(){i.hide(),clearTimeout(s)})}(),t.show=a},5:function(e,t,n){function a(e){var t,n=c(".has-eye");e&&"open"===e.status?n.append('<div class="eye"></div>'):n.append('<div class="eye close"></div>'),t=n.children(".eye"),t.on("touchstart",function(e){var t=c(this),n=t.siblings(".pwd");e.preventDefault(),t.toggleClass("close"),t.hasClass("close")?n.attr("type","password"):n.attr("type","text"),n.focus()})}function i(){var e,t=c(".has-clear");t.append('<div class="clear-input"></div>'),e=t.children(".clear-input"),e.on("touchstart",function(t){var n=e.siblings(".input");n.val("").trigger("input").focus(),t.preventDefault()}),t.children(".input").bind("input",function(){var e=c(this),t=e.siblings(".clear-input"),n=r(e.val());""===n?t.hide():t.show()})}function s(e){return e.length>=6&&e.length<=20}function o(e){function t(){var t=e.find("option:selected").text().length;switch(t){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(){t()}):e.removeClass("in-android-uc")}var c=n(1),r=c.trim,u=/^([a-zA-Z0-9]+[_|\_|\.|-]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.|-]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/,d={"+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}$/};e.exports={emailRegx:u,phoneRegx:d,bindEyesEvt:a,bindClearEvt:i,pwdValidate:s,selectCssHack:o}},30:function(e,t,n){var a=n(1),i=a("#phone-num"),s=a("#country-select"),o=a("#area-code"),c=a("#btn-next"),r=n(5),u=n(2),d=a.trim,l=u.show;r.selectCssHack(a("#country-select")),r.bindClearEvt(),i.bind("input",function(){""===d(i.val())?c.addClass("disable"):c.removeClass("disable")}),s.change(function(){o.text(s.val())}),c.on("touchstart",function(){var e=d(i.val()),t=s.val();c.hasClass("disable")||(r.phoneRegx[t].test(e)?a.ajax({url:"/passport/back/sendcode",type:"POST",data:{areaCode:t.replace("+",""),phoneNum:e},success:function(e){200===e.code?location.href=e.data:l(e.message)}}):l("手机号格式不正确,请重新输入"))})}});
\ No newline at end of file
webpackJsonp([25],{0:function(e,t,n){n(30)},2:function(e,t,n){function a(e,t){var n,a;"undefined"!=typeof e&&(n=e.toString(),a=t&&t>0?t:2e3,i.text(n).show(),s=setTimeout(function(){"block"===i.css("display")&&i.hide()},a))}var i,s,o=n(1);!function(){var e='<div id="yoho-tip" class="yoho-tip"></div>';o(".yoho-page").append(e),i=o("#yoho-tip"),i.on("touchend",function(){i.hide(),clearTimeout(s)})}(),t.show=a},5:function(e,t,n){function a(e){var t,n=c(".has-eye");e&&"open"===e.status?n.append('<div class="eye"></div>'):n.append('<div class="eye close"></div>'),t=n.children(".eye"),t.on("touchstart",function(e){var t=c(this),n=t.siblings(".pwd");e.preventDefault(),t.toggleClass("close"),t.hasClass("close")?n.attr("type","password"):n.attr("type","text"),n.focus()})}function i(){var e,t=c(".has-clear");t.append('<div class="clear-input"></div>'),e=t.children(".clear-input"),e.on("touchstart",function(t){var n=e.siblings(".input");n.val("").trigger("input").focus(),t.preventDefault()}),t.children(".input").bind("input",function(){var e=c(this),t=e.siblings(".clear-input"),n=r(e.val());""===n?t.hide():t.show()})}function s(e){return e.length>=6&&e.length<=20}function o(e){function t(){var t=e.find("option:selected").text().length;switch(t){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(){t()}):e.removeClass("in-android-uc")}var c=n(1),r=c.trim,u=/^([a-zA-Z0-9]+[_|\_|\.|-]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.|-]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/,d={"+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}$/};e.exports={emailRegx:u,phoneRegx:d,bindEyesEvt:a,bindClearEvt:i,pwdValidate:s,selectCssHack:o}},30:function(e,t,n){var a=n(1),i=a("#phone-num"),s=a("#country-select"),o=a("#area-code"),c=a("#btn-next"),r=n(5),u=n(2),d=a.trim,l=u.show;r.selectCssHack(a("#country-select")),r.bindClearEvt(),i.bind("input",function(){""===d(i.val())?c.addClass("disable"):c.removeClass("disable")}),s.change(function(){o.text(s.val())}),c.on("touchstart",function(){var e=d(i.val()),t=d(s.val());c.hasClass("disable")||(t&&e&&r.phoneRegx[t].test(e)?a.ajax({url:"/passport/back/sendcode",type:"POST",data:{areaCode:t.replace("+",""),phoneNum:e},success:function(e){200===e.code?location.href=e.data:l(e.message)}}):l(t?"手机号格式不正确,请重新输入":"出错了,请重新刷新页面"))})}});
\ No newline at end of file
... ...
webpackJsonp([7],{0:function(e,t,i){function n(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),i=window.location.search.substr(1).match(t);return null!==i?i[2]:null}function a(e){var t;return t=e.hasClass("coat")?"coat":e.hasClass("trouser")?"trouser":e.hasClass("shoes")?"shoes":"other"}function o(e){var t,i,n,o,s,r={},d={};if(!c){if("object"===l.type(e)&&(e=[e]),e){for(t in q)q.hasOwnProperty(t)&&(q[t].reload=!0);for(s=0;s<e.length;s++){switch(e[s].type){case"gender":d={gender:e[s].id};break;case"brand":d={brand:e[s].id};break;case"sort":d={sort:e[s].id};break;case"color":d={color:e[s].id};break;case"size":d={size:e[s].id};break;case"price":d={price:e[s].id};break;case"discount":d={discount:e[s].id};break;case"p_d":d={p_d:e[s].id};break;case"ageLevel":d={age_level:e[s].id};break;case"breakSort":d={breakSort:e[s].id};break;case"breakSize":d={breakSize:e[s].id}}l.extend(S,d)}}if(n=a(E),i=q[n],o=i.page+1,i.reload)o=1;else if(i.end)return;l.extend(r,S,{type:"stock",order:0,page:o}),c=!0,m.showLoadingMask(),l.ajax({type:"GET",url:"/product/sale/search",data:r,success:function(e){var t,a;switch(n){case"coat":t=b;break;case"trouser":t=y;break;case"shoes":t=C;break;default:t=k}t.hasClass("hide")&&(t.siblings().addClass("hide"),t.removeClass("hide")),""===e?(i.end=!0,i.reload&&t.html(F)):i.reload?(t.html(e),f(t.find(".lazy"))):(a=t.find(".good-info").length,t.append(e),f(t.find(".good-info:gt("+(a-1)+") .lazy"))),l(".good-detail-text .name").each(function(){var e=l(this),t=e.find("a");t[0].mlellipsis(2)}),i.reload=!1,i.page=o,c=!1,m.hideLoadingMask(),window.rePosFooter()},error:function(){p.show("网络断开连接了~"),c=!1,m.hideLoadingMask()}})}}function s(){l.ajax({type:"GET",url:"/product/sale/filter",data:l.extend(S,{saleType:"1"}),success:function(e){d&&d.remove(),v.append(e),d=l(".filter-mask"),g.initFilter({fCbFn:o,hCbFn:function(){E.addClass("active"),E.siblings(".filter").removeClass("active"),l("#size-swiper-"+E.index()).show()},missStatus:!0})}})}function r(){l(window).scrollTop()+x>l(document).height()-.25*v.height()-50&&"undefined"!=typeof E&&o()}var d,c,l=i(1),h=i(11),u=i(8),f=i(7),p=i(2),g=i(10),m=i(6),v=l("#goods-container"),w=v.children(),b=l(w.get(0)),y=l(w.get(1)),C=l(w.get(2)),k=l(w.get(3)),x=l(window).height(),F='<p class="no-result">未找到相关搜索结果</p>',S=i(9),z={},T=l("#list-nav"),_=l(".swiper-size"),q={coat:{reload:!0,page:0,end:!1},trouser:{reload:!0,page:0,end:!1},shoes:{reload:!0,page:0,end:!1},other:{reload:!0,page:0,end:!1}},E=T.find(".active"),A=[],D=["coat","trouser","shoes","other"];i(26),i(3),u.init(),f(l("img.lazy")),S=l.extend({yh_channel:n("channel")||"boys",saleType:1},S),z=l.extend({},S),l(".banner-swiper .swiper-slide").length>1&&new h(".swiper-container",{observer:!0,observeParents:!0,lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!0,paginationClickable:!0,pagination:".banner-top .pagination-inner"}),l.each(_,function(e){A[e]=new h("#size-swiper-"+e,{slidesPerView:"auto"})}),l.each(T.find("li"),function(e,t){l(t).addClass(D[e])}),l.each(_,function(e,t){l(t).addClass(D[e])}),s(),f(l(".lazy")),T.bind("contextmenu",function(){return!1}),T.on("touchend touchcancel",function(e){var t,i,n,r,d,c=l(e.target).closest("li");if(e.preventDefault(),c.hasClass("filter"))c.hasClass("active")?(g.hideFilter(),E.addClass("active"),c.removeClass("active"),_.eq(E.index()).show()):(E=c.siblings(".active"),_.hide(),E.removeClass("active"),c.addClass("active"),g.showFilter());else{if(r=a(c),t=q[r],!c.hasClass("active")){if(d=c.siblings(".active"),c.attr("class")!==E.attr("class")&&(g.resetFilter(),l(".classify .shower").removeClass("default"),S.breakSort=c.data("id"),S.breakSize=c.data("allsub"),s(),S=l.extend({},z)),E=c,d.hasClass("filter"))g.hideFilter();else switch(v.children(".container:not(.hide)").addClass("hide"),r){case"coat":b.removeClass("hide");break;case"trouser":y.removeClass("hide");break;case"shoes":C.removeClass("hide");break;case"other":k.removeClass("hide")}d.removeClass("active"),c.addClass("active"),i=c.data("id"),n=c.data("allsub"),_.hide(),l("#size-swiper-"+c.index()).show(),A[c.index()].onResize()}t.reload&&o([{type:"breakSort",id:i},{type:"breakSize",id:n}])}e.stopPropagation()}),_.on("click",function(e){var t,i,n,s,r,d=l(e.target).closest("li"),c=d.parents(".size-area").index(),h=T.find("li").eq(c);e.preventDefault(),"undefined"!=typeof d&&0!==d.length&&(s=a(h),t=q[s],d.hasClass("active")||(t.reload=!0,r=d.siblings(".active"),E=h,r.removeClass("active"),d.addClass("active"),i=h.data("id"),n=d.data("id"),t.reload&&o([{type:"breakSort",id:i},{type:"breakSize",id:n}]),e.stopPropagation()))}),l(window).scroll(function(){window.requestAnimationFrame(r)}),l(function(){var e,t,i=window.queryString.type;e=i&&"1"!==i?"3"===i?".trouser":".shoes":".coat",t=T.find(e),t.addClass("active").siblings().removeClass("active"),_.hide(),_.filter(e).show(),o([{type:"breakSort",id:t.data("id")},{type:"breakSize",id:t.data("allsub")}])}),T.on("touchstart","li",function(){l(this).addClass("bytouch")}).on("touchend touchcancel",function(){T.find("li").removeClass("bytouch")})},2:function(e,t,i){function n(e,t){var i,n;"undefined"!=typeof e&&(i=e.toString(),n=t&&t>0?t:2e3,a.text(i).show(),o=setTimeout(function(){"block"===a.css("display")&&a.hide()},n))}var a,o,s=i(1);!function(){var e='<div id="yoho-tip" class="yoho-tip"></div>';s(".yoho-page").append(e),a=s("#yoho-tip"),a.on("touchend",function(){a.hide(),clearTimeout(o)})}(),t.show=n},3:function(e,t,i){function n(e){var t,i,n=document.cookie;return document.cookie&&""!==document.cookie&&(i=n.indexOf(e+"="),i>-1&&(i+=e.length+1,t=decodeURIComponent(f.trim(n.substring(i,n.indexOf(";",i)))))),t}function a(e,t,i){var n,a,o,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:"",a=i.domain?"; domain="+i.domain:"",o=i.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(t),r,n,a,o].join(""))}function o(){var e=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||e||(document.cookie="testcookie",e=-1!==document.cookie.indexOf("testcookie")),e}function s(){var e,t=n("_UID");return"undefined"==typeof t?0:(e=t.split("::"),"undefined"==typeof e||e.length<4?0:e)}function r(){var e=s();return 0===e?0:e[1]}function d(){var e=n("_g");return"undefined"==typeof e?"":JSON.parse(e).k}function c(){var e;0!==g.length&&(e=Math.min(f(window).height(),window.screen.availHeight),f("body").height()<=e-parseInt(g.css("height"),0)?g.addClass("bottom"):g.removeClass("bottom"))}function l(e){var t=f(e).outerHeight();e&&g.css("margin-bottom",t+"px")}function h(){var e,t,i=[],n=window.location.search.slice(1).split("&");for(t=0;t<n.length;t++)e=n[t].split("="),i.push(e[0]),i[e[0]]=e[1];return i}function u(e){return e.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var f=i(1),p=i(4),g=f("#yoho-footer"),m=f(".yoho-page"),v=f(".yoho-header");!function(){var e,t=g.children(".op-row"),i=f(".back-to-top"),n=s();c(),0===n?t.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):t.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+n[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),i.length>0&&(e=new p(i[0]),e.on("tap",function(e){return f(window).scrollTop(0),e.srcEvent.preventDefault(),!1})),g.removeClass("hide")}(),function(e,t,i,n,a){var o=t.createElement(i),s=t.getElementsByTagName(i)[0];e.YohoAcquisitionObject=a,e[a]=function(){e[a].p=arguments},o.async=1,o.src=n,s.parentNode.insertBefore(o,s)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var e=r();e=0===e?"":e,window._ozuid=e,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",e,"","")}(),v.on("touchstart","a",function(){v.find("a").removeClass("highlight"),f(this).addClass("highlight")}).on("touchend touchcancel","a",function(){f(this).removeClass("highlight")}),m.on("touchstart",".tap-hightlight",function(){f(this).siblings(".tap-hightlight").removeClass("highlight"),f(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){f(this).removeClass("highlight")}),f(".nav-home").on("touchstart",function(){f(".homebuttom").toggleClass("hide")}),function(){var e,t,i=0,n="webkit moz ms o".split(" "),a=window.requestAnimationFrame,o=window.cancelAnimationFrame;for(t=0;t<n.length&&(!a||!o);t++)e=n[t],a=a||window[e+"RequestAnimationFrame"],o=o||window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"];a&&o||(a=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-i)),a=window.setTimeout(function(){e(t+n)},n);return i=t+n,a},o=function(e){window.clearTimeout(e)}),window.requestAnimationFrame=a,window.cancelAnimationFrame=o}(),f.extend({queryString:h}),11===g.find(".user-name").text().length&&g.find(".user-name").html(u(g.find(".user-name").text())),window.cookie=n,window.setCookie=a,window.isCookiesEnabled=o,window.getUser=s,window.getUid=r,window.getShoppingKey=d,window.rePosFooter=c,window.reMarginFooter=l,window.queryString=h()},6:function(e,t,i){function n(e){var t='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';c=!0,e||(e=d),e.append(t),s=e.children(".loading-mask"),r("body").on("touchstart touchmove touchend",".loading-mask",function(){return!1})}function a(){c||(n(),c=!0),s.removeClass("hide")}function o(){s.addClass("hide")}var s,r=i(1),d=r(".yoho-page"),c=!1;t.init=n,t.showLoadingMask=a,t.hideLoadingMask=o,t.show=a,t.hide=o},9:function(e,t,i){var n=i(1),a={};n(".query-param").each(function(){var e=n(this);a[e.data("attr")]=e.val()}),e.exports=a},10:function(e,t,i){function n(){u.addClass("hide")}function a(){u.removeClass("hide")}function o(){var e=g(".filter-body .classify");e.on("touchstart",".shower",function(){e.removeClass("highlight"),g(this).addClass("highlight")}).on("touchend touchcancel",".shower",function(){g(this).removeClass("highlight")})}function s(){var e=g(".filter-body .sub-item");e.on("touchstart",function(){e.removeClass("highlight"),g(this).addClass("highlight")}).on("touchend touchcancel",function(){g(this).removeClass("highlight")})}function r(e){e.hasClass("active")||(e.siblings(".active").removeClass("active"),e.addClass("active"))}function d(e){var t,i,n=e.closest(".sub-classify"),a=n.siblings(".shower");return e.hasClass("chosed")?n:(n.children(".chosed").removeClass("chosed"),e.addClass("chosed"),t=g.trim(e.html()),i=g.trim(a.html()),a.html(i.substring(0,i.indexOf("</span>")+7)+t.substring(0,t.indexOf("<i"))),0===e.index()?a.addClass("default"):a.removeClass("default"),n)}function c(e){var t,i=e.data("id");t=d(e),f&&f({type:t.data("type"),id:i}),p&&p(),n()}function l(e){var t;f=e.fCbFn,p=e.hCbFn,window.missStatus=e.missStatus,o(),s(),u=g(".filter-mask"),u[0]&&(t=new m(u[0]),t.on("tap",function(e){var t,i=g(e.target);e.preventDefault(),i.closest(".filter-body").length>0?(t=i.closest(".sub-item"),t.length>0?(t=i.closest("li"),c(t)):(t=i.closest(".classify-item"),e.srcEvent.stopPropagation(),r(t))):(n(),p&&p())}))}function h(){"undefined"!=typeof u&&(g(".sub-classify").each(function(){d(g(this).children(":first-child"))}),r(g(".classify > :first-child")))}var u,f,p,g=i(1),m=i(4);t.initFilter=l,t.showFilter=a,t.hideFilter=n,t.resetFilter=h},26:function(e,t,i){var n=i(1),a=n("#suspend-cart");n.ajax({type:"GET",url:"/cart/index/count",success:function(e){var t;200===e.code&&(t=e.data.cart_goods_count,t>99&&(t="99+"),0===t&&n(".cart-count").remove(),a.find(".cart-count").html(t).removeClass("hide"))}})}});
\ No newline at end of file
webpackJsonp([7],{0:function(e,t,i){function a(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),i=window.location.search.substr(1).match(t);return null!==i?i[2]:null}function n(e){var t;return t=e.hasClass("coat")?"coat":e.hasClass("trouser")?"trouser":e.hasClass("shoes")?"shoes":"other"}function o(e){var t,i,a,o,s,r={},d={};if(!c){if("object"===l.type(e)&&(e=[e]),e){for(t in q)q.hasOwnProperty(t)&&(q[t].reload=!0);for(s=0;s<e.length;s++){switch(e[s].type){case"gender":d={gender:e[s].id};break;case"brand":d={brand:e[s].id};break;case"sort":d={sort:e[s].id};break;case"color":d={color:e[s].id};break;case"size":d={size:e[s].id};break;case"price":d={price:e[s].id};break;case"discount":d={discount:e[s].id};break;case"p_d":d={p_d:e[s].id};break;case"ageLevel":d={age_level:e[s].id};break;case"breakSort":d={breakSort:e[s].id};break;case"breakSize":d={breakSize:e[s].id}}l.extend(F,d)}}if(a=n(E),i=q[a],o=i.page+1,i.reload)o=1;else if(i.end)return;l.extend(r,F,{type:"stock",order:0,page:o}),c=!0,m.showLoadingMask(),l.ajax({type:"GET",url:"/product/sale/search",data:r,success:function(e){var t,n;switch(a){case"coat":t=b;break;case"trouser":t=y;break;case"shoes":t=C;break;default:t=k}t.hasClass("hide")&&(t.siblings().addClass("hide"),t.removeClass("hide")),""===e?(i.end=!0,i.reload&&t.html(S)):i.reload?(t.html(e),f(t.find(".lazy"))):(n=t.find(".good-info").length,t.append(e),f(t.find(".good-info:gt("+(n-1)+") .lazy"))),l(".good-detail-text .name").each(function(){var e=l(this),t=e.find("a");t[0].mlellipsis(2)}),i.reload=!1,i.page=o,c=!1,m.hideLoadingMask(),window.rePosFooter()},error:function(){p.show("网络断开连接了~"),c=!1,m.hideLoadingMask()}})}}function s(e){l.ajax({type:"GET",url:"/product/sale/filter",data:l.extend(F,{saleType:"1"},e),success:function(e){d&&d.remove(),v.append(e),d=l(".filter-mask"),g.initFilter({fCbFn:o,hCbFn:function(){E.addClass("active"),E.siblings(".filter").removeClass("active"),l("#size-swiper-"+E.index()).show()},missStatus:!0})}})}function r(){l(window).scrollTop()+x>l(document).height()-.25*v.height()-50&&"undefined"!=typeof E&&o()}var d,c,l=i(1),h=i(11),u=i(8),f=i(7),p=i(2),g=i(10),m=i(6),v=l("#goods-container"),w=v.children(),b=l(w.get(0)),y=l(w.get(1)),C=l(w.get(2)),k=l(w.get(3)),x=l(window).height(),S='<p class="no-result">未找到相关搜索结果</p>',F=i(9),z={},T=l("#list-nav"),_=l(".swiper-size"),q={coat:{reload:!0,page:0,end:!1},trouser:{reload:!0,page:0,end:!1},shoes:{reload:!0,page:0,end:!1},other:{reload:!0,page:0,end:!1}},E=T.find(".active"),A=[],D=["coat","trouser","shoes","other"];i(26),i(3),u.init(),f(l("img.lazy")),F=l.extend({yh_channel:a("channel")||"boys",saleType:1},F),z=l.extend({},F),l(".banner-swiper .swiper-slide").length>1&&new h(".swiper-container",{observer:!0,observeParents:!0,lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!0,paginationClickable:!0,pagination:".banner-top .pagination-inner"}),l.each(_,function(e){A[e]=new h("#size-swiper-"+e,{slidesPerView:"auto"})}),l.each(T.find("li"),function(e,t){l(t).addClass(D[e])}),l.each(_,function(e,t){l(t).addClass(D[e])}),f(l(".lazy")),T.bind("contextmenu",function(){return!1}),T.on("touchend touchcancel",function(e){var t,i,a,r,d,c=l(e.target).closest("li");if(e.preventDefault(),c.hasClass("filter"))c.hasClass("active")?(g.hideFilter(),E.addClass("active"),c.removeClass("active"),_.eq(E.index()).show()):(E=c.siblings(".active"),_.hide(),E.removeClass("active"),c.addClass("active"),g.showFilter());else{if(r=n(c),t=q[r],!c.hasClass("active")){if(d=c.siblings(".active"),c.attr("class")!==E.attr("class")&&(g.resetFilter(),l(".classify .shower").removeClass("default"),F.breakSort=c.data("id"),F.breakSize=c.data("allsub"),s(),F=l.extend({},z)),E=c,d.hasClass("filter"))g.hideFilter();else switch(v.children(".container:not(.hide)").addClass("hide"),r){case"coat":b.removeClass("hide");break;case"trouser":y.removeClass("hide");break;case"shoes":C.removeClass("hide");break;case"other":k.removeClass("hide")}d.removeClass("active"),c.addClass("active"),i=c.data("id"),a=c.data("allsub"),_.hide(),l("#size-swiper-"+c.index()).show(),A[c.index()].onResize()}t.reload&&o([{type:"breakSort",id:i},{type:"breakSize",id:a}])}e.stopPropagation()}),_.on("click",function(e){var t,i,a,s,r,d=l(e.target).closest("li"),c=d.parents(".size-area").index(),h=T.find("li").eq(c);e.preventDefault(),"undefined"!=typeof d&&0!==d.length&&(s=n(h),t=q[s],d.hasClass("active")||(t.reload=!0,r=d.siblings(".active"),E=h,r.removeClass("active"),d.addClass("active"),i=h.data("id"),a=d.data("id"),t.reload&&o([{type:"breakSort",id:i},{type:"breakSize",id:a}]),e.stopPropagation()))}),l(window).scroll(function(){window.requestAnimationFrame(r)}),l(function(){var e,t,i=window.queryString.type;e=i&&"1"!==i?"3"===i?".trouser":".shoes":".coat",t=T.find(e),t.addClass("active").siblings().removeClass("active"),_.hide(),_.filter(e).show(),s({breakSort:t.data("id"),breakSize:t.data("allsub")}),o([{type:"breakSort",id:t.data("id")},{type:"breakSize",id:t.data("allsub")}])}),T.on("touchstart","li",function(){l(this).addClass("bytouch")}).on("touchend touchcancel",function(){T.find("li").removeClass("bytouch")})},2:function(e,t,i){function a(e,t){var i,a;"undefined"!=typeof e&&(i=e.toString(),a=t&&t>0?t:2e3,n.text(i).show(),o=setTimeout(function(){"block"===n.css("display")&&n.hide()},a))}var n,o,s=i(1);!function(){var e='<div id="yoho-tip" class="yoho-tip"></div>';s(".yoho-page").append(e),n=s("#yoho-tip"),n.on("touchend",function(){n.hide(),clearTimeout(o)})}(),t.show=a},3:function(e,t,i){function a(e){var t,i,a=document.cookie;return document.cookie&&""!==document.cookie&&(i=a.indexOf(e+"="),i>-1&&(i+=e.length+1,t=decodeURIComponent(f.trim(a.substring(i,a.indexOf(";",i)))))),t}function n(e,t,i){var a,n,o,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()),a=i.path?"; path="+i.path:"",n=i.domain?"; domain="+i.domain:"",o=i.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(t),r,a,n,o].join(""))}function o(){var e=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||e||(document.cookie="testcookie",e=-1!==document.cookie.indexOf("testcookie")),e}function s(){var e,t=a("_UID");return"undefined"==typeof t?0:(e=t.split("::"),"undefined"==typeof e||e.length<4?0:e)}function r(){var e=s();return 0===e?0:e[1]}function d(){var e=a("_g");return"undefined"==typeof e?"":JSON.parse(e).k}function c(){var e;0!==g.length&&(e=Math.min(f(window).height(),window.screen.availHeight),f("body").height()<=e-parseInt(g.css("height"),0)?g.addClass("bottom"):g.removeClass("bottom"))}function l(e){var t=f(e).outerHeight();e&&g.css("margin-bottom",t+"px")}function h(){var e,t,i=[],a=window.location.search.slice(1).split("&");for(t=0;t<a.length;t++)e=a[t].split("="),i.push(e[0]),i[e[0]]=e[1];return i}function u(e){return e.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var f=i(1),p=i(4),g=f("#yoho-footer"),m=f(".yoho-page"),v=f(".yoho-header");!function(){var e,t=g.children(".op-row"),i=f(".back-to-top"),a=s();c(),0===a?t.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):t.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+a[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),i.length>0&&(e=new p(i[0]),e.on("tap",function(e){return f(window).scrollTop(0),e.srcEvent.preventDefault(),!1})),g.removeClass("hide")}(),function(e,t,i,a,n){var o=t.createElement(i),s=t.getElementsByTagName(i)[0];e.YohoAcquisitionObject=n,e[n]=function(){e[n].p=arguments},o.async=1,o.src=a,s.parentNode.insertBefore(o,s)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var e=r();e=0===e?"":e,window._ozuid=e,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",e,"","")}(),v.on("touchstart","a",function(){v.find("a").removeClass("highlight"),f(this).addClass("highlight")}).on("touchend touchcancel","a",function(){f(this).removeClass("highlight")}),m.on("touchstart",".tap-hightlight",function(){f(this).siblings(".tap-hightlight").removeClass("highlight"),f(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){f(this).removeClass("highlight")}),f(".nav-home").on("touchstart",function(){f(".homebuttom").toggleClass("hide")}),function(){var e,t,i=0,a="webkit moz ms o".split(" "),n=window.requestAnimationFrame,o=window.cancelAnimationFrame;for(t=0;t<a.length&&(!n||!o);t++)e=a[t],n=n||window[e+"RequestAnimationFrame"],o=o||window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"];n&&o||(n=function(e){var t=(new Date).getTime(),a=Math.max(0,16-(t-i)),n=window.setTimeout(function(){e(t+a)},a);return i=t+a,n},o=function(e){window.clearTimeout(e)}),window.requestAnimationFrame=n,window.cancelAnimationFrame=o}(),f.extend({queryString:h}),11===g.find(".user-name").text().length&&g.find(".user-name").html(u(g.find(".user-name").text())),window.cookie=a,window.setCookie=n,window.isCookiesEnabled=o,window.getUser=s,window.getUid=r,window.getShoppingKey=d,window.rePosFooter=c,window.reMarginFooter=l,window.queryString=h()},6:function(e,t,i){function a(e){var t='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';c=!0,e||(e=d),e.append(t),s=e.children(".loading-mask"),r("body").on("touchstart touchmove touchend",".loading-mask",function(){return!1})}function n(){c||(a(),c=!0),s.removeClass("hide")}function o(){s.addClass("hide")}var s,r=i(1),d=r(".yoho-page"),c=!1;t.init=a,t.showLoadingMask=n,t.hideLoadingMask=o,t.show=n,t.hide=o},9:function(e,t,i){var a=i(1),n={};a(".query-param").each(function(){var e=a(this);n[e.data("attr")]=e.val()}),e.exports=n},10:function(e,t,i){function a(){u.addClass("hide")}function n(){u.removeClass("hide")}function o(){var e=g(".filter-body .classify");e.on("touchstart",".shower",function(){e.removeClass("highlight"),g(this).addClass("highlight")}).on("touchend touchcancel",".shower",function(){g(this).removeClass("highlight")})}function s(){var e=g(".filter-body .sub-item");e.on("touchstart",function(){e.removeClass("highlight"),g(this).addClass("highlight")}).on("touchend touchcancel",function(){g(this).removeClass("highlight")})}function r(e){e.hasClass("active")||(e.siblings(".active").removeClass("active"),e.addClass("active"))}function d(e){var t,i,a=e.closest(".sub-classify"),n=a.siblings(".shower");return e.hasClass("chosed")?a:(a.children(".chosed").removeClass("chosed"),e.addClass("chosed"),t=g.trim(e.html()),i=g.trim(n.html()),n.html(i.substring(0,i.indexOf("</span>")+7)+t.substring(0,t.indexOf("<i"))),0===e.index()?n.addClass("default"):n.removeClass("default"),a)}function c(e){var t,i=e.data("id");t=d(e),f&&f({type:t.data("type"),id:i}),p&&p(),a()}function l(e){var t;f=e.fCbFn,p=e.hCbFn,window.missStatus=e.missStatus,o(),s(),u=g(".filter-mask"),u[0]&&(t=new m(u[0]),t.on("tap",function(e){var t,i=g(e.target);e.preventDefault(),i.closest(".filter-body").length>0?(t=i.closest(".sub-item"),t.length>0?(t=i.closest("li"),c(t)):(t=i.closest(".classify-item"),e.srcEvent.stopPropagation(),r(t))):(a(),p&&p())}))}function h(){"undefined"!=typeof u&&(g(".sub-classify").each(function(){d(g(this).children(":first-child"))}),r(g(".classify > :first-child")))}var u,f,p,g=i(1),m=i(4);t.initFilter=l,t.showFilter=n,t.hideFilter=a,t.resetFilter=h},26:function(e,t,i){var a=i(1),n=a("#suspend-cart");a.ajax({type:"GET",url:"/cart/index/count",success:function(e){var t;200===e.code&&(t=e.data.cart_goods_count,t>99&&(t="99+"),0===t&&a(".cart-count").remove(),n.find(".cart-count").html(t).removeClass("hide"))}})}});
\ No newline at end of file
... ...
webpackJsonp([1],{0:function(o,e,t){function n(){var o=i(".cart-bar"),e=setInterval(function(){o?(window.reMarginFooter(".cart-bar"),clearInterval(e)):o=i(".cart-bar")},200)}var i=t(1),a=t(11),s=t(4),d=t(7),c=i(".goodsDiscount .discount-folder"),r=i(".goodsDiscount .first-item span"),l=document.getElementById("goodsDiscount"),u=l&&new s(l),h=i(l).find(".first-item"),f=i(".cart-bar"),m=i('input[name="limitCodeUrl"]').val(),p=t(21);t(3),n(),t(49),d(i("img.lazy")),i("#goodsDiscount h1").length<1&&i(".dropdown").remove(),new a(".banner-swiper",{lazyLoading:!0,lazyLoadingInPrevNext:!0,paginationClickable:!0,pagination:".banner-top .pagination-inner",nextButton:".my-swiper-button-next",prevButton:".my-swiper-button-prev",spaceBetween:3}),0===c.children().length&&(c.css("display","none"),r.html("")),u&&c.children().length>0&&u.on("tap",function(){c.is(":hidden")?(h.removeClass("short-text"),r.removeClass("icon-down").addClass("icon-up").html("&#xe608;"),c.slideDown()):(h.addClass("short-text"),r.removeClass("icon-up").addClass("icon-down").html("&#xe609;"),c.slideUp())}),i("#limit-sale").on("touchend",function(o){var e,t,n=i("#loginUrl").val();o.stopPropagation(),n?window.location=n:(p.showDialog({dialogText:"进入有货APP,获取限购码",hasFooter:{rightBtnText:"打开Yoho!Buy有货APP"}},function(){t=document.createElement("iframe"),t.src=m,t.style.display="none",document.body.appendChild(t),window.location.href=m,e=Date.now(),window.setTimeout(function(){document.body.removeChild(t),Date.now()-e<3200&&(window.location.href="http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho")},3e3)},null,!0),i(".dialog-wrapper").off("touchstart").on("touchstart",function(o){o.stopPropagation(),i(o.target).hasClass("dialog-wrapper")&&p.hideDialog()}))}),t(47),t(45),t(46),t(50),i.ajax({type:"GET",url:"/cart/index/count",success:function(o){var e;if(200===o.code){if(e=o.data.cart_goods_count||0,0===e)return!1;e>99&&(e="99+"),f.find(".num-tag").html(e).removeClass("hide")}}}),i(".good-detail-page").length>0&&i("#yoho-footer").css("border-top","1px solid #e0e0e0")},2:function(o,e,t){function n(o,e){var t,n;"undefined"!=typeof o&&(t=o.toString(),n=e&&e>0?e:2e3,i.text(t).show(),a=setTimeout(function(){"block"===i.css("display")&&i.hide()},n))}var i,a,s=t(1);!function(){var o='<div id="yoho-tip" class="yoho-tip"></div>';s(".yoho-page").append(o),i=s("#yoho-tip"),i.on("touchend",function(){i.hide(),clearTimeout(a)})}(),e.show=n},3:function(o,e,t){function n(o){var e,t,n=document.cookie;return document.cookie&&""!==document.cookie&&(t=n.indexOf(o+"="),t>-1&&(t+=o.length+1,e=decodeURIComponent(f.trim(n.substring(t,n.indexOf(";",t)))))),e}function i(o,e,t){var n,i,a,s,d="";"undefined"!=typeof e&&(t=t||{},null===e&&(e="",t.expires=-1),t.expires&&("number"==typeof t.expires||t.expires.toUTCString)&&("number"==typeof t.expires?(s=new Date,s.setTime(s.getTime()+24*t.expires*60*60*1e3)):s=t.expires,d="; expires="+s.toUTCString()),n=t.path?"; path="+t.path:"",i=t.domain?"; domain="+t.domain:"",a=t.secure?"; secure":"",document.cookie=[o,"=",encodeURIComponent(e),d,n,i,a].join(""))}function a(){var o=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||o||(document.cookie="testcookie",o=-1!==document.cookie.indexOf("testcookie")),o}function s(){var o,e=n("_UID");return"undefined"==typeof e?0:(o=e.split("::"),"undefined"==typeof o||o.length<4?0:o)}function d(){var o=s();return 0===o?0:o[1]}function c(){var o=n("_g");return"undefined"==typeof o?"":JSON.parse(o).k}function r(){var o;0!==p.length&&(o=Math.min(f(window).height(),window.screen.availHeight),f("body").height()<=o-parseInt(p.css("height"),0)?p.addClass("bottom"):p.removeClass("bottom"))}function l(o){var e=f(o).outerHeight();o&&p.css("margin-bottom",e+"px")}function u(){var o,e,t=[],n=window.location.search.slice(1).split("&");for(e=0;e<n.length;e++)o=n[e].split("="),t.push(o[0]),t[o[0]]=o[1];return t}function h(o){return o.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var f=t(1),m=t(4),p=f("#yoho-footer"),g=f(".yoho-page"),v=f(".yoho-header");!function(){var o,e=p.children(".op-row"),t=f(".back-to-top"),n=s();r(),0===n?e.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):e.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+n[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),t.length>0&&(o=new m(t[0]),o.on("tap",function(o){return f(window).scrollTop(0),o.srcEvent.preventDefault(),!1})),p.removeClass("hide")}(),function(o,e,t,n,i){var a=e.createElement(t),s=e.getElementsByTagName(t)[0];o.YohoAcquisitionObject=i,o[i]=function(){o[i].p=arguments},a.async=1,a.src=n,s.parentNode.insertBefore(a,s)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var o=d();o=0===o?"":o,window._ozuid=o,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",o,"","")}(),v.on("touchstart","a",function(){v.find("a").removeClass("highlight"),f(this).addClass("highlight")}).on("touchend touchcancel","a",function(){f(this).removeClass("highlight")}),g.on("touchstart",".tap-hightlight",function(){f(this).siblings(".tap-hightlight").removeClass("highlight"),f(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){f(this).removeClass("highlight")}),f(".nav-home").on("touchstart",function(){f(".homebuttom").toggleClass("hide")}),function(){var o,e,t=0,n="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(e=0;e<n.length&&(!i||!a);e++)o=n[e],i=i||window[o+"RequestAnimationFrame"],a=a||window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"];i&&a||(i=function(o){var e=(new Date).getTime(),n=Math.max(0,16-(e-t)),i=window.setTimeout(function(){o(e+n)},n);return t=e+n,i},a=function(o){window.clearTimeout(o)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),f.extend({queryString:u}),11===p.find(".user-name").text().length&&p.find(".user-name").html(h(p.find(".user-name").text())),window.cookie=n,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=s,window.getUid=d,window.getShoppingKey=c,window.rePosFooter=r,window.reMarginFooter=l,window.queryString=u()},6:function(o,e,t){function n(o){var e='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';r=!0,o||(o=c),o.append(e),s=o.children(".loading-mask"),d("body").on("touchstart touchmove touchend",".loading-mask",function(){return!1})}function i(){r||(n(),r=!0),s.removeClass("hide")}function a(){s.addClass("hide")}var s,d=t(1),c=d(".yoho-page"),r=!1;e.init=n,e.showLoadingMask=i,e.hideLoadingMask=a,e.show=i,e.hide=a},21:function(o,e,t){var n=t(1),i=t(19),a=t(4);e.showDialog=function(o,e,t,s){function d(){var o,e=null;return null===e&&(e='<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 tap-hightlight">{{.}}</span>{{/ leftBtnText}}{{# rightBtnText}}<span class="dialog-right-btn tap-hightlight">{{.}}</span>{{/ rightBtnText}}</div>{{/ hasFooter}}</div></div>',o=i.compile(e)),o}var c,r,l,u,h;c=d()(o),n(".dialog-wrapper").remove(),n("body").append(n(c)),r=n(".dialog-box"),u=n(".dialog-wrapper"),h=new a(document.getElementById("dialog-wrapper")),o.fast?u.css({display:"block"}):u.fadeIn(),s&&(n(".dialog-wrapper .dialog-footer > span").css("width","100%"),n(".dialog-wrapper .dialog-content").css({"padding-left":"1.85rem","padding-right":"1.85rem"}),u.css("z-index","10")),r.css({top:"50%",marginTop:-(r.height()/2)}),o.autoHide&&(l=1e3,o.autoHide>1&&(l=o.autoHide),setTimeout(function(){u.fadeOut()},l)),u.on("touchmove",function(){return!1}),h.on("tap",function(o){if(n(o.target).hasClass("dialog-left-btn"))"function"==typeof t&&t(),u.fadeOut();else if(n(o.target).hasClass("dialog-right-btn"))return e();o.preventDefault(),o.srcEvent.stopPropagation()})},e.hideDialog=function(){n(".dialog-wrapper").remove()}},24:function(o,e,t){function n(){var o=U(".chose-panel").find(".num .btn>.iconfont");o.hasClass("disabled")?null:o.addClass("disabled"),G.off("touchstart",".btn-minus"),G.off("touchstart",".btn-plus")}function i(){x=!1,T=!1,q=null,_=U.queryString(),v=U(".chose-panel").find(".thumb"),M=U(".chose-panel .main .chose-items"),S=U(".chose-items"),I=U(".size-list ul"),E=U(".color-list ul"),w=U("#left-num"),B=U(".cart-bar"),C=0,k=0,F=0}function a(o,e){U("#chose-btn-sure").html("确认"),F=1,z=o,L=e}function s(o,e){n(),U("#chose-btn-sure").html("立即购买"),j=o,A=e}function d(){var o=U(".chose-panel"),e=U("#promotionId");o&&o.remove(),e&&e.remove()}function c(){return x||T?x?T?!0:(O.show("请选择尺码~"),!1):(O.show("请选择颜色~"),!1):(O.show("请选择颜色和尺码~"),!1)}function r(o,e){o&&(R.html(o),""!==U("#promotionId").val()&&n(),i()),U(".chose-panel").show(),p=U("#good-num"),P=e,N.disableScroll(M)}function l(){U(".chose-panel").hide(),N.enableScroll(M),B.length>0&&B.show()}function u(){g=S.find(".chosed"),2===g.closest(".zero-stock").length?U("#chose-btn-sure").css("background-color","#c0c0c0").html("已售罄"):j?U("#chose-btn-sure").css("background-color","#eb0313").html("立即购买"):U("#chose-btn-sure").css("background-color","#eb0313").html(F?"确认":"加入购物车")}function h(o){o>0?(V.length>0?S.find(".num .left-num").html("即将售罄"):S.find(".num .left-num").html("剩余"+o+"件"),w.val(o)):(S.find(".num .left-num").html(""),w.val(0))}function f(o){var e,t;if(C&&q&&q.length>0){for(q.removeClass("chosed"),e=I.eq(o).children(),t=0;t<e.length;t++)if(U(e[t]).data("id")===q.data("id"))return q=U(e[t]),_="#"+q.data("id"),C=U(_).data("index"),q.addClass("chosed"),q.data("num");return q=null,T=!1,E.eq(C).addClass("hide"),E.eq(0).removeClass("hide"),C=0,-1}return 0}function m(o){return k&&D&&D.length>0?(D.removeClass("chosed"),D=U(E.eq(o).children().get(k-1)),D.addClass("chosed"),D.data("num")):0}var p,g,v,w,b,y,C,k,x,T,q,I,D,E,P,S,_,M,B,F,L,z,j,A,U=t(1),O=t(2),H=t(6),N=t(41),R=U("#chose-panel"),V=U(".soonSoldOut-tag"),G=U(".yoho-page");i(),G.on("touchstart",".chose-panel",function(o){var e=U(o.target);if(!(e.closest(".main").length>0))return l(),!1}),G.on("touchstart",".color-list .block",function(){var o,e=U(this),t=e.index();e.hasClass("chosed")?(S.find(".num .left-num").html(""),w.val(0),x=!1,I.eq(k).addClass("hide"),I.eq(0).removeClass("hide"),k=0,f(0)):(x=!0,I.eq(k).addClass("hide"),o=f(t+1),h(o),I.eq(t+1).removeClass("hide"),k=t+1,D=e,v.addClass("hide").eq(t).removeClass("hide")),e.siblings(".chosed").removeClass("chosed"),-1===o?(D=U(E.eq(0).children().get(t)),D.addClass("chosed")):e.toggleClass("chosed"),U("#good-num").val(1),u()}).on("touchstart",".size-list .block",function(){var o,e,t=U(this);t.hasClass("chosed")?(S.find(".num .left-num").html(""),w.val(0),T=!1,E.eq(C).addClass("hide"),E.eq(0).removeClass("hide"),C=0,m(0)):(T=!0,o=U("#"+t.data("id")).data("index")-1,E.eq(C).addClass("hide"),e=m(o+1),h(e),E.eq(o+1).removeClass("hide"),C=o+1,q=t),t.siblings(".chosed").removeClass("chosed"),t.toggleClass("chosed"),U("#good-num").val(1),u()}),G.on("touchstart",".btn-minus",function(){var o=parseInt(p.val(),10);return b=U("#left-num").val(),c()?1===o||b-0===0?void O.show("您选择的数量不能为零~"):0>o?void O.show("您选择的数量不能为负数~"):void p.val(o-1):void 0}).on("touchstart",".btn-plus",function(){var o=parseInt(p.val(),10);return b=U("#left-num").val(),c()&&o-0!==b&&0!==b?o>b-1?void O.show("您选择的数量超过了最大库存量~"):void p.val(o+1):void 0}).on("touchstart","#chose-btn-sure",function(){var o,e,t,n,i=U("#good-num").val()-0,a=parseInt(p.val(),10);if(c()&&"已售罄"!==U("#chose-btn-sure").html()){if(b=U("#left-num").val()-0,a>b)return void O.show("您选择的数量超过了最大库存量~");if(0>a)return void O.show("您选择的数量小于一件~");if(g=U(".block-list>ul>li.chosed"),2===g.length&&0===g.closest(".zero-stock").length){if(o=q.data("skuid"),e=U("#promotionId").val(),y)return!1;if(y=!0,H.showLoadingMask(),F)t={new_product_sku:o,old_product_sku:z,buy_number:i,selected:L},n="/cart/index/modify";else{if(j)return U(this).css("background-color","#ccc").removeAttr("id"),n=U("#limitProductPay").val()+"?limitproductcode="+j+"&sku="+o+"&skn="+A+"&buy_number="+i,d(),H.showLoadingMask(),U.ajax({url:n}).then(function(o){o.error?(O.show(o.message),setTimeout(function(){location.reload()},2e3)):location.href=n}).fail(function(){O.show("网络异常!"),setTimeout(function(){location.reload()},2e3)}),!1;t={productSku:o,buyNumber:i,promotionId:e,isEdit:F,cartType:_.cartType},n="/cart/index/add"}U.ajax({method:"POST",url:n,data:t}).done(function(o){var e;H.hideLoadingMask(),200!==o.code||F||(e=o.data.goods_count,e>99&&(e="99+"),U(".num-tag").html(e).removeClass("hide"),y=!1,P&&P()),o.message&&!F&&O.show(o.message),l(),F&&(H.showLoadingMask(),setTimeout(function(){window.location.href="/cart/index/index?cartType="+U("#cartType").val()},1))}).fail(function(){O.show("网络出了点问题~")}).always(function(){y=!1})}}}),e.init=i,e.show=r,e.remove=d,e.setEditModeWithSknId=a,e.disableNumEdit=n,e.setLimitGoodModeWithSknId=s},41:function(o,e,t){function n(o){o=o||window.event,o.preventDefault&&o.preventDefault(),o.returnValue=!1}function i(o){o=o||window.event,o.stopPropagation&&o.stopPropagation(),o.cancelBubble=!1}function a(o){var e=o.wheelDelta||o.originalEvent.wheelDelta||o.detail||0,t=c(this).get(0);return i(o),c(t).height()+t.scrollTop>=t.scrollHeight&&0>e?(n(o),!1):0===t.scrollTop&&e>0?(n(o),!1):void 0}function s(o){var e,t;o.on("mousewheel",a),o.on("touchstart",function(o){e=o.originalEvent.changedTouches[0].pageX,t=o.originalEvent.changedTouches[0].pageY}),o.on("touchmove",function(o){var n=o.originalEvent.changedTouches[0].pageX-e,i=o.originalEvent.changedTouches[0].pageY-t,a=c(this).get(0);return o.stopPropagation(),Math.abs(i)<Math.abs(n)?(o.preventDefault(),!1):c(a).height()+a.scrollTop>=a.scrollHeight&&0>i?(o.preventDefault(),!1):0===a.scrollTop&&i>0?(o.preventDefault(),!1):void 0}),c(document).on("mousewheel",n),c(document).on("touchmove",n)}function d(o){o.off("touchstart"),o.off("touchmove"),o.off("mousewheel"),c(document).off("mousewheel",n),c(document).off("touchmove",n)}var c=t(1);e.enableScroll=d,e.disableScroll=s},45:function(o,e,t){var n,i,a=t(1),s=t(2),d=t(4),c=document.getElementById("nav-tab"),r=c&&new d(c),l=document.getElementById("goto-consult"),u=l&&new d(l),h=document.getElementById("readmore"),f=h&&new d(h);!function(){i=a("#nav-tab .consults-num").html()-0,n=a("#nav-tab .comments-num").html()-0,a("#nav-tab li").each(function(){a(this).removeClass("focus")}),a("#feedback-content .content").each(function(){a(this).addClass("hide")}),0!==n?(a("#nav-tab .comment-nav").addClass("focus"),a("#feedback-content .comment-content").removeClass("hide")):0!==i&&(a("#nav-tab .consult-nav").addClass("focus"),a("#feedback-content .consult-content").removeClass("hide"))}(),r&&r.on("tap",function(o){var e=a(o.target).closest("li"),t=e.index();e.hasClass("comment-nav")&&0===n?s.show("暂无商品评价"):e.hasClass("focus")||(a("#nav-tab li").each(function(){a(this).removeClass("focus")}),a("#feedback-content .content").each(function(){a(this).addClass("hide")}),e.addClass("focus"),a("#feedback-content .content:eq("+t+")").removeClass("hide"))}),u&&u.on("tap",function(){location.href=a(l).find("a").attr("href")}),a(".goods-consults-page").length>0&&a("#yoho-header").css("position","fixed").css("top","0"),a(".goods-consults-page").length>0&&a("#yoho-footer").css("border-top","1px solid #e0e0e0"),f&&f.on("tap",function(){return a(".readmore").hide(),a(".goods-consults.customer-consults").removeClass("customer-consults"),!1}),t(48)},46:function(o,e,t){var n,i=t(1),a=t(2),s=t(6),d=i(".consult-form"),c=i("#submit"),r=i("#content"),l=i("#product_id").val();c.on("touchend",function(){return r.blur(),d.submit(),!1}).on("touchstart",function(){i(this).addClass("highlight")}).on("touchend touchcancel",function(){i(this).removeClass("highlight")}),r.on("focus",function(){"请输入咨询内容"===r.val()&&r.val("")}).on("blur",function(){""===r.val()&&r.val("请输入咨询内容")}),d.on("submit",function(){var o;return n?!1:(o=r.val(),o&&"请输入咨询内容"!==o?(n=!0,s.showLoadingMask(),i.ajax({method:"POST",url:"/product/detail/consultsubmit",data:{product_id:l,content:o}}).then(function(o){"object"!==i.type(o)&&(o={}),200!==o.code?(a.show(o.message||"网络出了点问题~"),n=!1,s.hideLoadingMask()):(a.show("提交成功~"),setTimeout(function(){window.history.go(-1)},3e3))}).fail(function(){a.show("网络出了点问题~"),n=!1}),!1):(a.show("咨询内容不能为空"),!1))})},47:function(o,e,t){function n(o){var e,t;o.length>0&&(e=o[0].getBoundingClientRect().right,t=o.find(".swiper-slide:last-child")[0].getBoundingClientRect().right,0>t-e?o.next(".tips").css("display","none"):o.next(".tips").css("display","block"))}function i(o,e){var t=null;c(o).each(function(n){t=c(o).slice(n,n+e),t.length===e&&n%e===0&&c(t).wrapAll(c('<div class="js-wraper"></div>'))})}function a(){p||g||(p=!0,u.showLoadingMask(),c.ajax({type:"GET",url:f,success:function(o){d=c("#productDesc"),d.append(o),window.rePosFooter(),r(d.find("img.lazy")),new l("#size-swiper-container",{slidesPerView:"auto"}),new l("#reference-swiper-container",{slidesPerView:"auto"}),n(c("#size-swiper-container")),n(c("#reference-swiper-container")),i(".detail .column",2),p=!1,g=!0,u.hideLoadingMask()},error:function(){h.show("网络断开连接了~"),p=!1,u.hideLoadingMask()}}))}function s(){(!g||c(window).scrollTop()+m>=c(document).height()-200)&&a()}var d,c=t(1),r=t(7),l=t(11),u=t(6),h=t(2),f=c("#introUrl").val(),m=c(window).height(),p=!1,g=!1;c(window).scroll(function(){window.requestAnimationFrame(s)})},48:function(o,e,t){function n(o){var e=o.find(".animate-count");e.css("display","inline"),e.animate({opacity:.25,fontSize:"0.7rem",right:"-=5"},300,function(){e.css("display","none")})}var i,a,s=t(1),d=t(4),c=t(2),r=s("#goods-consults")[0],l=r&&new d(r);!function(){var o=window.location.search.substring(1);i=o.split("&")[0].split("=")[1],a=o.split("&")[1]?o.split("&")[1].split("=")[1]:null}(),l&&l.on("tap",function(o){var e,t=s(o.target).closest("li"),d=t.closest(".consult-item").data("id"),r=t.find(".count").html()-0;t.hasClass("highlight")||(t.hasClass("fav")?e="/product/detail/consultupvote":t.hasClass("useful")&&(e="/product/detail/consultuseful"),s.ajax({method:"post",url:e,data:{id:d,productId:i,total:a}}).done(function(o){200===o.code?(n(t),t.addClass("highlight"),t.find(".count").html(r+1)):401===o.code&&(location.href=o.data)}).fail(function(){c.show("网络断开连接了~")}))})},49:function(o,e,t){var n=t(1),i=t(2),a=t(24),s=n("#productId").val(),d=n("#productSkn").val(),c=n("#limitProductCode").val();n("#likeBtn").on("touchstart",function(){var o,e,t=n(this);return t.hasClass("liked")?(o="cancel",e=0):(o="ok",e=1),n.ajax({type:"POST",url:"/product/opt/favoriteProduct",data:{id:s,opt:o},success:function(e){200===e.code?(t.toggleClass("liked"),"cancel"===o?i.show("取消收藏成功"):"ok"===o&&i.show("收藏成功")):400===e.code?location.href=e.data:i.show(e.message)},error:function(){i.show("网络断开连接了~")}}),window._yas&&window._yas.sendCustomInfo({pd:s,fa:e},!0),!1}),n("#addtoCart").on("touchstart",function(){return n(".cart-bar").hide(),c&&a.setLimitGoodModeWithSknId(c,d),a.show(),window._yas&&window._yas.sendCustomInfo({pd:s,by:1},!0),!1})},50:function(o,e,t){function n(){u||l||(u=!0,c&&s.get(c).then(function(o){o.length<5?d.css("display","none"):(d.html(o).show(),s("#swiper-recommend").length&&new a("#swiper-recommend",{slidesPerView:"auto",grabCursor:!0,slideElement:"a",lazyLoading:!0,watchSlidesVisibility:!0})),u=!1,l=!0,window.rePosFooter()}).fail(function(){d.hide()}))}function i(){(!l||s(window).scrollTop()+r>=s(document).height()-200)&&n()}var a=t(11),s=t(1),d=s(".recommend-for-you"),c=s("#preferenceUrl").val(),r=s(window).height(),l=!1,u=!1;s(window).scroll(function(){window.requestAnimationFrame(i)})}});
\ No newline at end of file
webpackJsonp([1],{0:function(o,e,t){function n(){var o=i(".cart-bar"),e=setInterval(function(){o?(window.reMarginFooter(".cart-bar"),clearInterval(e)):o=i(".cart-bar")},200)}var i=t(1),a=t(11),s=t(4),d=t(7),r=i(".goods-discount .discount-folder"),c=i(".goods-discount .first-item span"),l=document.getElementById("goodsDiscount"),u=l&&new s(l),h=i(l).find(".first-item"),f=i(".cart-bar"),m=i('input[name="limitCodeUrl"]').val(),p=t(21);t(3),n(),d(i("img.lazy")),i("#goodsDiscount h1").length<1&&i(".dropdown").remove(),new a(".banner-swiper",{lazyLoading:!0,lazyLoadingInPrevNext:!0,paginationClickable:!0,pagination:".banner-top .pagination-inner",nextButton:".my-swiper-button-next",prevButton:".my-swiper-button-prev",spaceBetween:3}),0===r.children().length&&(r.css("display","none"),c.html("")),u&&r.children().length>0&&u.on("tap",function(){r.is(":hidden")?(h.removeClass("short-text"),c.removeClass("icon-down").addClass("icon-up").html("&#xe608;"),r.slideDown()):(h.addClass("short-text"),c.removeClass("icon-up").addClass("icon-down").html("&#xe609;"),r.slideUp())}),i("#limit-sale").on("touchend",function(o){var e,t,n=i("#loginUrl").val();o.stopPropagation(),n?window.location=n:(p.showDialog({dialogText:"进入有货APP,获取限购码",hasFooter:{rightBtnText:"打开Yoho!Buy有货APP"}},function(){t=document.createElement("iframe"),t.src=m,t.style.display="none",document.body.appendChild(t),window.location.href=m,e=Date.now(),window.setTimeout(function(){document.body.removeChild(t),Date.now()-e<3200&&(window.location.href="http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho")},3e3)},null,!0),i(".dialog-wrapper").off("touchstart").on("touchstart",function(o){o.stopPropagation(),i(o.target).hasClass("dialog-wrapper")&&p.hideDialog()}))}),t(49),t(47),t(45),t(46),t(50),i.ajax({type:"GET",url:"/cart/index/count",success:function(o){var e;if(200===o.code){if(e=o.data.cart_goods_count||0,0===e)return!1;e>99&&(e="99+"),f.find(".num-tag").html(e).removeClass("hide")}}}),i(".good-detail-page").length>0&&i("#yoho-footer").css("border-top","1px solid #e0e0e0")},2:function(o,e,t){function n(o,e){var t,n;"undefined"!=typeof o&&(t=o.toString(),n=e&&e>0?e:2e3,i.text(t).show(),a=setTimeout(function(){"block"===i.css("display")&&i.hide()},n))}var i,a,s=t(1);!function(){var o='<div id="yoho-tip" class="yoho-tip"></div>';s(".yoho-page").append(o),i=s("#yoho-tip"),i.on("touchend",function(){i.hide(),clearTimeout(a)})}(),e.show=n},3:function(o,e,t){function n(o){var e,t,n=document.cookie;return document.cookie&&""!==document.cookie&&(t=n.indexOf(o+"="),t>-1&&(t+=o.length+1,e=decodeURIComponent(f.trim(n.substring(t,n.indexOf(";",t)))))),e}function i(o,e,t){var n,i,a,s,d="";"undefined"!=typeof e&&(t=t||{},null===e&&(e="",t.expires=-1),t.expires&&("number"==typeof t.expires||t.expires.toUTCString)&&("number"==typeof t.expires?(s=new Date,s.setTime(s.getTime()+24*t.expires*60*60*1e3)):s=t.expires,d="; expires="+s.toUTCString()),n=t.path?"; path="+t.path:"",i=t.domain?"; domain="+t.domain:"",a=t.secure?"; secure":"",document.cookie=[o,"=",encodeURIComponent(e),d,n,i,a].join(""))}function a(){var o=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||o||(document.cookie="testcookie",o=-1!==document.cookie.indexOf("testcookie")),o}function s(){var o,e=n("_UID");return"undefined"==typeof e?0:(o=e.split("::"),"undefined"==typeof o||o.length<4?0:o)}function d(){var o=s();return 0===o?0:o[1]}function r(){var o=n("_g");return"undefined"==typeof o?"":JSON.parse(o).k}function c(){var o;0!==p.length&&(o=Math.min(f(window).height(),window.screen.availHeight),f("body").height()<=o-parseInt(p.css("height"),0)?p.addClass("bottom"):p.removeClass("bottom"))}function l(o){var e=f(o).outerHeight();o&&p.css("margin-bottom",e+"px")}function u(){var o,e,t=[],n=window.location.search.slice(1).split("&");for(e=0;e<n.length;e++)o=n[e].split("="),t.push(o[0]),t[o[0]]=o[1];return t}function h(o){return o.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var f=t(1),m=t(4),p=f("#yoho-footer"),g=f(".yoho-page"),v=f(".yoho-header");!function(){var o,e=p.children(".op-row"),t=f(".back-to-top"),n=s();c(),0===n?e.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):e.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+n[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),t.length>0&&(o=new m(t[0]),o.on("tap",function(o){return f(window).scrollTop(0),o.srcEvent.preventDefault(),!1})),p.removeClass("hide")}(),function(o,e,t,n,i){var a=e.createElement(t),s=e.getElementsByTagName(t)[0];o.YohoAcquisitionObject=i,o[i]=function(){o[i].p=arguments},a.async=1,a.src=n,s.parentNode.insertBefore(a,s)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var o=d();o=0===o?"":o,window._ozuid=o,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",o,"","")}(),v.on("touchstart","a",function(){v.find("a").removeClass("highlight"),f(this).addClass("highlight")}).on("touchend touchcancel","a",function(){f(this).removeClass("highlight")}),g.on("touchstart",".tap-hightlight",function(){f(this).siblings(".tap-hightlight").removeClass("highlight"),f(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){f(this).removeClass("highlight")}),f(".nav-home").on("touchstart",function(){f(".homebuttom").toggleClass("hide")}),function(){var o,e,t=0,n="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(e=0;e<n.length&&(!i||!a);e++)o=n[e],i=i||window[o+"RequestAnimationFrame"],a=a||window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"];i&&a||(i=function(o){var e=(new Date).getTime(),n=Math.max(0,16-(e-t)),i=window.setTimeout(function(){o(e+n)},n);return t=e+n,i},a=function(o){window.clearTimeout(o)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),f.extend({queryString:u}),11===p.find(".user-name").text().length&&p.find(".user-name").html(h(p.find(".user-name").text())),window.cookie=n,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=s,window.getUid=d,window.getShoppingKey=r,window.rePosFooter=c,window.reMarginFooter=l,window.queryString=u()},6:function(o,e,t){function n(o){var e='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';c=!0,o||(o=r),o.append(e),s=o.children(".loading-mask"),d("body").on("touchstart touchmove touchend",".loading-mask",function(){return!1})}function i(){c||(n(),c=!0),s.removeClass("hide")}function a(){s.addClass("hide")}var s,d=t(1),r=d(".yoho-page"),c=!1;e.init=n,e.showLoadingMask=i,e.hideLoadingMask=a,e.show=i,e.hide=a},21:function(o,e,t){var n=t(1),i=t(19),a=t(4);e.showDialog=function(o,e,t,s){function d(){var o,e=null;return null===e&&(e='<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 tap-hightlight">{{.}}</span>{{/ leftBtnText}}{{# rightBtnText}}<span class="dialog-right-btn tap-hightlight">{{.}}</span>{{/ rightBtnText}}</div>{{/ hasFooter}}</div></div>',o=i.compile(e)),o}var r,c,l,u,h;r=d()(o),n(".dialog-wrapper").remove(),n("body").append(n(r)),c=n(".dialog-box"),u=n(".dialog-wrapper"),h=new a(document.getElementById("dialog-wrapper")),o.fast?u.css({display:"block"}):u.fadeIn(),s&&(n(".dialog-wrapper .dialog-footer > span").css("width","100%"),n(".dialog-wrapper .dialog-content").css({"padding-left":"1.85rem","padding-right":"1.85rem"}),u.css("z-index","10")),c.css({top:"50%",marginTop:-(c.height()/2)}),o.autoHide&&(l=1e3,o.autoHide>1&&(l=o.autoHide),setTimeout(function(){u.fadeOut()},l)),u.on("touchmove",function(){return!1}),h.on("tap",function(o){if(n(o.target).hasClass("dialog-left-btn"))"function"==typeof t&&t(),u.fadeOut();else if(n(o.target).hasClass("dialog-right-btn"))return e();o.preventDefault(),o.srcEvent.stopPropagation()})},e.hideDialog=function(){n(".dialog-wrapper").remove()}},24:function(o,e,t){function n(){var o=U(".chose-panel").find(".num .btn>.iconfont");o.hasClass("disabled")?null:o.addClass("disabled"),G.off("touchstart",".btn-minus"),G.off("touchstart",".btn-plus")}function i(){x=!1,T=!1,q=null,_=U.queryString(),v=U(".chose-panel").find(".thumb"),M=U(".chose-panel .main .chose-items"),S=U(".chose-items"),I=U(".size-list ul"),P=U(".color-list ul"),w=U("#left-num"),B=U(".cart-bar"),C=0,k=0,F=0}function a(o,e){U("#chose-btn-sure").html("确认"),F=1,z=o,L=e}function s(o,e){n(),U("#chose-btn-sure").html("立即购买"),j=o,A=e}function d(){var o=U(".chose-panel"),e=U("#promotionId");o&&o.remove(),e&&e.remove()}function r(){return x||T?x?T?!0:(O.show("请选择尺码~"),!1):(O.show("请选择颜色~"),!1):(O.show("请选择颜色和尺码~"),!1)}function c(o,e){o&&(R.html(o),""!==U("#promotionId").val()&&n(),i()),U(".chose-panel").show(),p=U("#good-num"),D=e,N.disableScroll(M)}function l(){U(".chose-panel").hide(),N.enableScroll(M),B.length>0&&B.show()}function u(){g=S.find(".chosed"),2===g.closest(".zero-stock").length?U("#chose-btn-sure").css("background-color","#c0c0c0").html("已售罄"):j?U("#chose-btn-sure").css("background-color","#eb0313").html("立即购买"):U("#chose-btn-sure").css("background-color","#eb0313").html(F?"确认":"加入购物车")}function h(o){o>0?(V.length>0?S.find(".num .left-num").html("即将售罄"):S.find(".num .left-num").html("剩余"+o+"件"),w.val(o)):(S.find(".num .left-num").html(""),w.val(0))}function f(o){var e,t;if(C&&q&&q.length>0){for(q.removeClass("chosed"),e=I.eq(o).children(),t=0;t<e.length;t++)if(U(e[t]).data("id")===q.data("id"))return q=U(e[t]),_="#"+q.data("id"),C=U(_).data("index"),q.addClass("chosed"),q.data("num");return q=null,T=!1,P.eq(C).addClass("hide"),P.eq(0).removeClass("hide"),C=0,-1}return 0}function m(o){return k&&E&&E.length>0?(E.removeClass("chosed"),E=U(P.eq(o).children().get(k-1)),E.addClass("chosed"),E.data("num")):0}var p,g,v,w,b,y,C,k,x,T,q,I,E,P,D,S,_,M,B,F,L,z,j,A,U=t(1),O=t(2),H=t(6),N=t(41),R=U("#chose-panel"),V=U(".soonSoldOut-tag"),G=U(".yoho-page");i(),G.on("touchstart",".chose-panel",function(o){var e=U(o.target);if(!(e.closest(".main").length>0))return l(),!1}),G.on("touchstart",".color-list .block",function(){var o,e=U(this),t=e.index();e.hasClass("chosed")?(S.find(".num .left-num").html(""),w.val(0),x=!1,I.eq(k).addClass("hide"),I.eq(0).removeClass("hide"),k=0,f(0)):(x=!0,I.eq(k).addClass("hide"),o=f(t+1),h(o),I.eq(t+1).removeClass("hide"),k=t+1,E=e,v.addClass("hide").eq(t).removeClass("hide")),e.siblings(".chosed").removeClass("chosed"),-1===o?(E=U(P.eq(0).children().get(t)),E.addClass("chosed")):e.toggleClass("chosed"),U("#good-num").val(1),u()}).on("touchstart",".size-list .block",function(){var o,e,t=U(this);t.hasClass("chosed")?(S.find(".num .left-num").html(""),w.val(0),T=!1,P.eq(C).addClass("hide"),P.eq(0).removeClass("hide"),C=0,m(0)):(T=!0,o=U("#"+t.data("id")).data("index")-1,P.eq(C).addClass("hide"),e=m(o+1),h(e),P.eq(o+1).removeClass("hide"),C=o+1,q=t),t.siblings(".chosed").removeClass("chosed"),t.toggleClass("chosed"),U("#good-num").val(1),u()}),G.on("touchstart",".btn-minus",function(){var o=parseInt(p.val(),10);return b=U("#left-num").val(),r()?1===o||b-0===0?void O.show("您选择的数量不能为零~"):0>o?void O.show("您选择的数量不能为负数~"):void p.val(o-1):void 0}).on("touchstart",".btn-plus",function(){var o=parseInt(p.val(),10);return b=U("#left-num").val(),r()&&o-0!==b&&0!==b?o>b-1?void O.show("您选择的数量超过了最大库存量~"):void p.val(o+1):void 0}).on("touchstart","#chose-btn-sure",function(){var o,e,t,n,i=U("#good-num").val()-0,a=parseInt(p.val(),10);if(r()&&"已售罄"!==U("#chose-btn-sure").html()){if(b=U("#left-num").val()-0,a>b)return void O.show("您选择的数量超过了最大库存量~");if(0>a)return void O.show("您选择的数量小于一件~");if(g=U(".block-list>ul>li.chosed"),2===g.length&&0===g.closest(".zero-stock").length){if(o=q.data("skuid"),e=U("#promotionId").val(),y)return!1;if(y=!0,H.showLoadingMask(),F)t={new_product_sku:o,old_product_sku:z,buy_number:i,selected:L},n="/cart/index/modify";else{if(j)return U(this).css("background-color","#ccc").removeAttr("id"),n=U("#limitProductPay").val()+"?limitproductcode="+j+"&sku="+o+"&skn="+A+"&buy_number="+i,d(),H.showLoadingMask(),U.ajax({url:n}).then(function(o){o.error?(O.show(o.message),setTimeout(function(){location.reload()},2e3)):location.href=n}).fail(function(){O.show("网络异常!"),setTimeout(function(){location.reload()},2e3)}),!1;t={productSku:o,buyNumber:i,promotionId:e,isEdit:F,cartType:_.cartType},n="/cart/index/add"}U.ajax({method:"POST",url:n,data:t}).done(function(o){var e;H.hideLoadingMask(),200!==o.code||F||(e=o.data.goods_count,e>99&&(e="99+"),U(".num-tag").html(e).removeClass("hide"),y=!1,D&&D()),o.message&&!F&&O.show(o.message),l(),F&&(H.showLoadingMask(),setTimeout(function(){window.location.href="/cart/index/index?cartType="+U("#cartType").val()},1))}).fail(function(){O.show("网络出了点问题~")}).always(function(){y=!1})}}}),e.init=i,e.show=c,e.remove=d,e.setEditModeWithSknId=a,e.disableNumEdit=n,e.setLimitGoodModeWithSknId=s},41:function(o,e,t){function n(o){o=o||window.event,o.preventDefault&&o.preventDefault(),o.returnValue=!1}function i(o){o=o||window.event,o.stopPropagation&&o.stopPropagation(),o.cancelBubble=!1}function a(o){var e=o.wheelDelta||o.originalEvent.wheelDelta||o.detail||0,t=r(this).get(0);return i(o),r(t).height()+t.scrollTop>=t.scrollHeight&&0>e?(n(o),!1):0===t.scrollTop&&e>0?(n(o),!1):void 0}function s(o){var e,t;o.on("mousewheel",a),o.on("touchstart",function(o){e=o.originalEvent.changedTouches[0].pageX,t=o.originalEvent.changedTouches[0].pageY}),o.on("touchmove",function(o){var n=o.originalEvent.changedTouches[0].pageX-e,i=o.originalEvent.changedTouches[0].pageY-t,a=r(this).get(0);return o.stopPropagation(),Math.abs(i)<Math.abs(n)?(o.preventDefault(),!1):r(a).height()+a.scrollTop>=a.scrollHeight&&0>i?(o.preventDefault(),!1):0===a.scrollTop&&i>0?(o.preventDefault(),!1):void 0}),r(document).on("mousewheel",n),r(document).on("touchmove",n)}function d(o){o.off("touchstart"),o.off("touchmove"),o.off("mousewheel"),r(document).off("mousewheel",n),r(document).off("touchmove",n)}var r=t(1);e.enableScroll=d,e.disableScroll=s},45:function(o,e,t){var n,i,a=t(1),s=t(2),d=t(4),r=document.getElementById("nav-tab"),c=r&&new d(r),l=document.getElementById("goto-consult"),u=l&&new d(l),h=document.getElementById("readmore"),f=h&&new d(h);!function(){i=a("#nav-tab .consults-num").html()-0,n=a("#nav-tab .comments-num").html()-0,a("#nav-tab li").each(function(){a(this).removeClass("focus")}),a("#feedback-content .content").each(function(){a(this).addClass("hide")}),0!==n?(a("#nav-tab .comment-nav").addClass("focus"),a("#feedback-content .comment-content").removeClass("hide")):0!==i&&(a("#nav-tab .consult-nav").addClass("focus"),a("#feedback-content .consult-content").removeClass("hide"))}(),c&&c.on("tap",function(o){var e=a(o.target).closest("li"),t=e.index();e.hasClass("comment-nav")&&0===n?s.show("暂无商品评价"):e.hasClass("focus")||(a("#nav-tab li").each(function(){a(this).removeClass("focus")}),a("#feedback-content .content").each(function(){a(this).addClass("hide")}),e.addClass("focus"),a("#feedback-content .content:eq("+t+")").removeClass("hide"))}),u&&u.on("tap",function(){location.href=a(l).find("a").attr("href")}),a(".goods-consults-page").length>0&&a("#yoho-header").css("position","fixed").css("top","0"),a(".goods-consults-page").length>0&&a("#yoho-footer").css("border-top","1px solid #e0e0e0"),f&&f.on("tap",function(){return a(".readmore").hide(),a(".goods-consults.customer-consults").removeClass("customer-consults"),!1}),t(48)},46:function(o,e,t){var n,i=t(1),a=t(2),s=t(6),d=i(".consult-form"),r=i("#submit"),c=i("#content"),l=i("#product_id").val();r.on("touchend",function(){return c.blur(),d.submit(),!1}).on("touchstart",function(){i(this).addClass("highlight")}).on("touchend touchcancel",function(){i(this).removeClass("highlight")}),c.on("focus",function(){"请输入咨询内容"===c.val()&&c.val("")}).on("blur",function(){""===c.val()&&c.val("请输入咨询内容")}),d.on("submit",function(){var o;return n?!1:(o=c.val(),o&&"请输入咨询内容"!==o?(n=!0,s.showLoadingMask(),i.ajax({method:"POST",url:"/product/detail/consultsubmit",data:{product_id:l,content:o}}).then(function(o){"object"!==i.type(o)&&(o={}),200!==o.code?(a.show(o.message||"网络出了点问题~"),n=!1,s.hideLoadingMask()):(a.show("提交成功~"),setTimeout(function(){window.history.go(-1)},3e3))}).fail(function(){a.show("网络出了点问题~"),n=!1}),!1):(a.show("咨询内容不能为空"),!1))})},47:function(o,e,t){function n(o){var e,t;o.length>0&&(e=o[0].getBoundingClientRect().right,o.find(".swiper-slide:last-child")[0]&&(t=o.find(".swiper-slide:last-child")[0].getBoundingClientRect().right),0>t-e?o.next(".tips").css("display","none"):o.next(".tips").css("display","block"))}function i(o,e){var t=null;r(o).each(function(n){t=r(o).slice(n,n+e),t.length===e&&n%e===0&&r(t).wrapAll(r('<div class="js-wraper"></div>'))})}function a(){p||g||(p=!0,u.showLoadingMask(),r.ajax({type:"GET",url:f,success:function(o){d=r("#productDesc"),d.append(o),window.rePosFooter(),c(d.find("img.lazy")),new l("#size-swiper-container",{slidesPerView:"auto"}),new l("#reference-swiper-container",{slidesPerView:"auto"}),n(r("#size-swiper-container")),n(r("#reference-swiper-container")),i(".detail .column",2),p=!1,g=!0,u.hideLoadingMask()},error:function(){h.show("网络断开连接了~"),p=!1,u.hideLoadingMask()}}))}function s(){(!g||r(window).scrollTop()+m>=r(document).height()-200)&&a()}var d,r=t(1),c=t(7),l=t(11),u=t(6),h=t(2),f=r("#introUrl").val(),m=r(window).height(),p=!1,g=!1;r(window).scroll(function(){window.requestAnimationFrame(s)})},48:function(o,e,t){function n(o){var e=o.find(".animate-count");e.css("display","inline"),e.animate({opacity:.25,fontSize:"0.7rem",right:"-=5"},300,function(){e.css("display","none")})}var i,a,s=t(1),d=t(4),r=t(2),c=s("#goods-consults")[0],l=c&&new d(c);!function(){var o=window.location.search.substring(1);i=o.split("&")[0].split("=")[1],a=o.split("&")[1]?o.split("&")[1].split("=")[1]:null}(),l&&l.on("tap",function(o){var e,t=s(o.target).closest("li"),d=t.closest(".consult-item").data("id"),c=t.find(".count").html()-0;t.hasClass("highlight")||(t.hasClass("fav")?e="/product/detail/consultupvote":t.hasClass("useful")&&(e="/product/detail/consultuseful"),s.ajax({method:"post",url:e,data:{id:d,productId:i,total:a}}).done(function(o){200===o.code?(n(t),t.addClass("highlight"),t.find(".count").html(c+1)):401===o.code&&(location.href=o.data)}).fail(function(){r.show("网络断开连接了~")}))})},49:function(o,e,t){var n=t(1),i=t(2),a=t(24),s=n("#productId").val(),d=n("#productSkn").val(),r=n("#limitProductCode").val();n("#likeBtn").on("touchstart",function(){var o,e,t=n(this);return t.hasClass("liked")?(o="cancel",e=0):(o="ok",e=1),n.ajax({type:"POST",url:"/product/opt/favoriteProduct",data:{id:s,opt:o},success:function(e){200===e.code?(t.toggleClass("liked"),"cancel"===o?i.show("取消收藏成功"):"ok"===o&&i.show("收藏成功")):400===e.code?location.href=e.data:i.show(e.message)},error:function(){i.show("网络断开连接了~")}}),window._yas&&window._yas.sendCustomInfo({pd:s,fa:e},!0),!1}),n("#addtoCart").on("touchstart",function(){return n(".cart-bar").hide(),r&&a.setLimitGoodModeWithSknId(r,d),a.show(),window._yas&&window._yas.sendCustomInfo({pd:s,by:1},!0),!1})},50:function(o,e,t){function n(){u||l||(u=!0,r&&s.get(r).then(function(o){s(o).find(".swiper-slide").length<5?d.hide():(d.html(o).show(),s("#swiper-recommend").length&&new a("#swiper-recommend",{slidesPerView:"auto",grabCursor:!0,slideElement:"a",lazyLoading:!0,watchSlidesVisibility:!0})),u=!1,l=!0,window.rePosFooter()}).fail(function(){d.hide()}))}function i(){(!l||s(window).scrollTop()+c>=s(document).height()-200)&&n()}var a=t(11),s=t(1),d=s(".recommend-for-you"),r=s("#preferenceUrl").val(),c=s(window).height(),l=!1,u=!1;s(window).scroll(function(){window.requestAnimationFrame(i)})}});
\ No newline at end of file
... ...