');a.append(n),n.append(r);var c=[100-parseFloat(i.css("right"))-parseFloat(i.css("left")),100-parseFloat(i.css("top"))-parseFloat(i.css("bottom"))];e();var d=v;m[d].animate=function(t){return u?void(t&&t.preventDefault()):(p=d,l&&l!==e&&l(),l=e,void a.css({left:i.css("left"),right:i.css("right"),top:i.css("top"),bottom:i.css("bottom")}))},i.on("click",m[d].animate),v++}}),o(),a.on("base-width-change",function(){o(),setTimeout(function(){o()},200)})}var n=$(this),c=n.find.bind(n),s=n.data("link_mask-params"),d=c("img").eq(0);n.css("overflow","hidden"),d.prop("complete")?e():d.on("load",e);var l=void 0})}(n,t),t.exports&&(d["/cloud/action/link_mask/link_mask.js.js"]=t.exports)}(),i.forEach(function(t){t()})}(),$(".rag[data-name='article_page_header']").each(function(){function t(){e.find(".wrap1>div").removeClass("hide")}var e=$(this),i=e.find(".wrap1>img");i[0].complete?t():i.on("load",function(){t()})}),o("source"),!function(){function t(){var t=document.createElement("div");t.style.visibility="hidden",t.style.width="100px",t.style.msOverflowStyle="scrollbar",document.body.appendChild(t);var e=t.offsetWidth;t.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",t.appendChild(i);var o=i.offsetWidth;return t.parentNode.removeChild(t),e-o}function e(){if("absolute"===c)n.css({position:"absolute",right:-a+"px",top:"0px",left:"auto"});else{var t=$("#wrap").width(),e=window.innerWidth;n.css({position:"fixed",left:(e-t)/2+t-s/2+"px",top:"0px",right:"auto"})}}function i(){var t=r.scrollTop();t>$(".editor-app-ad").height()?"absolute"===c&&(c="fixed",e()):"fixed"===c&&(c="absolute",e())}var o=articleMode,a=140;if(ua.pc&&!isEditor){var n=$('
');if("mi"===o)n.find("img").attr("src","//static.home.mi.com/app/shop/pages/editor-static/img/editor-output-qrcode-shop.jpg");else{if("news"!==o)return;n.find("img").attr("src","//m.xiaomiyoupin.com/img/editor-output-qrcode-wechat.png")}$("#wrap").append(n);var r=$(window);r.on("scroll",i),r.on("resize",e),setTimeout(i,200);var c="absolute";n.find(".editor-qrcode-close").on("tap",function(){r.off("scroll",i),r.off("resize",e),n.remove()});var s=t()}}(),!function(){isEditor||ua.app||ua.weirdhybrid||$.post("/app/stat/visitv2",{data:JSON.stringify([{e:{et:"shop",ref2:{page:"$Activity$",id:location.href,v:8,event:"VIEW",t:Math.floor(Date.now()/1e3),did:YouPinStat.uuid},referer:document.referrer?"id="+document.referrer:""}}])})}(),window.exportInfo={user:"sing",articleId:"5079",time:"2018年3月7日 22:38:26"};var u=void 0,p={},m=void 0;window.allModuleMap=d,u="/cloud/module/turn_timer/turn_timer.action.js",function(){var t={type:"resource"};!function(t,e){function i(t,e){for(var i in e)""!==e[i]&&void 0!==e[i]&&(t[i]=e[i])}function o(){return isDebug?Date.now()-y+b:Date.now()-y+b}function n(t){return t}function r(t){return t.timer.forEach(function(t){}),t}function c(t,e,i){var o={};t.forEach(function(t){o["get"+t]={model:"Couponv2",action:"FetchCheckLite",parameters:{config_id:t,activity_id:e}}}),miFetch(o,function(t){if(t.code)return void console.warn("Invalid fetchchecklite result:",t.code,t);var e=[];for(var o in t){if(!t[o].data)return void console.warn("Invalid fetchchecklite result:",t);e.push(t[o].data)}i&&i(e)},function(t){return!0},"/app/shop/gpipe",!0)}function s(t,e,i){var o={get:{model:"Couponv2",action:"Fetch",parameters:{config_id:t,activity_id:e}}};miFetch(o,function(t){var e=t.get;e.code?4005200===e.code?showDialog("已领取","快去使用吧!",[{text:"我知道了",action:"close"}]):405012===e.code&&showDialog("已抢光","啊哦, 抢光了~下次再来吧!",[{text:"我知道了",action:"close"}]):toast("领取成功")},function(){showDialog("出错了","啊哦,出错了~请重试!",[{text:"我知道了",action:"close"}])},"/app/shop/gpipe")}function d(t,e,i){var o=void 0;o=t.label?w[t.label]:w["限时秒"];var a=$('\n

\n

\n
\n
'+t.name_desc+'
\n
'+t.subtitle+'
\n
\n 秒杀价\n ¥\n '+i.minDiscountPrice+"\n "+(i.from&&'起')+'\n '+i.minRawPrice+"元"+(i.from&&"起"||"")+'\n
\n
\n
\n
\n
\n
剩余'+(100-t.distributed_rate)+'%
\n
\n
\n
\n
\n
");return a}function l(t){var e=void 0;e=t.label?w[t.label]:w["限时秒"];var i=$('\n

\n

