KISSY.add("mui/mallbar",function(t,a,e,i,r,n,l,o,s,m,c,b,u,d,p){var f=['
','
','{1}','
','
','
',"
",'
',"
"].join("");var g=['
','','
{3}
','
','
','
{0}
\u25c6
',"
"].join("");var h=['
','
{0}
',"
"].join("");var _=['
'].join("");var T=['
','
','
','
',"
",''].join("");var v=[];var A=true;var E=false;var I=function(a){var e=parseFloat(t.version);b.log("Kissy \u7248\u672c\u68c0\u6d4b\uff1a",t.version,e);if(e<1.3){return}var i=this;a=a||{};a.shopConfig=a.shopConfig||window.shop_config;a.gConfig=window.g_config;var r=t.one(document.body)||document.getElementsByTagName("body");if(r&&r.length>0){r=t.one(r[0])}a.container=a.container?t.one(a.container):r;if(!a.container){b.log(c.M.B);return}I.superclass.constructor.call(i,a);i.clearFloatEntries();i.init()};I.ATTRS={oldIndex:{value:-1}};t.extend(I,a,{clearFloatEntries:function(){var a=this;var e=a.get(c.K.G_CONFIG);var i={wwwLift:0,otherLift:0,ue:0,top:0,shop:0,brandbar:0};var r=setInterval(function(){if(!i.wwwLift){if(e.pageId=="mallfp"&&t.one("#J_MuiLift")){t.one("#J_MuiLift").css({"margin-left":"-632px"});i.wwwLift=1}}if(!i.otherLift){if(t.one(".mui-lift")){t.one(".mui-lift").css({"z-index":"999998"});i.otherLift=1}}if(!i.ue){if(t.one(".ui-feed")){t.one(".ui-feed").css({right:"auto",left:"11px"});i.ue=1}}if(!i.top){if(t.one("#J_ScrollTopBtn")){t.one("#J_ScrollTopBtn").css({visibility:"hidden"});i.top=1}}if(!i.shop){if(t.one(".tshop-psm-shop-ww-hover")){t.one(".tshop-psm-shop-ww-hover").css({"z-index":999999,right:"35px"});i.shop=1}}if(!i.brandbar){if(t.one("#J_BrandBar")){t.one("#J_BrandBar").css({visibility:"hidden"});i.brandbar=1}}},100)},init:function(){var a=this;var e=t.all(b.fm('
',c.VER)).appendTo(a.get(c.K.CONTAINER));a.set(c.K.ROOT,t.one(".mui-mbar"));a.set(c.K.ROOT_OUTER,e);a.set(c.K.ITEMS,{});var i=new u;a.set(c.K.MODEL,i);i.on(c.E.AFTER_BAR_CHANGE,function(e){b.log(e.type);function i(){t.use("mui/mallbar/guide",function(t,e){new e({isMask:false,callback:function(){a.initBar()}})});setTimeout(function(){if(t.one(".mui-mbar-guide")){t.one(".mui-mbar-guide").remove();a.initBar()}},12*1e3)}b.getStaticConf({cb:function(t){b.log("getStaticConf",t);if(t.showCartGuide){if(window.localStorage){p.get({k:c.K.FRM_CART,success:function(t){if(t){a.initBar()}else{p.set({k:c.K.FRM_CART,v:true});i()}}})}else{if(s.get("_mbg")){a.initBar()}else{s.set("_mbg","1",60,c.DEBUG?"tmall.net":"tmall.com","/");i()}}}else{a.initBar()}}})});i.getBar({shopId:a.get(c.K.SHOP_CONFIG)?"1":"",gConfig:a.get(c.K.G_CONFIG),mallbar:a});b.getStaticConf({cb:function(t){var e=t.firstBubbleWaitTime||3;setTimeout(function(){a.firstBubble()},e*1e3)}})},initBar:function(){var a=this;if(a.get(c.K.INITED)){return}a.set(c.K.INITED,true);var e=a.get(c.K.MODEL).get(c.K.BAR);var i=a.get(c.K.ROOT);var l=a.get(c.K.ROOT_OUTER);var o=a.get(c.K.MODEL);var s=o.get(c.K.USERINFO);var m=a.get(c.K.ITEMS);var u,p,h;var v=false;if(TB.instance&&TB.instance.bucket){if(TB.instance.bucket.getCurBt()=="10"||TB.instance.bucket.getCurBt()=="11"){v=true}}a.set("isBucket10",v);if(v){var A;t.each(e.l,function(t,a){if(t&&t.id=="cart"){A=a}});t.each(e.l,function(t,a){if(t&&t.id=="favor"){e.l.splice(a+1,0,e.l[A]);e.l.splice(A,1)}})}this.isBucket10=v;b.log("::after bucket::",e.l);var I=[];I.push('
');for(u=0,p=e.l.length;u");I.push('
');for(u=0,p=e.l.length;u');for(u=0,p=e.l.length;u");I.push("
");I.push(T);i.html(I.join(""));var B=t.one(window);var S=i.one(".mui-mbar-mini");var O=i.one(".mui-mbar-mini-logo");var L=i.one(".mui-mbar-tabs");var N=i.one(".mui-mbar-tabs-mask");var R=i.one(".mui-mbar-plugins");var U=L.all(".mui-mbar-tab");var M;var P;for(u=0,p=U.length;u0})}})}}})});if(n.ie&&n.ie<7){B.on("scroll",function(){l.css("top",B.scrollTop()+"px")});l.css("top",B.scrollTop()+"px")}i.on("click",function(t){t.stopPropagation()});var G=t.one(document);G.on("click",function(e){b.log("document click");if(c.S.EXPAND===a.get(c.K.STATUS)){a.fire(c.E.STATUS_CHANGE,{status:a.isMiniWidth()?c.S.MINI:c.S.STANDARD})}if(t.one(e.target).hasClass("j_flyToMallBar")){a.driving({e:e})}});var F=0;var x=a.get(c.K.G_CONFIG);G.on("mousemove",t.buffer(function(e){if(!a.isMiniWidth()&&!x.forceMallBarMini){return}var i=t.DOM.viewportWidth()-e.pageX+G.scrollLeft();var r=a.get(c.K.STATUS);var n=i<=c.MINI_HIT_WIDTH;if(n&&c.S.MINI===r){b.sendLog(c.ARR.S12_USER_TRIGGER);a.fire(c.E.STATUS_CHANGE,{status:c.S.STANDARD})}F=n},300));i.on("mouseleave",t.buffer(function(){if(!a.isMiniWidth()&&!x.forceMallBarMini){return}var t=a.get(c.K.STATUS);if(c.S.STANDARD===t){a.fire(c.E.STATUS_CHANGE,{status:c.S.MINI})}}));B.on("focus",t.buffer(function(t){a.broadcast(c.E.PAGE_VISIBILITY_CHANGE,{pageVisible:true})},c.COMMON_DELAY,a));B.on("blur",t.buffer(function(t){a.broadcast(c.E.PAGE_VISIBILITY_CHANGE,{pageVisible:false})},c.COMMON_DELAY,a));var X=false;var H=true;function k(){b.log("onresize");var r=t.DOM.viewportWidth();var n=t.DOM.viewportHeight();l.height(n);i.height(n);L.height(n);N.height(n);R.height(n);t.each(R.all(".mui-mbar-plugin"),function(a){a=t.one(a);a.height(n);var e=a.one(".mui-mbar-plugin-hd");var i=a.one(".mui-mbar-plugin-bd");i.height(n-e.height())});var o=0;t.each(e.l,function(t,a){if(!t.custom&&!t.bottom&&t.on&&!t.defaultHide){var e=m[t.id].get(c.K.TAB);o+=e.height()+(t.margin*2||0)}});var s=(n-o)/2;var d=s;var f=0;var g=30;for(u=0,p=e.l.length;u\u54c1\u724c\u5173\u6ce8\u6210\u529f\uff01

\u67e5\u770b\u6700\u65b0\u52a8\u6001

',a.id,c.SCM.BRAND_FLY_BUB_LINK)}else{e='\u54c1\u724c\u5173\u6ce8\u6210\u529f\uff01

\u67e5\u770b\u65b0\u52a8\u6001

'}break;case"ASSET":n=c.ARR.COUPON_FLY_BUB_SHOW;l=c.ARR.COUPON_FLY_BUB_CLICK;e='\u4f18\u60e0\u5238\u9886\u53d6\u6210\u529f

\u7acb\u5373\u67e5\u770b

';break;case"BONUS":n=c.ARR.BONUS_FLY_BUB_SHOW;l=c.ARR.BONUS_FLY_BUB_CLICK;e='\u7ea2\u5305\u9886\u53d6\u6210\u529f\uff01
\u7ea2\u5305\u4f1a\u572824\u5c0f\u65f6\u5230\u8d26\uff0c\u67e5\u770b\u6211\u5df2\u9886\u7528\u7684\u7ea2\u5305\uff01';break;case"GUESS_POINT":n=c.ARR.POINT_SHOW;l=c.ARR.POINT_BUB_CLICK;e='\u5929\u732b\u79ef\u5206\u9886\u53d6\u6210\u529f\uff01

\u53bb\u770b\u770b\u79ef\u5206

';break;case"SIGN_POINT":n=c.ARR.POINT_SHOW;l=c.ARR.POINT_BUB_CLICK;e='\u5929\u732b\u79ef\u5206\u9886\u53d6\u6210\u529f\uff01

\u53bb\u770b\u770b\u79ef\u5206

';break;case"GET_COUPON":n=c.ARR.GET_COUPON_BUB_SHOW;l=c.ARR.GET_COUPON_BUB_CLICK;e='\u4f18\u60e0\u5238\u9886\u53d6\u6210\u529f

\u53bb\u770b\u770b\u4f18\u60e0\u5238

';break;case"FOOT":n=c.ARR.FOOT_FLY_BUB_SHOW;l=c.ARR.FOOT_FLY_BUB_CLICK;e='\u60a8\u9489\u4f4f\u7684\u5546\u54c1\u5728\u8fd9\u91cc\u54e6\uff01

\u53bb\u770b\u770b

';o.height="110px";break;case"FAVOR":n="";l="";e='\u6536\u85cf\u5546\u54c1\u6210\u529f\uff01

\u53bb\u770b\u770b

';break;case"DELETE_FAVOR":n="";l="";e='\u53d6\u6d88\u6536\u85cf\u6210\u529f\uff01

\u53bb\u770b\u770b

';break}r.fire(c.E.BUBBLE_CHANGE,t.mix(o,{show:true,html:e,customConentType:1,isNotTabFire:false,showDelay:10,hideDelay:a.hideDelay===undefined?"":a.hideDelay,showed:function(t){n&&b.sendLog(n);var a=t.one(".j_BubbleLink");if(a){a.on("click",function(t){switch(i){case"BRAND":b.sendLog(c.ARR.BRAND_FLY_BUB_LINK_CLICK);break;case"GET_COUPON":b.sendLog(c.ARR.GET_COUPON_BUB_LINK_CLICK);break;case"SIGN_POINT":b.sendLog(c.ARR.POINT_BUB_LINK_CLICK);break;case"GUESS_POINT":b.sendLog(c.ARR.POINT_BUB_LINK_CLICK);break}t.stopPropagation()});b.getStaticConf({cb:function(t){t.brandBubUrl&&a.attr("href",t.brandBubUrl)}})}},clicked:function(){l&&b.sendLog(l)}}))}})}else{var l="",o="";switch(i){case"BRAND":l=c.ARR.BRAND_FLY_BUB_SHOW;o=c.ARR.BRAND_FLY_BUB_CLICK;break;case"ASSET":l=c.ARR.COUPON_FLY_BUB_SHOW;o=c.ARR.COUPON_FLY_BUB_CLICK;break;case"BONUS":l=c.ARR.BONUS_FLY_BUB_SHOW;o=c.ARR.BONUS_FLY_BUB_CLICK;break;case"GUESS_POINT":l=c.ARR.POINT_SHOW;o=c.ARR.POINT_BUB_CLICK;break;case"SIGN_POINT":l=c.ARR.POINT_SHOW;o=c.ARR.POINT_BUB_CLICK;break;case"GET_COUPON":l=c.ARR.GET_COUPON_BUB_SHOW;o=c.ARR.GET_COUPON_BUB_CLICK;break;case"FOOT":l=c.ARR.FOOT_FLY_BUB_SHOW;o=c.ARR.FOOT_FLY_BUB_CLICK;break;case"CART":break}l&&b.sendLog(l);o&&b.sendLog(o)}}},fly:function(a){var e=this;var i=a.type.toUpperCase();if(!e.isValid(i)){return}var n=e.getPoint({type:i});if(!n){return}var l=a.flyer,s=a.start,m=a.target,b=a.unAnim,u=a.speed?a.speed:1.16,d=a.bubble===undefined?true:a.bubble,p=a.hideDelay?a.hideDelay:"",f={left:n.x,top:n.y}||o.offset(m),g=t.UA.ie!=6,h=a.targetOffset||{left:0,top:0},_=a.flyerOffset||{left:0,top:0},T=a.flyerResize||{x:16,y:16},v=-1,A;var E=function(){var n=t.UA.ie==6;var s=e._popEl,m=t.UA.webkit,b=m?2:0,u={opacity:0,top:f.top-8-35-b+(n?o.scrollTop():0)+"px"},g={position:n?"absolute":"fixed",opacity:0,left:f.left-8-b+(n?o.scrollLeft():0)+"px",top:f.top-8-b+(n?o.scrollTop():0)+"px"};if(!s){var h=e.get(c.K.ITEMS);var _;if(h){_=h[a.type];if(_){_=_.get(c.K.POBJ);_.fire(c.E.DATA_CHANGE)}}s=e._popEl=o.create("
1
",{css:t.mix({display:"none",textAlign:"center",backgroundColor:"#b3000e",color:"#ffffff",zIndex:1000001},m?{width:"20px",height:"20px",borderRadius:"10px",color:"#ffffff",lineHeight:"20px",fontSize:"12px",transform:"scale(0.8)",WebkitTransform:"scale(0.8)"}:{width:"16px",height:"16px",borderRadius:"8px",lineHeight:"16px",fontSize:"10px"})});o.append(s,document.body)}function T(){o.hide(l);o.css(s,g);o.show(s);r(s,{opacity:1},.8,"easeOut",function(){r(s,u,1,"easeOut",function(){o.hide(s);e.onFinish({type:i,id:a.id,bubble:d,hideDelay:p});a.complete&&a.complete()}).run()}).run()}if(n){T()}else{r(l,{opacity:0},.8,"easeOut",T).run()}};if(T){A={x:o.width(l),y:o.height(l)}}o.append(l,document.body);o.css(l,{position:g?"fixed":"absolute",zIndex:1e6});if(g){s={left:s.left-o.scrollLeft(),top:s.top-o.scrollTop()};if(m){f={left:parseFloat(o.css(m,"left")),top:parseFloat(o.css(m,"top"))}}}else{if(m){f=o.offset(m)}else{f.left+=o.scrollLeft();f.top+=o.scrollTop()}}f.top+=h.top-4;var I=g?0:o.scrollTop();var C=Math.min(s.top,f.top)-Math.abs(s.left-f.left)*(1/3);if(C{3}
'.replace("{0}",r(l,i)?l:"default").replace("{3}",r(l,i)?r(l,i):"")).appendTo(document.getElementsByTagName("body")[0])}if(l!="cart"){n.pageX=m.offset(s).left+(m.width(s)-b.width())/2;n.pageY=m.offset(s).top-b.height()/2}b.css({left:n.pageX-m.scrollLeft(),top:n.pageY-m.scrollTop()});if(l=="cart"||!a.bubble){a.bubble=false}if(l=="cart"){var g=e.get(c.K.ITEMS);var h;if(g){h=g.cart;if(h){h=h.get(c.K.POBJ);h.fire("addCartItem")}}}var _;var T;if(b&&b.width){_=n.pageX+b.width()/2;T=n.pageY+b.height()/2}else{_=n.pageX;T=n.pageY}this.fly({type:l,flyer:b,start:{left:_,top:T},target:a.target?a.target:null,unAnim:a.unAnim||false,bubble:a.bubble===false?a.bubble:true,speed:a.speed?a.speed:1.16,hideDelay:a.hideDelay?a.hideDelay:"",complete:function(){if(typeof o=="function"){o()}}})}},bubble:function(t){var a=this;t=t||{};t.show=typeof t.show=="undefined"?t.show=true:t.show;t.tab=t.tab||"PROF";t.title=t.title||"";t.content=t.content||"";t.isCustomContent=!!t.isCustomContent;var e=t.customContentType||2;if(typeof t.bubbleType=="undefined"){t.bubbleType=1}if(typeof t.isNotTabFire=="undefined"){t.isNotTabFire=true}var i={PROF:1,CART:2,ASSET:3,BRAND:4,PROMOTION:5};var r=a.get(c.K.ITEMS)[c.P[t.tab]];if(!r){return}if(t.show){b.log("isMallbarExpend",E);if(A){var n={tab:t.tab,id:t.flag||i[t.tab],item:r,opt:t};v.push(n);return}else if(!E&&!t.first){return}}if(t.show){if(t.tab=="PROF"){r.get("pluginObj").fire(c.E.PROF_HIDE)}}r.fire(c.E.BUBBLE_CHANGE,{show:t.show,html:t.content,height:t.height||"",showDelay:500,contentTitle:t.title,bubbleType:t.bubbleType,customContentType:e,isNotTabFire:t.isNotTabFire,hideDelay:t.hideDelay||"",showDelay:t.showDelay,dismiss:t.dismiss||"",showed:t.showed||"",clicked:t.clicked||"",arrClicked:t.arrClicked||"",arrShowed:t.arrShowed||"",colsedClicked:t.colsedClicked||""})},firstBubble:function(){var t=this;A=false;b.log("arrBubble",v);if(v&&v.length){var a=0,e=v[0].id;for(var i=v.length-1;i>=0;i--){if(v[i].id-1;var m=t.indexOf("mbar-debug-tms=1")>-1;var _=t.indexOf("mbar-debug-log=1")>-1;var r="2014-03-06 03:20";var n=window.TB;var e=n&&n.globalToolFn&&a.isFunction(n.globalToolFn.isDaily)?n.globalToolFn.isDaily():location.hostname.indexOf(".net")>=0||location.hostname.indexOf(".com.hk")>=0;var I="http://gm.mmstat.com";var b={VER:"2.2.3",DEBUG:l,DEBUG_LOG:_,IS_DAILY:e,SKIN:"mui-mbar-d11",TAB_W:50,MINI_HIT_WIDTH:50,TAB_W_C:100,ZINDEX:999999,SAMPLING:5/1e3,SAM_PV:1/1e3,EASE:"easeOut",BUBBLE_PAD:5,COMMON_DELAY:100,TIMEOUT_TOP:5*1e3,TIMEOUT_STORAGE:3*1e3,DEGRADE:-99,BUBBLE_HIDE_DELAY:12*1e3,AVATAR:e?"http://wsapi.jianghu.daily.taobao.net/avatar/getAvatar.do?userId={0}&width={1}&height={1}&type=ww":"http://wwc.taobaocdn.com/avatar/getAvatar.do?userId={0}&width={1}&height={1}&type=ww",CAT:"http://img04.taobaocdn.com/tps/i4/T1VaaiFdpdXXXtxVjX.swf",AR:I,CK_USED:"_mr",NO_IMG:"http://img01.taobaocdn.com/tps/i1/T1aYCaFaVcXXX6DYsb-100-100.gif",STORAGE_PROXY:"http://www.tmall.com/go/act/storage-proxy.php",DOMAIN:e?".tmall.net":".tmall.com",RECOMMEND_APPID:"03159",ARR:{S1_DEFAULT:I+"/tmallbrand.999.102",S12:I+"/tmallbrand.99.1",S21:I+"/tmallbrand.99.2",S12_ACTIVE:I+"/tmallbrand.99.48",S21_ACTIVE:I+"/tmallbrand.99.49",S32_ACTIVE:I+"/tmallbrand.99.70",S31_ACTIVE:I+"/tmallbrand.99.71",S32:I+"/tmallbrand.99.9",S12_USER_TRIGGER:I+"/tmallbrand.99.113",S21_ICON_CLOSE:I+"/tmallbrand.99.114",QRCODE:I+"/tmallbrand.99.66",PROF:I+"/tmallbrand.99.3",PROF_LOGIN:I+"/tmallbrand.99.62",PROF_BUB_SHOW:I+"/tmallbrand.99.19",PROF_BUB_CLICK:I+"/tmallbrand.99.20",PROF_BUB_LINK_CLICK:I+"/tmallbrand.99.21",PROF_BUB_T0_SHOW:I+"/tmallbrand.99.89",PROF_BUB_T0_CLICK:I+"/tmallbrand.99.90",ASSETS_TAB_CLICK:I+"/tmallbrand.99.116",COUPON_AVAILABLE_SHOW:I+"/tmallbrand.99.7",COUPON_AVAILABLE_CLICK:I+"/tmallbrand.99.10",COUPON_MEMBER_BUBBLE_A_SHOW:I+"/tmallbrand.99.85",COUPON_MEMBER_BUBBLE_A_CLICK:I+"/tmallbrand.99.86",COUPON_MEMBER_BUBBLE_B_SHOW:I+"/tmallbrand.99.87",COUPON_MEMBER_BUBBLE_B_CLICK:I+"/tmallbrand.99.88",COUPON_7_SHOW:I+"/tmallbrand.99.13",COUPON_1_SHOW:I+"/tmallbrand.99.14",COUPON_7_CLICK:I+"/tmallbrand.99.15",COUPON_1_CLICK:I+"/tmallbrand.99.16",COUPON_COULD_SHOW:I+"/tmallbrand.99.59",COUPON_COULD_CLICK:I+"/tmallbrand.99.58",COUPON_FLY_BUB_SHOW:I+"/tmallbrand.99.26",COUPON_FLY_BUB_CLICK:I+"/tmallbrand.99.27",BONUS_FLY_BUB_SHOW:I+"/tmallbrand.99.28",BONUS_FLY_BUB_CLICK:I+"/tmallbrand.99.29",BONUS_AVAILABLE_BUB_SHOW:I+"/tmallbrand.99.30",BONUS_AVAILABLE_BUB_CLICK:I+"/tmallbrand.99.31",POINT_SHOW:I+"/tmallbrand.99.64",POINT_BUB_CLICK:I+"/tmallbrand.99.63",POINT_BUB_LINK_CLICK:I+"/tmallbrand.99.67",GET_COUPON_BUB_SHOW:I+"/tmallbrand.99.65",GET_COUPON_BUB_CLICK:I+"/tmallbrand.99.68",GET_COUPON_BUB_LINK_CLICK:I+"/tmallbrand.99.69",BRAND_FLY_BUB_SHOW:I+"/tmallbrand.99.23",BRAND_FLY_BUB_CLICK:I+"/tmallbrand.99.24",BRAND_FLY_BUB_LINK_CLICK:I+"/tmallbrand.99.25",LIVE_SHOW:I+"/tmallbrand.99.8",LIVE_CLICK:I+"/tmallbrand.99.11",LIVE_BUB_LINK_CLICK:I+"/tmallbrand.99.22",FOOT_BUBBLE:I+"/tmallbrand.99.17",FOOT_BUBBLE_CLICK:I+"/tmallbrand.99.18",FOOT_FLY_BUB_SHOW:I+"/tmallbrand.99.32",FOOT_FLY_BUB_CLICK:I+"/tmallbrand.99.33",FOOT_PIN_ITEM:I+"/tmallbrand.99.40",FOOT_DELETE_ITEM:I+"/tmallbrand.99.41",FOOT_CLEAR_HISTORY:I+"/tmallbrand.99.42",FOOT_UNPIN_ITEM:I+"/tmallbrand.99.43",CAL_REMIND:I+"/tmallbrand.99.53",CAL_BUB_SHOW:I+"/tmallbrand.99.54",CAL_BUB_CLICK:I+"/tmallbrand.99.55",CAL_BUB_LINK_CLICK:I+"/tmallbrand.99.57",CAL_DATE:I+"/tmallbrand.99.56",BACKTOP_CLICK:I+"/tmallbrand.99.115",PV:I+"/tmallbrand.999.1",LOGIN1:I+"/tmallbrand.999.2",LOGIN2:I+"/tmallbrand.999.3",RETINA:I+"/tmallbrand.999.4",FOOT_MORE_CLICK:I+"/tmallbrand.999.9",EXP1:I+"/tmallbrand.999.11",EXP2:I+"/tmallbrand.999.12",EXP3:I+"/tmallbrand.999.13",TIME1s:I+"/tmallbrand.999.14",TIME1m:I+"/tmallbrand.999.15",TIME1h:I+"/tmallbrand.999.16",TIME1d:I+"/tmallbrand.999.17",INCOGNITO:I+"/tmallbrand.999.18",CLEAR:I+"/tmallbrand.999.19",EXP7:I+"/tmallbrand.999.20",FAVOR_TO_MATCH:I+"/tmallbrand.99.77",FAVOR_TO_FX:I+"/tmallbrand.99.78",FAVOR_DELETE:I+"/tmallbrand.99.79",FAVOR_BACK:I+"/tmallbrand.99.80",FAVOR_CATE_CHECK:I+"/tmallbrand.99.81",FOOT_ADD_FAVOR:I+"/tmallbrand.99.82",PROMOTION_SHOW:I+"/tmallbrand.99.84",CART_TAB_CLICK:I+"/tmallbrand.99.101",CART_TAB_CLICK_DOWN:I+"/tmallbrand.99.102",PROMOTION_BUBBLE_SHOW:I+"/tmallbrand.99.91",PROMOTION_BUBBLE_CLICK:I+"/tmallbrand.99.92"},PE:{},SCM:{PROF:"1048.1.2.2",LIVE:"1048.1.5.2",LIVE_BUB_LINK:"1048.1.5.3",BRAND_FLY_BUB_LINK:"1048.1.4.15",CAL_ACT:"1048.1.10.2",FAVOR_ITEM:"1048.1.11.1"},URL:{GET_BAR:e?"http://bar.daily.tmall.net/getMallBar.htm?shopId={0}&v={1}&bizId={2}":"http://bar.tmall.com/getMallBar.htm?shopId={0}&v={1}&bizId={2}",GET_MSG:e?"http://bar.daily.tmall.net/getMessageWarn.htm":"http://bar.tmall.com/getMessageWarn.htm",GET_PLUGIN_EXAMPLE:"example.do",GEI_PLUGIN_PROF:e?"http://bar.daily.tmall.net/getMyInfo.htm":"http://bar.tmall.com/getMyInfo.htm",GET_PLUGIN_ASSET:e?"http://bar.daily.tmall.net/getMyAssets.htm":"http://bar.tmall.com/getMyAssets.htm",GET_PLUGIN_ASSET_COUPON_DUE_TIP:e?"http://bar.daily.tmall.net/cueCouponInfo.htm":"http://bar.tmall.com/cueCouponInfo.htm",GET_PLUGIN_ASSET_COUPON_DISABLE_TIP:e?"http://bar.daily.tmall.net/disableCouponInfo.htm":"http://bar.tmall.com/disableCouponInfo.htm",GET_PLUGIN_ASSET_TIP:e?"http://bar.daily.tmall.net/cueAssetMsg.htm":"http://bar.tmall.com/cueAssetMsg.htm",GET_PLUGIN_MEMBER_RIGHT:e?"http://bar.daily.tmall.net/getMemberRight.htm":"http://bar.tmall.com/getMemberRight.htm",GET_PLUGIN_BRAND_TIP:e?"http://bar.daily.tmall.net/cueAssetMsg.htm":"http://bar.tmall.com/cueAssetMsg.htm",GET_PLUGIN_BRAND:"brand.do",GET_PLUGIN_GET_BRAND:e?"http://mybrand.daily.tmall.net/ajax/mybrands/getMallBarMyBrands.htm?type=2":"http://mybrand.tmall.com/ajax/mybrands/getMallBarMyBrands.htm?type=2",GET_PLUGIN_LIVE:e?"http://tmm.daily.taobao.net/messagebox/readRadiateMsg.do":"http://tmm.taobao.com/messagebox/readRadiateMsg.do",GET_PLUGIN_LIVE_TIP:e?"http://bar.daily.tmall.net/getActiveMessage.htm":"http://bar.tmall.com/getActiveMessage.htm",GET_PLUGIN_FOOT_ITEMS:e?"http://bar.daily.tmall.net/getItemList.htm":"http://bar.tmall.com/getItemList.htm",GET_PLUGIN_FOOT_ITEMS2:e?"http://bar.daily.tmall.net/getItemList.htm":"http://bar.tmall.com/getItemList.htm",GET_PLUGIN_FOOT_PINITEM:e?"http://bar.daily.tmall.net/pinItem.htm":"http://bar.tmall.com/pinItem.htm",GET_CALENDAR:e?"http://cdnprepub.tms.taobao.com/go/act/getcalendar.php?date={0}":"http://www.tmall.com/go/act/getcalendar.php?date={0}",GET_CONF:l?"data/mallbar-conf.js":e?"http://tms.taobao.com/go/act/mallbar-conf.php":"http://www.tmall.com/go/act/mallbar-conf.php",GEI_PUSH_ITEMS:e?"http://110.75.14.52/recommend.htm":"http://ald.taobao.com/recommend.htm",GET_PLUGIN_ASSET_OBTAIN_COUPON_LIST:e?"http://bar.daily.tmall.net/cueAssetMsg.htm":"http://bar.tmall.com/cueAssetMsg.htm",GET_PLUGIN_ASSET_OBTAIN_COUPON:e?"http://bar.daily.tmall.net/obtainCoupon.htm":"http://bar.tmall.com/obtainCoupon.htm",GET_PLUGIN_FAVOR_INFO:e?"http://bar.daily.tmall.net/getCollectInfo.htm":"http://bar.tmall.com/getCollectInfo.htm",GET_PLUGIN_FAVOR_FX:"http://ald.taobao.com/recommend.htm?appId=03276",GET_PLUGIN_FAVOR_MATCH:"http://ald.taobao.com/recommend.htm?appId=03278",FAVORITE_ITEM:e?"http://bar.daily.tmall.net/favorite/favoriteItem.htm":"http://bar.tmall.com/favorite/favoriteItem.htm",GET_PLUGIN_PROF_QUERY_T0_USER:e?"http://bar.daily.tmall.net/activate/queryT0User.htm":"http://bar.tmall.com/activate/queryT0User.htm",GET_PLUGIN_PROF_SET_T0_USER:e?"http://bar.daily.tmall.net/activate/setT0User.htm":"http://bar.tmall.com/activate/setT0User.htm"},P:{PROF:"prof",ASSET:"asset",GET_COUPON:"asset",BONUS:"asset",GUESS_POINT:"asset",SIGN_POINT:"asset",BRAND:"brand",LIVE:"live",FOOT:"foot",CAL:"cal",TRIP:"trip",CART:"cart",NAV:" nav",QRCODE:"qrcode",TOP:"top",UE:"ue",CHARGE:"charge",FAVOR:"favor",PROMOTION:"promotion"},E:{AFTER_BAR_CHANGE:"afterBarChange",MALLBAR_STATUS_CHANGE:"mallbarStatusChange",STATUS_CHANGE:"statusChange",SUPTIP_CHANGE:"suptipChange",BUBBLE_CHANGE:"bubbleChange",PAGE_VISIBILITY_CHANGE:"pageVisibilityChange",VISIBILITY_CHANGE:"visibilityChange",DATA_CHANGE:"dataChange",FLYIN_END:"flyinEnd",ERROR:"error",LOGIN:"login",LOGIN_SUCCESS:"loginSuccess",AFTER_EXPAND_CHANGE:"afterExpandChange",AFTER_TITLE_CHANGE:"afterTitleChange",PROF_CHANGE:"profChange",QRCODE_CHANGE:"qrcodeChange",ON_LOAD:"onLoad",PROF_HIDE:"hideProf",RIGHT_TAB_ITEM_CLICK:"rightTabItemClick"},K:{BAR:"bar",USERINFO:"userinfo",STATIC_CONF:"staticConf",TIMESTAMP:"timestamp",ACCESSED:"__mallbar_accessed",FRM_INIT:"mui/mallbar/frm/init",FRM_USERINFO:"mui/mallbar/frm/userinfo",FRM_ACCESS:"mui/mallbar/frm/access",FRM_STATUS:"mui/mallbar/frm/status",FRM_CART:"mui/mallbar/frm/cart",IFRAME:"iframe",XD:"xd",XD_TIMEOUT:"xdTimeout",IFRAME_TIMEOUT:"iframeTimeout",PROXY:"proxy",CALLBACK_LIST:"callbackList",CACHED_ACTION_LIST:"cachedActionList",PROXY_READY:"proxyReady",INITED:"inited",CONTAINER:"container",G_CONFIG:"gConfig",SHOP_CONFIG:"shopConfig",ITEMS:"items",MODEL:"model",ROOT:"root",ROOT_OUTER:"rootOuter",STATUS:"status",OLD_INDEX:"oldIndex",LOADED:"loaded",MALLBAR:"mallbar",MALLBAR_ITEM:"mallbarItem",TIP_CONTAINER:"tipContainer",TAB:"tab",TITLE:"title",INDEX:"index",BUBBLE:"bubble",PLUGIN:"plugin",SCR:"scr",EXPAND:"expand",POBJ:"pluginObj",PG_FISRT_VISIBLE:"pgFirstVisible",DATA:"data",SHOW_SUPTIP:"showSuptip",SUPTIP_NUM:"suptipNum",BUBBLE_TYPE:"bubbleType",SHOW_BUBBLE:"showBubble",NOT_TO_SUPTIP:"notToSuptip",COUPON_ANCHOR:"anchor",ADD_CART_ITEM:"addCartItem"},B:{FOREVER:1},S:{MINI:1,STANDARD:2,EXPAND:3,SCREEN:4,BAR_NO_MSG:-4,BAR_NOT_LOGIN:-2,BAR_SUCCESS:1},C:{TAB_HIGHLIGHT:"mui-mbar-tab-hover",TABS_SHADOW:"mui-mbar-tabs-shadow",MINI_CLOSE:"mui-mbar-mini-logo-close",CAT_LEFT:"mui-mbar-cat-left",SCALE_DOWN:"mui-mbar-plugin-scaleDown"},M:{B:"\u672c\u9875\u9762\u4e0d\u652f\u6301\u5de5\u5177\u680f",T:"\u63d2\u4ef6\u7c7b\u578b\u53ea\u652f\u6301\uff1abrand\u3001asset\u3001prof\u3001live\u3001foot"},U:{PROF_INTERACT:e?"http://www.daily.tmall.net/go/act/tmall/2013-khc.php":"http://1111.tmall.com",TRIP_TMS:m?"http://demo.tmall.net/sell/gonglue/":e?"http://cdnprepub.tms.taobao.com/go/act/tmall/mallbar/1111-strategy.php":"http://www.tmall.com/go/act/tmall/mallbar/1111-strategy.php",NAV_TMS:m?"http://cdnprepub.tms.taobao.com/go/act/1212/mallbar-nav.php":e?"http://cdnprepub.tms.taobao.com/go/act/1212/mallbar-nav.php":"http://www.tmall.com/go/act/1212/mallbar-nav.php",ETC:{DAILY:"http://cdnprepub.tms.tmall.com/go/rgn/2014/mallbar/config/mconf-pub-2_2_0.php",STB:"http://www.tmall.com/go/rgn/2014/mallbar/config/mconf-pub-2_2_0.php",PRE:"http://cdnprepub.tms.tmall.com/go/rgn/2014/mallbar/config/mconf-pub-2_2_0.php",ONLINE:"http://www.tmall.com/go/rgn/2014/mallbar/config/mconf-pub-2_2_0.php"},QR:"http://gqrcode.alicdn.com/img?w=140&h=140&type=hv&logo=TB1cM36FVXXXXXiXpXXIqztGVXX-45-45.png&el=h&text=http://www.tmall.com/go/act/tmall-fp/m/download.php"},T:{NUMLEV:13}};return b});KISSY.add("mui/mallbar/util",function(a,e,t,i,r,n,o,s,l){var m=/^(https?:\/\/.+?)(\?(.*?))?(#(.*?))?$/;var u={log:function(){if(!o.DEBUG_LOG){return}if(window.console&&window.console.log&&window.console.log.apply){window.console.log.apply(window.console,arguments)}},fm:function(){if(arguments.length==0){return""}else if(arguments.length==1){return arguments[0]}var a=arguments[0],e;for(e=1;e-1?"&":"?",+new Date);t.onload=function(){window[e]=null}};var b;var d=false;var p=[];c.getStaticConf=function(e){if(b){e.cb&&e.cb(b);return}else{e.cb&&p.push(e.cb)}if(e.url){c.ajax({url:e.url,jsonpCallback:"__mallbarGetConf",scriptCharset:"gbk",error:function(a){c.log("__mallbarGetConf error\uff1a",a)},success:function(e){c.log("__mallbarGetConf",e);if(e){b=e;a.each(p,function(a){a(e)});p=[]}}})}};c.ajax=function(e){var t=e.success;var i=e.complete;var r=location.href;var n=r.indexOf("mbar-local=1")>-1;if(n&&o.DEBUG&&e.url.indexOf("mconf")>=0){e.type="get";e.dataType="script";var s="";var l=e.url;if(e.url.indexOf("?")>=0){var m=e.url.split("?");l=m[0];s=m[1]}var u=l.substring(l.lastIndexOf("/")+1,l.lastIndexOf(".")>=0?l.lastIndexOf("."):l.length);l=c.fm("data/{0}.js{1}",u,s?"?"+s:"");e.url=e._mockUrl?e._mockUrl:l;e.success=function(){t&&t(exports.response)}}else{e.type=e.type||"get";e.dataType=e.dataType||"jsonp";e.success=function(a){t&&t(a)}}var b=e.url.lastIndexOf("?")>-1;e.url=c.fm("{0}{1}_input_charset=UTF-8",e.url,b?"&":"?");e.timeout=e.timeout||5;e.error=e.error||function(a){c.log("U.ajax error: ",a)};var d=window.g_config||{};e.data=e.data||{};e.data.bizInfo=[d.bizId||"",d.sysId||"",d.devId||"pc"].join(".");e.complete=function(a){i&&i(a)};e.scriptCharset="gbk";a.ajax(e)};c.deepMerge=function(e,t){if(!a.isObject(e)||!a.isObject(t)){return e}a.each(t,function(t,i){if(a.isObject(e[i])){c.deepMerge(e[i],t)}else{e[i]=t}});return e};c.noScroll=function(a){if(!a){return}i.on(a,"mousewheel",function(a){var e=a.delta;var t=this.scrollTop;if(e>0&&0===t||e<0&&t+r.outerHeight(this)>=this.scrollHeight){a.halt()}})};var f=/^(\d+?)-(\d+?)-(\d+?) (\d+?):(\d+?):(\d+?)$/;var v=/^(\d+?)-(\d+?)-(\d+?)$/;c.getDateStr=function(a){a=a instanceof Date?a:new Date(a);return c.fm("{0}-{1}-{2}",a.getFullYear(),a.getMonth()+1,a.getDate())};c.parseDate=function(a){var e;e=f.exec(a);if(e){return new Date(e[1],parseInt(e[2],10)-1,e[3],e[4],e[5],e[6])}e=v.exec(a);if(e){return new Date(e[1],parseInt(e[2],10)-1,e[3])}return null};c.addSCM=function(a,e){var t=c.segment(a);t.qs=c.fm("?{0}{1}scm={2}",t.qs,t.qs?"&":"",e);return c.fm("{0}{1}{2}",t.url,t.qs,t.hash?"#"+t.hash:"")};var h=/^(\d+)\.(\d+)\.(\d+)$/;c.compareVersion=function(a,e){if(!h.test(a)||!h.test(e)){return-2}a=h.exec(a);e=h.exec(e);a=parseInt(a[1],10)*100+parseInt(a[2],10)*10+parseInt(a[3],10);e=parseInt(e[1],10)*100+parseInt(e[2],10)*10+parseInt(e[3],10);if(a===e){return 0}else if(ae){return 1}};if(a.isFunction(l)){c.codeTracker=new l;c.codeTracker.config({numLev:13,url:"http://mallbar.tmall.com/code-tracker"})}else{c.codeTracker=l}c.getSysId=function(){var a="";var e=window.g_config.appId==1;var t=window.g_config.sysId=="list";var i=window.g_config.appId==2||window.g_config.appId==7;!!t&&(a="list");!!e&&(a="detail");!!i&&(a="shop");return a};return c},{requires:["cookie","ajax","event","dom","ua","mui/mallbar/conf","mui/minilogin","mui/code-tracker"]});window.MLoginTimer=0;KISSY.add("mui/minilogin",function(e,n){var i=function(e){var n=location.hostname.split(".");return n.splice(n.length-e>0?n.length-e:0,e).join(".")}(2),o=location.hostname.indexOf(".net")>=0||location.hostname.indexOf(".com.hk")>=0,t=o?"daily.taobao.net":"taobao.com",a=o?"daily.tmall.net":"tmall.com",l=o?"daily.tmall.com.hk":"tmall.hk",r,c="assets_css=2.0.0/login_mini.css&enup_css=2.0.0/enup_mini.css",m="http"+(o?"":"s")+"://login."+t+"/member/login.jhtml?style=miniall&&enup=true&from=tmall&allp="+escape(c)+"&tpl_redirect_url=";var s={check:true,needRedirect:false,sub:false,proxy:{tmall:"http://vip."+a+"/miniLoginProxy.htm",hk:"http://www."+l+"/loginproxy.htm",yao:"http://yao.95095.com/go/rgn/95095/loginproxy.php",etao:"http://vip.daily.tmall.net/miniLoginProxy.htm"}};function d(e){var n=document.createElement("a");n.href=e;return n.hostname===location.hostname}var f={show:function(n,i){window.goldlog&&window.goldlog.send("http://log.mmstat.com/tmallmember.9.2",{});f.Analytics.MLstar=new Date*1;var o=this;if(typeof n!=="function"){i=n;n=null}i=e.merge(s,i);var t=new Date;t.setDate(t.getDate()-1);document.cookie="cookie2=;expires="+t.toGMTString()+";path=/;domain=.tmall.com";if(i.check===false){this._show(n,i)}else{this._check(function(e){f.Analytics.MLcheckStar=new Date*1;if(e){TB.Global&&TB.Global.updateLoginInfo();n&&n()}else{o._show(n,i)}},i)}},_checkPage:function(){return window.TB&&window.TB.userInfo&&window.TB.userInfo.isLogin},_check:function(n,i){f.Analytics.MLcheckStar=new Date*1;var o=this;var t=i.checkTimeout||5;var l=false,r=e.later(function(){if(!l){n(o._checkPage())}r&&r.cancel()},t*1e3);if(i&&i.checkApi&&i.checkApi.indexOf(".tmall.")==-1){i.checkApi=undefined}return e.io({type:"get",url:"http://miaoxin."+a+"/member/user_login_info2.do",success:function(e){f.Analytics.MLcheckEnd=new Date*1;l=true;n(e.login)},error:function(){l=true;n(o._checkPage())},timeout:t,dataType:"jsonp",charset:"utf-8",cache:false,headers:{"X-Requested-With":false}})},_show:function(o,t){f.Analytics.MLshowStar=new Date*1;window.MLoginTimer+=1;if(!!t.insert){window.MLoginTimer=0}if(window.MLoginTimer>1){return}var a,l=m,c="",s=window.location.hostname,u="";if(t.needRedirect){var h=t.redirectUrl?t.redirectUrl:location.href.split("#")[0];l+=encodeURIComponent(h)+"&full_redirect=true"}else{a="g_tml_callbak"+(new Date).getTime();window[a]=function(){var e=window.TB||{};r&&r.hide();e.Global&&e.Global.updateLoginInfo();window.MLoginTimer=0;o&&o.apply(this,arguments);try{delete window[a]}catch(n){}};if(t["proxyURL"]){c+=t["proxyURL"]}else if(s.indexOf(".hk")>=0){c+=t["proxy"]["hk"]}else if(s.indexOf("95095.com")>=0){c+=t["proxy"]["yao"]}else if(s.indexOf("95095.daily.etao.net")>=0){c+=t["proxy"]["etao"]}else{c+=t["proxy"]["tmall"]}c+=(c.indexOf("?")>0?"&":"?")+"callback="+a;if(!d(c)&&document.domain!==i){document.domain=i}if(d(c)&&document.domain===location.hostname){c+="&nsdomain=true"}l+=encodeURIComponent(c)+"&full_redirect=false"}if(t.sub){l+="&sub=true"}if(window.g_config&&window.g_config.moduleTimeStamp&&window.g_config.moduleTimeStamp.minilogin){l+="&t="+window.g_config.moduleTimeStamp.minilogin}u='';if(!!t.insert){e.all(t.insert).append(u);return}r=new n({width:400,height:360,bodyContent:u,mask:true,showCat:true,zIndex:999999,align:{points:["cc","cc"]}});r.render();r.show();var g=e.version.indexOf("1.3")>=0,p=e.all(g?r.__attrVals.el:r.$el),w=g?".mui-stdmod-body":".mui-dialog-body",y=g?".mui-ext-close":".mui-dialog-close",k=p.all(".j_minilogin_iframe");k.parent(w).style("background-color","#FAFAFA");f.Analytics.MLshowEnd=new Date*1;p.all(y).on("click",function(){t.closeCallback&&t.closeCallback();window.MLoginTimer=0;r.destroy()});k.on("load",function(){f.Analytics.MLloaded=new Date*1;f.sendTrack()})},Analytics:{},sendTrack:function(){if(!window.performance||window.performance&&!window.performance.getEntriesByType){return}var e;for(var n=0,i=window.performance.getEntriesByType("resource");n=0){e=i[n];break}}if(!e){return}var o=[];for(var t in e){o.push(t+"="+(t=="name"?"http://login.taobao.com":e[t]))}for(var t in f.Analytics){o.push(t+"="+f.Analytics[t])}o.push("MLtype=minilogin");var a=["[uhttp://login.tmall.com/track/0.2.0/]","[r10]"].join(""),l=document.cookie.match(/_nk_\=([^\;]*); /),r=l&&l[1]||"",c="http://gm.mmstat.com/ued.1.1.2?type=9&id=jstracker&v=0.02&nick="+encodeURIComponent(r)+"&msg="+a+escape(o.join("&"));(new Image).src=c}};return f},{requires:["mui/overlay/dialog","ajax"]});KISSY.add("mui/overlay/dialog",function(i,n){function t(n){var e=this;e.config=i.merge(t.Config,n);e.config.elCls=e.config.elCls||"";e.config.elCls+=e.config.skin?" mui-dialog-"+e.config.skin:"";if(e.config.mask){e.config.elCls+=" mui-dialog-hasmask"}t.superclass.constructor.call(this,e.config);var s=true;function o(){var n=e.get("el"),t=i.UA.ie<8?"style='height:expression(this.parentNode.clientHeight);'":"";n.append("
"+(e.config.showCat?"":""));s=false}if(i.version==="1.1.6"){e.on("show",function(){if(s){o()}});return}e.on("afterRenderUI",function(){o()})}t.Config={prefixCls:"mui-",showCat:true,zIndex:99999};i.extend(t,n.Dialog);return t},{requires:["overlay","mui/overlay/overlay.css","mui/button/btn.css","mui/button/btn-tb.css","mui/msg/msg.css"]});KISSY.add("mui/code-tracker",function(n){var e=n.unparam(document.location.search.substring(1));var o="disableSampling"in e;var a="debug"in e;var t=window.g_config||{};var c=window["mmstat"]=new Image;function r(e){var o=this;o.configData=n.merge(r.Config,e)}r.Config={numLev:13,url:document.location.href};n.augment(r,{config:function(e){var o=this;return o.configData=n.merge(o.configData,e)},send:function(n){if(!n)return;c.src=n},sendTrack:function(e,c,r,i){var d=this;var m=d.configData.numLev;var s=n.now()-(i||t&&t.startTime||0);e=Math.max(e,m+4);var u=Math.round(Math.pow(2,e-m));if(!o&&Math.floor(Math.random()*u)>0){return}var g=["[u"+d.configData.url+"]","[t"+s+"]","[c"+c+"]","[r"+u+"]"].join("")+(r||"");var f="",l;try{l=/_nk_=([^;]+)/.exec(document.cookie);if(l){f=decodeURIComponent(l[1])}}catch(v){}if(a){console&&console.log({name:c,time:s+"ms",sampling:"1/"+u,desc:r})}d.send("http://gm.mmstat.com/ued.1.1.2?"+["type=9","id=jstracker","v=0.01","nick="+encodeURIComponent(f),"islogin=0","msg="+encodeURIComponent(g),"file="+encodeURIComponent(d.configData.url),"line="+u,"scrolltop="+(document.documentElement&&document.documentElement.scrollTop||document.body&&document.body.scrollTop||0),"screen="+screen.width+"x"+screen.height,"t="+(new Date).valueOf()].join("&"))}});var i=new r;var d=function(){};n.mix(r,{configData:i.configData,config:i.config,send:i.send,sendTrack:i.sendTrack,saveTrack:d,getTrack:d,printTrack:d});window.CodeTracker=window.CodeTracker||r;return r});KISSY.add("mui/mallbar/model",function(t,a,e,i,r,n){var l=function(t){var a=this;t=t||{};l.superclass.constructor.call(a,t);a.init()};t.extend(l,t.Base,{init:function(){var t=this},isAccessed:function(){var t=e.get(i.CK_USED);r.log("used",t,e);return t==="1"},setAccessed:function(){e.set(i.CK_USED,"1",2147483647/86400,i.DOMAIN,"/")},getServerTime:function(){var t=this;var a=t.get(i.K.TIMESTAMP);return a?new Date(a):new Date},getUid:function(t){var a=this;t=t||a.get(i.K.USERINFO);var e="";try{if(t&&t.memberInfo){e=t.memberInfo.cookies.unb.value}}catch(n){r.log("getUid error",n)}return e},getBar:function(a){var e=this;var l=false;var o=0;var s=a.mallbar||null;var m={isLogin:true,nick:"",memberInfo:{isLogin:true,availablePoints:-99,activeStatus:-99,cookies:{unb:{value:""}}}};r.log("\u5f00\u59cb\u83b7\u53d6\u7528\u6237\u6570\u636e");function c(l){clearTimeout(o);r.log("\u5df2\u83b7\u53d6\u7528\u6237\u6570\u636e memberInfoReady",l);e.set(i.K.USERINFO,l);n.set({k:i.K.FRM_USERINFO,v:l});l.isLogin&&Math.random()=0)){if(a.gConfig.bizId==="chaoshi"&&t.id===i.P.CART){return}t.m=0;s.push(t)}});if(!s.length){return}l.l=s;t.each(l.q,function(a){t.each(l.l,function(t){if(t.id===a.id){t.m=a.m;return false}})});n.set({k:i.K.FRM_INIT,success:function(){r.log("\u5408\u5e76\u540e\u7684\u6846\u67b6\u6570\u636e",l);e.set(i.K.BAR,l)}})}})}},error:function(n){r.log("\u83b7\u53d6\u6846\u67b6\u6570\u636e\u5931\u8d25",n);r.codeTracker.sendTrack(i.T.NUMLEV,"mallbar.model.mallbarGetMallBar.get.failure","\u83b7\u53d6\u5de5\u5177\u680f\u6846\u67b6\u4fe1\u606f\u5931\u8d25");r.getStaticConf({url:i.U.ETC["ONLINE"],cb:function(l){n=n||{};if(!l.l||!l.l.length){return}var o=[];t.each(l.l,function(t){if(t.on&&(!t.since||r.compareVersion(i.VER,t.since)>=0)){if(a.gConfig.bizId==="chaoshi"&&t.id===i.P.CART){return}t.m=0;o.push(t)}});if(!o.length){return}e.set(i.K.BAR,{l:o})}})}})}function b(t){l=true;t=t||m;r.log("\u8d85\u65f6\u5f02\u5e38\u6216\u65e0\u540a\u9876",t);c(t)}var u=window.TB;if(u&&u.Global&&u.Global.loginStatusReady&&u.Global.memberInfoReady){var d={};o=setTimeout(function(){var a=r.deepMerge(t.clone(m),a);r.log("timeout enter",a);b(a)},i.TIMEOUT_TOP);u.Global.loginStatusReady(function(t){r.log("loginStatusReady",t);d=t;s.set("token",t["tbToken"]);if(!t.isLogin){c(t)}else{u.Global.memberInfoReady(function(t){if(l){r.log("timeout quit",t);return}c(t)})}})}else{b()}var f=s.get(i.K.SHOP_CONFIG)||s.get(i.K.G_CONFIG)||{};var p="",g="",h="",_="",T="",v="";if(window.g_config&&window.g_config.itemId){p=window.g_config.itemId}g=f.userId||f.sellerId||"";h=!!f.shopId?f.shopId:"";var A=t.one(".j_CollectBrand");if(A){T=A.attr("data-brandId")||""}var I=t.one("#J_CrumbSearchForm");var E=I&&I.one('input[name="cat"]');if(E){_=E.val()}if(window.g_config){v=!!window.g_config.bizId?window.g_config.bizId:""}s.set("itemId",p);s.set("sellerId",g);s.set("shopId",h);s.set("brandId",T);s.set("category",_);s.set("bizId",v);setTimeout(function(){var t=window.devicePixelRatio>1;t&&Math.random()','
\u25c6
','
','
{0}
',""].join("");var b=['
','
{0}
',"
"].join("");var d=new m(['
','
','
','
{{{tip}}}
','
\u786e\u5b9a
',' {{#if dialogType===2}}
\u53d6\u6d88
{{/if}}',"
","
"].join(""));var g="mui-mbar-dialog";var _="mui-mbar-dialog-bd";var p="mui-mbar-dialog-yes";var T="mui-mbar-dialog-no";var u=function(t){var a=this;u.superclass.constructor.call(a,t);a.init()};u.ATTRS={showBubble:{value:false},expand:{value:false},pgFirstVisible:{value:true},suptipNum:{value:0}};t.extend(u,a,{init:function(){var a=this;var e=a.get(l.K.MALLBAR);var i=e.get(l.K.MODEL);var m=i.get(l.K.USERINFO);var r=e.get(l.K.ITEMS);var d=a.get(l.K.DATA);var g=a.get(l.K.PLUGIN);var _=g.one(".mui-mbar-plugin-bd");var p=g.one(".mui-mbar-plugin-cover");var T=a.get(l.K.TAB);var u=a.get(l.K.BUBBLE);var h=u.one(".mui-mbar-tab-bubble-bd");var E=T.one(".mui-mbar-tab-sup");var A=T.one(".mui-mbar-tab-tip");var I=T.one(o.fm(".mui-mbar-tab-logo-{0}",d.id));var f=o.fm(".mui-mbar-tab-hover");var C=o.fm(".mui-mbar-tab-sel");var v=o.fm(".mui-mbar-tab-logo-{0}-sel",d.id);var B=0;_.on("scroll",t.buffer(function(t){var a=_.scrollTop();a>0?p.css("visibility","visible"):p.css("visibility","hidden")},100));!d.scroll&&o.noScroll(_);t.use(d.p,function(t,e){var i=new e({mallbarItem:a,container:_,tipContainer:g.one(".mui-mbar-plugin-hd-tip")});a.set(l.K.POBJ,i)});g.one(".mui-mbar-plugin-hd-close").on("click",function(){e.fire(l.E.STATUS_CHANGE,{status:l.S.STANDARD})});var L=0;T.on("mouseenter",function(){T.addClass(f);if(d.noHover||a.get(l.K.SHOW_BUBBLE)){return true}if(L){L=0}L=setTimeout(function(){if(!L){return}A.css({right:"70px",opacity:0});A.show();n(A,{right:"35px",opacity:1},.3,"easeOut",function(){}).run()},200)}).on("mouseleave",function(){T.removeClass(f);if(d.noHover||a.get(l.K.SHOW_BUBBLE)){return true}if(L){L=0}n(A,{right:"70px",opacity:0},.3,"easeIn",function(){A.hide()}).run()}).on("click",function(){var i=a.get(l.K.POBJ);if(i&&i.needLogin){i.needLogin(n)}else{n(false)}function n(n){if(!d.noLogin&&!m.isLogin||n){a.fire(l.E.LOGIN);return}if(d.noExpand){return}if(i&&i.disableExpand&&i.disableExpand()){if(l.S.MINI===e.get(l.K.STATUS)){e.fire(l.E.STATUS_CHANGE,{status:l.S.STANDARD})}return}T.fire("mouseout");e.get(l.K.ROOT).width(g.width()+T.width());o.log(a.get(l.K.EXPAND));if(!a.get(l.K.EXPAND)){t.each(r,function(t){t.fire(l.E.VISIBILITY_CHANGE,{visible:false})});a.fire(l.E.VISIBILITY_CHANGE,{visible:true});e.fire(l.E.STATUS_CHANGE,{status:l.S.EXPAND});a.fire(l.E.BUBBLE_CHANGE,{show:false});o.sendLog(d.arr)}else{e.fire(l.E.STATUS_CHANGE,{status:l.S.STANDARD})}}});a.on(l.E.VISIBILITY_CHANGE,function(i){var m=a.get(l.K.EXPAND);g.css("zIndex",l.ZINDEX-2);T.removeClass(f);if(i.visible){I.addClass(v);T.addClass(C);d.custom&&T.css("backgroundImage","none");var r=t.one(".tm-mcHandler");!!r&&r.css("position","relative");if(!m){var o=e.get(l.K.OLD_INDEX);g.removeClass(l.C.SCALE_DOWN);g.css("top",0);g.css("zIndex",l.ZINDEX);g.css("visibility","visible");var s=a.get(l.K.INDEX);if(l.S.EXPAND===e.get(l.K.STATUS)&&o!==-1&&s!==o){g.css("top",g.height()+"px");n(g,{top:"0"},.4,"easeOut").run()}else{t.each(e.get(l.K.ITEMS),function(t){var a=t.get(l.K.PLUGIN);if(a!==g){a.css("visibility","hidden")}})}}!!r&&r.css("position","fixed")}else{I.removeClass(v);T.removeClass(C);if(m){var o=a.get(l.K.INDEX);e.set(l.K.OLD_INDEX,o);g.css("zIndex",l.ZINDEX-1);if(l.S.EXPAND===e.get(l.K.STATUS)){g.addClass(l.C.SCALE_DOWN)}}}a.set(l.K.EXPAND,i.visible)});a.on(l.E.AFTER_EXPAND_CHANGE,function(t){var e=a.get(l.K.POBJ);var i=t.newVal;var n=a.get(l.K.PG_FISRT_VISIBLE);e&&e.fire(l.E.VISIBILITY_CHANGE,{visible:i,first:n});if(n&&i){a.set(l.K.PG_FISRT_VISIBLE,false)}});a.on(l.E.SUPTIP_CHANGE,function(i){a.set(l.K.SHOW_SUPTIP,i.show);if(i.show){var n=1;if(t.isNumber(i.num)){n=i.num}else{n=a.get(l.K.SUPTIP_NUM)+1}a.set(l.K.SUPTIP_NUM,n);if(n>99){n="99"}E.html(o.fm(b,n));E.show()}else{a.set(l.K.SUPTIP_NUM,0);E.hide()}var m=a.get(l.K.POBJ);if(m&&i.show){m.fire(l.E.DATA_CHANGE)}e.fire(l.E.SUPTIP_CHANGE)});a.on(l.E.BUBBLE_CHANGE,function(i){var m=!!i.show;var r=i.showDelay||1e3;var b=!!i.customContentType?i.customContentType:"";var d=!!i.isCustomContent;var g=!!i.isNotTabFire;var _="http://gm.mmstat.com/";if(m===a.set(l.K.SHOW_BUBBLE)){return}if(m&&l.S.EXPAND===e.get(l.K.STATUS)){return}function p(){var r=a.get(l.K.BUBBLE);var p=r.one(".mui-mbar-tab-bubble-bd");if(B){clearTimeout(B);B=0}a.set(l.K.SHOW_BUBBLE,m);i.bubbleType&&a.set(l.K.BUBBLE_TYPE,i.bubbleType);if(m){var u=e.get(l.K.ITEMS);if(u){t.each(u,function(t){var a=t.get(l.K.BUBBLE);!!a&&a.hide()})}var h=e.get(l.K.STATUS);if(l.S.MINI===h){e.fire(l.E.STATUS_CHANGE,{status:l.S.STANDARD,noToClose:true})}if(l.B.FOREVER===i.bubbleType){s.set({k:l.K.FRM_STATUS,v:l.S.STANDARD})}else{B=setTimeout(function(){o.log("tmBubbleHide timeout");a.fire(l.E.BUBBLE_CHANGE,{show:false,timeout:true,cb:function(){i.dismiss&&i.dismiss();s.get({k:l.K.FRM_STATUS,success:function(t){if(l.S.MINI===t){e.fire(l.E.STATUS_CHANGE,{status:l.S.MINI})}}})}})},i.hideDelay||l.BUBBLE_HIDE_DELAY)}var E=['
','

{0}

','
\u25c6
','','
{1}
',"
"].join("");if(!d&&!b){b=1}else if(d&&!b){b=3}if(b==1){var A=o.fm(c,i.html)}else if(b==2){var A=o.fm(E,i.contentTitle||"",i.html);i.height=i.height+40||"200px"}else if(b==3){var A=i.html}p.html(A);var I=p.one(".mui-mbar-bubble-close");var f=p.one(".mui-mbar-bubble");if(I){I.on("click",function(t){i.colsedClicked&&i.colsedClicked();t.stopPropagation();a.fire(l.E.BUBBLE_CHANGE,{show:false})})}if(f&&i.height){f.css("height",i.height)}r.show();n(r,{opacity:1},.3,l.EASE,function(){i.cb&&i.cb()}).run();r.detach("click");var C=f.one("a");var v;r.on("click",function(a){i.arrClicked&&o.sendLog(_+i.arrClicked);i.clicked&&i.clicked();if(!g){if(C){v=C.attr("href");if(t.isString(v)&&v.indexOf("http://")>=0){window.open(v,"newwin");a.halt()}else{T.fire("click")}}else{T.fire("click")}}});if(!!i.tabMouseleave){T.on("mouseleave",function(a){var e=t.one(a.toElement||a.relatedTarget);if(e){if(!t.DOM.hasClass(e,"mui-mbar-tabs-shadow")){if(!e.parent(".mui-mbar-tab-bubble")){r.detach("click");r.hide()}}}});r.on("mouseleave",function(t){n(r,{opacity:0},.1,l.EASE,function(){r.hide()}).run()})}a.resetBubble();i.arrShowed&&o.sendLog(_+i.arrShowed);i.showed&&i.showed(r)}else{n(r,{opacity:0},.1,l.EASE,function(){r.hide();i.cb&&i.cb()}).run()}}if(m){setTimeout(p,r)}else{p()}});a.on(l.E.MALLBAR_STATUS_CHANGE,function(t){var e=t.status;if(l.B.FOREVER!==a.get(l.K.BUBBLE_TYPE)&&a.get(l.K.SHOW_BUBBLE)&&l.S.STANDARD!==e){a.fire(l.E.BUBBLE_CHANGE,{show:false})}if((l.S.EXPAND===e||l.S.SCREEN===e)&&!a.get(l.K.EXPAND)){h.hide()}else{h.show()}});a.on(l.E.ERROR,function(t){var a="\u554a\u54e6\uff0c\u597d\u50cf\u6709\u70b9\u95ee\u9898";if(t&&t.tip){a=t.tip}_.html('
'+a+"
")});a.on(l.E.LOGIN,function(t){var a=e.get(l.K.ITEMS)[l.P.PROF];a.get(l.K.POBJ).fire(l.E.PROF_CHANGE,{toLogin:1,pid:d.id,success:t.success})});a.on(l.E.FLYIN_END,function(t){var e=a.get(l.K.POBJ);e&&e.fire(l.E.DATA_CHANGE)});a.on(l.E.PAGE_VISIBILITY_CHANGE,function(t){var e=a.get(l.K.POBJ);e&&e.fire(t.type,{pageVisible:t.pageVisible})});if(d.m>0){a.fire(l.E.SUPTIP_CHANGE,{show:true,num:d.m})}},getUserInfo:function(){var t=this;return t.get(l.K.MALLBAR).get(l.K.MODEL).get(l.K.USERINFO)},setUserInfo:function(t){var a=this;var e=a.get(l.K.MALLBAR).get(l.K.MODEL).get(l.K.USERINFO);e=o.deepMerge(e,t);s.set({k:l.K.FRM_USERINFO,v:e})},getUid:function(){var t=this;return t.get(l.K.MALLBAR).get(l.K.MODEL).getUid()},expand:function(){var t=this;var a=t.get(l.K.TAB);if(!t.get(l.K.EXPAND)){a.fire("click")}},getShopConfig:function(){var t=this;return t.get(l.K.MALLBAR).get(l.K.SHOP_CONFIG)},getGConfig:function(){var t=this;return t.get(l.K.MALLBAR).get(l.K.G_CONFIG)},resetBubble:function(){var t=this;var a=t.get(l.K.TAB);var e=t.get(l.K.BUBBLE);e.offset({top:a.offset().top})},getOrigin:function(){var a=this;var e=a.get(l.K.MALLBAR);var i=e.get(l.K.STATUS);var n=e.get(l.K.ROOT);var m=a.get(l.K.TAB);var r=m.offset();var o;if(i==l.S.EXPAND){o=t.DOM.viewportWidth()-n.width()}else{o=t.DOM.viewportWidth()-m.width()}var s={x:o,y:r.top-t.one(window).scrollTop()};return s},getPoint:function(){var t=this;var a=t.get(l.K.MALLBAR);var e=t.get(l.K.TAB);var i=t.getOrigin();var n={x:e.width()/2+i.x,y:e.width()/2+i.y};if(l.S.MINI===a.get(l.K.STATUS)){a.fire(l.E.STATUS_CHANGE,{status:l.S.STANDARD})}return n},getServerTime:function(){var t=this;return t.get(l.K.MALLBAR).get(l.K.MODEL).getServerTime()},dialog:function(a){var e=this;var i=e.get(l.K.PLUGIN);i.append(t.all(d.render(a)));var n=i.one("."+g);var m=n.one("."+_);var r=n.one("."+p);var s=n.one("."+T);n.show();n.width(i.width());n.height(i.height());m.css("top",(i.height()-m.height())/2+"px");o.log(i.width(),i.height(),n.width(),n.height());function c(t){n.remove();a.callback&&a.callback(t)}r.on("click",function(){c(true)});s&&s.on("click",function(){c(false)})},alert:function(t){var a=this;t.dialogType=1;a.dialog(t)},confirm:function(t){var a=this;t.dialogType=2;a.dialog(t)}});return u},{requires:["base","event","node","anim","xtemplate","mui/minilogin","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store"]});KISSY.add("mui/mallbar/guide",function(t,a,e,m){var n,i=false,l;var o=function(a){var e=this;e.config=t.merge(o.config,a);e._init()};o.config={picBox:[{src:"http://gtms01.alicdn.com/tps/i1/T11E.AFzxXXXa.AtHl-250-300.png"},{src:"http://gtms02.alicdn.com/tps/i2/T15b3zFuVaXXa.AtHl-250-300.png"},{src:"http://gtms03.alicdn.com/tps/i3/T1mZonFvVeXXa.AtHl-250-300.png"},{src:"http://gtms04.alicdn.com/tps/i4/T1zygsFp0dXXa.AtHl-250-300.png"},{src:"http://gtms01.alicdn.com/tps/i1/T1Hf3tFzpcXXa.AtHl-250-300.png"},{src:"http://gtms02.alicdn.com/tps/i2/T1zKAnFqJeXXa.AtHl-250-300.png"},{src:"http://gtms02.alicdn.com/tps/i2/T1AvIuFuhcXXa.AtHl-250-300.png"},{src:"http://gtms03.alicdn.com/tps/i3/T1pHUAFDFXXXa.AtHl-250-300.png"},{src:"http://gtms04.alicdn.com/tps/i4/T1tR3sFCNcXXa.AtHl-250-300.png"},{src:"http://gtms01.alicdn.com/tps/i1/T1sKsrFx4dXXa.AtHl-250-300.png"},{src:"http://gtms02.alicdn.com/tps/i2/T1z7crFw8dXXa.AtHl-250-300.png"},{src:"http://gtms03.alicdn.com/tps/i3/T1A0ZAFDBXXXa.AtHl-250-300.png"},{src:"http://gtms04.alicdn.com/tps/i4/T1SpMBFABXXXa.AtHl-250-300.png"},{src:"http://gtms01.alicdn.com/tps/i1/T1jrUAFEXXXXa.AtHl-250-300.png"},{src:"http://gtms02.alicdn.com/tps/i2/T1NEUrFqXdXXa.AtHl-250-300.png"},{src:"http://gtms03.alicdn.com/tps/i3/T1WvIAFC4XXXa.AtHl-250-300.png"},{src:"http://gtms04.alicdn.com/tps/i4/T1x5ZtFwRcXXa.AtHl-250-300.png"},{src:"http://gtms01.alicdn.com/tps/i1/T17tsAFEdXXXa.AtHl-250-300.png"},{src:"http://gtms03.alicdn.com/tps/i3/T15cBaFTRXXXbw.PjB-284-35.png"}],picBoxIE:[{src:"http://gtms01.alicdn.com/tps/i1/T11E.AFzxXXXa.AtHl-250-300.png"},{src:"http://gtms02.alicdn.com/tps/i2/T15b3zFuVaXXa.AtHl-250-300.png"},{src:"http://gtms03.alicdn.com/tps/i3/T1mZonFvVeXXa.AtHl-250-300.png"},{src:"http://gtms04.alicdn.com/tps/i4/T1zygsFp0dXXa.AtHl-250-300.png"},{src:"http://gtms01.alicdn.com/tps/i1/T1Hf3tFzpcXXa.AtHl-250-300.png"},{src:"http://gtms02.alicdn.com/tps/i2/T1zKAnFqJeXXa.AtHl-250-300.png"},{src:"http://gtms03.alicdn.com/tps/i3/T15cBaFTRXXXbw.PjB-284-35.png"},{src:"http://gtms02.alicdn.com/tps/i2/T1XTktFzlcXXa.AtHl-250-300.png"},{src:"http://gtms03.alicdn.com/tps/i3/T1hHwvFrVcXXa.AtHl-250-300.png"}],AnimateTimeLine:[{lineName:"line-bent",startLine:{X:"127",Y:"229",Cx1:"127",Cy1:"229",Cx2:"127",Cy2:"229",X2:"127",Y2:"229"},animateTime:"0.5"},{lineName:"line-stretch",startLine:{X:"83",Y:"593",Cx1:"265",Cy1:"584",Cx2:"104",Cy2:"274",X2:"127",Y2:"229",X3:"67",Y3:"251"},animateTime:"0.5"},{lineName:"shake",startLine:{X:"83",Y:"593",Cx1:"83",Cy1:"593",Cx2:"125",Cy2:"229",X2:"124",Y2:"232",X3:"251",Y3:"121"},animateTime:"0.03"},{lineName:"up-vertical",startLine:{X:"83",Y:"593",Cx1:"83",Cy1:"593",Cx2:"125",Cy2:"229",X2:"124",Y2:"232",X3:"100",Y3:"121",M:"1.5"},animateTime:"0.01"},{lineName:"throw-out",startLine:{X:"67",Y:"320",Cx1:"180",Cy1:"100",Cx2:"398",Cy2:"80",X2:"157",Y2:"113",M:"90",X5:"50"},endLine:{X:"432",Y:"69",Cx1:"300",Cy1:"100",Cx2:"500",Cy2:"180",X2:"324",Y2:"24",M:"120",X5:"110"},animateTime:"1"}],isMask:false,callback:false};o.prototype={_init:function(){var e=this,i=!!(t.UA.ie<=8);if(!i){e._imagesLoad(e.config.picBox,function(){var m;if(e.config.isMask){m='
'}else{m=""}var i=[m,''].join("");a(i).appendTo(t.one("body"));n=t.get(".mui-mbar-animate-canvas").getContext("2d");n.webkitImageSmoothingEnabled=true;t.getScript("http://g.tbcdn.cn/tm/act/1.10.36/??mazi/ShoppingCartAnimate/TweenLite.js",function(){e._catAnimate()})})}else{e._imagesLoad(e.config.picBoxIE,function(){var a;if(e.config.isMask){a='
'}else{a=""}var n=[a,'
','','
',"
"].join("");t.one("body").append(n);var i=m.viewportWidth(),l=m.viewportHeight();t.one(".mui-mbar-animate-mask-bg")&&t.one(".mui-mbar-animate-mask-bg").css({width:i+"px",height:l+"px"});e._catAnimateIE()})}},_catAnimate:function(){var t=this;var a=0;var e=setInterval(function(){if(a<6){n.clearRect(0,0,300,600);n.beginPath();n.drawImage(t.config.picBox[18].Dom,15,566,284,35);n.drawImage(t.config.picBox[a].Dom,50,0,250,300)}else{setTimeout(function(){n.clearRect(0,0,300,600);n.beginPath();n.drawImage(t.config.picBox[18].Dom,15,566,284,35);setTimeout(function(){t._catPole(a)},0)},500);clearInterval(e)}a++},150)},_catPole:function(t){var a=this;var e=setInterval(function(){if(t<11){n.clearRect(0,0,300,600);n.beginPath();n.drawImage(a.config.picBox[18].Dom,15,566,284,35);n.drawImage(a.config.picBox[t].Dom,50,0,250,300)}else{clearInterval(e);a._pushLineAnimate()}t++},100)},_pushLineAnimate:function(){var a=this,e=0,m,i,l,o,r;n.lineWidth=1;m=a.config.AnimateTimeLine[e].startLine;i=a.config.AnimateTimeLine[e+1].startLine;o=a.config.AnimateTimeLine[e].animateTime;TweenLite.to(m,o,t.merge(i,{onUpdate:function(){n.clearRect(0,0,300,600);n.beginPath();n.moveTo(m.X,m.Y);n.bezierCurveTo(m.Cx1,m.Cy1,m.Cx2,m.Cy2,m.X2,m.Y2);n.stroke();n.drawImage(a.config.picBox[18].Dom,15,566,284,35);n.drawImage(a.config.picBox[11].Dom,50,0,250,300)},onComplete:function(){l=a.config.AnimateTimeLine[e+2].startLine;r=e+1;a._lineStraightenAnimate(i,l,r)}}))},_lineStraightenAnimate:function(a,e,m){var l=this,o=l.config.AnimateTimeLine[m].animateTime;TweenLite.to(a,o,t.merge(e,{onUpdate:function(){n.clearRect(0,0,300,600);n.beginPath();n.moveTo(a.X,a.Y);n.bezierCurveTo(a.Cx1,a.Cy1,a.Cx2,a.Cy2,a.X2,a.Y2);n.stroke();n.drawImage(l.config.picBox[18].Dom,15,566,284,35);n.drawImage(l.config.picBox[12].Dom,50,0,250,300)},onComplete:function(){var t=0;i=false;m+=1;var a=setInterval(function(){t++;if(t>5&&i==true){clearInterval(a);setTimeout(function(){l._upAnimate(m)},300)}else{var n=l.config.AnimateTimeLine[m+1].startLine;l._shakeAnimate(e,n,m)}},200)}}))},_shakeAnimate:function(a,e,m){var l=this,o=l.config.AnimateTimeLine[m].animateTime;TweenLite.to(a,o,t.merge(e,{onUpdate:function(){n.clearRect(0,0,300,600);n.beginPath();n.moveTo(a.X,a.Y);n.bezierCurveTo(a.X,a.Y,a.X2,a.Y2,a.X2,a.Y2);n.stroke();n.drawImage(l.config.picBox[14].Dom,50,0,250,300);n.save();n.rotate(1.5*Math.PI/180);n.drawImage(l.config.picBox[18].Dom,30,559,284,35);n.restore()},onComplete:function(){TweenLite.to(e,o,t.merge(a,{onUpdate:function(){n.clearRect(0,0,300,600);n.beginPath();n.moveTo(a.X,a.Y);n.bezierCurveTo(a.X,a.Y,a.X2,a.Y2,a.X2,a.Y2);n.stroke();n.drawImage(l.config.picBox[12].Dom,50,0,250,300);n.save();n.rotate(Math.PI/180);n.drawImage(l.config.picBox[18].Dom,24,562,284,35);n.restore()},onComplete:function(){i=true}}))}}))},_upAnimate:function(a){var e=this,m=e.config.AnimateTimeLine[a+1].startLine,i=e.config.AnimateTimeLine[a+2].startLine,l=e.config.AnimateTimeLine[a+1].animateTime;TweenLite.to(m,l,t.merge(i,{onUpdate:function(){n.clearRect(0,0,300,600);n.beginPath();n.moveTo(m.X,m.Y);n.bezierCurveTo(m.Cx1,m.Cy1,m.Cx2,m.Cy2,157,113);n.stroke();n.drawImage(e.config.picBox[15].Dom,50,0,250,300);n.save();n.translate(m.X,m.Y);n.rotate(m.M*Math.PI/180);n.drawImage(e.config.picBox[18].Dom,-81,0,284,35);n.restore()},onComplete:function(){a+=2;e._throwAnimate(a)}}))},_throwAnimate:function(a){var e=this,i=e.config.AnimateTimeLine[a].startLine,l=e.config.AnimateTimeLine[a].endLine,o=e.config.AnimateTimeLine[a].animateTime;TweenLite.to(i,o,t.merge(l,{onUpdate:function(){n.clearRect(0,0,300,600);n.beginPath();n.moveTo(i.X,i.Y);n.bezierCurveTo(i.Cx1,i.Cy1,i.Cx2,i.Cy2,324,24);n.stroke();if(i.X5>90){n.drawImage(e.config.picBox[16].Dom,i.X5,0,250,300)}else{n.drawImage(e.config.picBox[17].Dom,i.X5,0,250,300)}n.save();n.translate(i.X,i.Y);n.rotate(i.M*Math.PI/180);n.drawImage(e.config.picBox[18].Dom,-81,0,284,35);n.restore()},onComplete:function(){n.clearRect(0,0,300,600);m.remove(".mui-mbar-animate-mask-bg");m.remove(".mui-mbar-animate-canvas");if(t.isFunction(e.config.callback)){e.config.callback()}}}))},_catAnimateIE:function(){var a=this,e=0;l=t.one(".mui-mbar-animate-cat");var m=setInterval(function(){if(e<6){l.attr("src",a.config.picBox[e].src)}else{setTimeout(function(){a._buyAnimateIE()},500);clearInterval(m)}e++},150)},_buyAnimateIE:function(){var a=this,e=t.one(".mui-mbar-animate-buy");l.attr("src",a.config.picBoxIE[8].src);e.stop().animate({width:"34px",height:"34px",right:"100px"},.5,"elasticBoth",function(){l.attr("src",a.config.picBoxIE[7].src);e.stop().animate({bottom:"334px",right:"110px"},1,"elasticIn",function(){l.attr("src",a.config.picBoxIE[8].src);setTimeout(function(){var m=setInterval(function(){if(parseInt(e.css("right"))>-250){var n=10;e.css("right",parseInt(e.css("right"))-n);l.css("right",parseInt(l.css("right"))-n)}else{clearInterval(m);t.one(".mui-mbar-animate-mask-bg")&&t.one(".mui-mbar-animate-mask-bg").remove();t.one(".mui-mbar-animate-box")&&t.one(".mui-mbar-animate-box").remove();t.isFunction(a.config.callback)&&a.config.callback()}},10)},500)})})},_imagesLoad:function(t,a,e){var m=this;e=e||0;if(t[e]){m._imgLoad(t[e],function(){m._imagesLoad(t,a,e+1)})}else{a(e)}},_imgLoad:function(t,a){var e=new Image;e.src=t;if(e.complete){t.Dom=e;a();return}e.onload=function(){t.Dom=e;a()};e.src=t.src}};window.catAnimate=o;return o},{requires:["node","event","dom","mui/mallbar/mallbar-guide.css"]});KISSY.add("mui/mallbar/plugin/prof",function(a,e,t,i,r,n,o,s,m,l,u,c){var b=new u(['','',''].join(""));var d=['
','
',"
",'
','
',' {{#if iconUrl}}{{else}}','
{{/if}}','
'," ",'{{#if level>0}}T{{level}}{{/if}}',"
",'
',' ',' {{#if level>0}} \u60a8\u662f T{{level}} \u5929\u732b\u8fbe\u4eba',' {{else}}{{#if level>DEGRADE}}\u60a8\u8fd8\u4e0d\u662f\u5929\u732b\u8fbe\u4eba{{/if}}'," {{/if}}","
","{0}",'
','
','
','
',"
","
","
",'
\u25c6
'].join("");var p="";var f=['
','
\u7b7e\u5230\uff1a
'," \u8d62\u79ef\u5206","\u9886\u70b9\u5238","
"].join("");var v=['"].join("");var h="mui-mbarp-prof-tip";var g=160;var _=0;var T=2;var I=false;var A=function(a){var e=this;A.superclass.constructor.call(e,a);e.init()};a.extend(A,t,{rightConfig:[{bizId:"vip",isDefault:true,name:"\u4f1a\u5458\u6743\u76ca"}],init:function(){var e=this;var t=e.mallbarItem=e.get(s.K.MALLBAR_ITEM);var r=t.get(s.K.MALLBAR);var n=r.get(s.K.ROOT);var l=t.get(s.K.TAB);var c=a.all('
').appendTo(n);var f=t.getUserInfo();this.prof=c;var v=l.one(".mui-mbar-tab-tip");function T(){if(f.isLogin){var e=t.getUid();if(e){var i=m.fm(s.AVATAR,e,g);var r=new Image;r.onload=function(e){l.one(".mui-mbar-tab-logo-prof-def").hide();a.one(m.fm('
',i)).insertBefore(v)};a.one(m.fm('
')).insertBefore(v);r.src=i}}}if(f.isLogin){e._initT0User()}T();a.one(document).on("click",function(a){c.hide();if(_!=3&&f.isLogin){e._updateRedDot()}});var I=false;l.on("mouseenter",function(t){m.log("prof tab mouseenter");I=true;a.later(function(){if(I){e.fire(s.E.PROF_CHANGE,{pid:s.P.PROF});v.hide()}},400)});l.on("mouseleave",function(t){I=false;var r=a.one(t.toElement||t.relatedTarget);if(r){if(!i.hasClass(r,"mui-mbar-tabs-shadow")){if(!r.parent(".mui-mbarp-prof")){c.hide();if(_!=3&&f.isLogin){e._updateRedDot()}}}}});l.on("click",function(){if(f.isLogin){c.css("display")==="none"&&m.sendLog(s.ARR.PROF);c.show();if(_czc){_czc.push(["_trackEvent","\u6211","\u9f20\u6807\u70b9\u51fb","\u5df2\u767b\u5f55"])}}});var A=document.createElement("script");A.src="http://w.cnzz.com/c.php?id=1000279581&async=1";A.type="text/javascript";A.async=true;A.charset="utf-8";var C=document.getElementsByTagName("body")[0];C.appendChild(A);var E=document.createElement("script");E.text='var _czc=_czc || []; _czc.push(["_setAccount","1000279581"]);';document.body.appendChild(E);e.on(s.E.PROF_HIDE,function(){c.hide()});e.on(s.E.RIGHT_TAB_ITEM_CLICK,function(e){var t=a.one(".mui-mbarp-prof-right-hd-tab-item-"+e.bizId)||"";!!t&&t.fire("click")});this._initMarketMods(function(){e._initRightData();var l=true;e.on(s.E.PROF_CHANGE,function(v){if(f.isLogin){if(l){l=false;var I=t.getUid();var A={DEGRADE:s.DEGRADE,nick:f.nick,loginUrl:s.DEBUG?"http://login.daily.taobao.net/member/logout.jhtml":"http://login.taobao.com/member/logout.jhtml",curl:encodeURIComponent(location.href),level:f.memberInfo.activeStatus,iconUrl:I?m.fm(s.AVATAR,I,g):"",vip:"http://vip.tmall.com?scm="+s.SCM.PROF};m.log("me.profDo",e.profDo);p=m.fm(d,e.profDo);c.html(new u(p).render(A));e._initRight();var C=c.one(".mui-mbarp-prof-icon-edit");var E=c.one(".mui-mbarp-prof-icon-edit-mask");c.one(".mui-mbarp-prof-icon-bd").on("mouseenter",function(){C.show();E.show()});c.on("mouseleave",function(){C.hide();E.hide()});c.one(".mui-mbarp-prof-tip").on("mouseleave",function(t){var r=a.one(t.toElement||t.relatedTarget);if(i.hasClass(r,"mui-mbar-tabs-shadow")||i.hasClass(r,"mui-mbarp-prof-arr")){c.show()}else{c.hide();if(_!=3&&f.isLogin){e._updateRedDot()}}})}}var A=n.one(".mui-mbar-tab-logo-"+v.pid);var B=a.DOM.height(A);var L=parseFloat(A.parent().offset().top-i.scrollTop())+B/3.8;var R=a.DOM.viewportHeight();if(R-L<272){L=L-272+B+1;c.addClass("mui-mbarp-prof-bottom-arrow")}else{c.removeClass("mui-mbarp-prof-bottom-arrow")}if(A){c.css({top:L});if(s.P.CART===v.pid&&s.S.MINI===r.get(s.K.STATUS)){c.css({left:-A.parent().width()+"px"})}else{c.css({left:0})}}if(v.toLogin||!f.isLogin){c.html(b.render());var S=c.one(".mui-mbarp-prof-login-close");c.one(".mui-mbarp-prof-tip").on("mouseleave",function(e){var t=a.one(e.toElement||e.relatedTarget);if(t){if(!i.hasClass(t,"mui-mbar-tabs-shadow")){if(!t.parent(".mui-mbarp-prof")){c.hide()}}}});S.on("click",function(a){c.hide()});o.show(function(){c.hide();TB.Global.loginStatusReady(function(a){TB.Global.memberInfoReady(function(a){m.log("minilogin memberInfoReady",a);f=m.deepMerge(f,a);f.isLogin=true;t.setUserInfo(f);e._initT0User();v.success&&v.success();r.broadcast(s.E.LOGIN_SUCCESS);T();if(s.P.PROF===v.pid){e.fire(s.E.PROF_CHANGE,{pid:s.P.PROF})}else{f.isLogin&&r.expand({type:v.pid})}})})},{insert:"."+h,needRedirect:false});m.sendLog(s.ARR.PROF_LOGIN);if(_czc){_czc.push(["_trackEvent","\u6211","\u9f20\u6807\u79fb\u8fc7","\u672a\u767b\u5f55"])}c.show()}else{c.css("display")==="none"&&m.sendLog(s.ARR.PROF);if(_czc){_czc.push(["_trackEvent","\u6211","\u9f20\u6807\u79fb\u8fc7","\u5df2\u767b\u5f55"])}c.show()}})})},_initRight:function(){if(!this.rightConfig){return}this._initRightCont()},_initRightCont:function(){var e=this;var t=this.prof;var i=t.one(".mui-mbarp-prof-right-hd");var r=t.one(".mui-mbarp-prof-right-bd");var n='
  • {name}
  • ';var o='
    {content}
    ';var s='
      ';var m="";a.each(this.rightConfig,function(e){s=s+a.substitute(n,e);m=m+a.substitute(o,e)});s=s+"
    ";i.html(s);r.html(m);a.each(this.rightConfig,function(t){if(!t.isDefault){e[t.bizId].fire("bindRightDetail");e[t.bizId].on("rightChange",function(e){a.one(".mui-mbarp-prof-right-hd-tab-cont-"+t.bizId).html(e.rightDetail)})}});this._bindRightTab();this._initMemberRight();a.one(".mui-mbarp-prof-right-hd-tab-item-vip").fire("click");if(this.rightList){a.each(this.rightList,function(a){e[a.bizId].fire("rightTabClick")})}},_initMemberRight:function(){var e=[{rightImg:"http://gtms02.alicdn.com/tps/i2/TB1ogEVFVXXXXXaXXXXgBrbGpXX-36-36.png",rightUrl:"http://vip.tmall.com/privilege/returned?scm=1048.1.2.13",rightName:"\u9000\u8d27\u4fdd\u969c"},{rightImg:"http://gtms03.alicdn.com/tps/i3/TB1T9ZlFVXXXXb5XFXXgBrbGpXX-36-36.png",rightUrl:"http://vip.tmall.com/privilege/brand?scm=1048.1.2.14",rightName:"\u54c1\u724c\u4e13\u4eab"},{rightImg:"http://gtms03.alicdn.com/tps/i3/TB1K_MPFVXXXXaxXpXXgBrbGpXX-36-36.png",rightUrl:"http://vip.tmall.com/privilege/ftry?scm=1048.1.2.15",rightName:"\u5148\u8bd5\u540e\u4e70"},{rightImg:"http://gtms01.alicdn.com/tps/i1/TB1DTZRFVXXXXXiXpXXgBrbGpXX-36-36.png",rightUrl:"http://vip.tmall.com/privilege/speedReturned?scm=1048.1.2.17",rightName:"\u6781\u901f\u9000\u6b3e"},{rightImg:"http://gtms04.alicdn.com/tps/i4/TB1z.7PFVXXXXaiXpXXgBrbGpXX-36-36.png",rightUrl:"http://vip.tmall.com/privilege/birthday?scm=1048.1.2.18",rightName:"\u53cc\u500d\u79ef\u5206"}];var t=a.one(".mui-mbarp-prof-right-hd-tab-cont-vip");var i='';var r='
    ';a.each(e,function(e,t){r=r+a.substitute(i,e)});r=r+'
    ';t.html(r);setTimeout(function(){var e=new c(a.one(".mui-mbarp-prof-vip-right-slide"),{effect:"hSlide",autoSlide:false,contentClass:"mui-mbarp-prof-vip-right-slide-cont",pannelClass:"mui-mbarp-prof-vip-right-item",carousel:true,colspan:3,speed:500});a.one(".mui-mbarp-prof-vip-right-slide-prev").on("click",function(){e.next()});a.one(".mui-mbarp-prof-vip-right-slide-next").on("click",function(){e.previous()})},0)},_bindRightTab:function(){var e=a.one(".mui-mbarp-prof-right-cont");e.delegate("click",".mui-mbarp-prof-right-hd-tab-item",function(t){var i=a.one(t.currentTarget);var r=i.attr("data-type");var n=e.one(".mui-mbarp-prof-right-hd-tab-cont-"+r);i.siblings().removeClass("sellected");i.addClass("sellected");n.siblings().hide();n.show()})},_initRightData:function(){var e=this;a.each(this.rightList,function(a){e.rightConfig.push(a)});a.each(this.rightConfig,function(a){if(!a.isDefault){var t=e[a.bizId].getRightDetail();a.content=t.html||"";a.isVisible=t.isVisible||""}})},_initMarketMods:function(e){var t=this;var i=this.get(s.K.MALLBAR_ITEM);var r=i.get(s.K.MALLBAR);m.getStaticConf({cb:function(i){var n=i.marketMods;if(n&&n.length>0){t.rightList=n;var o=n.length;var s=0;a.each(n,function(i){if(a.Env.mods[i.moduleName]){a.use(i.moduleName,function(a,n){t[i.bizId]=new n({mallbar:r,Util:m,Store:l,rightDetailContCls:"mui-mbarp-prof-right-hd-tab-cont-"+i.bizId});s=s+1;if(o==s){e&&e()}})}else{n=[];e&&e()}})}else{n=[];e&&e()}}})},_initT0User:function(){var a='

    \u25c6

    Hi\uff0c{0}

    \u606d\u559c\u60a8\u6210\u4e3a T{1}\u5929\u732b\u8fbe\u4eba!

    \u624b\u673a\u5929\u732b\u5ba2\u6237\u7aef\u626b\u7801

    \u62a2188\u5143\u65b0\u4eba\u7ea2\u5305

    ';var e=this;e.profDo=f;var t=e.get(s.K.MALLBAR_ITEM);var i=t.get(s.K.MALLBAR);var r=this.prof;var n=t.getUserInfo();if(!n.isLogin){return}m.getStaticConf({cb:function(n){if(n.profT0QueryClose){I=true;return}!!n.profT0queryInterval&&(T=n.profT0queryInterval);if(_==3){e.profDo=f;return}l.get({k:"mui/mallbar/prof/isNotQueryT0/"+t.getUid(),success:function(n){var o=0;if(n){var l=(new Date).getTime();var u=n.time||"";o=!!(l-u<1e3*3600*T)}if(o){_=3;e.profDo=f}else{m.ajax({url:s.URL.GET_PLUGIN_PROF_QUERY_T0_USER,dataType:"jsonp",data:{_tb_token_:i.get("token")||""},timeout:4,success:function(n){if(!n){return}if(n.status!=200){m.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.pro.queryT0User.get.failure-bad-status-"+n.status,"\u67e5\u8be2T0\u7528\u6237\u6fc0\u6d3b\u63a5\u53e3\u72b6\u6001\u5f02\u5e38");return}var o=n.data;if(o&&o.length){var l=o[0].step||3;_=l;if(l==1){if(r.one(".mui-mbarp-prof-ci-bd")){r.one(".mui-mbarp-prof-ci-bd").html('\u9886\u65b0\u4eba\u7ea2\u5305>')}else{e.profDo=v}var u=t.getUserInfo();m.log("userInfo",u);var c=u.nick,b=u.memberInfo.activeStatus;if(b<0){b=0}var d="http://gqrcode.alicdn.com/img?type=hv&w=100&h=100&el=h&text=http%3A%2F%2Fm.tmall.com%2Fqr%2F2014xrlb1";var p=m.fm(a,c,b,d);i.bubble({show:true,flag:.9,content:p,customContentType:3,bubbleType:1,height:130,tab:"PROF",showed:function(){m.sendLog(s.ARR.PROF_BUB_T0_SHOW);var a=e.mallbarItem.get(s.K.BUBBLE);var t=a.one(".mui-mbar-bubble-close");if(t){t.on("click",function(a){a.stopPropagation();m.sendLog(s.ARR.PROF_BUB_T0_CLICK);m.ajax({url:s.URL.GET_PLUGIN_PROF_SET_T0_USER,dataType:"jsonp",data:{_tb_token_:i.get("token")||"",bizType:1,bizStep:2},timeout:4,success:function(a){},error:function(){}});e.fire(s.E.BUBBLE_CHANGE,{show:false});e._updateRedDot()})}},clicked:function(){m.sendLog(s.ARR.PROF_BUB_T0_CLICK);m.ajax({url:s.URL.GET_PLUGIN_PROF_SET_T0_USER,dataType:"jsonp",data:{_tb_token_:i.get("token")||"",bizType:1,bizStep:2},timeout:4,success:function(a){},error:function(){}});e.mallbarItem.fire(s.E.BUBBLE_CHANGE,{show:false});e._updateRedDot();var a="http://vip.tmall.com/act/gift/newgift?scm=1048.1.2.11";window.open(a)}})}else if(l==2){if(r.one(".mui-mbarp-prof-ci-bd")){r.one(".mui-mbarp-prof-ci-bd").html('\u9886\u65b0\u4eba\u7ea2\u5305>')}else{e.profDo=v}var f=t.get(s.K.TAB);var h=f.one(".mui-mbar-tab-sup");h.html('
    ');h.show()}else{e._setT0queryStorage()}}else{e._setT0queryStorage()}},error:function(){m.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.pro.queryT0User.get.failure","\u67e5\u8be2T0\u7528\u6237\u6fc0\u6d3b\u63a5\u53e3\u5931\u8d25")}})}}})}})},_updateRedDot:function(){var a=['
    \u7b7e\u5230\uff1a
    '," \u8d62\u79ef\u5206"," \u9886\u70b9\u5238"].join("");var e=this;var t=e.get(s.K.MALLBAR_ITEM);var i=t.get(s.K.MALLBAR);var r=this.prof;if(I){return}var n=t.getUserInfo();if(!n.isLogin){return}m.ajax({url:s.URL.GET_PLUGIN_PROF_QUERY_T0_USER,dataType:"jsonp",data:{_tb_token_:i.get("token")||""},timeout:4,success:function(i){if(i.status!=200){m.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.pro.queryT0User.get.failure-bad-status-"+i.status,"\u67e5\u8be2T0\u7528\u6237\u6fc0\u6d3b\u63a5\u53e3\u72b6\u6001\u5f02\u5e38");return}var n=i.data;if(n&&n.length){var o=n[0].step||3;var l=_;_=o;var u=t.get(s.K.TAB);var c=u.one(".mui-mbar-tab-sup");if(o==1||o==2){c.html('
    ');c.show();if(l!=o){if(r.one(".mui-mbarp-prof-ci-bd")){r.one(".mui-mbarp-prof-ci-bd").html('\u9886\u65b0\u4eba\u7ea2\u5305>')}else{e.profDo=v}}}else if(o==3){c.hide();if(l!=o){if(r.one(".mui-mbarp-prof-ci-bd")){r.one(".mui-mbarp-prof-ci-bd").html(a)}else{e.profDo=f}}e._setT0queryStorage()}}else{e._setT0queryStorage()}},error:function(){}})},_setT0queryStorage:function(){var a=this;var e=a.mallbarItem;var t=(new Date).getTime();l.set({k:"mui/mallbar/prof/isNotQueryT0/"+e.getUid(),v:{s:1,time:t}});_=3;a.profDo=f}});return A},{requires:["cookie","base","dom","node","event","mui/minilogin","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","xtemplate","gallery/slide/1.3/","sizzle","mui/mallbar/plugin-prof.css"]});KISSY.add("mui/mallbar/plugin/asset",function(a,e,t,i,s,n,r,o,l){var m=function(a){var e=this;m.superclass.constructor.call(e,a);e.init()};a.extend(m,e,{init:function(){var e=this;var t=e.mallbarItem=e.get(n.K.MALLBAR_ITEM);var i=e.userInfo=t.getUserInfo();e.token="";var s=r.getSysId();e.isList=s=="list";e.isDetail=s=="detail";e.isShop=s=="shop";e.bubbled=false;var o=t.get(n.K.MALLBAR);e.itemId=o.get("itemId")||"";e.sellerId=o.get("sellerId")||"";e.shopId=o.get("shopId")||"";if(i.isLogin){var l=a.unparam(window.location.search.substr(1));var m=l&&Number(l.gap)||36e5;b()}e.set("isDataChange",true);e.on(n.E.VISIBILITY_CHANGE,function(a){if(a.visible&&e.get("isDataChange")){e._getAssetData()}});t.on(n.E.LOGIN_SUCCESS,function(a){r.log(a.type);b()});e.on(n.E.DATA_CHANGE,function(a){e.set("isDataChange",true);if(t.get(n.K.EXPAND)){e._getAssetData()}});var u=e.get("mallbarItem").get("tab");var c=a.one(".mui-mbar");u.on("click",function(){if(c.hasClass("mui-mbar-status-expand")){r.sendLog(n.ARR.ASSETS_TAB_CLICK)}});function b(){if(!e.bubbled){e.bubbled=true;e.getPluginAssetTip()}}},_getCouldCoupon:function(){var e=this;var t=e.mallbarItem;var l=a.one("#mbarCouponAnchorCouldCoupon");if(l){l.hide();r.ajax({url:n.URL.GET_PLUGIN_ASSET_OBTAIN_COUPON_LIST,dataType:"jsonp",data:{sellerId:e.sellerId,itemId:e.itemId},timeout:5,success:function(t){if(t.s!==200){r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.obtainCoupon.failure.bad-status-"+t.s,"\u83b7\u53d6\u53ef\u9886\u4f18\u60e0\u5238\u5f02\u5e38");return}if(!t.oci){return}e.token=t.t;var m=t.oci.c;if(m.length=="0"){return}l.html("\u5f53\u524d\u5e97\u94fa\u6709\u53ef\u9886\u4f18\u60e0\u5238\u54e6").show();var u=new o(['
    ',"\u5f53\u524d\u5e97\u94fa\u53ef\u7528\u4f18\u60e0\u5238","
    "].join(""));var c=['",'
    ','
    ','

    ',' {{n}}',"

    ",'
    ','
    ',"

    {{s}}

    ","

     {{l}}

    ","
    ",'
    ','

    ','\uffe5',"{{d}}","

    ",'

    \u6ee1{{c}}\u4f7f\u7528{{#if i===1}}
    (\u90e8\u5206\u5546\u54c1){{/if}}

    ',"
    ","
    ","
    ",'
    ','
    ','
    ','\u7acb\u5373\u9886\u53d6','
    ',"
    ",'
    ','
    ','
    ',"
    ",'
    ','
    ','
    ',"
    ","
    "];var b=new o(['
    ',"{{#each c}}",c.join(""),"{{/each}}","
    "].join(""));r.log("::\u53ef\u9886\u53d6\u7684\u4f18\u60e0\u5238::",m);if(m&&m.length>0){if(!m[0].s){return}if(a.one(".mui-mbar-asset-no-coupon")){a.one(".mui-mbar-asset-no-coupon").css("visibility","hidden")}a.each(m,function(a){var e=/^\d{2}/;a.s=a.s.replace(e,"");a.l=a.l.replace(e,"")});if(a.one("#mbarCouponAnchorCouldCoupon")){a.DOM.insertAfter(a.DOM.create(b.render(t.oci)),a.one("#mbarCouponAnchorCouldCoupon"));a.one("#mbarCouponAnchorCouldCoupon").show()}s.delegate(".j_mui-mbarp-asset-could-coupon","mouseenter",".mui-mbarp-asset-coupon-item",function(e){var t=a.one(e.currentTarget);if(t.attr("data-stretch")=="1"){i(t.one(".j_couldPullBd"),{right:"-183px"},.1,n.EASE).run();i(t.one(".mui-mbarp-asset-coupon-could-act"),{right:"8px"},.1,n.EASE).run()}});s.delegate(".j_mui-mbarp-asset-could-coupon","mouseleave",".mui-mbarp-asset-coupon-item",function(e){var t=a.one(e.currentTarget);if(t.attr("data-stretch")=="1"){i(t.one(".j_couldPullBd"),{right:"-190px"},.1,n.EASE).run();i(t.one(".mui-mbarp-asset-coupon-could-act"),{right:"0px"},.1,n.EASE).run()}});s.delegate(".j_mui-mbarp-asset-could-coupon","click",".mui-mbarp-asset-coupon-item",function(a){a.halt();p(a)});s.delegate(".mui-mbarp-asset-wrap","click",".j_couldPull",function(a){a.halt();p(a)});s.delegate(".j_mui-mbarp-asset-could-coupon","click",".j_couldCouponFail",function(e){var t=a.one(e.currentTarget).parent(".mui-mbarp-asset-coupon-item");t.slideUp(.5);e.halt()});function p(t){var s;if(a.one(t.currentTarget).hasClass(".mui-mbarp-asset-coupon-item")){s=a.one(t.currentTarget)}else{s=a.one(t.target).parent(".mui-mbarp-asset-coupon-item")}var o=.5,l=.5,m=n.EASE;r.ajax({url:n.URL.GET_PLUGIN_ASSET_OBTAIN_COUPON,data:{sellerId:e.sellerId,spreadId:s.attr("data-activeId"),_tb_token_:e.token},success:function(t){if(t.s=="-2"){r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.counpon.get.failure","\u7528\u6237\u4f18\u60e0\u5238\u9886\u53d6\u5931\u8d25");return}if(t.s=="-1"){s.attr("data-stretch","0");if(t.m.length<12){s.one(".j_couldCouponFailMsg").css("line-height","48px")}else{s.one(".j_couldCouponFailMsg").css("padding-top","9px")}s.one(".j_couldCouponFailMsg").html(t.m);i(s.one(".j_couldCouponFail"),{right:"0px"},l,m,function(){s.one(".j_couldPullBd").one(".mui-mbarp-asset-coupon-now-area-bg").hide();s.one(".j_couldPullBd").one(".mui-mbarp-asset-coupon-fail-area-bg").css("width","198px")}).run();i(s.one(".j_couldPullBd"),{right:"0px"},l,m).run();i(s.one(".j_couldPullAct"),{right:"187px"},l-6e-5,m).run()}else if(t.s=="1"){s.one(".mui-mbarp-asset-coupon-could-act").css("top","18px");s.one(".j_couldActIcon").html("").show();s.one(".j_couldActVal").next().hide();s.one(".j_couldActVal").html("\u5df2\u9886").css("margin-top","0px");i(s,{height:"0px"},o,m,function(){s.hide();b();var t={};t.d=s.attr("data-d");t.u=s.attr("data-u");t.s="20"+s.attr("data-s");t.l="20"+s.attr("data-l");t.t=s.attr("data-t");t.n=s.attr("data-n");t.c=s.attr("data-c");var n=e._couponTemp.render(t);a.one(n).prependTo(a.one(".j_mui-mbarp-asset-cur-coupon"));if(!a.one("#mbarCouponAnchorAbleCoupon")){a.all(u.render()).insertBefore(a.one(".j_mui-mbarp-asset-cur-coupon"));i(a.one("#mbarCouponAnchorAbleCoupon"),{height:"18px"},.1,m,function(){c()}).run()}else{c()}}).run()}}});function c(){a.one(".j_mui-mbarp-asset-cur-coupon").all(".mui-mbarp-asset-coupon-item").each(function(t,s){if(s==0){if(a.one(".j_pushShopItems")){if(!e.isDetail){i(a.one(".j_pushShopItems"),{height:"0px"},o,m,function(){a.one(".j_pushShopItems").css("overflow","hidden").insertAfter(a.one(t));i(a.one(t),{height:"90px"},o,m,function(){d();p()}).run()}).run()}else{i(a.one(t),{height:"90px"},o,m,function(){p()}).run()}}else{i(a.one(t),{height:"90px"},o,m,function(){if(!e.isDetail){a.one('
    ').appendTo(a.one(".j_mui-mbarp-asset-cur-coupon"));e._getPullItems();d();b()}p()}).run()}return false}})}function b(){var t=a.one("#mbarCouponAnchorAbleCoupon");var s=e.get(n.K.CONTAINER);if(t){var r=a.all(t).getDOMNode().offsetTop;i(s,{scrollTop:r},.5).run();e.set(n.K.COUPON_ANCHOR,"")}}function p(){var e=false;a.one(".j_mui-mbarp-asset-could-coupon").all("a").each(function(t){if(parseInt(a.one(t).css("height"))!=0){e=true}});if(e){a.one("#mbarCouponAnchorCouldCoupon").show()}else{a.one("#mbarCouponAnchorCouldCoupon").hide()}}function d(){i(a.one(".j_pushShopItems"),{height:"265px"},2,m,function(){a.one(".j_pushShopItems").css("overflow","visible")}).run()}}}},error:function(){r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.obtainCoupon.get.failure","\u83b7\u53d6\u53ef\u9886\u4f18\u60e0\u5238\u5931\u8d25")}})}},_getPullItems:function(){var e=this;var t=e.mallbarItem;var l=a.one("#mbarCouponAnchorAbleCoupon");if(!e.isDetail){if(l){l.html("\u5f53\u524d\u5e97\u94fa\u53ef\u7528\u4f18\u60e0\u5238:");r.ajax({url:n.URL.GEI_PUSH_ITEMS,dataType:"jsonp",data:{appId:n.RECOMMEND_APPID,shopId:e.shopId},timeout:5,success:function(t){var l=new o(['
    \u63a8\u8350\u4ee5\u4e0b\u4eba\u6c14\u5b9d\u8d1d\u4eab\u7528\u4f18\u60e0\u5238\uff1a
    ',"",'
    '].join(""));if(t.d&&t.d.length>0){if(a.one(".j_pushShopItems")){a.DOM.append(a.DOM.create(l.render(t)),a.one(".j_pushShopItems"))}a.all(".mui-mbarp-asset-shop-push-item").each(function(e){s.delegate(document,"mouseover",".mui-mbarp-asset-shop-push-60pic",function(e){var t=a.one(e.target).prev(),i=a.one(e.target).parent().one(".mui-mbarp-asset-shop-push-166pic-arr");t.css({display:"block"});i.css({display:"block"})});s.delegate(document,"mouseout",".mui-mbarp-asset-shop-push-60pic",function(e){var t=a.one(e.target).prev(),i=a.one(e.target).parent().one(".mui-mbarp-asset-shop-push-166pic-arr");t.css({display:"none"});i.css({display:"none"})});a.one(e).one("div.mui-mbarp-asset-hide").on("mouseout",function(e){var t=a.one(e.target).parent().one(".mui-mbarp-asset-shop-push-166pic-arr");a.one(e.target).css({display:"none"});t.css({display:"none"})})});s.delegate(".j_mui-mbarp-asset-cur-coupon","click",".mui-mbarp-asset-coupon-item",function(t){if(!e.isDetail){var s=a.one(".j_pushShopItems"),o=a.one(t.target).parent(".mui-mbarp-asset-coupon-item").next();if(o&&o.hasClass("j_pushShopItems")){return}i(s,{height:"0px"},.5,n.EASE,function(){r.log("i try clone");s.css("height","0px").insertAfter(a.one(t.target).parent(".mui-mbarp-asset-coupon-item"));i(s,{height:"265px"},2,n.EASE,function(){s.css("overflow","visible")}).run()}).run()}});a.one(".mui-mbarp-asset-shop-push-items").show()}else{a.one(".j_pushShopItems").hide()}},error:function(){a.one(".mui-mbarp-asset-shop-push-items").hide();r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.pushShopItems.get.failure","\u62c9\u53d6\u63a8\u8350\u5546\u54c1\u5931\u8d25")}})}}else{if(a.one(".j_pushShopItems")){a.one(".j_pushShopItems").css("height","0px")}}},_getAssetData:function(){var a=this;var e=a.mallbarItem;var t=e.get(n.K.MALLBAR);r.ajax({url:n.URL.GET_PLUGIN_ASSET,data:{sellerId:a.sellerId,itemId:a.itemId},timeout:4,jsonpCallback:"__mallbarGetMyAssets",success:function(t){r.log(t);if(t.s==401){e.fire(n.E.LOGIN,{success:function(){a.set("isDataChange",true);if(e.get(n.K.EXPAND)){a._getAssetData()}}});return}if(t.s!==200){e.fire(n.E.ERROR);r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.myAssets.failure.bad-status-"+t.s,"\u83b7\u53d6\u6211\u7684\u8d44\u4ea7\u5f02\u5e38");return}if(t){a._render(t)}a._getCouldCoupon();a._getPullItems();a.set("isDataChange",false)},error:function(){e.fire(n.E.ERROR);r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.myAssets.get.failure","\u83b7\u53d6\u6211\u7684\u8d44\u4ea7\u5931\u8d25")}})},renderCouldCoupon:function(a){var e=this,t;var i=e.mallbarItem;var s=i.get(n.K.MALLBAR);t=e._assetCouponBubbleTPL('
    \u8be5\u5e97\u94fa\u53ef\u9886\u4f18\u60e0\u5238

    \u7acb\u5373\u9886\u53d6

    ');e.token=a.t;s.bubble({show:true,content:new o(t).render(),customContentType:3,isNotTabFire:false,bubbleType:0,tab:"ASSET",dismiss:function(){e.handleAbleBonusBubble()},showed:function(){r.sendLog(n.ARR.COUPON_COULD_SHOW)},clicked:function(){e.set(n.K.COUPON_ANCHOR,"mbarCouponAnchorCouldCoupon");r.sendLog(n.ARR.COUPON_COULD_CLICK)}})},renderExpCoupon:function(e){var t=this,i="",s=t.handleExpCoupon(e),l=false,m={};if(s.n==1){var u=s.d[0];if(!u.isShow){l=true}else if(u.lastDay&&u.lastShow==false){l=true}var c=new Date(s.d[0].t);s.deadline=t.dateFormat(c,"yyyy-MM-dd");i='
    {{n}}\u5f20\u4f18\u60e0\u5238\u4e8e
    {{deadline}}\u8fc7\u671f
    \u4ef7\u503c \uffe5{{t}}\u5143

    \u7acb\u5373\u67e5\u770b

    ';m.height="120px"}else{i='
    {{n}}\u5f20\u4f18\u60e0\u5238\u5373\u5c06\u8fc7\u671f
    \u603b\u4ef7\u503c \uffe5{{t}}\u5143

    \u7acb\u5373\u67e5\u770b

    ';m.height="100px"}a.each(s.d,function(a){if(!a.isShow){l=true;return false}else if(a.lastDay&&a.lastShow==false){l=true;return false}});if(!l){t.getPluginAssetTip();return}t.mallbarItem.fire(n.E.BUBBLE_CHANGE,a.mix(m,{show:true,html:new o(i).render(s),dismiss:function(){t.getPluginAssetTip()},showed:function(){r.sendLog(n.ARR.COUPON_7_SHOW)},clicked:function(){t.set(n.K.COUPON_ANCHOR,"mbarCouponAnchorExpCoupon");r.sendLog(n.ARR.COUPON_7_CLICK)}}))},dateFormat:function(a,e){var t={"M+":a.getMonth()+1,"d+":a.getDate(),"h+":a.getHours(),"m+":a.getMinutes(),"s+":a.getSeconds(),"q+":Math.floor((a.getMonth()+3)/3),S:a.getMilliseconds()};if(/(y+)/.test(e)){e=e.replace(RegExp.$1,(a.getFullYear()+"").substr(4-RegExp.$1.length))}for(var i in t){if(new RegExp("("+i+")").test(e)){e=e.replace(RegExp.$1,RegExp.$1.length==1?t[i]:("00"+t[i]).substr((""+t[i]).length))}}return e},handleExpCoupon:function(a){var e=this,t={},i=e.mallbarItem;if(a.isServer)a["server"]["serverSince"]=new Date*1;e.handleExpServiceData(a,t);l.set({k:"mui/mallbar/asset/"+i.getUid(),v:a.isServer?a["server"]:a["local"],success:function(a){}});return t},handleExpServiceData:function(e,t){var i=this;var s=new Date*1,n=e["server"],r=e["local"];if(r&&r.d){r.d=a.filter(r.d,function(e){if(n&&n.d){var t=false;a.each(n.d,function(a){if(a.i==e.i){t=true;return false}});return t}return true})}if(n){a.each(n.d,function(e){if(r){a.each(r.d,function(t){if(t.i==e.i){a.mix(e,t)}})}});a.mix(t,a.clone(n))}else{if(r){a.mix(t,a.clone(r))}}var o=n?n:r;a.each(o.d,function(a,e){if(i.dateFormat(new Date(a.t),"yyyy-MM-dd")==i.dateFormat(new Date(s),"yyyy-MM-dd")){t.d[e].lastDay=true;a.isShow=true;a.lastShow=true}else{a.isShow=true}})},getPluginAssetTip:function(){var a=this;var e=a.mallbarItem;var t=e.get(n.K.MALLBAR);t.getCueMsgInfo(function(e){if(e.s!=200){r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.cueAssetMsg.failure.bad-status-"+e.s,"\u83b7\u53d6\u6211\u7684\u8d44\u4ea7\u6c14\u6ce1\u63d0\u9192\u5f02\u5e38");return false}a.token=e.t;if(e.b&&e.b.c>0&&e.b.a!=="0.0"){a.handleAbleBonusBubble(e);return}else if(e.m&&e.m.t){if(e.m.p&&e.m.p!=2){a.handleMemberCouponBubble(e)}return}else if(e.uci&&e.uci.d&&e.uci.d.length>0){a.handleAbleCouponBubble(e);return}else if(e.oci&&e.oci.c&&e.oci.c.length>0){a.renderCouldCoupon(e)}})},handleAbleBonusBubble:function(a){var e=this;var t=e.mallbarItem;var i=t.get(n.K.MALLBAR);if(!a){return}l.get({k:"mui/mallbar/asset/ableBonus/"+t.getUid(),success:function(s){if(s&&s.isShow){if(a.m&&a.m.t){if(a.m.p&&a.m.p!=2){e.handleMemberCouponBubble(a)}return}else if(a.uci&&a.uci.d&&a.uci.d.length>0){e.handleAbleCouponBubble(a);return}else if(a.oci&&a.oci.d&&a.oci.d.length>0){e.renderCouldCoupon(a)}}else{var m=["
    ","\u60a8\u5171\u6709{{c}}\u4e2a\u7ea2\u5305\u53ef\u7528","
    ","
    ","\u603b\u91d1\u989d{{a}}\u5143","
    "].join("");var u=new o(m).render(a.b);i.bubble({show:true,content:u,customContentType:1,isNotTabFire:false,bubbleType:0,tab:"ASSET",showed:function(){r.sendLog(n.ARR.BONUS_AVAILABLE_BUB_SHOW)},dismiss:function(){e.handleAbleCouponBubble(a)},clicked:function(){r.sendLog(n.ARR.BONUS_AVAILABLE_BUB_CLICK)}});l.set({k:"mui/mallbar/asset/ableBonus/"+t.getUid(),v:{isShow:true}})}}})},handleAbleCouponBubble:function(e){var t=this;var i=t.mallbarItem;var s=i.get(n.K.MALLBAR);var l=["red","yellow","blue"];var m=["mui-mbarp-asset-ableCouponBubble-title-red","mui-mbarp-asset-ableCouponBubble-title-yellow","mui-mbarp-asset-ableCouponBubble-title-blue"];if(a.isUndefined(e.uci)){return}if(e.uci.d&&e.uci.d.length==0){return}var u=function(e){var t=e[0]?e[0]:e.data;var i=t.d;if(i.length==0){return}var s="";var n='
    ';n+='
    \u25c6
    ';n+='
    ';a.each(i,function(a,e){var t=a.d;var r="mui-mbarp-asset-ableCouponBubble-title-denomination";if(e===0){n+='
    ';n+='

    \u60a8\u6709'+i.length+"\u5f20\u4f18\u60e0\u5238

    "+'

    ';n+='\uffe5'+''+t+""+"

    "+'

    \u7acb\u5373\u4f7f\u7528

    '+"
    ";return}});n+='
    ';n+="
    ";return n};var c=new o(u).render(e.uci);s.bubble({show:true,content:c,customContentType:3,bubbleType:n.B.FOREVER,isNotTabFire:false,tab:"ASSET",showed:function(){r.sendLog(n.ARR.COUPON_AVAILABLE_SHOW)},clicked:function(){t.set(n.K.COUPON_ANCHOR,"mbarCouponAnchorAbleCoupon");r.sendLog(n.ARR.COUPON_AVAILABLE_CLICK)}})},handleMemberCouponBubble:function(e){var t=this;var i=t.mallbarItem;var s=i.get(n.K.MALLBAR);if(a.isUndefined(e.m)){return}var l="";var m='
    '+'
    \u25c6
    '+'
    '+'
    '+'

    '+"{{#if v}}"+''+"{{/if}}"+"{{t}}

    "+'

    '+"{{#if rt===2}}"+'\uffe5'+'{{m}}\u73b0\u91d1\u5238

    '+"{{/if}}"+"{{#if rt===1}}"+"{{b}}\u6298\u6263

    "+"{{/if}}"+"{{#if rt===3}}"+"{{b}}\u8bd5\u7528

    "+"{{/if}}";m+='

    {{a}}

    '+'
    '+"
    ";l=m;var u=new o(l).render(e.m);s.bubble({show:true,content:u,customContentType:3,bubbleType:n.B.FOREVER,isNotTabFire:false,tab:"ASSET",showed:function(){r.sendLog(n.ARR.COUPON_MEMBER_BUBBLE_A_SHOW)},clicked:function(){t.set(n.K.COUPON_ANCHOR,"mbarCouponAnchorAbleCoupon");r.sendLog(n.ARR.COUPON_MEMBER_BUBBLE_A_CLICK)}})},_render:function(e){var t=this;var i=t.get(n.K.CONTAINER);var s=e.d;s.alipayId=e.alipayId?e.alipayId:"";o.addCommand("formatInteral",function(a,e){return t._formatInteral(e.fn(a))});var l=['","{{#with p}}{{#if e}}",'
    ',"{{#formatInteral}}{{e}}{{/formatInteral}}\u5929\u732b\u79ef\u5206\u4e8e{{d}}\u8fc7\u671f",'\u25c6',"
    ","{{/if}}{{/with}}"];var m=['
    ',"{{#with b}}","{{#if b_l_len}}",'
    ','
    ',"\u6211\u7684\u7ea2\u5305","
    ","{{/if}}","{{#each l}}","{{#if xindex<3}}",'','
    ','
    ','

    ¥{{d}}

    ','

    \u5269\u4f59\uff1a¥{{sp}}

    ',"
    ",'
    ',"

    \u6709\u6548\u671f

    ","

    {{s}}

    ","

    - {{l}}

    ","
    ","
    ","
    ","{{/if}}","{{/each}}","{{/with}}","{{#with b}}","{{#if a>0}}",'',"\u67e5\u770b\u66f4\u591a","","{{/if}}","{{/with}}","
    "];var u=['','
    ','
    ','

    ','','{{#if t==="\u5373\u5c06\u8fc7\u671f"}}',"","{{diffDay}}\u5929\u540e\u8fc7\u671f","{{else}}","{{t}}{{/if}}","",' {{n}}',"

    ",'
    ','
    ','{{#if t==="\u5373\u5c06\u8fc7\u671f"}}'," ","{{else}}","

    {{s}}

    ","

    - {{l}}

    ","{{/if}}","
    ",'
    ','

    ','\uffe5{{d}}','{{#if a>1}} x {{a}}\u5f20{{/if}}',"

    ",'

    \u6ee1{{c}}\u4f7f\u7528{{#if i===1}}
    (\u90e8\u5206\u5546\u54c1\u53ef\u7528){{/if}}

    ',"
    ","
    ","
    ",'
    ',"
    "];var c=['','

    {{n}}

    ','

    ',"{{#if v}}",'',"{{/if}}","{{r}}

    ",'

    \uffe5 {{cm}}\u73b0\u91d1\u5238

    ','

    \u6d3b\u52a8\u65f6\u95f4:{{t}}

    ',"
    ",'
    ',"
    "].join("");var b="";if(s.c.l.length==0&&s.c.j.length==0&&s.c.o.length==0&&s.c.m==0){b=['
    ',l.join(""),m.join(""),'
    ',"
    ",'
     ',"
    ",'

    \u55b5\uff01\u4f60\u8fd8\u6ca1\u9886\u53d6\u8fc7\u5929\u732b\u4f18\u60e0\u5238\uff01
    \u5feb\u53bb\u9886\u53d6\u5427\uff01

    ',"
    "]}else{function p(a,e){if(!a){return}if(a.indexOf("?")==-1){a+="?scm="+e}else{a+="&scm="+e}return a}a.each(s.c.l,function(a){a.u=p(a.u,"1048.1.3.2");a.curCoupon=true;a.diffDay=t._getDiffDay(a.l)});a.each(s.c.j,function(a){a.u=p(a.u,"1048.1.3.5");a.diffDay=t._getDiffDay(a.l)});a.each(s.c.o,function(a){a.u=p(a.u,"1048.1.3.3");a.diffDay=t._getDiffDay(a.l)});a.each(s.c.g,function(a){a.u=p(a.u,"1048.1.3.6");a.diffDay=t._getDiffDay(a.l)});a.each(s.c.m,function(a){a.u=p(a.u,"1048.1.3.6");a.diffDay=t._getDiffDay(a.l)});function d(a,e){var t="";t+=['
    ',l.join(""),m.join(""),'
    ',"{{#with c}}"].join("");if(e||a){t+=['
    ','
    ',"\u53ef\u7528\u4f18\u60e0\u5238","
    ",'
    '].join("");if(a){t+=["{{#each m}}",c,"{{/each}}"].join("")}if(e){t+=["{{#each l}}",u.join(""),"{{/each}}"].join("")}t+='
    '}else{t+='
    '}t+=["
    ",'
     ',"
    ","{{#if j_len}}",'
    ',"\u5373\u5c06\u8fc7\u671f","
    ","{{/if}}",'
    ',"{{#each j}}",u.join(""),"{{/each}}","{{#if j_len}}",'',"\u67e5\u770b\u66f4\u591a","","{{/if}}","
    ","{{#if o_len}}",'
    ',"\u6211\u9886\u53d6\u7684\u4f18\u60e0\u5238","
    ","{{/if}}",'
    ',"{{#each o}}","{{#if xindex<10}}",u.join(""),"{{/if}}","{{/each}}","{{#if o_len}}",'',"\u67e5\u770b\u66f4\u591a","","{{/if}}","
    ","{{#if g_len}}",'
    ',"\u5546\u5bb6\u8d60\u9001\u7684\u4f18\u60e0\u5238","
    ","{{/if}}",'
    ',"{{#each g}}","{{#if xindex<3}}",u.join(""),"{{/if}}","{{/each}}","{{#if g_len}}",'',"\u67e5\u770b\u66f4\u591a","","{{/if}}","
    ","{{/with}}","
    ","
    "].join("");return t}var f=!!s.c.m?s.c.m.length:0;var h=!!s.c.l?s.c.l.length:0;b=d(f,h)}if(s.b){s.b_l_len=0;a.each(s.b,function(a,e){if(typeof a!=="number"){if(e=="l"){s.b_l_len=a.length}}})}if(s.c){s.j_len=0;s.o_len=0;s.l_len=0;s.g_len=0;s.m_len=0;s.ableShow=0;a.each(s.c,function(a,e){if(typeof a!=="number"){switch(e){case"j":s.j_len=a.length;break;case"l":s.l_len=a.length;break;case"o":s.o_len=a.length;break;case"g":s.g_len=a.length;break;case"m":s.m_len=a.length;break}}})}r.log(b);if(a.isArray(b)){b=b.join("")}var g=new o(b).render(s);i.html(g);var v=a.one("#"+t.get(n.K.COUPON_ANCHOR));if(v){var _=v.offset().top-v.height()-10-a.one(window).scrollTop();i.scrollTop(_);t.set(n.K.COUPON_ANCHOR,"")}var A=i.one(".mui-mbar-asset-no-coupon");if(A){r.getStaticConf({cb:function(a){if(a.showZeroCoupon){A.html(r.fm('{0} \u7acb\u5373\u9886\u53d6',a.zeroCouponTxt,a.zeroCouponUrl))}}})}},cutStr:function(a,e){if(!a){return""}a=a.replace(/]*?>([\w\W]+)<\/a>/gi,"$1");if(a.length<=e){return a}return a.substr(0,e)+"..."},getIntegral:function(){var e=this;var t=e.get(n.K.MALLBAR_ITEM);var i=t.getUserInfo();var s=i.memberInfo.availablePoints;s=a.isNumber(s)?s:n.DEGRADE;if(s==n.DEGRADE){return"-"}return e._formatInteral(s)},now:function(){var a=this;return a.get(n.K.MALLBAR_ITEM).getServerTime()},_getDiffDay:function(a){if(!a){return}var e,t,i,s,n=this;e=a.replace(/\./g,"/");t=new Date(e);i=new Date(n.dateFormat(n.now(),"yyyy/MM/dd"));s=parseInt(Math.abs(t-i)/1e3/60/60/24);return s+1},_formatInteral:function(a){a=Number(a);if("NaN"==typeof a){throw Error("\u53c2\u6570\u7c7b\u578b\u9519\u8bef\uff0c\u8bf7\u4f20\u5165\u6570\u503c\u7c7b\u578b\u7684\u53c2\u6570")}if(a>=1e6){return parseInt(a/1e6,10)+"00\u4e07+"}else if(a>=1e7){return parseInt(a/1e7,10)+"000\u4e07+"}return a},_couponTemp:new o(['','
    ','
    ','

    ','',"{{t}}",' {{n}}',"

    ",'
    ','
    ',"

    {{s}}

    ","

    - {{l}}

    ","
    ",'
    ','

    ','\uffe5{{d}}','{{#if a>1}} x {{a}}\u5f20{{/if}}',"

    ",'

    \u6ee1{{c}}\u4f7f\u7528{{#if i===1}}
    (\u90e8\u5206\u5546\u54c1\u53ef\u7528){{/if}}

    ',"
    ","
    ","
    ",'
    ',"
    "].join("")),_assetCouponBubbleTPL:function(a){var e; e='
    ';e+='
    \u25c6
    ';e+='
    ';e+='
    ';e+=a;e+='
    ';e+="
    ";return e}});return m},{requires:["base","node","anim","event","mui/mallbar/conf","mui/mallbar/util","xtemplate","mui/mallbar/store","mui/mallbar/plugin-asset.css"]});KISSY.add("mui/mallbar/plugin/brand",function(a,e,t,i,r,s){var n=function(a){var e=this;e.showCoupon=false;n.superclass.constructor.call(e,a);e.init()};a.extend(n,e,{init:function(){var e=this;e.isAjaxMemberRight=false;var s=e.get(i.K.CONTAINER);var n=e.mallbarItem=e.get(i.K.MALLBAR_ITEM);var o=r.getSysId();e.isList=o=="list";e.isAjaxMemberRight=e.isList;var l=n.get(i.K.MALLBAR);e.brandId=l.get("brandId")||"";var m={noBrands:'

    \u55b5\uff01\u4f60\u8fd8\u6ca1\u6709\u5173\u6ce8\u8fc7\u54c1\u724c\uff01
    \u770b\u770b\u4e0b\u9762\u7684\u63a8\u8350\u54c1\u724c\u5427\uff01

    ',myBrands:'',aldBrands:'

    \u63a8\u8350\u54c1\u724c

    ',moreURL:'\u67e5\u770b\u66f4\u591a'};function u(){var a=n.get(i.K.DATA);if(a.i1){r.ajax({url:i.URL.GET_PLUGIN_GET_BRAND,data:{},timeout:4,success:function(a){if(a.s!==200){r.codeTracker.sendTrack(i.T.NUMLEV,"mallbar.brand.brandContent.failure.bad-status-"+a.s,"\u83b7\u53d6\u6211\u5173\u6ce8\u7684\u54c1\u724c\u5185\u5bb9\u5f02\u5e38");return n.fire(i.E.ERROR)}var e='
    {{#if m&&m.length}} '+m.myBrands+"{{else}} "+m.noBrands+" {{/if}} {{#if a&&a.length}} "+m.aldBrands+"{{/if}} {{#if u}} "+m.moreURL+"{{/if}}
    ";s.html(new t(e).render(a.m));if(a.mai){r.sendLog(a.mai)}b=false},jsonpCallback:"__mallbarBrand",error:function(){n.fire(i.E.ERROR);r.codeTracker.sendTrack(i.T.NUMLEV,"mallbar.brand.brandContent.get.failure","\u83b7\u53d6\u6211\u5173\u6ce8\u7684\u54c1\u724c\u5185\u5bb9\u5931\u8d25")}})}}var c=e.userInfo=n.getUserInfo();e.token="";e.bubbled=false;if(e.isList&&e.brandId){if(c.isLogin){p()}else{n.on(i.E.LOGIN_SUCCESS,function(a){r.log(a.type);p()})}}var b=true;e.on(i.E.VISIBILITY_CHANGE,function(a){if(e.showCoupon){e.showMemberCoupon();e.showCoupon=false}else{if(a.visible&&b){n.fire(i.E.SUPTIP_CHANGE,{show:false});u()}}});e.on(i.E.DATA_CHANGE,function(a){b=true;if(n.get(i.K.EXPAND)){u()}});function p(){var t=n.get(i.K.MALLBAR);t.getCueMsgInfo(function(t){a.log(t);if(t.s!=200){r.codeTracker.sendTrack(i.T.NUMLEV,"mallbar.brand.cueAssetMsg.failure.bad-status-"+t.s,"\u83b7\u53d6\u6211\u5173\u6ce8\u7684\u54c1\u724c\u7684\u4f18\u60e0\u5238\u6c14\u6ce1\u63d0\u9192\u5f02\u5e38");return false}e.token=t.t;if(t.m&&t.m.p==2){e.memberRightType=!!t.m.rt?t.m.rt:0;e.handBrandBubble(t)}})}},handBrandBubble:function(e){var s=this;var n=s.mallbarItem;var o=n.get(i.K.MALLBAR);var l=e.m;if(a.isUndefined(l)){return}var m="";var u='
    '+'
    \u25c6
    '+'
    '+'
    '+'

    '+"{{#if v}}"+''+"{{/if}}"+"{{t}}

    "+'

    '+"{{#if rt===2}}"+'\uffe5'+'{{m}}\u73b0\u91d1\u5238

    '+"{{/if}}"+"{{#if rt===1}}"+'{{bt}}

    \u6298\u6263

    '+"{{/if}}"+"{{#if rt===3}}"+'{{bt}}

    \u8bd5\u7528

    '+"{{/if}}";u+='

    {{a}}

    '+'
    '+"
    ";m=u;if(l.rt!=2){if(l.b){l.bt=c(l.b,15)}}function c(a,e){var t=/[^\x00-\xff]/g;if(a.replace(t,"mm").length<=e)return a;e=e-3;var i=Math.floor(e/2);for(var r=i;r=e){return a.substr(0,r)+"..."}}return a}var b=new t(m).render(l);o.bubble({show:true,content:b,customContentType:3,bubbleType:i.B.FOREVER,isNotTabFire:false,tab:"BRAND",showed:function(){r.sendLog(i.ARR.COUPON_MEMBER_BUBBLE_B_SHOW)},clicked:function(){s.showCoupon=true;r.sendLog(i.ARR.COUPON_MEMBER_BUBBLE_B_CLICK)}})},showMemberCoupon:function(){var e=this;var s=['"].join("");var n=['"].join("");var o=['","{{#if dit}}",'
    ','
    \u25c6
    ','

    \u4ee5\u4e0b\u5546\u54c1\u4e13\u4eab\u6298\u6263\u4ef7:

    ',"{{/if}}","","
    ","{{#if dit}}",'',"\u67e5\u770b\u66f4\u591a","","{{/if}}"].join("");var l=!!e.brandId?e.brandId:"";var m=!!e.memberRightType?e.memberRightType:0;if(e.isAjaxMemberRight){r.ajax({url:i.URL.GET_PLUGIN_MEMBER_RIGHT,data:{brandId:l,type:m},timeout:4,jsonpCallback:"__mallbarMemberRight",success:function(l){if(l.s!=200){e.mallbarItem.fire(i.E.ERROR);r.codeTracker.sendTrack(i.T.NUMLEV,"mallbar.brand.memberRight.failure.bad-status-"+l.s,"\u6211\u5173\u6ce8\u7684\u54c1\u724c\u83b7\u53d6\u4f1a\u5458\u6743\u76ca\u5238\u5f02\u5e38")}e.token=l.t;if(l.c&&l.c.length){var m=l.c,u=l.c.length,c="";for(var b=0;b\u5f53\u524d\u54c1\u724c\u53ef\u7528\u4f18\u60e0\u5238

    ';a.each(d,function(a){!!a&&(a.u="http://brand.tmall.com/brandInfo.htm?&brandId="+e.brandId);!!a.u&&(a.u=r.addSCM(a.u,"1048.1.99.1"))});for(var f=0;f\u5f53\u524d\u54c1\u724c\u4e13\u4eab\u54c1\u724cVIP\u6298\u6263\u4ef7

    ';a.each(d,function(t){!!t&&(t.u="http://brand.tmall.com/brandInfo.htm?&brandId="+e.brandId);!!t.u&&(t.u=r.addSCM(t.u,"1048.1.4.18"));if(!!t.dit){a.each(t.dit,function(a){!!a.diu&&(a.diu=r.addSCM("http://detail.tmall.com/item.htm?id="+a.diu,"1048.1.99.2"));!!a.did&&(a.did=a.did/100)})}});for(var f=0;f\u5f53\u524d\u54c1\u724c\u53ef\u7528\u8bd5\u7528\u4ea7\u54c1

    ';a.each(d,function(a){!!a.u&&(a.u=r.addSCM("http://shiyong.tmall.com/try/payTryItem.htm?id="+a.u,"1048.1.99.3"))});for(var f=0;f
    ','
    ','
    \u67e5\u770b\u66f4\u591a
    ','
    \u55b5\uff0c\u5df2\u7ecf\u662f\u6700\u540e\u7684\u6d88\u606f\u54af\uff01\uff01
    '].join(""));var c="mui/mallbar/live/show";var b="";var d=new r(["{{#each msgs}}",'
    ',' '," {{#if src}}",' {{#if link}}{{/if}}',' '," {{#if link}}{{/if}}"," {{/if}}",'
    ',' {{title}} ',' {{#if content}}
    {{{content}}}
    {{/if}}',"
    ",'
    ','
    {{date}}
    ','
    ',"
    ","{{/each}}"].join(""));var p="\u53cc11";var f=new r(['
    ','
    ','
    ',' '," {{#if i}}",' {{#if u}}{{/if}}',' '," {{#if u}}{{/if}}"," {{/if}}",'
    ','
    ',' {{#if u}}{{/if}}'," {{title}} "," {{#if u}}{{/if}}","
    ","
    ","
    ","
    "].join(""));a.extend(l,e,{init:function(){var e=this;o.getStaticConf({cb:function(t){var i=e.get(s.K.CONTAINER);var r=e.get(s.K.MALLBAR_ITEM);var n=r.get(s.K.MALLBAR);i.html(u.render());i.one(".mui-mbarp-live-more").on("click",function(){e._getLiveData();o.sendLog(s.ARR.FOOT_MORE_CLICK)});var l=r.getUserInfo();var b=r.get(s.K.DATA);if(!l.isLogin||l.isLogin&&b.m>0){o.ajax({url:s.URL.GET_PLUGIN_LIVE_TIP,timeout:4,jsonpCallback:"__mallbarGetActiveMessage",success:function(i){if(i.s!==1||!i.t||!i.id){o.log("\u8bf7\u6c42\u6c14\u6ce1\u65f6\u670d\u52a1\u5668\u8fd4\u56de\u6709\u95ee\u9898");o.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.live.activeMessage.failure.bad-status-"+i.s,"\u83b7\u53d6\u76f4\u64ad\u95f4\u6d3b\u52a8\u4fe1\u606f\u72b6\u6001\u5f02\u5e38");return}var l=i.id+"";m.get({k:c,success:function(u){var b=false;var d=t.liveBubMax;a.each(u,function(a,e){if(e===l&&a>=d){b=true;return false}});if(b){return}u=u||{};u[l]=u[l]||0;u[l]+=1;m.set({k:c,v:u});i.d11=t.isLiveD11;i.title=e.toStr(i.t,10);i.u=i.u?o.addSCM(i.u,s.SCM.LIVE_BUB_LINK):"";n.bubble({show:true,content:f.render(i),customContentType:3,bubbleType:0,isNotTabFire:false,tab:"LIVE",hideDelay:t.liveBubDur?t.liveBubDur*1e3:s.BUBBLE_HIDE_DELAY,showed:function(e){e.one(".mui-mbarp-live-close").on("click",function(a){a.stopPropagation();r.fire(s.E.BUBBLE_CHANGE,{show:false})});a.each(e.all("a"),function(e){a.one(e).on("click",function(a){o.sendLog(s.ARR.LIVE_BUB_LINK_CLICK);a.stopPropagation()})});o.sendLog(s.ARR.LIVE_SHOW)},clicked:function(){o.sendLog(s.ARR.LIVE_CLICK)},dismiss:function(){}})}})},error:function(){o.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.live.activeMessage.get.failure","\u83b7\u53d6\u76f4\u64ad\u95f4\u6d3b\u52a8\u4fe1\u606f\u5931\u8d25");o.log("\u8bf7\u6c42\u6c14\u6ce1\u65f6\u670d\u52a1\u5668\u8d85\u65f6\u6216\u9519\u8bef")}})}var d=true;e.on(s.E.VISIBILITY_CHANGE,function(a){if(a.visible&&d){r.fire(s.E.SUPTIP_CHANGE,{show:false});e._getLiveData();d=false}});e.on(s.E.DATA_CHANGE,function(a){d=true;if(r.get(s.K.EXPAND)){e._getLiveData()}})}})},_getLiveData:function(){var e=this;var t=e.get(s.K.CONTAINER);var i=t.one(".mui-mbarp-live-msgs");var r=t.one(".mui-mbarp-live-more");var n=t.one(".mui-mbarp-live-more-nomsg");var m=t.one(".mui-mbarp-live-load");var l=e.get(s.K.MALLBAR_ITEM);r.hide();m.show();o.ajax({url:s.URL.GET_PLUGIN_LIVE,data:{pageSize:10,lastId:b},timeout:4,jsonpCallback:"__mallbarReadRadiateMsg",success:function(u){m.hide();r.show();o.log("lastId",b);if(u.errorCode=="E01"){l.fire(s.E.LOGIN);return}if(u.errorCode!="E00"&&!b){l.fire(s.E.ERROR);return}if(!u.msgs||!u.msgs.length){!b&&t.html('

    \u55b5\uff01\u60a8\u6ca1\u6709\u65b0\u6d88\u606f\u54e6\uff01

    ');if(b){r.hide();n.show()}return}o.getStaticConf({cb:function(t){b=u.msgs[u.msgs.length-1].id;a.each(u.msgs,function(a,i){a.d11=t.isLiveD11;var r=o.parseDate(a.date);a.date=o.fm("{0}\u6708{1}\u65e5\u7ed3\u675f",r.getMonth()+1,r.getDate());a.t=a.title;a.title=e.toStr(a.t,10);a.link="";a.src="";a.desc="";if(a.extras.pics.length>0){var n=a.extras.pics[0];a.link=n.link?o.addSCM(n.link,s.SCM.LIVE):"";a.src=n.src;a.desc=n.desc||n.t}});i.append(d.render(u));e.fixArrow(i)}})},error:function(){o.log("\u76f4\u64ad\u95f4\u6570\u636e\u8bf7\u6c42\u8d85\u65f6\u6216\u9519\u8bef");m.hide();r.show();if(!b){l.fire(s.E.ERROR)}}})},fixArrow:function(e){if(!e){return}if(n.ie&&n.ie<=8){a.each(e.all(".mui-mbarp-live-bg"),function(e){e=a.one(e);e.css("width","14px");e.css("bottom","-3px")})}},toStr:function(a,e){e=e||Number.MAX_VALUE;if(!a){return""}a=a.replace(/]*?>([\w\W]+)<\/a>/gi,"");if(a.length<=e){return a}return a.substr(0,e)}});return l},{requires:["base","node","event","xtemplate","ua","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","mui/mallbar/plugin-live.css"]});KISSY.add("mui/mallbar/plugin/foot",function(a,e,t,i,r,n,o,s,m,l){var u=function(a){var e=this;u.superclass.constructor.call(e,a);e.init()};var c="\u55b5\uff01\u770b\u8fc7\u7684\u60a8\u53ef\u80fd\u9519\u8fc7\u4e86\uff01\u8fd9\u91cc\u5e2e\u60a8\u8bb0\u5f55\u60a8\u67e5\u770b\u8fc7\u7684\u5b9d\u8d1d\u3002\u8fd9\u6b21\u522b\u518d\u9519\u8fc7\u4e86\u54e6\uff01";a.extend(u,e,{init:function(){var e=this;var t=o.ie==6||o.ie==7;var n=e.get(s.K.CONTAINER);var u=e.get(s.K.MALLBAR_ITEM);var b=u.getUserInfo();var d=s.IS_DAILY?/http:\/\/.*\.daily\.tmall\.net.*itemId=.*/:/http:\/\/detail\.tmall\.com.*(\?|\&)id=.*/;var p=10;var f=30;var v=0;var h=false;var g;var _=[];var T=false;var A=false;var I=false;var C=false;var E=7;var B=7;var L=20;var S=18;var R=96;var O=120;var N=105;var M=120;var w=["\u4eca\u5929","1\u5929\u524d","2\u5929\u524d","1\u5468\u524d"];var b=u.getUserInfo();var y=b.isLogin;var U=false;var k;var P=a.one('

    \u55b5~\u786e\u5b9a\u8981\u6e05\u7a7a\u6211\u770b\u8fc7\u7684\uff1f

    \u6ce8\uff1a\u60a8\u9489\u4f4f\u7684\u5546\u54c1\u4e0d\u4f1a\u88ab\u6e05\u7a7a

    ');var D=a.one('

    \u55b5\uff0c\u60a8\u5df2\u7ecf\u9489\u6ee1\u4e86~~

    \u6ce8\uff1a\u60a8\u6700\u591a\u53ef\u4ee5\u9489100\u4ef6\u5546\u54c1

    ');var x=a.one('

    \u55b5\uff0c\u6ca1\u9489\u4e0a~~

    \u6ce8\uff1a\u8bf7\u7a0d\u540e\u518d\u8bd5\u54e6\uff1a\uff09

    ');var K=a.one('

    \u55b5\uff0c\u5220\u9664\u5931\u8d25\u4e86~~

    \u6ce8\uff1a\u8bf7\u7a0d\u540e\u518d\u8bd5\u54e6\uff1a\uff09

    ');var G=a.one('

    \u55b5~~\u60a8\u53ef\u4ee5\u5bf9\u91cd\u70b9\u5173\u6ce8\u7684\u5546\u54c1\u4f7f\u7528\u9489\u4f4f\uff0c\u7cfb\u7edf\u4f1a\u4e00\u76f4\u4fdd\u7559\u4f4f\u8be5\u5546\u54c1\u7684\u770b\u8fc7\u8bb0\u5f55\uff01\u9489\u4f4f\u7684\u5546\u54c1\u4e5f\u4f1a\u540c\u65f6\u52a0\u5165\u60a8\u7684\u6536\u85cf\u5939\u54e6\uff1a\uff09

    ');F();H();e.on(s.E.VISIBILITY_CHANGE,function(e){if(e.visible){A=true;setTimeout(function(){A=false},100);j()}if(e.first){var t=u.get(s.K.MALLBAR);n.delegate("click",".mui-mbarp-foot-favor-cancel",function(e){var i=a.one(e.currentTarget).parent(".mui-mbar-foot-hsitem");var r=i.attr("data-itemId");t._addFavor(r,e);m.sendLog(s.ARR.FOOT_ADD_FAVOR);e.halt()})}});e.on(s.E.DATA_CHANGE,function(a){m.log("Plugin",a.type);var e=u.get(s.K.EXPAND);if(e){j()}});e.on(s.E.PAGE_VISIBILITY_CHANGE,function(a){if(C){return}var e=u.get(s.K.EXPAND);if(e&&a.pageVisible&&!A){j()}});u.on(s.E.LOGIN_SUCCESS,function(){I=true});function F(){r.delegate(n,"click",".j_mui-mbar-foot-pfbtn",J)}function H(){l.get({k:"mui/mallbar/foot/historynum",success:function(a){var e;var t=window.location.href;e=a?a:[];var i=e.length;if(i>=f){return}var r;if(window.g_config&&window.g_config.itemId){r=window.g_config.itemId}if(r){var n=false;for(var o=0;o
    ');a.one("#J_MuiMbarHistoryBd").parent(".mui-mbar-plugin-bd").css({overflow:"hidden",width:"235px"});m.noScroll(a.one("#J_MuiMbarHistoryBd"));m.log("Foot Visible");l.get({k:"mui/mallbar/foot/blacklist",success:function(a){if(a){_=a}V()}})}function X(){var e=a.one("#J_MuiMbarHistoryBd");var t=e.parent(".mui-mbar-plugin-bd").height();var i=a.one("#J_MuiMbarPinBd").height();e.height(t-i)}function V(){v=0;b=u.getUserInfo();m.log("updateContent",+new Date);new i({url:s.URL.GET_PLUGIN_FOOT_ITEMS,dataType:"jsonp",scriptCharset:"gbk",jsonpCallback:"__mallbarFootGetHistory",data:{type:1,t:+new Date},timeout:5,success:Z,error:function(){m.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.foot.footGetHistory.get.failure","\u83b7\u53d6\u6211\u7684\u8db3\u8ff9\u5386\u53f2\u5931\u8d25");u.fire(s.E.ERROR)}});new i({dataType:"jsonp",scriptCharset:"gbk",url:s.URL.GET_PLUGIN_FOOT_ITEMS2,jsonpCallback:"__mallbarFootGetPins",data:{type:2,t:+new Date},timeout:5,success:z,error:function(){m.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.foot.footGetPins.get.failure","\u83b7\u53d6\u6211\u7684\u8db3\u8ff9Pins\u5931\u8d25");u.fire(s.E.ERROR)}})}function Y(){var e=''+'
    '+'
    '+' "+'
    '+"
    "+' \u70b9\u51fb\u767b\u5f55'+"
    "+"
    ";a.one("#J_MuiMbarPinBd").html(e);var i=a.one(".mui-mbar-foot-hsitem");if(!(i&&i.length>0)){if(!t){a.one("#J_MuiMbarPinBd").css({height:0});T=true}}a.one(".mui-mbar-foot-plbtn").on("click",function(a){a.preventDefault();return u.fire(s.E.LOGIN,{success:function(){j()}})})}function W(){l.get({k:"mui/mallbar/foot/first",success:function(a){if(a){return}else{$(4)}}})}function z(e){m.log("::foot refreshPins::",e,+new Date);if(e.s&&e.s==-2){y=false;Y();X();return}y=true;var i=e["l"];var r=e["c"]?e["c"]:0;var n=''+'
    '+'
    '+'
    '+'

    \u6211\u9489\u4f4f\u7684 '+r+" \u4ef6

    "+" "+"
    "+'
    '+' '+' '+"

    \u5feb\u6ee1\u4e86\uff0c\u60a8\u6700\u591a\u53ef\u4ee5\u9489100\u4ef6\u5546\u54c1\uff01

    "+"
    "+"
    ";if(i&&i.length>0){T=false;var o=i.length;var s=Math.ceil(o/2)*M;s=t?116:s;var l='
    ';for(var u=0;u'+' '+c.desc+''+' \uffe5'+c.price+""+' '+'
    '+' '+c.desc+""+"
    "+"
    "}l+="
    ";pinHintHtml='
    ';n+=l+pinHintHtml+"
    ";a.one("#J_MuiMbarPinBd").append(n);a.all(".j_mui-mbar-foot-ppin").on("click",q)}else{W();var l='
    ';pinHintHtml='
    ';n+=l+pinHintHtml+"
    ";a.one("#J_MuiMbarPinBd").append(n);if(!t){a.one("#J_MuiMbarPinBd").css({height:0});T=true}a.one(".mui-mbar-foot-pstatn").html("0");a.one(".mui-mbar-foot-pslist").css({height:0})}X();m.noScroll(a.one(".mui-mbar-foot-pins"))}function J(e){e.preventDefault();if(I){C=true;I=false}else{C=false}m.log("Unfold Pins");m.log(e);var i=a.one(e.target);var r=a.one(e.target).parent(".mui-mbar-plugin-bd").height();var n=a.one(".mui-mbar-foot-pins").height();var o=a.one(".mui-mbar-foot-phead").height();var s=a.one("#J_MuiMbarHistoryBd");if(i.hasClass("mui-mbar-foot-pfold")){var l=n>156?156:n;var u=T?r:r-o-19-l;s.height(u);i.removeClass("mui-mbar-foot-pfold");i.addClass("mui-mbar-foot-punfold");if(T){a.one("#J_MuiMbarPinBd").animate({height:0},.3,"easeOut",function(){X()})}else{a.one("#J_MuiMbarPinBd").removeAttr("style");a.one(".mui-mbar-foot-pins").animate({height:l},.3,"easeOut",function(){X()});s.one(".mui-mbar-foot-hmask").css({height:0,display:"none"});a.one(".mui-mbar-foot-hisbd").css({overflow:"auto"})}if(t){var c=a.one(".mui-mbar-foot-pslist");c.css({height:116})}}else{i.removeClass("mui-mbar-foot-punfold");i.addClass("mui-mbar-foot-pfold");var b=r-134;if(T){a.one("#J_MuiMbarPinBd").animate({height:156},.3,"easeOut",function(){X()})}else{a.one("#J_MuiMbarPinBd").removeAttr("style");a.one(".mui-mbar-foot-pins").animate({height:b},.3,"easeOut",function(){X()});if(t){var c=a.one(".mui-mbar-foot-pslist");var d=c.all(".mui-mbar-foot-psitem").length;var p=Math.ceil(d/2);var f=p*M;var v=b-94;f=f0){var C=parseInt(I.html());var E=C-1;I.html(E)}if(t){o.remove()}else{o.fadeOut(.3,function(){o.remove()})}},error:function(){a.one(n).on("click",q);$(3)}})}function Z(e){m.log("::foot refreshHistory::",+new Date);g=e.t;m.log(e);if(e.s==-2){return u.fire(s.E.LOGIN)}var i=e["c"];var n=e["l"];if(n&&n.length>0){var o='
    '+'

    {{HITEMCOUNT}}\u4ef6\u5546\u54c1

    '+' \u6e05\u7a7a'+"
    "+'
    ';for(var l=0;l";o=o.replace("{{HITEMCOUNT}}",v);if(v==0){a.one("#J_MuiMbarHistoryBd").prepend(m.fm('

    {0}

    ',c));return}else{a.one("#J_MuiMbarHistoryBd").prepend(o)}a.all(".j_mui-mbar-foot-hpin").on("click",ae);a.all(".j_mui-mbar-foot-hclose").on("click",function(e){m.sendLog(s.ARR.FOOT_DELETE_ITEM);e.preventDefault();r.detach(e.target,"click");var t=a.one(e.target).parent(".j_mui-mbar-foot-hsitem");var i=t.attr("data-itemid");te(i);ie(e)});a.one(".j_mui-mbar-foot-hclear").on("click",function(a){a.preventDefault();$(0)});if(t){a.all(".mui-mbar-foot-hsitem").on("mouseover",function(e){var t=a.one(this);t.one(".mui-mbar-foot-hsibg").show();t.one(".mui-mbar-foot-hpin").show();t.one(".mui-mbar-foot-hclose").show()});a.all(".mui-mbar-foot-hsitem").on("mouseout",function(e){var t=a.one(this);t.one(".mui-mbar-foot-hsibg").hide();t.one(".mui-mbar-foot-hpin").hide();t.one(".mui-mbar-foot-hclose").hide()})}m.noScroll(a.one(".mui-mbar-foot-hisbd"))}else{a.one("#J_MuiMbarHistoryBd").prepend(m.fm('

    {0}

    ',c))}}function Q(){m.sendLog(s.ARR.FOOT_CLEAR_HISTORY);m.log("Clear All Items");var e=[];var t=a.all(".mui-mbar-foot-hsitem");for(var i=0;i
    ',c));a.one(".mui-mbar-foot-nohis").fadeIn(.5);a.one(".mui-mbar-foot-nohhint").fadeIn(.5)})}function $(e){if(e===undefined)return;if(e==0){var t=a.one(".mui-mbar-plugin-foot");var i=t.one("#J_mui-mbar-foot-dclear");if(i&&i.length>0){i.show();return}t.append(P);var i=t.one("#J_mui-mbar-foot-dclear");i.show();i.one(".mui-mbar-foot-dco").on("click",function(e){e.preventDefault();Q();u=a.one(".mui-mbar-foot-mask");u&&u.hide();i.hide()});i.one(".mui-mbar-foot-dcc").on("click",function(e){e.preventDefault();u=a.one(".mui-mbar-foot-mask");u&&u.hide();i.hide()})}else if(e==1){var t=a.one(".mui-mbar-plugin-foot");var r=t.one("#J_mui-mbar-foot-dos");if(r&&r.length>0){r.show();return}t.append(D);var r=t.one("#J_mui-mbar-foot-dos");r.show();r.one(".mui-mbar-foot-doc").on("click",function(e){e.preventDefault();u=a.one(".mui-mbar-foot-mask");u&&u.hide();r.hide()})}else if(e==2){var t=a.one(".mui-mbar-plugin-foot");var n=t.one("#J_mui-mbar-foot-dpf");if(n&&n.length>0){n.show();return}t.append(x);var n=t.one("#J_mui-mbar-foot-dpf");n.show();n.one(".mui-mbar-foot-dpc").on("click",function(e){e.preventDefault();u=a.one(".mui-mbar-foot-mask");u&&u.hide();n.hide()})}else if(e==3){var t=a.one(".mui-mbar-plugin-foot");var o=t.one("#J_mui-mbar-foot-dupf");if(o&&o.length>0){o.show();return}t.append(K);var o=t.one("#J_mui-mbar-foot-dupf");o.show();o.one(".mui-mbar-foot-dupc").on("click",function(e){e.preventDefault();u=a.one(".mui-mbar-foot-mask");u&&u.hide();o.hide()})}else if(e==4){var s=a.one(".mui-mbar-foot-hsitem");if(s&&s.length>0){var t=a.one(".mui-mbar-plugin-foot");var m=t.one("#J_mui-mbar-foot-dpt");if(m&&m.length>0){m.show();return}t.append(G);var m=t.one("#J_mui-mbar-foot-dpt");m.show();s.one(".mui-mbar-foot-hsibg").show();s.one(".mui-mbar-foot-hpin").show();s.one(".mui-mbar-foot-hclose").show();m.one(".mui-mbar-foot-dptc").on("click",function(e){e.preventDefault();u=a.one(".mui-mbar-foot-mask");u&&u.hide();m.hide();s.one(".mui-mbar-foot-hsibg").attr("style","");s.one(".mui-mbar-foot-hpin").attr("style","");s.one(".mui-mbar-foot-hclose").attr("style","");l.set({k:"mui/mallbar/foot/first",v:1,success:function(){}})})}else{return}}var t=a.one(".mui-mbar-plugin-foot");var u=t.one(".mui-mbar-foot-mask");if(!u||u.length<=0){t.append('
    ');var u=t.one(".mui-mbar-foot-mask")}u.css({height:t.height()});u.show()}function ae(e){m.sendLog(s.ARR.FOOT_PIN_ITEM);e.preventDefault();if(h)return;var t=e.target;r.detach(e.target,"click");m.log("Pin Item");m.log(e.target);var n=a.one(e.target).parent(".mui-mbar-foot-hsitem");var o=n.attr("data-itemid");new i({url:s.URL.GET_PLUGIN_FOOT_PINITEM,scriptCharset:"gbk",jsonpCallback:"__mallbarFootPinItem",data:{_tb_token_:g,pin:1,itemId:o,t:+new Date},dataType:"jsonp",timeout:5,success:function(i){g=i.t;if(i.s==-2){return u.fire(s.E.LOGIN)}if(i.s==-1){a.one(t).on("click",ae);m.log("Pin Fail");$(2);return}if(!y){j();return}h=true;var r=a.one("#J_MuiMbarPinBd");r.show();m.log("Pin Successful");var l=n.offset();var c=a.one(".mui-mbar-foot-pslist");var b=c.offset();var d=l.top-a.one(window).scrollTop();var p=l.left-a.one(".mui-mbar").offset().left-a.one(window).scrollLeft()-35;var f=99999999999999;var v=n.one("img").attr("src");var _=n.one(".mui-mbar-foot-hdtxt").html();var A=n.children(".mui-mbar-foot-hprice").html();var I=n.one(".mui-mbar-foot-hprice").attr("href");var C=I.split("?");var E=C[0];var B=C[1];var R="";if(!B){R=E+"?acm=03200.1003.1.1&scm=1048.1.6.3"}else{var O=a.unparam(B);O.acm="03200.1003.1.1";O.scm="1048.1.6.3";var N=a.param(O);R=E+"?"+N}var M='
    '+' '+_+''+' "+' '+'
    '+' '+_+""+"
    "+"
    ";if(T){if(a.one("#J_MuiMbarPinBd").height()==0){a.one("#J_MuiMbarPinBd").animate({height:156},.3,"easeOut",function(){X()});b.top-=156}else{var w=a.one(".j_mui-mbar-foot-pfbtn");w.removeClass("mui-mbar-foot-pfold");w.addClass("mui-mbar-foot-punfold")}}T=false;a.one(".mui-mbar-plugin-foot").prepend(M);var U=a.one(".mui-mbar-foot-psia");U.one(".j_mui-mbar-foot-ppin").on("click",q);m.log("aniItem width:"+U.width()+" height: "+U.height());U.animate({left:p+20,top:d-20},.5,"easeIn",function(){U.animate({left:b.left-a.one(".mui-mbar").offset().left+L-a.one(window).scrollLeft()-35,top:b.top+S-a.one(window).scrollTop()},1,"easeIn",function(){c.prepend(U);U.one(".mui-mbar-foot-ppin").fadeIn(.5);U.one(".mui-mbar-foot-pprice").fadeIn(.5);h=false;U.removeClass("mui-mbar-foot-psia");U.css({left:L,top:S,"z-index":100})})});ee();n.fadeOut(1.5);setTimeout(function(){ie(e)},1500);var k=a.one(".mui-mbar-foot-pstatn");if(k&&k.length>0){var P=parseInt(k.html());var D=P+1;k.html(D)}var x=a.one(".mui-mbar-foot-pinhint");if(x){x.removeClass(".mui-mbar-foot-pinhint");x.addClass(".mui-mbar-foot-pinohint")}},error:function(){a.one(t).on("click",ae);m.log("Pin Fail");$(2)}})}function ee(){var e=a.one(".mui-mbar-foot-pslist");var i=e.all(".mui-mbar-foot-psitem");var r=i.length;var n=Math.floor(r/2);var o=r%2;var s=M*(n+1);if(!t){e.height(s)}if(i&&i.length>0){var m=L+o*N;var l=S+n*M;for(var u=r-1;u>=0;u--){var c=a.one(i[u]);c.animate({left:m,top:l},.5,"easeOut",function(){var a=c;var e=a.css("z-index");e=e==100?99:100;a.css({"z-index":e})});m=parseInt(c.css("left"));l=parseInt(c.css("top"))}}else{var s=M*(n+1)}}function te(a){l.get({k:"mui/mallbar/foot/blacklist",success:function(e){if(!e){var t;if(typeof a=="object"&&a instanceof Array){t=a}else{t=[a]}l.set({k:"mui/mallbar/foot/blacklist",v:t,success:function(a){m.log("New mbar_plugin_foot_storage")}})}else{var t;if(typeof a=="object"&&a instanceof Array){t=e.concat(a)}else{e.push(a);t=e}l.set({k:"mui/mallbar/foot/blacklist",v:t,success:function(a){m.log("Update foot/blacklist")}})}}})}function ie(e){m.log("Delete Item");m.log(e.target);var i=a.one(e.target).parent(".mui-mbar-foot-hsitem");var r=i.attr("data-itemid");var n=a.one(i.parent(".mui-mbar-foot-hslist"));var o=i.parent(".mui-mbar-foot-hslist").children(".mui-mbar-foot-hsitem");var s=o.length;var l=0;while(l0){var h=parseInt(v.html());var g=h-1;v.html(g)}if(s==1){var _=i.parent(".mui-mbar-foot-hsection");var T=_;var A=a.all(".mui-mbar-foot-hsection");if(A&&A.length==1){var I=a.one("#J_MuiMbarHistoryBd").children();T=I}T&&T.fadeOut(1,function(){T.remove();var e=a.all(".mui-mbar-foot-hsection");if(e&&e.length>0)return;var t=a.one("#J_MuiMbarHistoryBd").prepend('
    ');a.one(".mui-mbar-foot-nohis").fadeIn(.5);a.one(".mui-mbar-foot-nohhint").fadeIn(.5)});return}var C=s-1;var E=Math.ceil(C/2);var B=E*O;if(t){n.height(B)}else{n.animate({height:B},.5,"easeOut")}if(t){i.remove()}else{i.fadeOut(.3,function(){i.remove()})}}function re(e){var t=w[e.n];var i=e.d;var r=i.length;var n='
    '+'
    '+"

    "+t+"

    "+" "+"
    "+'
    ';var o=0;for(var s=0;s'+'
    '+' '+m.desc+''+' \uffe5'+m.price+""+' '+' '+'
    '+' '+m.desc+""+"
    "+"
    ";v++;o++}if(o==0){return""}n+="
    ";var L=Math.ceil(o/2)*O;n=n.replace("{{LISTHEIGHT}}",+L);return n}}});return u},{requires:["base","node","ajax","event","anim","ua","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","mui/mallbar/plugin-foot.css"]});KISSY.add("mui/mallbar/plugin/cal",function(a,e,t,i,r,s,n,o,l){var m=new s(['
    ','
    \u7cbe\u9009\u4e00\u5468\u6d3b\u52a8\uff0c\u8ba2\u9605\u4e0d\u518d\u9519\u8fc7\uff01
    ','
    ','
    ','
    ','
    ','
    ','
    ','
    \u60a8\u5df2\u7ecf\u53c2\u52a0
    ',"
    ","
    ",'
    ',"
    "].join(""));var u=new s(['
    '," {{#if title}}{{title}}"," {{else}}{{acts.length}}\u4e2a\u7cbe\u5f69\u6d3b\u52a8\uff0c{{#if today===1}}\u6b63\u5728\u8fdb\u884c\uff01{{else}}\u656c\u8bf7\u671f\u5f85\uff01{{/if}} {{/if}}","
    ","{{#each acts}}",'<{{#if ../today===1&&url}}a{{else}}div{{/if}} class="mui-mbarp-cal-act" target="_blank" href="{{url}}" data-id="{{id}}">',' {{#if img}}
    ',' ',' {{#if ../today!==1}}
    \u656c\u8bf7\u671f\u5f85
    {{/if}}',"
    {{/if}}"," {{#if ../today!==1&&remain}}",'
    \u79bb\u5f00\u59cb\u8fd8\u6709\uff1a{{remain}} \u5929','
    \u63d0\u9192\u6211
    ','
    \u5df2\u8bbe\u7f6e\u63d0\u9192
    ',"
    "," {{/if}}",'
    ','
    {{desc}}
    ','
    {{brands}}
    ',' {{#if ../today===1&&remain&&hideEnd===""}}
    \u4ec5\u5269 {{remain}} \u5929
    {{/if}}',"
    ","","{{/each}}"].join(""));var c=new s(["{{#each this}}",'
    ','
    {{#if today===1}}\u5468{{/if}}{{day}}
    ','
    {{date}}
    ','
    ','
    \u25c6
    ',"
    ","{{/each}}"].join(""));var b="\u77e5\u9053\u4e86\uff01\u4e3b\u4eba\uff01
    \u6d3b\u52a8\u5f00\u59cb\u4e86\uff0c\u53ea\u8981\u60a8\u767b\u9646\u5929\u732b\uff0c\u5c31\u80fd\u5728\u8fd9\u91cc\u6536\u5230\u6211\u7684\u63d0\u9192\u6d88\u606f\u54e6";var d='{0} \u5f00\u59cb\u4e86\uff01';var p=["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"];var f=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];var h="mui/mallbar/cal/remind";var g="calActs";var v="mui-mbarp-cal-week-date";var _="mui-mbarp-cal-week-date-bd";var T="mui-mbarp-cal-week-tip";var A="mui-mbarp-cal-week-date-normal";var C="mui-mbarp-cal-week-date-today";var I="mui-mbarp-cal-week-date-sup";var E="mui-mbarp-cal-week-date-arr";var B="mui-mbarp-cal-week-date-sup-off";var S=function(a){var e=this;S.superclass.constructor.call(e,a);e.init()};a.extend(S,e,{init:function(){var e=this;var t=e.get(n.K.CONTAINER);var r=e.get(n.K.MALLBAR_ITEM);var s=r.get(n.K.MALLBAR);var u=r.getUserInfo();if(u.isLogin){o.getStaticConf({cb:function(a){l.get({k:h,success:function(t){t=t||{};var i=e.now().getTime();for(var r in t){var m=t[r];if(!m.bubbled&&i>=o.parseDate(m.start).getTime()&&is.width()-S.width()?s.width()-S.width():m;S.css({left:m+"px"})}}})}).on("mouseleave",function(){S.hide()});i.fire(B[0],"click")}})},refreshSup:function(){var e=this;var t=e.get(n.K.CONTAINER);var i=t.all("."+v);for(var r=0;r=0&&re?1:Math.ceil((e-a)/(86400*1e3))},render:function(e){var t=this;var i=t.isToday(e)?1:0;var r=t.get(n.K.CONTAINER);var s=t.get(n.K.MALLBAR_ITEM);o.ajax({url:o.fm(n.URL.GET_CALENDAR,o.getDateStr(e)),jsonpCallback:"__mallbarGetCalendar",error:function(a){o.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.cal.Calendar.get.failure","\u83b7\u53d6\u6211\u7684\u6d3b\u52a8\u5217\u8868\u5931\u8d25");o.log("__mallbarGetCalendar error\uff1a",a)},success:function(e){var m=e.status;if(m!==n.S.BAR_SUCCESS&&m!==n.S.BAR_NOT_LOGIN){o.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.cal.Calendar.failure.bad-status-"+m,"\u83b7\u53d6\u6211\u7684\u6d3b\u52a8\u5217\u8868\u72b6\u6001\u5f02\u5e38");return}t.set(g,e);l.get({k:h,success:function(m){m=m||{};e.today=i;var c=e.acts,d=1;for(var p=0;p11){d=11}_[3]=d;v=_.join(".");f.url=f.url?o.addSCM(f.url,v):"";f.remain=t.getRemainDays(t.now(),i?f.end:f.start);f.logo=t.isToday(f.start);f.reminded=m[f.id]?1:0}r.one(".mui-mbarp-cal-acts").html(u.render(e));r.all(".mui-mbarp-cal-act-remind").on("click",function(){o.sendLog(n.ARR.CAL_REMIND);var e=a.one(this);var i=t.get(g).acts;var r=e.attr("data-id");for(var m=0,u;m',''].join("");var l="http://gtms01.alicdn.com/tps/i1/T10aT_Fl0XXXXJwqvl-64-98.png";var u="http://gtms01.alicdn.com/tps/i1/T1W_j2FbtcXXXJwqvl-64-98.png";var c=function(a){var e=this;c.superclass.constructor.call(e,a);e.init()};a.extend(c,e,{init:function(){var a=this;var e=a.get(n.K.CONTAINER);var t=a.get(n.K.MALLBAR_ITEM);var i=t.get(n.K.MALLBAR);var s=t.get(n.K.TAB);var c=s.one(".mui-mbar-tab-txt");s.append(o.fm(m,r.ie&&r.ie<=6?u:l));var b=s.one(".mui-mbarp-trip-disk");var p=s.one(".mui-mbarp-trip-logo");var d=b.width();function f(a){if(n.S.STANDARD===a){b.css({right:-d/4+"px"})}else if(n.S.MINI===a){b.css({right:0})}else if(n.S.EXPAND===a){t.get(n.K.EXPAND)?b.css({right:-d/2+"px"}):b.css({right:0})}}t.on(n.E.MALLBAR_STATUS_CHANGE,function(a){f(a.status)});o.getStaticConf({cb:function(a){a.tripTxt&&c.html(a.tripTxt);a.tripLogo&&a.tripLogoIe6&&p.attr("src",r.ie&&r.ie<=6?a.tripLogoIe6:a.tripLogo);a.tripLogoNoAnim&&p.removeClass("mui-mbarp-trip-logo-anim")}});a.on(n.E.VISIBILITY_CHANGE,function(a){f(i.get(n.K.STATUS));if(a.visible&&a.first){e.html(o.fm('',n.U.TRIP_TMS))}var t=e.one(".mui-mbarp-trip-bd");t.height(e.height())})}});return c},{requires:["base","node","event","ua","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","mui/mallbar/plugin-trip.css"]});KISSY.add("mui/mallbar/plugin/top",function(a,e,t,i,r,n,o){var s=function(a){var e=this;s.superclass.constructor.call(e,a);e.init()};a.extend(s,e,{init:function(){var e=this;var t=e.get(r.K.MALLBAR_ITEM);var i=t.get(r.K.TAB);var o=a.one(window);o.on("scroll",a.buffer(function(a){var e=o.scrollTop();e>0?i.fadeIn(.2):i.fadeOut(.1)},100));o.fire("scroll");i.on("click",function(){n.log("top click");n.sendLog(r.ARR.BACKTOP_CLICK);s(0,0,300,"ease")});function s(e,t,i,r){if(!i){window.scrollTo(e,t)}else{a.one(window).animate({scrollLeft:e,scrollTop:t},i/1e3,r)}}}});return s},{requires:["base","node","event","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","mui/mallbar/plugin-top.css"]});KISSY.add("mui/mallbar/plugin/ue",function(a,e,t,i,r,n,o){var s=function(a){var e=this;s.superclass.constructor.call(e,a);e.init()};a.extend(s,e,{init:function(){var e=this;var t=e.get(r.K.MALLBAR_ITEM);var i=t.get(r.K.TAB);var n="http://ur.taobao.com/survey/view.htm?id=";var o=t.getGConfig();if(o.ueId){n=n+o.ueId;a.one(".mui-mbar-tab-ue").show();a.all("").appendTo("head");var s=i.one(".mui-mbar-tab-logo-ue");s.append('UE')}}});return s},{requires:["base","node","event","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","mui/mallbar/plugin-ue.css"]});KISSY.add("mui/mallbar/plugin/qrcode",function(a,e,t,i,r,n,o,s,m,l){var u=new l(['
    ','
    ',' ',"
    ",'
    ',' ',"
    ","
    ",'
    \u25c6
    '].join(""));var c=function(a){var e=this;c.superclass.constructor.call(e,a);e.init()};a.extend(c,e,{init:function(){var e=this;var i=e.mallbarItem=e.get(o.K.MALLBAR_ITEM);var r=i.get(o.K.MALLBAR);var n=r.get(o.K.ROOT);var m=i.get(o.K.TAB);var l=a.all('
    ').appendTo(n);e.renderTpl=false;e.qrcodeSrc="";var c=s.getSysId();e.isDetail=c=="detail";e.isList=c=="list";e.isShop=c=="shop";if(e.isDetail||e.isList||e.isShop){e.renderTpl=true}if(e.isShop){var b=e.shopConfig=i.getShopConfig()||i.getGConfig()||{};e.sellerId=b.userId||b.sellerId;!!b.shopId&&(e.shopId=b.shopId);if(e.shopId||e.sellerId){e.qrcodeSrc="http://gqrcode.alicdn.com/img?type=bs&shop_id="+(!!e.shopId?e.shopId:0)+"&seller_id="+(!!e.sellerId?e.sellerId:0)}}if(e.isList){var d=window.encodeURIComponent(location.href);e.qrcodeSrc="http://gqrcode.alicdn.com/img?type=hv&logo=TB1cM36FVXXXXXiXpXXIqztGVXX-45-45.png&el=h&text="+d}if(e.isDetail){var p="";if(window.g_config&&window.g_config.itemId){p=window.g_config.itemId}if(p){e.qrcodeSrc="http://gqrcode.alicdn.com/img?v=1&type=bi&item_id="+p}}l.html(u.render());l.hide();a.one(document).on("click",function(a){l.hide()});r.on(o.E.MALLBAR_STATUS_CHANGE,function(a){l.hide()});e.on(o.E.QRCODE_CHANGE,function(a){if(a.pid){var t=n.one(".mui-mbar-tab-logo-"+a.pid);if(t){l.css({top:t.parent().css("top")})}}else{l.css({top:m.css("top")})}if(o.S.STANDARD===r.get(o.K.STATUS)){l.css("display")==="none"&&s.sendLog(o.ARR.QRCODE);if(e.renderTpl){var i='';l.one(".mui-mbarp-qrcode-hd").html(i);e.renderTpl=false}l.show()}});l.one(".mui-mbarp-qrcode-tip").on("mouseleave",function(i){var r=a.one(i.toElement||i.relatedTarget);if(t.hasClass(r,"mui-mbar-tabs-shadow")||t.hasClass(r,"mui-mbarp-qrcode-arr")){if(e.renderTpl){var n='';l.one(".mui-mbarp-qrcode-hd").html(n);e.renderTpl=false}l.show()}else{l.hide()}});var f=false;m.on("mouseenter",function(t){f=true;a.later(function(){if(f){e.fire(o.E.QRCODE_CHANGE)}},400)}).on("mouseleave",function(e){f=false;var i=a.one(e.toElement||e.relatedTarget);if(i){if(!t.hasClass(i,"mui-mbar-tabs-shadow")){if(!i.parent(".mui-mbarp-qrcode")){l.hide()}}}}).on("click",function(){l.css("display")==="none"&&s.sendLog(o.ARR.QRCODE);if(e.renderTpl){var a='';l.one(".mui-mbarp-qrcode-hd").html(a);e.renderTpl=false}l.show()})}});return c},{requires:["base","dom","node","event","mui/minilogin","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","xtemplate","mui/mallbar/plugin-qrcode.css"]});KISSY.add("mui/mallbar/plugin/favor",function(a,e,t,i,r,n,s,o){var l="401";var m=function(a){return a.replace(/\.jpg_.+\.jpg/,".jpg")};var u=function(a){var e=this;u.superclass.constructor.call(e,a);e.init()};var c='
    {{content}}'+'

    \u67e5\u770b\u5168\u90e8

    '+"
    ";var b='

    \u642d\u914d/\u540c\u6b3e

    \u6211\u7684\u6536\u85cf
    • \u627e\u642d\u914d
    • \u627e\u540c\u6b3e
    ';var d='
  • ¥{promotionPrice}

  • ';var p=[1,2,3,4];var f=0;a.extend(u,e,{_itemListCache:{},init:function(){var e=this;var t=this;var i=e.get(s.K.CONTAINER);var r=e.get(s.K.TIP_CONTAINER);var n=e.get(s.K.MALLBAR_ITEM);var l=n.get(s.K.MALLBAR);var m=n.get(s.K.BUBBLE);o.log(n,this);this._initBind();this._initDOMBind();a.later(function(){t._initRecommandDetail()},10)},_initDOMBind:function(){var e=this;var t=this.get(s.K.MALLBAR_ITEM);var i=t.get(s.K.MALLBAR);var r=this._pluginContainer=this._pluginContainer||a.one(".mui-mbar-plugin-favor");r.delegate("click",".mui-mbarp-favor-cancel",function(t){var r=a.one(t.currentTarget).parent("li");r.animate({opacity:0,width:0},{duration:.5,easing:"easeOut",complete:function(){r.remove();e._isDataChange=true}});var n=a.one(t.currentTarget).attr("data-itemId");i._deleteFavor(n,function(){});o.sendLog(s.ARR.FAVOR_DELETE);t.preventDefault()});r.delegate("mouseenter",".mui-mbarp-favor-item",function(e){var t=a.one(e.currentTarget);t.addClass("mui-mbarp-favor-item-hover")});r.delegate("mouseleave",".mui-mbarp-favor-item",function(e){var t=a.one(e.currentTarget);t.removeClass("mui-mbarp-favor-item-hover")});r.delegate("mouseenter mouseleave",".mui-mbarp-favor-item-sale",function(e){var t=a.one(e.currentTarget);t.toggleClass("mui-mbarp-favor-item-sale-hover")});this._bindDetail();this._initBindCateCheck()},_initBind:function(){var a=this;this.on("visibilityChange",function(e){if(e.visible&&e.first){a._initContainer()}else if(!e.visible&&a._isDataChange){a._isDataChange=false;a._initContainer()}});this.on(s.E.DATA_CHANGE,function(e){o.log("Plugin",e.type);a._initContainer()})},_initContainer:function(){var e=this;a.later(function(){e._initFavorList()},10)},_initRecommandDetail:function(){var e=this;var t=this._pluginContainer||a.one(".mui-mbar-plugin-favor");t.append(b);a.later(function(){e._initDetailBind()},10)},_initDetailBind:function(){var e=this._favorDetail=a.one(".mui-mbarp-favor-detail");o.noScroll(e.one(".mui-mbarp-favor-detail-bd"));var t=this._favorTabItems=a.all(".mui-mbarp-favor-recommand-tab-item");var i=this._favorTabContents=a.all(".mui-mbar-favor-recommand-content");var r=this;e.delegate("click",".mui-mbarp-favor-detail-back",function(a){r._switchBackToList();o.sendLog(s.ARR.FAVOR_BACK);a.halt()});e.delegate("click",".mui-mbarp-favor-recommand-tab-item",function(e){var r=a.one(e.currentTarget);t.removeClass("mui-mbarp-favor-recommand-tab-item-sellected");r.addClass("mui-mbarp-favor-recommand-tab-item-sellected");var n=r.attr("data-type");var s=a.one(".mui-mbar-favor-recommand-content-"+n);i.hide();s.show();e.halt()})},_initFavorList:function(){var a=this.get(s.K.MALLBAR_ITEM);var e=a.get(s.K.MALLBAR);var t=a.get(s.K.TAB);var i=this;var n=new r({dataType:"jsonp",scriptCharset:"gbk",type:"GET",url:s.URL.GET_PLUGIN_FAVOR_INFO,success:function(e){o.log("::favorList::",e);if(e.success&&e.status!=l){if(e.itemInfo&&e.cateInfo.length>1){if(e.cateInfo){i._initCateBox(e.cateInfo)}i._initItemListInner(e.itemInfo)}else{o.codeTracker.sendTrack(20,"mallbar.favor.getFavorItem.data.empty","\u7528\u6237\u6536\u85cf\u5939\u4e3a\u7a7a");a.fire(s.E.ERROR,{tip:"\u54a6\uff0c\u4eb2\u8fd8\u6ca1\u6709\u6536\u85cf\u8fc7\u5546\u54c1\u54e6\uff01"})}}else{if(e.status==l){o.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.favor.getFavorItem.user.not-login","\u7528\u6237\u767b\u9646\u8d85\u65f6")}else{o.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.favor.getFavorItem.failure.bad-status-"+e.status,"\u6536\u85cf\u5939\u83b7\u53d6\u4fe1\u606f\u72b6\u6001\u5f02\u5e38")}a.fire(s.E.ERROR)}},error:function(){o.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.favor.getFavorItem.data.error","\u6536\u85cf\u5939\u4fe1\u606f\u83b7\u53d6\u5931\u8d25");a.fire(s.E.ERROR)}})},_initCateBox:function(e){var t='

    \u5206\u7c7b

      {{content}}
    ';var i='
  • {cateName}({number})
  • ';var r=[];var n=a.one(".mui-mbarp-favor-cate-trigger");a.each(e,function(e,t){r.push(a.substitute(i,e))});if(n){n.one("ul").html(r.join(""))}else{t=t.replace("{{content}}",r.join(""));var s=a.one(".mui-mbar-plugin-favor").one(".mui-mbar-plugin-hd");s.append(t);a.later(function(){n=a.one(".mui-mbarp-favor-cate-trigger");n.on("mouseenter mouseleave",function(){n.toggleClass("mui-mbarp-favor-cate-trigger-hover")})},10)}},_initBindCateCheck:function(){var e=this;var t=this._pluginContainer;t.delegate("click",".mui-mbarp-favor-cate-item",function(t){var i=a.one(t.currentTarget);i.addClass("mui-mbar-favor-cate-item-sellected").siblings().removeClass("mui-mbar-favor-cate-item-sellected");var r=i.attr("data-cateId");var n=".mui-mbarp-favor-item-"+r;e._itemListAll=a.all(".mui-mbarp-favor-item");e._timeList.hide();if(r){e._itemListAll.hide();a.all(n).show();e._timeList.each(function(a){if(a.all(n).length>0){a.show()}})}else{a.all(".mui-mbarp-favor-item").show();e._timeList.show()}e._dataLazyloadIns.refresh();o.sendLog(s.ARR.FAVOR_CATE_CHECK);t.halt()})},_getPicHost:function(){var a=f++;if(a>3){a=0}return"http://gtms0"+p[a]+".alicdn.com/tps/"},_initItemListInner:function(e){var t=this;var i=["lastWeek","oneWeekAgo","oneMonthAgo","twoMonthAgo"];var r={lastWeek:"\u6700\u8fd1\u4e03\u5929",oneWeekAgo:"\u4e00\u5468\u524d",oneMonthAgo:"\u4e00\u4e2a\u6708\u524d",twoMonthAgo:"\u4e24\u4e2a\u6708\u524d"};var n=[];a.each(i,function(a,i){e[a].desc=r[a];e[a].name=a;n.push(t._renderSingleTime(e[a]))});this._renderItemList(n.join(""))},_renderItemList:function(e){var t=this;var i=this.get(s.K.CONTAINER);var r=c.replace("{{content}}",e);i.html(r);a.later(function(){t._dataLazyloadIns&&t._dataLazyloadIns.destroy();t._dataLazyloadIns=new n({container:i,diff:50});a.later(function(){n.loadCustomLazyData(i,"textarea")},500);t._timeList=a.all(".mui-mbarp-favor-item-time")},10)},_bindDetail:function(){var a=this;var e=this._pluginContainer;e.delegate("click",".mui-mbarp-favor-to-detail",function(e){a._toItemDetail(e)})},_toItemDetail:function(e){var t=a.one(e.currentTarget);var i=t.parent(".mui-mbarp-favor-item");var r=t.attr("data-type");var n=i.attr("data-itemId");var l=this._itemListCache[n];l.recommandType=r;if(r=="match"){o.sendLog(s.ARR.FAVOR_TO_MATCH)}else{o.sendLog(s.ARR.FAVOR_TO_FX)}this._initItemDetail(l);this._switchToFavorDetail(i);e.halt()},_switchToFavorDetail:function(e){var i=e.attr("data-itemId");var r=this._itemListCache[i];r.itemPicBig=r.itemPic+"_240x240.jpg";if(!(a.UA.ie<9)){var n='';var s=e.offset();var o=this._pluginContainer;s.top=s.top-a.one(window).scrollTop();s.left=s.left-o.offset().left;var l={left:0,top:40};n=t(n);n.css(s);o.append(n);n.animate({left:l.left,top:l.top,width:235,height:235},{duration:.3,easing:"easeOut",complete:function(){n.animate({opacity:0},{duration:.2,easing:"easeOut",complete:function(){n.remove()}})}})}var m=this._favorDetail||a.one(".mui-mbarp-favor-detail");m.animate({right:0},{duration:.3,easing:"easeOut"})},_switchBackToList:function(){var e=this._favorDetail||a.one(".mui-mbarp-favor-detail");e.animate({right:-235},{duration:.3,easing:"easeOut"})},_initItemDetail:function(a){o.log("::to item Detail::",a);this._initFavorDetailBig(a);this._initRecommandList(a)},_initFavorDetailBig:function(e){var t='

    {itemTitle}

    ';e.itemPicBig=e.itemPic+"_240x240.jpg";var i=a.substitute(t,e);if(!this._favorItemBigCont){this._favorItemBigCont=a.one(".mui-mbarp-favor-item-b")}this._favorItemBigCont.html(i)},_initRecommandList:function(e){this._tabItemMatch=this._tabItemMatch||a.one(".mui-mbarp-favor-recommand-tab-item-match");this._tabItemFx=this._tabItemFx||a.one(".mui-mbarp-favor-recommand-tab-item-fx");this._tabContentMatch=this._tabContentMatch||a.one(".mui-mbar-favor-recommand-content-match");this._tabContentFx=this._tabContentFx||a.one(".mui-mbar-favor-recommand-content-fx");if(e.recommandType=="match"){this._tabItemMatch.addClass("mui-mbarp-favor-recommand-tab-item-sellected");this._tabItemFx.removeClass("mui-mbarp-favor-recommand-tab-item-sellected")}else{this._tabItemMatch.removeClass("mui-mbarp-favor-recommand-tab-item-sellected");this._tabItemFx.addClass("mui-mbarp-favor-recommand-tab-item-sellected")}this._favorTabContents.html("");this._initTabContent("match",e);this._initTabContent("fx",e)},_initTabContent:function(e,t){var i=this;var n;var l;if(e=="match"){n=this._tabContentMatch;l=s.URL.GET_PLUGIN_FAVOR_MATCH}else{n=this._tabContentFx;l=s.URL.GET_PLUGIN_FAVOR_FX}new r({url:l,dataType:"jsonp",type:"GET",scriptCharset:"gbk",data:{itemId:t.itemId,categoryId:t.categoryId,sellerId:t.sellerId},success:function(r){o.log("::favor item recommand::",r);var s=[];if(r&&r.data&&r.data.length){s.push("
      ");a.each(r.data,function(e,t){if(t>11){return}e.picUrl=m(e.picUrl)+"_100x100.jpg";s.push(a.substitute(d,e))});s.push("
    ");n.html(s.join(""));if(e==t.recommandType){i._favorTabContents.hide();n.show()}if(r.exposureParam){o.sendLog(r.exposureParam)}}else{o.codeTracker.sendTrack(20,"mallbar.favor.getFavorItemAld.data.empty","\u6536\u85cf\u5939\u5546\u54c1\u63a8\u8350\u4e3a\u7a7a")}},error:function(a){o.codeTracker.sendTrack(20,"mallbar.favor.getFavorItemAld.data.error","\u6536\u85cf\u5939\u5546\u54c1\u63a8\u8350\u83b7\u53d6\u5931\u8d25|"+e)}})},_renderSingleTime:function(e){var t=this;if(e.length){var i=[];var r='
  • \u6bd4\u6536\u85cf\u65f6\u76f4\u964d\uff1a¥{priceDown}

    \u52a0\u5165\u6536\u85cf\u65f6\u4ef7\u683c\uff1a¥{itemCollectPrice}

    ¥{itemPrice}
    \u627e\u642d\u914d \u627e\u540c\u6b3e
  • ';i.push('
    ');i.push('
    '+e.desc+"
    ");i.push('
    ');a.each(e,function(n,o){if(o%20==0){i.push('")}});i.push("
    ");return i.join("")}else{return""}}});return u},{requires:["base","node","event","ajax","datalazyload","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/plugin-favor.css"]});KISSY.add("mui/mallbar/plugin/charge",function(a,e,t,i,r,n){var s=function(a){var e=this;s.superclass.constructor.call(e,a);e.init()};a.extend(s,e,{init:function(){var e=this;var t=e.get(r.K.MALLBAR_ITEM);var i=t.get(r.K.MALLBAR);var n=e.get(r.K.CONTAINER);var s=t.get(r.K.TAB);var o=i.get(r.K.G_CONFIG);if(o.bizId=="mallfp"){s.show()}e.on("visibilityChange",function(e){if(e.visible&&e.first){a.use("mui/chongzhi/index,mui/chongzhi/dianquan",function(a,e,t){n.html('
    ');setTimeout(function(){var i=a.one("#J_MbarPhoneCharge");if(!i)return;e(i);var r=a.one("#J_MbarDianquanCharge");if(!r)return;new t(r,{})},0)})}})}});return s},{requires:["base","node","event","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/plugin-charge.css"]});KISSY.add("mui/mallbar/plugin/promotion",function(a,e,t,i,r,n,o,s){var m=[''].join("");var l=function(a){var e=this;l.superclass.constructor.call(e,a);e.init()};a.extend(l,e,{init:function(){var e=this;var t=e.get(n.K.CONTAINER);var i=e.mallbarItem=e.get(n.K.MALLBAR_ITEM);var r=i.get(n.K.MALLBAR);var m=i.get(n.K.TAB);function l(){t.one(".mui-mbarp-promotion-bd").height(t.height())}var u,c;var b=a.unparam(window.location.search.replace("?",""));function p(e){if(u&&c){e&&e({navUrl:u,navLogo:c})}else{window.__content_results=window.__content_results||[];new a.IO({url:"http://delta.taobao.com/home/delivery/AllContentByPage.do",type:"GET",dataType:"script",scriptCharset:"utf-8",data:{resourceIds:20140703,wfType:b["wfType"],wfCode:b["wfCode"],_mock_:b["_mock_"]},success:function(){if(a.unparam(window.location.search.replace("?",""))["promotion-mock"]==1){__content_results=[{content:"http://gtms01.alicdn.com/tps/i1/TB1Ne73FFXXXXXEapXXXOXwIpXX-70-70.gif",link:"http://www.tmall.com/go/rgn/promotion-act/public-block-toolbar.php",contentPicUrl:"http://gtms03.alicdn.com/tps/i3/TB1KrUZFFXXXXcoapXXF6kF2pXX-190-480.jpg",title:"\u590f\u65e5\u9017\u6bd45\u6298",rightDesc:"T100\u4e13\u4eab",actDesc:"\u5173\u6ce8\u54c1\u724c\u5373\u53ef\u4eab"}]}o.log("::content result::",__content_results);var t={};if(__content_results&&__content_results[0]&&__content_results[0].content&&__content_results[0].link){o.sendLog(n.ARR.PROMOTION_SHOW);o.sendLog(__content_results[0].exposureParam);t=__content_results[0];u=t.navUrl=__content_results[0].link;c=t.navLogo=__content_results[0].content;e&&e(t)}}})}}var d='

    {nick}\u4e13\u4eab\u7684\u54c1\u724c\u7279\u6743

    \u9650\u65f6\u6d3e\u53d1\u4e2d

    \u7acb\u5373\u9886\u53d6
    ';var f='';var v=a.one(".mui-mbar-tab-bubble-promotion");function h(i){p(function(l){if(l.navLogo){l.nick=i.nick;d=a.substitute(d,l);m.slideDown(.5);var u=a.one(".mui-mbar-tab-prof");var c=u.css("margin-top");u.animate({"margin-bottom":{value:5},"margin-top":{value:parseInt(c,10)-25}},{duration:.5});var b="mui/mbarp/promotion/"+l.acm;s.get({k:b,success:function(a){if(!a){r.bubble({show:true,content:d,customContentType:2,bubbleType:1,height:90,tab:"PROMOTION",showed:function(){o.sendLog(n.ARR.PROMOTION_BUBBLE_SHOW)},clicked:function(){m.fire("click");o.sendLog(n.ARR.PROMOTION_BUBBLE_CLICK)}});s.set({k:b,v:1})}}});m.on("mouseenter",function(){e.mallbarItem.fire(n.E.BUBBLE_CHANGE,{show:true,html:d,height:90,showDelay:500,isCustomContent:true,customContentType:2,bubbleType:1,isNotTabFire:true,tabMouseleave:true,showed:"",clicked:function(){m.fire("click");o.sendLog(n.ARR.PROMOTION_BUBBLE_CLICK)}})});e.on(n.E.VISIBILITY_CHANGE,function(e){if(l.navUrl){if(e.visible&&e.first){var i=a.substitute(f,l);t.html(i)}}})}})}o.getStaticConf({cb:function(){TB.Global.loginStatusReady(function(a){if(a.isLogin){h(a)}else{i.on(n.E.LOGIN_SUCCESS,function(e){h(a)})}})}})}});return l},{requires:["base","node","dom","event","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","mui/mallbar/plugin-promotion.css"]});KISSY.add("mui/mallbar/plugin/cart",function(a,e,t,i,r,s,n,o,l){var m=function(a){var e=this;m.superclass.constructor.call(e,a);e.init()};a.extend(m,e,{init:function(){var e=this;var t=e.get(r.K.CONTAINER);var i=e.get(r.K.MALLBAR_ITEM);var n=i.get(r.K.MALLBAR);var m=i.get(r.K.TAB);var u=a.all('
    ').appendTo(m);m.on("mouseenter",function(){u.hide()}).on("mouseleave",function(){if(!i.get(r.K.EXPAND)){u.show()}});n.on(r.E.MALLBAR_STATUS_CHANGE,function(a){r.S.STANDARD===a.status?u.show():u.hide()});i.on(r.E.LOGIN_SUCCESS,function(a){e._updateMiniCartNum(function(){})});l.set("_mallbarItem",i);l.set("_mallbarConf",r);e._bindCartModel();e._bindResize();e._updateMiniCartNum();e.on("visibilityChange",function(a){a.visible?u.hide():u.show();if(a.visible&&a.first){t.html('
    ');o.init("#J_MBarMiniCart")}else if(a.visible){o.strectch();e._resize()}if(a.visible){if(n.get("isBucket10")){s.sendLog(r.ARR.CART_TAB_CLICK_DOWN)}else{s.sendLog(r.ARR.CART_TAB_CLICK)}var i=e.total||0;if(i==0){l.record("tmalljy.2.5?action=open-with-size-zero")}}});e._contentReady(".tm-mcCartBtn",function(){var e=a.one(".tm-mcCartBtn");e.text("\u67e5\u770b\u5168\u90e8")});e.on("addCartItem",function(){e._updateMiniCartNum()});e.fire(r.E.ADD_CART_ITEM)},_contentReady:function(e,t){var i=false;setTimeout(function(){i=true},5e3);setTimeout(function(){var r=a.one(e);if(r&&r.children()){t()}else if(!i){setTimeout(arguments.callee,50)}},50)},_bindCartModel:function(){var a=this;var e=a.get(r.K.MALLBAR_ITEM);l.on("numChange",function(a){var t=e.getUserInfo();if(t&&t.isMallSeller){e.fire("suptipChange",{show:true,num:0});return}var i=l.get("totalSize");if(typeof i=="number"&&i!="-1"){e.fire("suptipChange",{show:true,num:i})}});l.on("numChangeCheckCount",function(){var a=e.getUserInfo();if(a&&a.isMallSeller){e.fire("suptipChange",{show:true,num:0});return}var t=l.get("__totalCount__");if(t&&t!="-1"){e.fire("suptipChange",{show:true,num:t})}});l.on("mallBarMiniCartNum",function(t){var i=t.data;var r=i.callback;var s=l.getNum("total");a.total=s;var n=e.getUserInfo();if(n&&n.isMallSeller){e.fire("suptipChange",{show:true,num:0})}else{e.fire("suptipChange",{show:true,num:s})}if(!r){return}r(!n.isLogin&&0===s)})},needLogin:function(a){a()},disableExpand:function(){var a=this;var e=a.get(r.K.MALLBAR_ITEM);var t=e.getUserInfo();if(t&&t.isMallSeller){s.sendLog("http://log.mmstat.com/tmalljy.2.5?action=openmini_v101");e.fire(r.E.BUBBLE_CHANGE,{show:true,customContentType:1,bubbleType:0,showDelay:100,html:"\u60a8\u662f\u5929\u732b\u5356\u5bb6\uff0c\u4e0d\u80fd\u4f7f\u7528\u8d2d\u7269\u8f66"});return true}return false},_bindResize:function(){var e=this;var i=e.get(r.K.MALLBAR_ITEM);var s=i.get(r.K.MALLBAR);t.delegate(document,"renderMiniCartList","#J_MBarMiniCart",function(){e._resize()});t.delegate(document,"miniCartEmpty","#J_MBarMiniCart",function(){a.later(function(){s.collapse({status:2})},2e3)})},_bindScroll:function(){var e=a.one(".mui-mbar-plugin-cart").one(".mui-mbar-plugin-bd");t.on(e,"scroll",a.buffer(function(t){var i=a.one(".mui-mbar-plugin-cart").one(".tm-mcHandler");var r=a.one(".mui-mbar-plugin-cart").one(".tm-mcTop");var s=e.height();i.css({position:"absolute",top:t.currentTarget.scrollTop+s-85});r.css({position:"absolute",top:t.currentTarget.scrollTop})},8>i.ie?150:-1))},_resize:function(){o();var e=a.one(".mui-mbar-plugin-cart");var t=e.one(".mui-mbar-plugin-bd");var i=e.one(".tm-mcHandler");var r=e.one(".tm-mcTop");var s=e.height();var n=a.one(".mui-mbarp-cart-bd").innerHeight();t.height(s);if(n>=s){if(l.get("quickSettlement")){a.one(".tm-mcListBox").css({"padding-bottom":"85px"})}}else{o()}function o(){a.one(".tm-mcListBox").css({"padding-bottom":"0px"})}},_updateMiniCartNum:function(e){var t=this;var s=i.ie==6||i.ie==7;var n=t.get(r.K.MALLBAR_ITEM);var o=n.get(r.K.MALLBAR);var m=function(t){var i=t.uid;var r="TCART_234_"+i+"_q";var s=function(t){t=t||{};var i=a.isNumber(t[r]);l.setNum({normal:i?l.formatNum(t[r]):0,invalid:0});l.fire("mallBarMiniCartNum",{data:{callback:e}})};if(i){l.xhr({api:"num",data:{keys:r},complete:s})}else{s()}};TB.Global.loginStatusReady(function(e){if(e.isLogin){var t=a.later(m,5e3);TB.Global.memberInfoReady(function(a){t.cancel();var e=a.memberInfo;m({uid:e.cookies&&e.cookies.unb?e.cookies.unb.value:""})})}else{m({uid:e.trackId})}})}});return m},{requires:["base","event","ua","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","mui/minicart","mui/minicart/model","mui/mallbar/plugin-cart.css"]});KISSY.add("mui/minicart",function(t,e,a,i,n,r,s){var o={};var c=0;t.mix(o,{version:"%VERSION%",init:function(i,n){if(c){return}c++;var s=this;s.carttype=1;i=e.get(i);n=t.merge({},n);e.addClass(i,"tm-mCart");s.el=i;var o=function(){i.innerHTML='
    '+'
    '+'
    '+'
    '+'
    '+"
    "+"
    ";s.handlerEl=e.get("div.tm-mcHandler",i);s.listBoxEl=e.get("div.tm-mcListBox",i);s.listInnerEl=e.get("div.tm-mcListInner",i);s.listEl=e.get("div.tm-mcList",i);s.rootEl=e.get("div.tm-mcRoot",i);s.graceEl=e.get("div.tm-mcGrace",i);s.apartEl=e.get("div.tm-mcApart",i);s.renderHandler();t.use("mui/minicart/fullext",function(){s.strectch()});a.on(s.rootEl,"click",function(t){t.stopPropagation();var a=t.target;do{if(a===this){return}var i=e.attr(a,"data-tmc");if("."===i){return}if(i){if("A"===a.nodeName){t.preventDefault()}return s[i](a)}a=e.parent(a)}while(true)});r.detach("numInit",o)};r.on("numInit",o);r.numInit();s.CartModel=r},login:function(e){var a=this;r.record("tmalljy.2.5?action=openmininotlogin_v102&ver="+a.carttype);var i=r.get("_mallbarItem");var n=r.get("_mallbarConf");if(i&&n){i.fire(n.E.LOGIN,{success:function(){r.set("_isLogin",true);if(t.isFunction(e)){return e()}if(TB&&TB.Global&&TB.Global.writeLoginInfo){TB._isMemberInfoReady=false;TB._isLoginStatusReady=false;TB.Global.writeLoginInfo()}}})}},cart:function(){window.open(r.getApi("bcart"),"_blank")},add:function(a,i,n){var s=this;s.addData={params:t.clone(a),success:i,error:n};var o=a.anim;delete a.anim;i=i||function(){};r.set("_cached",false);r.add({data:a,success:function(t){if(window.TB&&TB.Global&&TB.Global.mallbar){var a=o.startNode;var n=40;var r=40;TB.Global.mallbar.driving({e:{target:o.startNode,pageX:e.offset(a).left+(e.width(a)-n)/2,pageY:e.offset(a).top-r},type:"cart",flyer:o.img,width:n,height:r,bubble:false,speed:2,callback:function(){i(t)}})}},error:n||i})},invalidCache:function(){r.set("_cached",false)},loginThenAdd:function(){var t=this;t.login(function(){var e=t.addData;t.add(e.params,e.success,e.error)})},renderHandler:function(){var t=this;var a=r.getNum("total");var i="";if(r.get("_listFilled")&&!t.cartDegr){i+='
    ';i+='
    '+'

    \u8d2d\u7269\u8f66\u5df2\u9009'+a+''+(r.get("_checkedCount")||0)+'\u4ef6

    '+'¥'+s.toMoney(r.get("_totalFee"))+""+"
    ";i+='
    ';i+='
    \u7ed3 \u7b97
    ';i+="
    ";i+="
    "}var n=t.handlerEl;e.remove(".tm-mcCashier-wrap",n);e.append(e.create(i),n)}});r.on("after_counterDownChange",function(t){e[t.newVal?"addClass":"removeClass"](o.el,"tm-mcCounterDown")});r.on("after_countMaxChange",function(t){e[t.newVal?"addClass":"removeClass"](o.el,"tm-mcCountMax")});window.MiniCartModel=r;window.TMiniCart=o;return o},{requires:["dom","event","anim","ua","mui/minicart/model","mui/minicart/util","mui/minicart/minicart.css"]});KISSY.add("mui/minicart/model",function(t,e,a,r,i,n,c){var s=function(){var e=false;var a=[];var r=new Image;window["_tmcr_"+t.now()]=r;r.onload=r.onerror=function(){e=false;i()};function i(){if(e){return}var i=a.shift();if(i){e=true;r.src="http://gm.mmstat.com/"+i+(i.indexOf("?")>-1?"&":"?")+t.now()}}return function(t){if(t){a.push(t);i()}}}();function o(){var t=this;var e=location.hostname;var a=e.match(/\b(daily|com\.hk)\b/);var r=e.match(/\.hk\b/);var i=e.match(/\.95095/);var n=e.match(/\.95095\.daily\.etao\.net/);t.isDaily=a;var c=a?"daily.tmall.com.hk":"tmall.hk";var s=a?"daily.tmall.net":"tmall.com";var l=a?"daily.taobao.net":"taobao.com";var m=a?"yao.95095.daily.tmall.net":"yao.95095.com";if(n){m="yao.95095.daily.etao.net"}o.superclass.constructor.call(t);t.set("_checkedMax",50);t.set("_numDanger",50);var d=r?c:i?m:s;t.set("host:fbuy","http://{hostprefix}fbuy."+d);t.set("host:cart","http://{hostprefix}cart."+s);t.set("host:buy","http://{hostprefix}buy."+s);t.set("host:buyYY","http://{hostprefix}buy."+m);t.set("host:buyHK","http://{hostprefix}buy."+c);t.set("api:num",(a?"http://count.config-vip.taobao.net:8888":"http://count.tbcdn.cn")+"/counter6");t.set("api:list","{fbuy}/cart/mini/trailMiniCart.htm");t.set("api:add","{fbuy}/cart/addCartItems.do");t.set("api:del","{fbuy}/cart/mini/delMini.do");t.set("api:update","{fbuy}/cart/mini/updateMini.do");t.set("api:check","{fbuy}/cart/mini/checkMini.do");t.set("api:sss","http://{hostprefix}cart."+l+"/sss.htm");t.set("api:bag","{fbuy}/auth/buyerRemoveReward.do");t.set("api:bcart","{cart}/cart/myCart.htm");t.set("api:buyTB","http://{hostprefix}buy."+l+"/auction/order/confirm_order.htm");t.set("api:buy","{buy}/order/confirmOrder.htm");t.set("api:buyHK","{buyHK}/order/confirmOrder.htm");t.set("api:buyYY","{buyYY}/order/confirm_order.htm");t.set("api:checkLogin","{buy}/login/buy.do");t.set("api:checkLoginYY","{buyYY}/login/buy.do");t.set("api:checkLoginHK","{buyHK}/login/buy.do");var u=window.TB&&TB.Global&&TB.Global.setCartNum?TB.Global.setCartNum:function(){};t.on("numChange",function(){u(this.get("_counterDown")||this.get("_countMax")?false:this.getNum("total"))})}t.extend(o,a);t.augment(o,i.Target||t.EventTarget,{DATA:{},NUM:{total:0,normal:0,invalid:0,primitive:true},TYPE:{bundle:{child:"main"},main:{parent:"bundle",child:"order"},order:{parent:"main"}},setNum:function(e,a){var r={};var i=false;if(!t.isPlainObject(e)){r[e]=a}else{r=e}var n=this.NUM;t.each(r,function(t,e){if(e in n){if(t!==n[e]){i=true}n[e]=t}});n.total=n.normal+n.invalid;if(n.total>=this.get("_numDanger")){this.set("_countMax",true)}if(n.primitive){i=true;n.primitive=false}if(i){this.fire("numChange")}this.fire("updateNum")},getNum:function(e){var a=this.NUM;if(e){return a[e]}return t.clone(a)},numInit:function(){var e=this;var a=false;var r=function(){if(a){return}a=true;var r=e.get("uid");var i="TCART_234_"+r+"_q";var n=function(a){a=a||{};var r=t.isNumber(a[i]);if(!r){e.set("_counterDown",true)}e.setNum({normal:r?e.formatNum(a[i]):0,invalid:0});e.fire("numInit")};if(r){e.xhr({api:"num",data:{keys:i},complete:n})}else{n()}};TB.Global.loginStatusReady(function(a){if(a.isLogin){e.set("_isLogin",true);var i=t.later(r,5e3);TB.Global.memberInfoReady(function(t){i.cancel();var a=t.memberInfo;e.set("uid",a.cookies&&a.cookies.unb?a.cookies.unb.value:"");r()})}else{e.set("uid",a.trackId);r()}})},dump:function(){if(window.console){window.console.log(this.getAttrVals());window.console.log(this.NUM);window.console.log(this.DATA)}},getApi:function(e){var a=this;if(-1===e.indexOf(":")){e="api:"+e}var r=a.get(e);if(r){t.each(["fbuy","buy","buyHK","cart","buyYY"],function(t){r=r.replace("{"+t+"}",a.get("host:"+t)||"")});r=r.replace("{hostprefix}",a.get("host:prefix")||"")}return r},record:s,add:function(e){var a=this;var i=0;var s=1;e=a.mixParams(e);o(e.data);l();function o(t){t.add=r.stringify(t.add);var e=a.get("_tb_token_");if(e){t._tb_token_=e}}function l(r){if(r){o(r)}else{r=e.data}a.xhr({api:"add",data:r,success:function(t){a.setNum({normal:t.cartNum,invalid:0});e.success(t)},error:function(o){if(i>=s){return}if("CsrfCheckFail"===o.errorCode&&o.tk){i++;e.data._tb_token_=o.tk;a.set("_tb_token_",o.tk);return l()}if(!o.errorCode){o.errorCode="SERVER_BUSY";o.error="\u5ba2\u5b98\uff0c\u7f51\u7edc\u62e5\u5835\uff0c\u6dfb\u52a0\u8d2d\u7269\u8f66\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5"}if(o.errorCode==="BuyerNeedLogin"){var m={check:false};if(r.proxyURL){m.proxyURL=r.proxyURL}c.show(function(){var c=r.getParams;if(o.tk){e.data._tb_token_=o.tk;a.set("_tb_token_",o.tk)}if(t.isFunction(c)){n.when(c(),function(t){i++;return l(t)})}else{i++;return l()}},m)}else{e.error(o)}}})}},xhr:function(a){var r=this;a=t.merge({data:{},type:"get",success:function(){},error:function(){},complete:function(){},wait:function(){},needMerge:false,timeout:5},a);var i=r.getApi(a.api);var n=t.later(function(){a.wait()},360);var c=function(e){n.cancel();a.responseData=e;r.onXhrResponse(a);var i=r.get("uid");if(a.api==="num"&&!i){t.each(e,function(t,e){if(t<0){r.record("tmalljy.2.5?action=tair-error")}})}};var s=a.data;var o=r.get("_tpId");if(o){s.tpId=o}a.data=s;if("get"===a.type){e({url:i,type:"get",scriptCharset:a.scriptCharset||"gbk",data:s,dataType:"jsonp",complete:c,timeout:a.timeout})}else{r.useProxy(function(t){t.post(i,s,c,a.timeout)})}},onXhrResponse:function(e){var a=this;var i=e.responseData;if(!t.isPlainObject(i)){i={success:false}}var n=i.globalData;var c;if(n){c=n.sss;a.set("_isLogin",n.login);if(!a.get("host:prefix")&&n.hostPrefix){a.set("host:prefix",n.hostPrefix+".")}if(n.cartUrl){a.set("api:bcart",n.cartUrl)}}try{c=c||r.parse(i.sss);if(t.isPlainObject(c)&&"quantity"in c){t.getScript(a.getApi("sss")+"?quantity="+c.quantity+"&tk="+c.token+"&"+t.now())}}catch(s){}if(i.success){if(e.needMerge){a.set(n);a.merge(i.list)}if(n&&n.bundRela){a.mergeBundleRelaPromo(n)}e.success(i);if(e.needMerge){a.calculate()}}else{e.error(i)}e.complete(i)},formatNum:function(t){t-=0;return t>0?t:0},read:function(t,e,a){if(!t){return null}var r;e=e.split("/");while(r=e.shift()){if(r in t){t=t[r]}else{return a}}return t},mixParams:function(e,a){return t.merge({success:function(){},error:function(){}},a,e)},useProxy:function(e){var a=this;t.use("mui/minicart/proxy",function(t,r){r.init(a.getApi("host:fbuy")+"/cart/mini/proxy.htm",function(){});if(e){e(r)}})}});return new o},{requires:["ajax","base","json","event","promise","mui/minilogin"]});KISSY.add("mui/minicart/util",function(t,e){var i={};t.mix(i,{toMoney:function(t){if("number"!==typeof t){t=t-0}t=t/100;return isNaN(t)?"":t.toFixed(2)},toWeight:function(t){if("number"!==typeof t){t=t-0}t/=1e3;return t||0},toTxt:function(t){var i=document.createElement("div");i.innerHTML=t;return e.text(i).replace(/\s+/g,"")},showLogin:function(e){t.use("mui/minilogin",function(t,i){i.show(e)})}});return i},{requires:["dom"]});KISSY.add("mui/mallbar/plugin/nav",function(a,e,t,i,r,n,s){var o=[''].join("");var m="http://gtms01.alicdn.com/tps/i1/T19YwFFbVhXXcGUfcA-70-146.png";var l=[];var u=function(a){var e=this;u.superclass.constructor.call(e,a);e.init()};a.extend(u,e,{init:function(){var e=this;var t=e.get(r.K.CONTAINER);var i=e.get(r.K.MALLBAR_ITEM);var s=i.get(r.K.TAB);var u=s.one(".mui-mbar-tab-txt");function c(){t.one(".mui-mbarp-nav-bd").height(t.height())}e.on(r.E.VISIBILITY_CHANGE,function(a){if(a.visible&&a.first){n.getStaticConf({cb:function(a){t.html(n.fm('',a.navUrl||r.U.NAV_TMS));c()}})}c()});n.getStaticConf({cb:function(e){s.append(n.fm(o,e.navLogo||m));e.navTxt&&u.html(e.navTxt);var t=false;var i=location.href;i=i.indexOf("?")>-1?i.substring(0,i.indexOf("?")):i;i=i.charAt(i.length-1)==="/"?i.substring(0,i.length-1):i;var r=e.navActList&&e.navActList.length?e.navActList:l;for(var c=0;c1024){s.css("visibility","hidden")}}})}});return u},{requires:["base","node","event","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","mui/mallbar/plugin-nav.css"]});