\n
\n
\n
剩余'+(100-t.distributed_rate)+"%
\n
\n
");return i}function u(t){$(document.body).append("")}function p(t){return Math.floor((t/1e3/3600+8)/24)}function m(t,e){var i=p(t),o=p(e);return io.timeStart&&(a=n),e>=o.timeStart-i&&(a=n),n>0&&t[n-1].isDone&&(a=n),!0}),a}var v=void 0;isDebug&&(v=Date.now());var b=void 0,y=void 0;a(function(t,e){var a=[{id:t,data:e}];if(e.timer&&e.timer.length){var p=void 0;getLogin().then(function(t){p=t}),a.forEach(function(t,e){function a(t){if(t){var e=function(e){var i=1/0,o=1/0,a=!1;t[e].forEach(function(t){i<1e8&&t.market_price!==i&&(a=!0),t.market_price=79200)&&delete E[e],P[e]={fetched:o,tofetch:a,end_time:r,btn_status:j[d],name_desc:c,subtitle:s,pic_url:l,distributed_rate:u,timeStart:m,timeEnd:h,target:p}}),T.parameters.config_id=Object.keys(E).join(","),k.timer.forEach(function(t){if(!P[t.cid])return void console.warn("can't get coupon info of "+t.cid);t.timeStart=1e3*P[t.cid].timeStart;var e=1e3*P[t.cid].timeStart;k.navStyle||(k.navStyle="Time"),"Time"===k.navStyle?t.timeStartText=new Date(e).format("hh:mm"):"Date"===k.navStyle?t.timeStartText=new Date(e).format("M月d日"):"Date Time"===k.navStyle&&(t.timeStartText=new Date(e).format("M月d日 hh:mm"))}),b=1e3*i.timestamp,$("#coupontest").length&&(b=Date.now()),b-=200,y=Date.now(),t(P)},!1,"/app/shop/gpipe",!0)});D.then(function(){function t(t){var e=(arguments.length<=1||void 0===arguments[1]||arguments[1],t.data("config-id"));t.parents(".rag").find(".turning-timer-item").hide();var i=t.parents(".rag").find('.turning-timer-item[data-config-id="'+e+'"]');i.show(),t.parents(".rag").find(".thumb-item").inactive(),t.active(),t.parents(".thumb-line").after(i),z[q]=e}function e(t,i,o){if(!(o<0)){var a=i-t.scrollLeft(),n=a/o*10;setTimeout(function(){isNaN(parseInt(n,10))||(t.scrollLeft(t.scrollLeft()+n),e(t,i,o-10))},10)}}function a(t,i){var o=i?1:150;setTimeout(function(){if(t=r.timeStart-k.preTime&&setTimeout(function(){function t(){var t=o(),e=1e3*Math.ceil((r.timeStart-t)/1e3);F.find(".fetch-btn").text();e<=0?u():_.find(".fetch-btn").text(new Date(e+576e5).format("hh:mm:ss")).css("background-color","#f89002")}t(),u(),H=setInterval(t,1e3)}),M.empty(),k.thumbPerLine)for(var x=0;x');M.append(T)}var E=[];if(y.forEach(function(t,e){var o=P[t.cid];i(o,t);var a=void 0;a=R[o.btn_status],k.subscribe&&"即将开始"===a&&m(w,1e3*o.next)&&(a=ua.app?f(o.cid)?"已订阅":"订阅提醒":new Date(1e3*o.next).format("MM月dd日"));var n=d(o,a,C[o.cid]);n.on("tap",function(){var t=$(this).data("href");t&&jumpTo(t,{$dom:n,open:!0,append:"-"+o.cid})});var r=n.find(".btn"),c=N[o.btn_status];if(r.css("background-color",c),"立即秒杀"===a?(r.active(),E.push({cid:t.cid,$dom:n.find(".process")})):r.inactive(),r.on("tap",function(t){t.stopImmediatePropagation();var e=r.text();if("立即秒杀"===e)s(o.cid,k.activityId,function(t,e){0==e.data.fetched&&showDialog("已抢光","啊哦, 抢光了~下次再来吧!",[{text:"我知道了",action:"close"}]),I()});else if("已领取"===e)o.target&&(location.href=randomUrl(o.target));else if("订阅提醒"===e){if(!p)return void jumptoLogin();$.ajax({type:"GET",url:location.origin+"/app/shop/stat",data:{method:"subscribe",config_id:o.cid,page:"topic",href:location.href},success:function(){toast("订阅成功"),r.text("已订阅"),h(o.cid)},error:function(){toast("订阅失败")}})}else"00:00:01"===e&&I()}),F.append(n),k.thumbPerLine){n.hide();var u=M.find(".thumb-line").eq(parseInt(e/k.thumbPerLine)),g=l(o);g.data("config-id",o.cid),u.append(g)}}),k.thumbPerLine){var S=z[e];S&&t(M.find('.thumb-item[data-config-id="'+S+'"]'),!1)}if(E.length){var D=function(){c(E.map(function(t){return t.cid}),k.activityId,function(t){var i=t.length;if(q===e){var o=!1;t.forEach(function(t,e){var a=1*E[e].$dom.find(".process-num").text().match(/\d+/)[0];if(!(100-t.distributed_rate>a)){var n=M.find('.thumb-item[data-config-id="'+E[e].cid+'"] .process'),r=n.add(E[e].$dom);r.find(".process-bar .color").css("width",100-t.distributed_rate+"%"),r.find(".process-num").text("剩余"+(100-t.distributed_rate)+"%"),100===t.distributed_rate&&(a>0&&(o=!0),i--)}}),o&&I(),i||b()}})};D(),b(),U=setInterval(D,1e3)}a&&a()}},!1,"/app/shop/gpipe",!0)}function I(){y(q,function(){E()})}function E(){A.forEach(function(t,e){function i(e){t.$nav.find(".nav-state").text(e)}function a(e){t.$nav.find(".nav-state").css("color",e),t.$nav.find(".nav-time").css("color",e)}A[e+1],A[e-1];if(o()"),O=$(""),M=$(""),F=$("");w.css("position","relative"),w.append(D),w.append(O),w.append(M),w.append(F),k.thumbPerLine&&(M.show(),M.on("tap",".thumb-item",function(){var e=$(this);t(e)}));var z=[],L=0,A=[];for(var B in S)A.push(S[B]);A.sort(function(t,e){return t.timeStart>e.timeStart?1:t.timeStartk.navPerline?100/(k.navPerline+.5)+"%":100/L+"%";var R={toFetch:"立即秒杀",toStart:"即将开始",waitInventory:"即将开始",toUse:"已领取",fetched:"已领取",unavailable:"秒杀完成",actEnd:"秒杀完成"},N={toFetch:"#f04222",toStart:"#ffbf46",waitInventory:"#ffbf46",toUse:"#f04222",fetched:"#f04222",unavailable:"#d2d2d2",actEnd:"#d2d2d2"};O.on("tap",".turing-timer-nav",function(){var t=$(this),e=t.data("index");r(e),ua.pc&&a(e)}),setTimeout(function(){E();var t=g(A,o(),x.preTime,P);r(t),a(t,!0)});var q=void 0,U=0,H=0;window.updateItemList=y,A.forEach(function(t,e){var i=$('\n '+t.timeStartText+'
\n \n ');t.$nav=i;var a=o();if(ax.preTime&&setTimeout(function(){I()},r-x.preTime)}O.append(i)})})})}});var w={"限时秒":"https://static.home.mi.com/app/shop/img?id=shop_8a19223a1a7a355aa5dc7fcc976266a9.png&w=137&h=148","1元秒":"https://static.home.mi.com/app/shop/img?id=shop_b504ae222cd3fac9ebb800837c06d00c.png&w=137&h=148","5折秒":"https://static.home.mi.com/app/shop/img?id=shop_dcfe65f767a3bbbd8b9b6b010d4cf37f.png&w=137&h=148"}}(n,t),t.exports&&(d["/cloud/module/turn_timer/turn_timer.action.js"]=t.exports)}(),function(){var t={type:"resource"};!function(t,e){function i(t){function e(t,e,i){t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent("on"+e,function(){i.call(t,window.event)})}function i(t){}function a(e){$(".slider_s").hide(),m=!1,i(e),e="touchstart"===e.type?e.changedTouches[0]:e,y=!0,t.vertical?k.Y=e.clientY-h.offsetTop:k.X=e.clientX-h.offsetLeft}function n(e){return console.log("normalize",e),e<0?e=t.cycle?e+g:0:e>g-1&&(e=t.cycle?e-g:g-1),console.log("cur",e),e}function r(e){if(y){i(e),e="touchmove"===e.type?e.changedTouches[0]:e;var o=t.vertical?e.clientY-h.offsetTop-k.Y:e.clientX-h.offsetLeft-k.X;o=t.reverse?-o:o,o<-1e4&&(o=0);var a=b/g,r=x;o=Math.floor(o/a),console.log("pre.frame",k.frame,o),o!==x&&(x=n(k.frame+o),r!==x&&(h.getElementsByTagName("img")[r].style.display="none",h.getElementsByTagName("img")[x].style.display="block","function"==typeof T.change&&T.change(x,g)))}}function c(t){i(t),y=!1,k.frame=x}function s(e){m=!1,i(e);var o=e.deltaY||e.detail||-e.wheelDelta;o/=Math.abs(o),o=t.reverse?-o:o,x=n(x+o),h.getElementsByTagName("img")[k.frame].style.display="none",h.getElementsByTagName("img")[x].style.display="block",k.frame=x,"function"==typeof T.change&&T.change(x,g)}function d(){if(f&&(f.style.display="none"),0===_.length){var i=n(t.start);if(h.getElementsByTagName("img")[i].style.display="block",x=i,k.frame=x,h.style.position="relative",h.style.width="100%","ontouchstart"in window||"onmsgesturechange"in window)(t.mouse||t.scroll)&&(e(h,"touchstart",a),e(h,"touchmove",r),e(h,"touchend",c));else if(t.mouse&&(e(h,"mousedown",a),e(h,"mousemove",r),e(document,"mouseup",c)),t.scroll)for(var o=0;o=e)&&(a.push(t),!0)}),a.join(",")}var n={unit:"元",name:"",src:"",descr:"",price:"",marketPrice:"",showMarketPrice:"",showTag:t.showTag};if(e.attr_ext){var r=e.attr_ext;(1===r.price_tag||t.daiqi)&&(n.unit="元起"),r.custom_name&&!t.name&&(n.name=r.custom_name),r.custom_summary&&!t.descr&&(n.descr=r.custom_summary)}return n.name||(n.name=t.name||e.name),t.src?n.src=t.src:"限时购"===t.mode||t.showWhiteProductImage?n.src=e.pic_url:n.src=e.album[0],h.android&&(n.src=v(n.src,"t","webp")),n.descr||(t.descr?n.descr=t.descr:i?n.descr=a(e.summary,18):n.descr=e.summary),e.market_price||(e.market_price=e.price_min),t.price&&(e.price_min=Math.round(100*t.price)),t.priceOriginal&&(e.market_price=Math.round(100*t.priceOriginal)),n.price=o(e.price_min,"cent").short,n.marketPrice=o(e.market_price,"cent").short,n.showMarketPrice=1*e.price_min<1*e.market_price,n.downPriceValue=e.market_price-e.price_min,n.downPrice=o(n.downPriceValue,"cent").short,n.downPriceText="直降"+n.downPrice+"元",n.discountText=""+Math.ceil(e.price_min/e.market_price*100)/10,n.discountText=""+n.discountText.replace(/\.\d+/,function(t){return t.slice(0,2)}).replace(/\.0/,""),n}function o(t,e){t(".unit").text(e.unit),t(".product-name").html(e.name),t(".product-descr").html(e.descr),t(".price-wrap .num").text(e.price),e.showMarketPrice&&(t(".price-wrap-market").show(),t(".price-wrap-market .num").text(e.marketPrice),e.showTag&&t(".link-wrap>.tag").show().text(e.downPriceText));var i=t('[data-editor-tag-name="horizontal_border_label"]'),o=t('[data-editor-tag-name="circle-background-double-line"]'),a=i.find(".tag-content"),n=o.find(".tag-content");if(i.length&&e.showMarketPrice&&(a.text()||(a.text(e.downPriceText),i.children().show())),o.length&&e.showMarketPrice&&!n.text().trim())if(o.find('[data-auto-mode="××折"]').length)n.html(''+e.discountText+'折
'),o.children().show();else{var r="";e.downPriceValue>1e5&&(r="#ffea00"),n.html('直降
'+e.downPrice+"
"),
o.children().show()}}function a(t){function e(t,e){return t.length-1&&(a[e]=t.name)})});var n=void 0;return n=void 0!==t.onsale?t.onsale?1:0:parseInt(t.inventory),{map_id:t.map_id,pid:t.pid,type:a,price:t.price,inventory:n,image_url:t.img,origin_price:parseInt(t.market_price),name:t.name}}),n={price:m(e.detail.data.good.price_min,"cent").short,productName:e.detail.data.good.name,image_url:e.detail.data.good.pic_url};return{info:n,type:o,list:a}}function a(t,e){var o=void 0,a=void 0;parseInt(t)>1e8?(o={model:"Cart",action:"add",parameters:{product_id:t,consumption:"1"}},a=l({url:y,$dom:i})):(o={model:"Cart",action:"add",parameters:{pid:t,num:"1"}},a=l({url:w,$dom:i})),s({detail:o},function(t){t.detail.code?toast(u(t.detail)||"加入购物车失败"):(b.emit("add-cart-success"),h.app||h.weirdhybrid||$(".editor-fixed-cart-btn").length?toast("加入购物车成功"):toast("已加入购物车,请前往有品App结算"),e&&e())},!1,a)}function n(){function e(t){r(".bottom").hide(),r('.bottom[data-mode="'+t+'"]').show()}function o(){function t(t,e){for(var i in e)if(t.type[i]!=e[i])return!1;return!0}var i={};r(".tag.active").each(function(){var t=$(this),e=t.parent().data("type-name"),o=t.text().trim();i[e]=o});for(var o in i)r(".tag:not(.active)").addClass("disabled");var a=void 0;v.list.forEach(function(e){if(t(e,i)){a=e;for(var o in e.type)i[o]||r('[data-type-name="'+o+"\"] .tag[data-tag='"+e.type[o]+"']").removeClass("disabled")}});var n=function(e){var o=Object.assign({},i);delete o[e],v.list.forEach(function(i){t(i,o)&&r('[data-type-name="'+e+'"] [data-tag="'+i.type[e]+'"]').removeClass("disabled")})};for(var o in i)n(o);Object.keys(i).length===Object.keys(v.type).length&&a?(r(".title").text(a.name),r(".price").text("¥"+m(a.price,"cent").short),r(".product-img").attr("src",a.image_url),u=a,e(a.inventory?"ready":"gone")):(r(".title").text(v.info.productName),r(".price").text("¥"+v.info.price),r(".product-img").attr("src",v.info.image_url),u=void 0,e("wait"))}var n=$(c(v.info.productName,v.info.price,v.info.image_url)),r=n.find.bind(n),s=function(t){var e=v.type[t],i=$(d(t));r(".layer>main").append(i),e.forEach(function(t){i.find("main").append($(p(t)))})};for(var l in v.type)s(l);var u=void 0;r(".add-cart").on("tap",function(){a(u.pid||u.mapId)});var b=void 0;r(".go-checkout").on("tap",function(){var e=i;if(!u)return void toast("请先选中商品");if(u.pid){if(u.map_id&&"0"!==u.map_id)return b(),void f("https://m.xiaomiyoupin.com/shop/detail?gid="+t.gid+"&pid="+u.pid,{$dom:e});h.app?(b(),f("https://m.xiaomiyoupin.com/shop/check?quickOrder=2&pid="+u.pid,{$dom:e})):(b(),f("https://m.xiaomiyoupin.com/shop/checkshop/check?quickOrder=2&pid="+u.pid,{$dom:e}))}else a(u.mapId,function(){b(),f("https://m.xiaomiyoupin.com/shop/cart",{$dom:e})})}),o();var y=h.pc?"mousedown":"touchstart";n.on(y,".tag",function(){var t=$(this),e=t.parent();t.hasClass("disabled")||(t.hasClass("active")?(t.inactive(),e.inactive()):(t.active(),e.active(),t.siblings().inactive()),o())});var w=g(n,function(){},!1,!0,!0);b=w.exit,n.parent().css({left:0,right:0,"max-width":"none"})}var c=function(t,e,i){return'\n
\n
\n \n

\n
\n \n \n
\n \n
\n
\n
\n
\n
\n'},d=function(t){return'\n'},p=function(t){return' \n '+t+" \n\n"},v={};if(t.gid){if(window.isEditor)return;r(t.gid,function(t){Object.assign(v,o(t))})}else v=t.config;e(function(){var t=0;return v.list?(v.list.forEach(function(e){e.inventory&&e.inventory>0&&t++}),void(t?v.list.length>1?n():a(v.list[0].pid):toast("商品已售罄"))):void getLogin().then(function(t){t?toast("数据加载中..."):jumptoLogin()})})}function r(t,e){x&&clearTimeout(x),k.push({gid:t,cb:e}),x=setTimeout(function(){var t=k.slice(0);k.length=0,x=0;var e={};t.forEach(function(t){var i=t.gid;e[i]={model:"Shopv2",action:"getDetail",parameters:{gid:i}}}),s(e,function(e){var i=function(i){t.forEach(function(t){var o=t.gid,a=t.cb;i==o&&a({detail:e[i]})})};for(var o in e)i(o)},function(t){toast("获取商品信息失败"),console.warn(t)},v(y,"editor-cache",""+Math.floor(Date.now()/36e5)),!0)})}var c=t("util"),s=c.miFetch,d=c.PIPE_URL,l=c.getTracedUrl2,u=c.getChineseMessage,p=c.GPIPE_URL,m=c.formatMoney,h=c.ua,f=c.jumpTo,g=c.showBottomWindow,v=c.addParam,b=c.eventEmitter,y=d.replace("static.",""),w=p.replace("static.",""),_="map_id_add_cart-floating-layer",x=void 0,k=[];e.exports={getFinalInfo:i,renderFinalInfo:o,getRemainTime:a,initBottomWindow:n,getDetail:r,floatingLayerId:_}}(n,t),t.exports&&(d["/cloud/module/product_big/util.js"]=t.exports)}(),function(){var t={type:"resource"};!function(t,o){var a=t("mi-home-lib"),n=a.miFetch,r=a.PIPE_URL,d=a.getTracedUrl2,l=a.getChineseMessage,u=a.GPIPE_URL,p=a.formatMoney,m=a.ua,h=a.jumpTo,f=a.showBottomWindow,g=a.addParam,v=a.getLogin,b=a.jumptoLogin,y=a.countEvent,w=a.EventEmitter,_=a.eventEmitter,x=function(t){function o(t){var e=this,a=t.id,n=void 0===a?"map_id_add_cart-floating-layer":a,r=t.gid,s=t.$sourceDom,d=t.cartExtraParams,l=void 0===d?{}:d,u=t.pidWhiteList;i(this,o),c(Object.getPrototypeOf(o.prototype),"constructor",this).call(this),Object.assign(this,{id:n,gid:r,config:{},$sourceDom:s,cartExtraParams:l,pidWhiteList:u}),this.getDetail(r,function(t){Object.assign(e.config,e.handleResult(t)),e.emit("ready")})}return e(o,t),s(o,[{key:"getDetail",value:function(t,e){o.getDetailTimeout&&clearTimeout(o.getDetailTimeout),o.requestQueue.push({gid:t,cb:e}),o.getDetailTimeout=setTimeout(function(){var t=o.requestQueue.slice(0);o.requestQueue.length=0,o.getDetailTimeout=0;var e={};t.forEach(function(t){var i=t.gid;e[i]={model:"Shopv2",action:"getDetail",parameters:{gid:i}}}),n(e,function(e){var i=function(i){t.forEach(function(t){var o=t.gid,a=t.cb;i===""+o&&a({detail:e[i]})})};for(var o in e)i(o)},function(t){toast("获取商品信息失败"),console.warn(t)},g("/app/shop/pipe","editor-cache",""+Math.floor(Date.now()/36e5)),!0)},100)}},{key:"addCart",value:function(t,e){var i=this,o=void 0,a=void 0;return parseInt(t)>1e8?(o={model:"Cart",action:"add",parameters:{product_id:t,consumption:"1"}},a=d({url:r,$dom:this.$sourceDom})):(o={model:"Cart",action:"add",parameters:{pid:t,num:"1"}},a=d({url:u,$dom:this.$sourceDom})),Object.assign(o.parameters,this.cartExtraParams),n({detail:o},function(t){t.detail.code?toast(l(t.detail)||"加入购物车失败"):(_.emit("add-cart-success"),i.emit("cart-success"),m.app||m.weirdhybrid||$(".editor-fixed-cart-btn").length?toast("加入购物车成功"):toast("已加入购物车,请前往有品App结算"),e&&e())},!1,a)}},{key:"renderSection",value:function(t){return'\n'}},{key:"renderTag",value:function(t){return' \n '+t.name+" \n\n"}},{key:"renderFooter",value:function(){return'\n \n '}},{key:"renderPanel",value:function(t,e,i){return'\n
\n
\n \n

\n
\n \n \n
\n \n '+this.renderFooter()+"\n
\n
\n "}},{key:"trigger",value:function(){if(window.isEditor)return void toast("不支持编辑器内使用");var t=0;return this.detailResult?(y("trigger-bottom",this.$sourceDom),this.config.list?(this.config.list.forEach(function(e){e.inventory&&e.inventory>0&&t++}),void(t?this.config.list.length>1?(this.emit("show"),this.show()):this.addCart(this.config.list[0].pid):toast("商品已售罄"))):(this.detailResult&&this.detailResult.detail.data.code&&toast(l(this.detailResult.detail.data)),void v().then(function(t){t||b()}))):void toast("数据加载中...")}},{key:"setMode",value:function(t){var e=this.$$;e(".bottom").hide(),e('.bottom[data-mode="'+t+'"]').show()}},{key:"onPressAddCart",value:function(t){this.addCart(t)}},{key:"onPressCheckout",value:function(){var t=this,e=this.$sourceDom;if(!this.selectingProduct)return void toast("请先选中商品");if(this.selectingProduct.pid){var i=function(){if(t.selectingProduct.map_id&&"0"!==t.selectingProduct.map_id)return t.exit(),h("https://m.xiaomiyoupin.com/shop/detail?gid="+t.gid+"&pid="+t.selectingProduct.pid,{$dom:e}),{v:void 0};var i=void 0;i=m.app?"https://m.xiaomiyoupin.com/shop/check?quickOrder=2&pid="+t.selectingProduct.pid:"https://m.xiaomiyoupin.com/shop/checkshop/check?quickOrder=2&pid="+t.selectingProduct.pid,t.exit(),v().then(function(t){if(t)h(i,{$dom:e});else{var o=d({url:i,$dom:e});b(o)}})}();if("object"==typeof i)return i.v}else this.addCart(this.selectingProduct.mapId,function(){t.exit(),h("https://m.xiaomiyoupin.com/shop/cart",{$dom:e})})}},{key:"onTriggerTag",value:function(){function t(t,e){for(var i in e)if(""+t.type[i].tid!=""+e[i])return!1;return!0}var e=this,i=this.$$,o={};i(".tag.active").each(function(){var t=$(this),e=t.parent().data("type-name"),i=t.data("tag");o[e]=i}),i(".tag:not(.active)").addClass("disabled");var a=void 0;this.config.list.forEach(function(e){if(t(e,o)){a=e;for(var n in e.type)o[n]||i('[data-type-name="'+n+"\"] .tag[data-tag='"+e.type[n].tid+"']").removeClass("disabled")}});var n=function(a){var n=Object.assign({},o);delete n[a],e.config.list.forEach(function(e){t(e,n)&&i('[data-type-name="'+a+'"] [data-tag="'+e.type[a].tid+'"]').removeClass("disabled")})};for(var r in o)n(r);Object.keys(o).length===Object.keys(this.config.type).length&&a?(i(".title").text(a.name),i(".price").text("¥"+p(a.price,"cent").short),i(".product-img").attr("src",a.image_url),this.selectingProduct=a,a.inventory?this.setMode("ready"):this.setMode("gone")):(i(".title").text(this.config.info.productName),i(".price").text("¥"+this.config.info.price),i(".product-img").attr("src",this.config.info.image_url),this.selectingProduct=void 0,this.setMode("wait")),this.emit("trigger-tag")}},{key:"show",value:function(){var t=this,e=$(this.renderPanel(this.config.info.productName,this.config.info.price,this.config.info.image_url)),i=e.find.bind(e);this.$$=i;var o=function(e){var o=t.config.type[e],a=$(t.renderSection(e));i(".layer>main").append(a),o.forEach(function(e){a.find("main").append($(t.renderTag(e)))})};for(var a in this.config.type)o(a);i(".add-cart").on("tap",function(){t.onPressAddCart(t.selectingProduct.pid||t.selectingProduct.mapId)}),i(".go-checkout").on("tap",function(){t.onPressCheckout()}),this.onTriggerTag();var n=this;e.on("tap",".tag",function(){var t=$(this),e=t.parent();t.hasClass("disabled")||(t.hasClass("active")?(t.inactive(),e.inactive()):(t.active(),e.active(),t.siblings().inactive()),n.onTriggerTag())});var r=f(e,function(){t.emit("exit")},!1,!0,!0),c=r.exit;this.exit=c,e.parent().css({left:0,right:0,"max-width":"none"})}},{key:"handleResult",value:function(t){var e=this;this.detailResult=t;var i={};if(!t.detail.data.group){var o="none"===this.$sourceDom[0].style.display||this.$sourceDom.hasClass("hide");return void console.warn("商品信息错误",t,this.gid,o?"(已隐藏)":"")}var a=t.detail.data.group;this.pidWhiteList&&this.pidWhiteList.match(/[^ ]/)&&!function(){var i=e.pidWhiteList.split(/ +/).filter(function(t){return t});t.detail.data.tag_prop=t.detail.data.tag_prop.filter(function(t){var e=t.pid;return i.indexOf(""+e)>-1}),t.detail.data.props=t.detail.data.props.filter(function(t){var e=t.pid;return i.indexOf(""+e)>-1});var o={};t.detail.data.tag_prop.forEach(function(t){var e=t.tid;o[e]=!0}),t.detail.data.group.forEach(function(t){t.tags=t.tags.filter(function(t){var e=t.tid;return o[e]})})}();var n=t.detail.data.tag_prop;a.forEach(function(t){i[t.name]=[],t.tags.forEach(function(e){i[t.name].push(e)})});var r=t.detail.data.props.map(function(t){var e=[],i={};n.forEach(function(i){i.pid===t.pid&&e.push(i.tid)}),a.forEach(function(t){var o=t.name;t.tags.forEach(function(t){var a=e.indexOf(t.tid);a>-1&&(i[o]=t)})});var o=void 0;return o=void 0!==t.onsale?t.onsale?1:0:parseInt(t.inventory),{map_id:t.map_id,pid:t.pid,type:i,price:t.price,inventory:o,image_url:t.img,origin_price:parseInt(t.market_price),name:t.name}}),c={price:p(t.detail.data.good.price_min,"cent").short,productName:t.detail.data.good.name,image_url:t.detail.data.good.pic_url};return{info:c,type:i,list:r}}}]),o}(w);x.requestQueue=[],x.getDetailTimeout=0,o.exports=x}(n,t),t.exports&&(d["/cloud/module/product_big/bottom_window.js"]=t.exports)}(),u="/cloud/module/product_big/product_big.action.js",function(){var t={type:"resource"};!function(t,e){var o=t("mi-home-lib"),a=o.formatMoney,n=o.ua,r=o.setTrace,c=o.addParam,d=o.miFetch,l=o.jumpTo,u=t("/cloud/module/product_big/util.js"),p=u.getFinalInfo,m=u.renderFinalInfo,h=u.getRemainTime,f=u.floatingLayerId,g=t("/cloud/module/product_big/bottom_window.js"),v=void 0,b=[];e.exports=function(){function t(e,o){i(this,t),this.init(e,o)}return s(t,[{key:"replaceA",value:function(){var t=this;try{var e=function(){var e=t.$$(".product-big-img-link"),i=e.attr("href"),o=e.children();if(!e[0])return{v:void 0};var a=$(e[0].outerHTML.replace(//g,"/div>"));a.empty(),a.append(o),e.replaceWith(a),a.originalOn("tap",function(){l(i,{$dom:t.$dom})})}();if("object"==typeof e)return e.v}catch(t){toast(t.message)}}},{key:"init",value:function(e,i){var o=this,c=$("[data-id="+i+"]"),s=c.find.bind(c);this.$$=s,this.$dom=c;var d=e.gid;if(d){n.pc&&1===window.devicePixelRatio&&c.find(".top-a-wrap").css("border","1px solid rgb(204,204,204)");var l=s(".product-big-img-link"),u=s("a.buy-btn-wrap");e.startTime&&e.startTime>Date.now()/1e3&&this.initTimer(),e.href?(l.attr("href",e.href),u.attr("href",e.href)):(l.attr("href","//m.xiaomiyoupin.com/shop/detail?gid="+d),u.attr("href","//m.xiaomiyoupin.com/shop/detail?gid="+d)),r(l),r(u),n.pc||this.replaceA(),s(".bottom-btn").on("tap",function(){window.countEvent&&window.countEvent("button",this)}),"加入购物车"===e.btn&&!function(){var t=new g({id:f,gid:d,$sourceDom:c,pidWhiteList:e.pidWhiteList});s(".bottom-btn.cart-btn").on("click",function(){t.trigger()})}();var h=c.parent().is('[data-name="horizontal_layout"],[data-name="test_container"],[data-name="horizontal_scroll_container"],.horizontal_scroll_container_body,.horizontal-adjust-wrapper');this.isSmall=h;var v=c.find(".normal-mode"),b=$(".top-wrap");return n.android&&b.addClass("android"),n.iOS&&b.addClass("iOS"),n.pc&&b.addClass("pc"),h?v.addClass("thin"):v.addClass("big"),"没按钮"===e.btn&&v.addClass("nobutton"),e.static?(m(s,e.finalInfo),void setTimeout(this.afterRender.bind(this))):void t.getDetail(d,function(t){var i=t.detail.data;if(!i)return void console.warn("gid error",d);var n=p(e,i.goods,h,a);m(s,n),o.afterRender()})}}},{key:"initTimer",value:function(){function t(t){i.text(h(t))}var e=this.$$,i=e(".bottom-btn"),o="倒计时",a=e(".bottom-btn-wrap"),n=i.html();a.css({"pointer-events":"none",cursor:"not-allowed"});var r=config.startTime-Date.now()/1e3,c=r/3600/24;c>1?(i.text(""+o+Math.floor(c)+"天"),i.addClass("left-days")):!function(){i.addClass("left-time");var e=Math.ceil(config.startTime-Date.now()/1e3);t(e);var o=setInterval(function(){e--,e?t(e):(clearInterval(o),i.html(n).removeClass("left-days").removeClass("left-time"),a.css({"pointer-events":"all",cursor:"pointer"}))},1e3)}()}},{key:"afterRender",value:function(){function t(){var t=i.parent()[0].containerAdjustHeight;t&&t()}function e(){r&&r.css("position","static").removeClass("loading"),n.removeClass("loading").css({"min-height":"0px"}),a?n.css("padding-top","100%"):n.css("padding-top","0px")}var i=this.$dom,o=this.$$,a=this.isSmall,n=o(".product-big-img-link"),r=o(".product");t(),r.length?r[0].naturalWidth?e():r.on("load",e):e()}}],[{key:"getDetail",value:function(t,e){v&&clearTimeout(v),b.push({gid:t,cb:e}),v=setTimeout(function(){var t=b.slice(0);b.length=0,v=0;var e={};t.forEach(function(t){var i=t.gid;e[i]={model:"Product",action:"GetDetail",parameters:{gid:i}}}),d(e,function(e){var i=function(i){t.forEach(function(t){var o=t.gid,a=t.cb;i===""+o&&a({detail:e[i]})})};for(var o in e)i(o)},function(t){toast("获取商品信息失败"),console.warn(t)},c("//m.xiaomiyoupin.com/app/shopv3/pipe","editor-cache",""+Math.floor(Date.now()/36e5)),!0)},100)}}]),t}()}(n,t),t.exports&&(d["/cloud/module/product_big/product_big.action.js"]=t.exports)}(),function(){var e={type:"resource"};!function(e,i){var o=e("util"),a=o.eventEmitter;i.exports=function(e){function i(){function e(t){var e=t.children()[0].scrollHeight,i=1*(t.css("border-bottom-width").match(/^[\d.]+/)||[0])[0],o=1*(t.css("border-top-width").match(/^[\d.]+/)||[0])[0];return e+i+o}var i=function(i){var o=n[i];if(o.length<2)return"continue";var a=Math.max.apply(Math,t(o.map(e)));o.forEach(function(t){t.css("min-height",a+"px")})};for(var o in n){i(o)}}function o(){setTimeout(i,200),setTimeout(i,2e3)}var n={},r=e.find.bind(e);r("[data-sync-height]").each(function(){var t=$(this),e=t.data("sync-height");n[e]||(n[e]=[]),n[e].push(t)});var c=void 0;Object.keys(n).length&&(e[0].containerAdjustHeight=o,o(),a.on("base-width-change",function(t){if(t!==c){c=t;for(var e in n){var i=n[e];i.length<2||i.forEach(function(t){t.css("min-height","0px")})}o()}}))}}(n,e),e.exports&&(d["/cloud/container/horizontal_layout/adjust-height.js"]=e.exports)}(),u="/cloud/container/horizontal_layout/horizontal_layout.action.js",function(){var t={type:"resource"};!function(t,e){var o=t("/cloud/container/horizontal_layout/adjust-height.js");e.exports=function(){function t(e,a){i(this,t);var n=$("[data-id="+a+"]"),r=n.find.bind(n);this.$$=r,this.$dom=n,o(this.$dom),"等高"===e.mode&&this.syncHeight()}return s(t,[{key:"heightAdjust",value:function(){}},{key:"syncHeight",value:function(){function t(t){var e=t.match(/[?&]w=(\d+)\b/),i=t.match(/[?&]h=(\d+)\b/);return e&&i?{width:1*e[1],height:1*i[1]}:(toast("图片链接缺少尺寸参数:"+t),{width:0,height:0})}var e=this.$dom.children();this.$dom.addClass("stretch");var i=[],o=[],a=0,n=1,r=!0;e.each(function(e){var i=$(this),a=void 0;a="IMG"===i.prop("tagName")?i:i.find("img");var c=a.attr("src")||a.data("lazy-src"),s=t(c),d=s.width,l=s.height;if(o[e]={width:d,height:l},!d||!l)return void(r=!1);var u=n/l;parseInt(u)!==u&&(n*=l)}),r&&(e.each(function(t){var e=o[t],r=e.width,c=e.height;i[t]=n/c*r,a+=i[t]}),e.each(function(t){$(this).css("width",100*i[t]/a+"%")}))}}]),t}()}(n,t),t.exports&&(d["/cloud/container/horizontal_layout/horizontal_layout.action.js"]=t.exports)}(),m=p["/cloud/module/turn_timer/turn_timer.action.js"],m&&$('[data-id="editor-rag-4"]').length&&m("editor-rag-4",{preTime:10,navStyle:"Date Time",navPerline:3,activityId:125,subscribe:!1,thumbPerLine:3,timer:[{cid:1134,start:!1,subtitle:"816优惠券提前抢",productImg:"",name:"",priceRaw:"299",priceNow:"1",label:"限时秒"},{cid:1138,start:!0,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1140,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒",name:""},{cid:1143,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1109,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1110,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1236,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1238,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1240,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1244,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1247,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1248,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1249,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1251,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1252,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1237,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1239,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1241,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1135,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1139,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1141,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1144,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1112,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"},{cid:1113,subtitle:"816优惠券提前抢",productImg:"",label:"限时秒"}],colorBtn:"#ff7884",colorPress:"#ff7884"}),$('[data-id="editor-rag-8"]').length&&new d["/cloud/module/circle_product/circle_product.action.js"]({frameColor:"#FEDC52",showColorSelector:!0,showRotationTip:!1,groups:[{pics:["https://static.home.mi.com/app/shop/img?id=shop_5fa5534df11011eb5176e64e04c7e600.jpeg&w=1080&h=1567"],thumb:"https://static.home.mi.com/app/shop/img?id=shop_e7e8a4f4fc54de6a43a6f544e42a62b8.png&w=328&h=79",title:""},{pics:["https://static.home.mi.com/app/shop/img?id=shop_e0ec4d58735be8c65d6b4a7d22a2b8b8.jpeg&w=1080&h=1568"],thumb:"https://static.home.mi.com/app/shop/img?id=shop_295a60790debada18207f64c704382b9.png&w=328&h=79",title:""},{pics:["https://static.home.mi.com/app/shop/img?id=shop_f45c4b5b9d2a9eb71e0a154c0bbc2f23.jpeg&w=1080&h=1567"],thumb:"https://static.home.mi.com/app/shop/img?id=shop_2f24ebc8ada3ab7b945dab39286f0d93.png&w=328&h=79",title:""},{pics:["https://static.home.mi.com/app/shop/img?id=shop_81433799ba91f4c443a2c43ee6b07924.jpeg&w=1080&h=1568"],thumb:"https://static.home.mi.com/app/shop/img?id=shop_c7056eb3032cae3c44bb6de5732fdd00.png&w=328&h=79"},{pics:["https://static.home.mi.com/app/shop/img?id=shop_7dea4324dc34ff9c8d0b7ac0e03bfbf8.jpeg&w=1080&h=1568"],thumb:"https://static.home.mi.com/app/shop/img?id=shop_6ba7065737b700f11c1c86c33d433bb2.png&w=328&h=79"},{pics:["https://static.home.mi.com/app/shop/img?id=shop_f2b0afee07ebf2ea041826909ed36712.jpeg&w=1080&h=1568"],thumb:"https://static.home.mi.com/app/shop/img?id=shop_f16a2afe7e4b3d2a2959577605e0c4d0.png&w=328&h=79"}],transitionTime:0},"editor-rag-8"),m=p["/cloud/container/pure_container/pure_container.action.js"],m&&$('[data-id="editor-rag-10"]').length&&m("editor-rag-10",{mode:"没用"}),m=p["/cloud/container/pure_container/pure_container.action.js"],m&&$('[data-id="editor-rag-19"]').length&&m("editor-rag-19",{mode:"没用"}),m=p["/cloud/container/pure_container/pure_container.action.js"],m&&$('[data-id="editor-rag-28"]').length&&m("editor-rag-28",{mode:"没用"}),$('[data-id="editor-rag-11"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:553,src:"https://static.home.mi.com/app/shop/img?id=shop_05d7709817648cd49fae12ce484c24e6.png&w=1080&h=500",btnColor:"#f66f40",hideImg:!1,mode:"普通",showWhiteProductImage:!1,btnColor2:"#cf2d2d",bottomBg:"#fff",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_05d7709817648cd49fae12ce484c24e6.png&w=1080&h=500",descr:'【11日价格更低】快速吸湿,透气舒适',embedDescription:!1},"editor-rag-11"),$('[data-id="editor-rag-13"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:368,btnColor:"#f66f40",hideImg:!1,bottomBg:"#fff",mode:"普通",showWhiteProductImage:!0,btnColor2:"#cf2d2d",href:"",src:"",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_0037e092c14cd354d302f236926172ad.jpeg",descr:"【11日价格更低】一体铝机身",embedDescription:!1},"editor-rag-13"),$('[data-id="editor-rag-14"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:323,btnColor:"#f66f40",hideImg:!1,bottomBg:"#fff",mode:"普通",showWhiteProductImage:!0,btnColor2:"#cf2d2d",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_5d9e15c961e55ce573911d334f7180bb.jpeg",descr:"",embedDescription:!1},"editor-rag-14"),$('[data-id="editor-rag-16"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:423,btnColor:"#f66f40",hideImg:!1,bottomBg:"#fff",mode:"普通",showWhiteProductImage:!0,btnColor2:"#cf2d2d",href:"",src:"",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_5cf1fe0ed1cfe0a6326b881dc95a22d5.jpeg",descr:"【11日价格更低】2A安全充电,多重保护",embedDescription:!1},"editor-rag-16"),$('[data-id="editor-rag-17"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:436,btnColor:"#f66f40",hideImg:!1,bottomBg:"#fff",mode:"普通",showWhiteProductImage:!0,btnColor2:"#cf2d2d",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_f656529ddc9213561740f117d0406fe3.jpeg",descr:"【11日价格更低】独特新风系统高效过滤",embedDescription:!1},"editor-rag-17"),$('[data-id="editor-rag-20"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:589,src:"https://static.home.mi.com/app/shop/img?id=shop_8ff5644465986d6683700e3a6583b78a.png&w=1080&h=501",btnColor:"#f66f40",hideImg:!1,mode:"普通",showWhiteProductImage:!1,btnColor2:"#cf2d2d",bottomBg:"#fff",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_8ff5644465986d6683700e3a6583b78a.png&w=1080&h=501",descr:"【11日价格更低】天然亚麻,快速散热",embedDescription:!1},"editor-rag-20"),$('[data-id="editor-rag-22"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:574,btnColor:"#f66f40",hideImg:!1,bottomBg:"#fff",mode:"普通",showWhiteProductImage:!1,btnColor2:"#cf2d2d",href:"",src:"",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_766d5695b864b5e946020ac03a9d1863.jpeg",descr:"【11日价格更低】进口板材,尼龙偏光镜片",embedDescription:!1},"editor-rag-22"),$('[data-id="editor-rag-23"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:542,btnColor:"#f66f40",hideImg:!1,bottomBg:"#fff",mode:"普通",showWhiteProductImage:!0,btnColor2:"#cf2d2d",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_c9e28b5c57241f07c55e081925b17385.jpeg",descr:"【11日价格更低】0.7秒超快开伞",embedDescription:!1},"editor-rag-23"),$('[data-id="editor-rag-25"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:761,btnColor:"#f66f40",hideImg:!1,bottomBg:"#fff",mode:"普通",showWhiteProductImage:!1,btnColor2:"#cf2d2d",href:"",src:"",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_a255ce1a43445683b68d98e2c454dab7.jpeg",descr:"【11日价格更低】抛光一体成型,优美弧线",embedDescription:!1},"editor-rag-25"),$('[data-id="editor-rag-26"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:247,btnColor:"#f66f40",hideImg:!1,bottomBg:"#fff",mode:"普通",showWhiteProductImage:!0,btnColor2:"#cf2d2d",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_ea82e205f5f5e9ce136b6c32d8f18a48.jpeg",descr:"【11日价格更低】拟自然风,静音运行",embedDescription:!1},"editor-rag-26"),$('[data-id="editor-rag-29"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:697,src:"https://static.home.mi.com/app/shop/img?id=shop_b04396fd273b4fdbd5bdecd413cd8676.png&w=1080&h=501",btnColor:"#f66f40",hideImg:!1,mode:"普通",showWhiteProductImage:!1,btnColor2:"#cf2d2d",bottomBg:"#fff",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_b04396fd273b4fdbd5bdecd413cd8676.png&w=1080&h=501",descr:"【11日价格更低】不漂白,无有害添加",embedDescription:!1},"editor-rag-29"),$('[data-id="editor-rag-31"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:726,btnColor:"#f66f40",hideImg:!1,bottomBg:"#fff",mode:"普通",showWhiteProductImage:!0,btnColor2:"#cf2d2d",href:"",src:"",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_5bd98e1471368a210305d26585e9ed30.jpeg",descr:"【11日价格更低】创新搭配设计,舒适精梳棉",embedDescription:!1},"editor-rag-31"),$('[data-id="editor-rag-32"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:686,btnColor:"#f66f40",hideImg:!1,bottomBg:"#fff",mode:"普通",showWhiteProductImage:!0,btnColor2:"#cf2d2d",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_27e851e2809ed57a8236ae05663516c3.jpeg",descr:"【11日价格更低】进口美棉,快速排汗",embedDescription:!1},"editor-rag-32"),$('[data-id="editor-rag-34"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:674,btnColor:"#f66f40",hideImg:!1,bottomBg:"#fff",mode:"普通",showWhiteProductImage:!0,btnColor2:"#cf2d2d",href:"",src:"",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_db690da047b09a1941804b27455298f4.jpeg",descr:"【11日价格更低】国宴瓷品 通透坚韧",embedDescription:!1},"editor-rag-34"),$('[data-id="editor-rag-35"]').length&&new d["/cloud/module/product_big/product_big.action.js"]({btn:"加入购物车",links:[],begin:!1,gid:627,btnColor:"#f66f40",hideImg:!1,bottomBg:"#fff",mode:"普通",showWhiteProductImage:!0,btnColor2:"#cf2d2d",showTag:!0,fakeSrc:"https://static.home.mi.com/app/shop/img?id=shop_b577ceb4518f881989beb152dc62d632.jpeg",descr:"【11日价格更低】实惠套装浴巾(1条)+毛巾(3条)",embedDescription:!1},"editor-rag-35"),$('[data-id="editor-rag-12"]').length&&new d["/cloud/container/horizontal_layout/horizontal_layout.action.js"]({
mode:"等宽"},"editor-rag-12"),$('[data-id="editor-rag-15"]').length&&new d["/cloud/container/horizontal_layout/horizontal_layout.action.js"]({mode:"等宽"},"editor-rag-15"),$('[data-id="editor-rag-21"]').length&&new d["/cloud/container/horizontal_layout/horizontal_layout.action.js"]({mode:"等宽"},"editor-rag-21"),$('[data-id="editor-rag-24"]').length&&new d["/cloud/container/horizontal_layout/horizontal_layout.action.js"]({mode:"等宽"},"editor-rag-24"),$('[data-id="editor-rag-30"]').length&&new d["/cloud/container/horizontal_layout/horizontal_layout.action.js"]({mode:"等宽"},"editor-rag-30"),$('[data-id="editor-rag-33"]').length&&new d["/cloud/container/horizontal_layout/horizontal_layout.action.js"]({mode:"等宽"},"editor-rag-33"),window.publicAttribute={"产品模块":{static:!1}},!function(){function t(t,e){document.dispatchEvent(new CustomEvent("share-result",{detail:{status:t,channel:e}}))}function e(t,e,i){var o=location.href;o=addParam(o,"shareTitle",encodeURIComponent(t)),e||(e=location.href),o=addParam(o,"shareUrl",encodeURIComponent(e)),i&&(o=addParam(o,"shareImg",encodeURIComponent(i)));try{history.replaceState({},"",o)}catch(t){}}var i={url:"http://m.xiaomiyoupin.com/app/shop/content?id=o1a955039e8b0ac22",title:"有品生活就这Young!",ml:"link",wx:"link",wb:"link",pyq:"link",content:"816嗨购节,剁手族必读攻略",pyqTitle:"有品生活就这Young!",wbContent:"剁手族必读816攻略",wbTitle:"816嗨购节,剁手族必读攻略",imgs:[["https://static.home.mi.com/app/shop/img?id=shop_e42962411369cfd0866469fd7b9e6a53.jpeg&w=200&h=200"],[],[]],bimg:"https%3A%2F%2Fstatic.home.mi.com%2Fapp%2Fshop%2Fimg%3Fid%3Dshop_e42962411369cfd0866469fd7b9e6a53.jpeg%26w%3D200%26h%3D200",pics:"http%3A%2F%2Fapi.io.mi.com%2Fapp%2Fshop%2Fzimg%3Fids%3Dthumb_e42962411369cfd0866469fd7b9e6a53-pic_e42962411369cfd0866469fd7b9e6a53",image:"https://static.home.mi.com/app/shop/img?id=shop_e42962411369cfd0866469fd7b9e6a53.jpeg&w=200&h=200"};if(ua&&ua.app&&!args.mihomenoshare&&appShare){var o=function(){a||window._MiHomeStore&&(appShare2(i,{mode:"icon",notoast:0}),a=!0)};document.addEventListener("message",function(e){var i=JSON.parse(e.data);"ShareResult"===i.name&&("0"===i.result.toString()?t("success",i.channel):t("failed",i.channel))});var a=!1;setTimeout(o,1e3),setTimeout(o,2e3),setTimeout(o,1e4)}setWechatShare(i),ua&&ua.wxminiprogram&&!args.shareTitle&&e(i.wxminiprogramTitle||i.title,i.url,i.wxminiprogramImg)}(),function(){function t(t){var i=t.attr("data-lazy-src");if(i){ua.android&&(parseURL(i).params.t||(i=addParam(i,"t","webp"))),t.attr("src",i).removeAttr("data-lazy-src").css("width","100%").css("opacity","1");var o=window.getRag(t);o&&o.length&&o[0].eventEmitter&&o[0].eventEmitter.emit("lazyload-reach"),setTimeout(function(){t[0].complete&&e(t),t.on("load",function(){e(t)})})}}function e(t){setTimeout(function(){var e=parseInt(t.css("height"));e<1&&console.log("reset failed");var i=t.parent();i.hasClass("product-big-img-link")&&"absolute"===t.css("position")||(i.css("padding-top","0").css("overflow","visible"),t.css("position","static")),i.hasClass("product-big-img-link")&&i.css("overflow","hidden")})}function i(){var e=a.scrollTop(),i=a.height();o=o.filter(function(o,a,n){var r=o.offset().top;return!(re-1.5*i)||(t(o),!1)})}var o=[];$("img[data-lazy-src]").each(function(){o.push($(this))}),setTimeout(function(){a.scroll(i),i()},500);var a=$(window),n=setInterval(function(){o.length?i():clearInterval(n)},400)}()})