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

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

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

\u67e5\u770b\u65b0\u52a8\u6001

'}break;case"ASSET":r=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":r=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":r=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":r=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":r=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":r=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":r="";l="";e='\u6536\u85cf\u5546\u54c1\u6210\u529f\uff01

\u53bb\u770b\u770b

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

\u53bb\u770b\u770b

';break}n.fire(c.E.BUBBLE_CHANGE,a.mix(o,{show:true,html:e,showDelay:10,hideDelay:t.hideDelay===undefined?"":t.hideDelay,showed:function(a){r&&b.sendLog(r);var t=a.one(".j_BubbleLink");if(t){t.on("click",function(a){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}a.stopPropagation()});b.getStaticConf({cb:function(a){a.brandBubUrl&&t.attr("href",a.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(t){var e=this;var i=t.type.toUpperCase();if(!e.isValid(i)){return}var r=e.getPoint({type:i});if(!r){return}var l=t.flyer,s=t.start,m=t.target,b=t.unAnim,u=t.speed?t.speed:1.16,d=t.bubble===undefined?true:t.bubble,p=t.hideDelay?t.hideDelay:"",f={left:r.x,top:r.y}||o.offset(m),g=a.UA.ie!=6,_=t.targetOffset||{left:0,top:0},h=t.flyerOffset||{left:0,top:0},T=t.flyerResize||{x:16,y:16},A=-1,v;var I=function(){var r=a.UA.ie==6;var s=e._popEl,m=a.UA.webkit,b=m?2:0,u={opacity:0,top:f.top-8-35-b+(r?o.scrollTop():0)+"px"},g={position:r?"absolute":"fixed",opacity:0,left:f.left-8-b+(r?o.scrollLeft():0)+"px",top:f.top-8-b+(r?o.scrollTop():0)+"px"};if(!s){var _=e.get(c.K.ITEMS);var h;if(_){h=_[t.type];if(h){h=h.get(c.K.POBJ);h.fire(c.E.DATA_CHANGE)}}s=e._popEl=o.create("
1
",{css:a.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);n(s,{opacity:1},.8,"easeOut",function(){n(s,u,1,"easeOut",function(){o.hide(s);e.onFinish({type:i,id:t.id,bubble:d,hideDelay:p});t.complete&&t.complete()}).run()}).run()}if(r){T()}else{n(l,{opacity:0},.8,"easeOut",T).run()}};if(T){v={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+=_.top-4;var E=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}",n(l,i)?l:"default").replace("{3}",n(l,i)?n(l,i):"")).appendTo(document.getElementsByTagName("body")[0])}if(l!="cart"){r.pageX=m.offset(s).left+(m.width(s)-b.width())/2;r.pageY=m.offset(s).top-b.height()/2}b.css({left:r.pageX-m.scrollLeft(),top:r.pageY-m.scrollTop()});if(l=="cart"||!t.bubble){t.bubble=false}if(l=="cart"){var g=e.get(c.K.ITEMS);var _;if(g){_=g.cart;if(_){_=_.get(c.K.POBJ);_.fire("addCartItem")}}}var h;var T;if(b&&b.width){h=r.pageX+b.width()/2;T=r.pageY+b.height()/2}else{h=r.pageX;T=r.pageY}this.fly({type:l,flyer:b,start:{left:h,top:T},target:t.target?t.target:null,unAnim:t.unAnim||false,bubble:t.bubble===false?t.bubble:true,speed:t.speed?t.speed:1.16,hideDelay:t.hideDelay?t.hideDelay:"",complete:function(){if(typeof o=="function"){o()}}})}}});return A},{requires:["base","event","node","anim","ua","swf","dom","cookie","ajax","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/model","mui/mallbar/item","mui/mallbar/store","mui/mallbar/mallbar.css","mui/mallbar/mallbar-tab.css","mui/mallbar/guide","mui/mallbar/plugin/prof","mui/mallbar/plugin/asset","mui/mallbar/plugin/brand","mui/mallbar/plugin/live","mui/mallbar/plugin/foot","mui/mallbar/plugin/cal","mui/mallbar/plugin/trip","mui/mallbar/plugin/top","mui/mallbar/plugin/ue","mui/mallbar/plugin/qrcode","mui/mallbar/plugin/favor","mui/mallbar/plugin/charge","mui/mallbar/plugin/promotion","mui/mallbar/plugin/cart","mui/mallbar/plugin/nav"]});KISSY.add("mui/mallbar/conf",function(a){var t=location.href;var l=t.indexOf("mbar-debug=1")>-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.0",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",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"},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"},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"},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_1_16.php",STB:"http://www.tmall.com/go/rgn/2014/mallbar/config/mconf-pub-2_1_16.php",PRE:"http://cdnprepub.tms.tmall.com/go/rgn/2014/mallbar/config/mconf-pub-2_1_16.php",ONLINE:"http://www.tmall.com/go/rgn/2014/mallbar/config/mconf-pub-2_1_16.php"},QR:"http://gtms03.alicdn.com/tps/i3/T1uu15FBxXXXamNNre-140-140.png"},T:{NUMLEV:13}};return b});KISSY.add("mui/mallbar/util",function(a,e,i,t,r,n,o,s,m){var l=/^(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);i.onload=function(){window[e]=null}};var d;var p=false;var b=[];c.getStaticConf=function(e){if(d){e.cb&&e.cb(d);return}else{e.cb&&b.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){d=e;a.each(b,function(a){a(e)});b=[]}}})}};c.ajax=function(e){var i=e.success;var t=e.complete;if(0&&o.DEBUG){e.type="get";e.dataType="script";var r="";var n=e.url;if(e.url.indexOf("?")>=0){var s=e.url.split("?");n=s[0];r=s[1]}var m=n.substring(n.lastIndexOf("/")+1,n.lastIndexOf(".")>=0?n.lastIndexOf("."):n.length);n=c.fm("data/{0}.js{1}",m,r?"?"+r:"");e.url=e._mockUrl?e._mockUrl:n;e.success=function(){i&&i(exports.response)}}else{e.type=e.type||"get";e.dataType=e.dataType||"jsonp";e.success=function(a){i&&i(a)}}var l=e.url.lastIndexOf("?")>-1;e.url=c.fm("{0}{1}_input_charset=UTF-8",e.url,l?"&":"?");e.timeout=e.timeout||5;e.error=e.error||function(a){c.log("U.ajax error: ",a)};var u=window.g_config||{};e.data=e.data||{};e.data.bizInfo=[u.bizId||"",u.sysId||"",u.devId||"pc"].join(".");e.complete=function(a){t&&t(a)};a.ajax(e)};c.deepMerge=function(e,i){if(!a.isObject(e)||!a.isObject(i)){return e}a.each(i,function(i,t){if(a.isObject(e[t])){c.deepMerge(e[t],i)}else{e[t]=i}});return e};c.noScroll=function(a){if(!a){return}t.on(a,"mousewheel",function(a){var e=a.delta;var i=this.scrollTop;if(e>0&&0===i||e<0&&i+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 i=c.segment(a);i.qs=c.fm("?{0}{1}scm={2}",i.qs,i.qs?"&":"",e);return c.fm("{0}{1}{2}",i.url,i.qs,i.hash?"#"+i.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(m)){c.codeTracker=new m;c.codeTracker.config({numLev:13,url:"http://mallbar.tmall.com/code-tracker"})}else{c.codeTracker=m}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",r=o?"daily.tmall.com.hk":"tmall.hk",l,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."+r+"/loginproxy.htm",yao:"http://yao.95095.com/go/rgn/95095/loginproxy.php"}};function d(e){var n=document.createElement("a");n.href=e;return n.hostname===location.hostname}var u={show:function(n,i){window.goldlog&&window.goldlog.send("http://log.mmstat.com/tmallmember.9.2",{});u.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){u.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){u.Analytics.MLcheckStar=new Date*1;var o=this;var t=i.checkTimeout||5;var r=false,l=e.later(function(){if(!r){n(o._checkPage())}l&&l.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){u.Analytics.MLcheckEnd=new Date*1;r=true;n(e.login)},error:function(){r=true;n(o._checkPage())},timeout:t,dataType:"jsonp",charset:"utf-8",cache:false,headers:{"X-Requested-With":false}})},_show:function(o,t){u.Analytics.MLshowStar=new Date*1;window.MLoginTimer+=1;if(!!t.insert){window.MLoginTimer=0}if(window.MLoginTimer>1){return}var a,r=m,c="",s=window.location.hostname,f="";if(t.needRedirect){var h=t.redirectUrl?t.redirectUrl:location.href.split("#")[0];r+=encodeURIComponent(h)+"&full_redirect=true"}else{a="g_tml_callbak"+(new Date).getTime();window[a]=function(){var e=window.TB||{};l&&l.destroy();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{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"}r+=encodeURIComponent(c)+"&full_redirect=false"}if(t.sub){r+="&sub=true"}if(window.g_config&&window.g_config.moduleTimeStamp&&window.g_config.moduleTimeStamp.minilogin){r+="&t="+window.g_config.moduleTimeStamp.minilogin}f='';if(!!t.insert){e.all(t.insert).append(f);return}l=new n({width:400,height:360,bodyContent:f,mask:true,showCat:true,zIndex:999999,align:{points:["cc","cc"]}});l.render();l.show();var g=e.version.indexOf("1.3")>=0,w=e.all(g?l.__attrVals.el:l.$el),p=g?".mui-stdmod-body":".mui-dialog-body",y=g?".mui-ext-close":".mui-dialog-close",k=w.all(".j_minilogin_iframe");k.parent(p).style("background-color","#FAFAFA");u.Analytics.MLshowEnd=new Date*1;w.all(y).on("click",function(){t.closeCallback&&t.closeCallback();window.MLoginTimer=0;l.destroy()});k.on("load",function(){u.Analytics.MLloaded=new Date*1;u.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 u.Analytics){o.push(t+"="+u.Analytics[t])}o.push("MLtype=minilogin");var a=["[uhttp://login.tmall.com/track/0.2.0/]","[r10]"].join(""),r=document.cookie.match(/_nk_\=([^\;]*); /),l=r&&r[1]||"",c="http://gm.mmstat.com/ued.1.1.2?type=9&id=jstracker&v=0.02&nick="+encodeURIComponent(l)+"&msg="+a+escape(o.join("&"));(new Image).src=c}};return u},{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/mallbar/model",function(a,t,e,i,n,r){var l=function(a){var t=this;a=a||{};l.superclass.constructor.call(t,a);t.init()};a.extend(l,a.Base,{init:function(){var a=this},isAccessed:function(){var a=e.get(i.CK_USED);n.log("used",a,e);return a==="1"},setAccessed:function(){e.set(i.CK_USED,"1",2147483647/86400,i.DOMAIN,"/")},getServerTime:function(){var a=this;var t=a.get(i.K.TIMESTAMP);return t?new Date(t):new Date},getUid:function(a){var t=this;a=a||t.get(i.K.USERINFO);var e="";try{if(a&&a.memberInfo){e=a.memberInfo.cookies.unb.value}}catch(r){n.log("getUid error",r)}return e},getBar:function(t){var e=this;var l=false;var o=0;var s=t.mallbar||null;var m={isLogin:true,nick:"",memberInfo:{isLogin:true,availablePoints:-99,activeStatus:-99,cookies:{unb:{value:""}}}};n.log("\u5f00\u59cb\u83b7\u53d6\u7528\u6237\u6570\u636e");function c(l){clearTimeout(o);n.log("\u5df2\u83b7\u53d6\u7528\u6237\u6570\u636e memberInfoReady",l);e.set(i.K.USERINFO,l);r.set({k:i.K.FRM_USERINFO,v:l});l.isLogin&&Math.random()=0)){if(t.gConfig.bizId==="chaoshi"&&a.id===i.P.CART){return}a.m=0;s.push(a)}});if(!s.length){return}l.l=s;a.each(l.q,function(t){a.each(l.l,function(a){if(a.id===t.id){a.m=t.m;return false}})});r.set({k:i.K.FRM_INIT,success:function(){n.log("\u5408\u5e76\u540e\u7684\u6846\u67b6\u6570\u636e",l);e.set(i.K.BAR,l)}})}})}}})}function u(a){l=true;a=a||m;n.log("\u8d85\u65f6\u5f02\u5e38\u6216\u65e0\u540a\u9876",a);c(a)}var b=window.TB;if(b&&b.Global&&b.Global.loginStatusReady&&b.Global.memberInfoReady){var d={};o=setTimeout(function(){var t=n.deepMerge(a.clone(m),t);n.log("timeout enter",t);u(t)},i.TIMEOUT_TOP);b.Global.loginStatusReady(function(a){n.log("loginStatusReady",a);d=a;s.set("token",a["tbToken"]);if(!a.isLogin){c(a)}else{b.Global.memberInfoReady(function(a){if(l){n.log("timeout quit",a);return}c(a)})}})}else{u()}setTimeout(function(){var a=window.devicePixelRatio>1;a&&Math.random()','
\u25c6
','
','
{0}
',""].join("");var g=['
','
{0}
',"
"].join("");var d=new m(['
','
','
','
{{{tip}}}
','
\u786e\u5b9a
',' {{#if dialogType===2}}
\u53d6\u6d88
{{/if}}',"
","
"].join(""));var b="mui-mbar-dialog";var _="mui-mbar-dialog-bd";var p="mui-mbar-dialog-yes";var T="mui-mbar-dialog-no";var A=function(t){var a=this;A.superclass.constructor.call(a,t);a.init()};A.ATTRS={showBubble:{value:false},expand:{value:false},pgFirstVisible:{value:true},suptipNum:{value:0}};t.extend(A,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 b=a.get(l.K.PLUGIN);var _=b.one(".mui-mbar-plugin-bd");var p=b.one(".mui-mbar-plugin-cover");var T=a.get(l.K.TAB);var A=a.get(l.K.BUBBLE);var u=A.one(".mui-mbar-tab-bubble-bd");var E=T.one(".mui-mbar-tab-sup");var h=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 L=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:b.one(".mui-mbar-plugin-hd-tip")});a.set(l.K.POBJ,i)});b.one(".mui-mbar-plugin-hd-close").on("click",function(){e.fire(l.E.STATUS_CHANGE,{status:l.S.STANDARD})});var v=0;T.on("mouseenter",function(){T.addClass(f);if(d.noHover||a.get(l.K.SHOW_BUBBLE)){return true}if(v){v=0}v=setTimeout(function(){if(!v){return}h.css({right:"70px",opacity:0});h.show();n(h,{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(v){v=0}n(h,{right:"70px",opacity:0},.3,"easeIn",function(){h.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(b.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);b.css("zIndex",l.ZINDEX-2);T.removeClass(f);if(i.visible){I.addClass(L);T.addClass(C);d.custom&&T.css("backgroundImage","none");if(!m){var r=e.get(l.K.OLD_INDEX);b.removeClass(l.C.SCALE_DOWN);b.css("top",0);b.css("zIndex",l.ZINDEX);b.css("visibility","visible");var o=a.get(l.K.INDEX);if(l.S.EXPAND===e.get(l.K.STATUS)&&r!==-1&&o!==r){b.css("top",b.height()+"px");n(b,{top:"0"},.4,"easeOut").run()}else{t.each(e.get(l.K.ITEMS),function(t){var a=t.get(l.K.PLUGIN);if(a!==b){a.css("visibility","hidden")}})}}}else{I.removeClass(L);T.removeClass(C);if(m){var r=a.get(l.K.INDEX);e.set(l.K.OLD_INDEX,r);b.css("zIndex",l.ZINDEX-1);if(l.S.EXPAND===e.get(l.K.STATUS)){b.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(g,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 g=!!i.isCustomContent;if(m===a.set(l.K.SHOW_BUBBLE)){return}if(m&&l.S.EXPAND===e.get(l.K.STATUS)){return}function d(){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 r=e.get(l.K.STATUS);if(l.S.STANDARD!==r){e.fire(l.E.STATUS_CHANGE,{status:l.S.STANDARD})}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 d=g?i.html:o.fm(c,i.html);u.html(d);var b=u.one(".mui-mbar-bubble-close");var _=u.one(".mui-mbar-bubble");if(b){b.on("click",function(t){t.stopPropagation();a.fire(l.E.BUBBLE_CHANGE,{show:false})})}if(_&&i.height){_.css("height",i.height)}A.show();n(A,{opacity:1},.3,l.EASE,function(){i.cb&&i.cb()}).run();A.detach("click");var p=_.one("a");var E;A.on("click",function(a){i.clicked&&i.clicked();if(p){E=p.attr("href");if(t.isString(E)&&E.indexOf("http://")>=0){window.open(E,"newwin");a.halt()}else{T.fire("click")}}else{T.fire("click")}});i.showed&&i.showed(A)}else{n(A,{opacity:0},.1,l.EASE,function(){A.hide();i.cb&&i.cb()}).run()}}if(m){setTimeout(d,r)}else{d()}});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)){u.hide()}else{u.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.css("top",a.css("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("."+b);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 A},{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,n){var m,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 n;if(e.config.isMask){n='
'}else{n=""}var i=[n,''].join("");a(i).appendTo(t.one("body"));m=t.get(".mui-mbar-animate-canvas").getContext("2d");m.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 m=[a,'
','','
',"
"].join("");t.one("body").append(m);var i=n.viewportWidth(),l=n.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){m.clearRect(0,0,300,600);m.beginPath();m.drawImage(t.config.picBox[18].Dom,15,566,284,35);m.drawImage(t.config.picBox[a].Dom,50,0,250,300)}else{setTimeout(function(){m.clearRect(0,0,300,600);m.beginPath();m.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){m.clearRect(0,0,300,600);m.beginPath();m.drawImage(a.config.picBox[18].Dom,15,566,284,35);m.drawImage(a.config.picBox[t].Dom,50,0,250,300)}else{clearInterval(e);a._pushLineAnimate()}t++},100)},_pushLineAnimate:function(){var a=this,e=0,n,i,l,o,r;m.lineWidth=1;n=a.config.AnimateTimeLine[e].startLine;i=a.config.AnimateTimeLine[e+1].startLine;o=a.config.AnimateTimeLine[e].animateTime;TweenLite.to(n,o,t.merge(i,{onUpdate:function(){m.clearRect(0,0,300,600);m.beginPath();m.moveTo(n.X,n.Y);m.bezierCurveTo(n.Cx1,n.Cy1,n.Cx2,n.Cy2,n.X2,n.Y2);m.stroke();m.drawImage(a.config.picBox[18].Dom,15,566,284,35);m.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,n){var l=this,o=l.config.AnimateTimeLine[n].animateTime;TweenLite.to(a,o,t.merge(e,{onUpdate:function(){m.clearRect(0,0,300,600);m.beginPath();m.moveTo(a.X,a.Y);m.bezierCurveTo(a.Cx1,a.Cy1,a.Cx2,a.Cy2,a.X2,a.Y2);m.stroke();m.drawImage(l.config.picBox[18].Dom,15,566,284,35);m.drawImage(l.config.picBox[12].Dom,50,0,250,300)},onComplete:function(){var t=0;i=false;n+=1;var a=setInterval(function(){t++;if(t>5&&i==true){clearInterval(a);setTimeout(function(){l._upAnimate(n)},300)}else{var m=l.config.AnimateTimeLine[n+1].startLine;l._shakeAnimate(e,m,n)}},200)}}))},_shakeAnimate:function(a,e,n){var l=this,o=l.config.AnimateTimeLine[n].animateTime;TweenLite.to(a,o,t.merge(e,{onUpdate:function(){m.clearRect(0,0,300,600);m.beginPath();m.moveTo(a.X,a.Y);m.bezierCurveTo(a.X,a.Y,a.X2,a.Y2,a.X2,a.Y2);m.stroke();m.drawImage(l.config.picBox[14].Dom,50,0,250,300);m.save();m.rotate(1.5*Math.PI/180);m.drawImage(l.config.picBox[18].Dom,30,559,284,35);m.restore()},onComplete:function(){TweenLite.to(e,o,t.merge(a,{onUpdate:function(){m.clearRect(0,0,300,600);m.beginPath();m.moveTo(a.X,a.Y);m.bezierCurveTo(a.X,a.Y,a.X2,a.Y2,a.X2,a.Y2);m.stroke();m.drawImage(l.config.picBox[12].Dom,50,0,250,300);m.save();m.rotate(Math.PI/180);m.drawImage(l.config.picBox[18].Dom,24,562,284,35);m.restore()},onComplete:function(){i=true}}))}}))},_upAnimate:function(a){var e=this,n=e.config.AnimateTimeLine[a+1].startLine,i=e.config.AnimateTimeLine[a+2].startLine,l=e.config.AnimateTimeLine[a+1].animateTime;TweenLite.to(n,l,t.merge(i,{onUpdate:function(){m.clearRect(0,0,300,600);m.beginPath();m.moveTo(n.X,n.Y);m.bezierCurveTo(n.Cx1,n.Cy1,n.Cx2,n.Cy2,157,113);m.stroke();m.drawImage(e.config.picBox[15].Dom,50,0,250,300);m.save();m.translate(n.X,n.Y);m.rotate(n.M*Math.PI/180);m.drawImage(e.config.picBox[18].Dom,-81,0,284,35);m.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(){m.clearRect(0,0,300,600);m.beginPath();m.moveTo(i.X,i.Y);m.bezierCurveTo(i.Cx1,i.Cy1,i.Cx2,i.Cy2,324,24);m.stroke();if(i.X5>90){m.drawImage(e.config.picBox[16].Dom,i.X5,0,250,300)}else{m.drawImage(e.config.picBox[17].Dom,i.X5,0,250,300)}m.save();m.translate(i.X,i.Y);m.rotate(i.M*Math.PI/180);m.drawImage(e.config.picBox[18].Dom,-81,0,284,35);m.restore()},onComplete:function(){m.clearRect(0,0,300,600);n.remove(".mui-mbar-animate-mask-bg");n.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 n=setInterval(function(){if(e<6){l.attr("src",a.config.picBox[e].src)}else{setTimeout(function(){a._buyAnimateIE()},500);clearInterval(n)}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 n=setInterval(function(){if(parseInt(e.css("right"))>-250){var m=10;e.css("right",parseInt(e.css("right"))-m);l.css("right",parseInt(l.css("right"))-m)}else{clearInterval(n);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 n=this;e=e||0;if(t[e]){n._imgLoad(t[e],function(){n._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,i,t,r,n,o,s,m,l){var u=new l(['','',''].join(""));var c=new l(['
','
',"
",'
','
',' {{#if iconUrl}}{{else}}','
{{/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}}","
",'
','
\u7b7e\u5230\uff1a
'," \u8d62\u79ef\u5206"," \u9886\u70b9\u5238","
",'
','
','
\u7279\u6743\uff1a
'," 㐲"," 㐵"," 㐴"," 㐸"," 㐹"," 㐺"," 㐶"," 㐷","
","
","
",'
\u25c6
'].join(""));var b="mui-mbarp-prof-tip";var d=160;var p=function(a){var e=this;p.superclass.constructor.call(e,a);e.init()};a.extend(p,e,{init:function(){var e=this;var t=e.mallbarItem=e.get(o.K.MALLBAR_ITEM);var r=t.get(o.K.MALLBAR);var m=r.get(o.K.ROOT);var l=t.get(o.K.TAB);var p=a.all('
').appendTo(m);var f=t.getUserInfo();var v=l.one(".mui-mbar-tab-tip");function h(){if(f.isLogin){var e=t.getUid();if(e){var i=s.fm(o.AVATAR,e,d);var r=new Image;r.onload=function(e){l.one(".mui-mbar-tab-logo-prof-def").hide();a.one(s.fm('
',i)).insertBefore(v)};a.one(s.fm('
')).insertBefore(v);r.src=i}}}h();a.one(document).on("click",function(a){p.hide()});e.on(o.E.PROF_CHANGE,function(l){if(f.isLogin){var v=t.getUid();var g={DEGRADE:o.DEGRADE,nick:f.nick,loginUrl:o.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:v?s.fm(o.AVATAR,v,d):"",vip:"http://vip.tmall.com?scm="+o.SCM.PROF};p.html(c.render(g));var _=p.one(".mui-mbarp-prof-icon-edit");var A=p.one(".mui-mbarp-prof-icon-edit-mask");p.one(".mui-mbarp-prof-icon-bd").on("mouseenter",function(){_.show();A.show()}).on("mouseleave",function(){_.hide();A.hide()});p.one(".mui-mbarp-prof-tip").on("mouseleave",function(e){var t=a.one(e.toElement||e.relatedTarget);if(i.hasClass(t,"mui-mbar-tabs-shadow")||i.hasClass(t,"mui-mbarp-prof-arr")){p.show()}else{p.hide()}})}var g=m.one(".mui-mbar-tab-logo-"+l.pid);var I=a.DOM.height(g);var C=parseFloat(g.parent().css("top"))+I/3.8;var T=a.DOM.viewportHeight();if(T-C<272){C=C-272+I+1;p.addClass("mui-mbarp-prof-bottom-arrow")}else{p.removeClass("mui-mbarp-prof-bottom-arrow")}if(g){p.css({top:C});if(o.P.CART===l.pid&&o.S.MINI===r.get(o.K.STATUS)){p.css({left:-g.parent().width()+"px"})}else{p.css({left:0})}}if(l.toLogin||!f.isLogin){p.html(u.render());var E=p.one(".mui-mbarp-prof-login-close");p.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")){p.hide()}}}});E.on("click",function(a){p.hide()});n.show(function(){p.hide();TB.Global.loginStatusReady(function(a){TB.Global.memberInfoReady(function(a){s.log("minilogin memberInfoReady",a);f=s.deepMerge(f,a);f.isLogin=true;t.setUserInfo(f);l.success&&l.success();r.broadcast(o.E.LOGIN_SUCCESS);h();if(o.P.PROF===l.pid){e.fire(o.E.PROF_CHANGE,{pid:o.P.PROF})}else{f.isLogin&&r.expand({type:l.pid})}})})},{insert:"."+b,needRedirect:false});s.sendLog(o.ARR.PROF_LOGIN);if(_czc){_czc.push(["_trackEvent","\u6211","\u9f20\u6807\u79fb\u8fc7","\u672a\u767b\u5f55"])}p.show()}else{p.css("display")==="none"&&s.sendLog(o.ARR.PROF);if(_czc){_czc.push(["_trackEvent","\u6211","\u9f20\u6807\u79fb\u8fc7","\u5df2\u767b\u5f55"])}p.show()}});var g=false;l.on("mouseenter",function(i){s.log("prof tab mouseenter");g=true;a.later(function(){if(g){e.fire(o.E.PROF_CHANGE,{pid:o.P.PROF});v.hide()}},400)}).on("mouseleave",function(e){g=false;var t=a.one(e.toElement||e.relatedTarget);if(t){if(!i.hasClass(t,"mui-mbar-tabs-shadow")){if(!t.parent(".mui-mbarp-prof")){p.hide()}}}}).on("click",function(){if(f.isLogin){p.css("display")==="none"&&s.sendLog(o.ARR.PROF);p.show();if(_czc){_czc.push(["_trackEvent","\u6211","\u9f20\u6807\u70b9\u51fb","\u5df2\u767b\u5f55"])}}});var _=document.createElement("script");_.src="http://w.cnzz.com/c.php?id=1000279581&async=1";_.type="text/javascript";_.async=true;_.charset="utf-8";var A=document.getElementsByTagName("body")[0];A.appendChild(_);var I=document.createElement("script");I.text='var _czc=_czc || []; _czc.push(["_setAccount","1000279581"]);';document.body.appendChild(I)}});return p},{requires:["base","dom","node","event","mui/minilogin","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","xtemplate","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="";e.isDetail=location.hostname.indexOf("detail.tmall.com")>=0||location.hostname.indexOf("detail.daily.tmall.net")>=0;e.isList=window.g_config.sysId=="list";e.bubbled=false;if(i.isLogin){var s=e.shopConfig=t.getShopConfig()||t.getGConfig()||{};e.sellerId=s.userId||s.sellerId;if(s.shopId){e.shopId=s.shopId}var o=a.unparam(window.location.search.substr(1));var l=o&&Number(o.gap)||36e5;c()}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);c()});e.on(n.E.DATA_CHANGE,function(a){e.set("isDataChange",true);if(t.get(n.K.EXPAND)){e._getAssetData()}});var m=e.get("mallbarItem").get("tab");var u=a.one(".mui-mbar");m.on("click",function(){if(u.hasClass("mui-mbar-status-expand")){r.sendLog(n.ARR.ASSETS_TAB_CLICK)}});function c(){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(m){if(m.s!==200){t.fire(n.E.ERROR);r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.obtainCoupon.get.failure","\u83b7\u53d6\u53ef\u9886\u4f18\u60e0\u5238\u5931\u8d25");return}if(!m.oci){return}e.token=m.t;var u=m.oci.c;if(u.length=="0"){return}l.html("\u5f53\u524d\u5e97\u94fa\u6709\u53ef\u9886\u4f18\u60e0\u5238\u54e6").show();var c=new o(['
',"\u5f53\u524d\u5e97\u94fa\u53ef\u7528\u4f18\u60e0\u5238","
"].join(""));var p=['",'
','
','

',' {{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}}",p.join(""),"{{/each}}","
"].join(""));r.log("::\u53ef\u9886\u53d6\u7684\u4f18\u60e0\u5238::",u);if(u&&u.length>0){if(!u[0].s){return}if(a.one(".mui-mbar-asset-no-coupon")){a.one(".mui-mbar-asset-no-coupon").css("visibility","hidden")}a.each(u,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(m.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();d(a)});s.delegate(".mui-mbarp-asset-wrap","click",".j_couldPull",function(a){a.halt();d(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 d(s){var o;if(a.one(s.currentTarget).hasClass(".mui-mbarp-asset-coupon-item")){o=a.one(s.currentTarget)}else{o=a.one(s.target).parent(".mui-mbarp-asset-coupon-item")}var l=.5,m=.5,u=n.EASE;r.ajax({url:n.URL.GET_PLUGIN_ASSET_OBTAIN_COUPON,data:{sellerId:e.sellerId,spreadId:o.attr("data-activeId"),_tb_token_:e.token},success:function(s){if(s.s=="-2"){t.fire(n.E.ERROR);r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.counpon.get.failure","\u7528\u6237\u4f18\u60e0\u5238\u9886\u53d6\u5931\u8d25");return}if(s.s=="-1"){o.attr("data-stretch","0");if(s.m.length<12){o.one(".j_couldCouponFailMsg").css("line-height","48px")}else{o.one(".j_couldCouponFailMsg").css("padding-top","9px")}o.one(".j_couldCouponFailMsg").html(s.m);i(o.one(".j_couldCouponFail"),{right:"0px"},m,u,function(){o.one(".j_couldPullBd").one(".mui-mbarp-asset-coupon-now-area-bg").hide();o.one(".j_couldPullBd").one(".mui-mbarp-asset-coupon-fail-area-bg").css("width","198px")}).run();i(o.one(".j_couldPullBd"),{right:"0px"},m,u).run();i(o.one(".j_couldPullAct"),{right:"187px"},m-6e-5,u).run()}else if(s.s=="1"){o.one(".mui-mbarp-asset-coupon-could-act").css("top","18px");o.one(".j_couldActIcon").html("㑄").show();o.one(".j_couldActVal").next().hide();o.one(".j_couldActVal").html("\u5df2\u9886").css("margin-top","0px");i(o,{height:"0px"},l,u,function(){o.hide();b();var t={};t.d=o.attr("data-d");t.u=o.attr("data-u");t.s="20"+o.attr("data-s");t.l="20"+o.attr("data-l");t.t=o.attr("data-t");t.n=o.attr("data-n");t.c=o.attr("data-c");var s=e._couponTemp.render(t);a.one(s).prependTo(a.one(".j_mui-mbarp-asset-cur-coupon"));if(!a.one("#mbarCouponAnchorAbleCoupon")){a.all(c.render()).insertBefore(a.one(".j_mui-mbarp-asset-cur-coupon"));i(a.one("#mbarCouponAnchorAbleCoupon"),{height:"18px"},.1,u,function(){p()}).run()}else{p()}}).run()}}});function p(){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"},l,u,function(){a.one(".j_pushShopItems").css("overflow","hidden").insertAfter(a.one(t));i(a.one(t),{height:"90px"},l,u,function(){f();d()}).run()}).run()}else{i(a.one(t),{height:"90px"},l,u,function(){d()}).run()}}else{i(a.one(t),{height:"90px"},l,u,function(){if(!e.isDetail){a.one('
').appendTo(a.one(".j_mui-mbarp-asset-cur-coupon"));e._getPullItems();f();b()}d()}).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 d(){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 f(){i(a.one(".j_pushShopItems"),{height:"265px"},2,u,function(){a.one(".j_pushShopItems").css("overflow","visible")}).run()}}}},error:function(){t.fire(n.E.ERROR);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);var i=a.sellerId;var s="";if(window.g_config&&window.g_config.itemId){s=window.g_config.itemId}r.ajax({url:n.URL.GET_PLUGIN_ASSET,data:{sellerId:i,itemId:s},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.get.failure","\u83b7\u53d6\u6211\u7684\u8d44\u4ea7\u5931\u8d25");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;t=e._assetCouponBubbleTPL('
\u8be5\u5e97\u94fa\u53ef\u9886\u4f18\u60e0\u5238

\u7acb\u5373\u9886\u53d6

');e.token=a.t;e.mallbarItem.fire(n.E.BUBBLE_CHANGE,{isCustomContent:true,show:true,html:new o(t).render(),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.get.failure","\u83b7\u53d6\u6211\u7684\u8d44\u4ea7\u6c14\u6ce1\u63d0\u9192\u5931\u8d25");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;if(!a){return}l.get({k:"mui/mallbar/asset/ableBonus/"+t.getUid(),success:function(i){if(i&&i.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 s=["
","\u60a8\u5171\u6709{{c}}\u4e2a\u7ea2\u5305\u53ef\u7528","
","
","\u603b\u91d1\u989d{{a}}\u5143","
"].join("");var m=new o(s).render(a.b);e.mallbarItem.fire(n.E.BUBBLE_CHANGE,{show:true,html:m,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=["red","yellow","blue"];var s=["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 l=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 m=new o(l).render(e.uci);t.mallbarItem.fire(n.E.BUBBLE_CHANGE,{show:true,html:m,isCustomContent:true,bubbleType:n.B.FOREVER,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;if(a.isUndefined(e.m)){return}var i="";var s='
'+'
\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}}";s+='

{{a}}

'+'
'+"
";i=s;var l=new o(i).render(e.m);t.mallbarItem.fire(n.E.BUBBLE_CHANGE,{show:true,html:l,isCustomContent:true,bubbleType:n.B.FOREVER,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 p="";if(s.c.l.length==0&&s.c.j.length==0&&s.c.o.length==0&&s.c.m==0){p=['
',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 b(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=b(a.u,"1048.1.3.2");a.curCoupon=true;a.diffDay=t._getDiffDay(a.l)});a.each(s.c.j,function(a){a.u=b(a.u,"1048.1.3.5");a.diffDay=t._getDiffDay(a.l)});a.each(s.c.o,function(a){a.u=b(a.u,"1048.1.3.3");a.diffDay=t._getDiffDay(a.l)});a.each(s.c.g,function(a){a.u=b(a.u,"1048.1.3.6");a.diffDay=t._getDiffDay(a.l)});a.each(s.c.m,function(a){a.u=b(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+='
'}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;p=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(p);if(a.isArray(p)){p=p.join("")}var g=new o(p).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,s,r){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 r=e.get(i.K.CONTAINER);var n=e.mallbarItem=e.get(i.K.MALLBAR_ITEM);var o=window.g_config.sysId=="list";e.isList=o;var m=g_config.appId==1||g_config.appId==2;var l=location.hostname.indexOf("detail.tmall.com")>=0||location.hostname.indexOf("detail.daily.tmall.net")>=0;e.isAjaxMemberRight=o||m||l;if(!e.brandId){var u=a.one(".minisite");var c=u&&u.one(".j_CollectBrand");var b;if(c){b=c.attr("data-brandId")||""}e.brandId=b}var p={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 d(){var a=n.get(i.K.DATA);if(a.i1){s.ajax({url:i.URL.GET_PLUGIN_GET_BRAND,data:{},timeout:4,success:function(a){if(a.s!==200){s.codeTracker.sendTrack(i.T.NUMLEV,"mallbar.asset.brandContent.get.failure","\u83b7\u53d6\u6211\u5173\u6ce8\u7684\u54c1\u724c\u5185\u5bb9\u5931\u8d25");return n.fire(i.E.ERROR)}var e='
{{#if m&&m.length}} '+p.myBrands+"{{else}} "+p.noBrands+" {{/if}} {{#if a&&a.length}} "+p.aldBrands+"{{/if}} {{#if u}} "+p.moreURL+"{{/if}}
";r.html(new t(e).render(a.m));if(a.mai){s.sendLog(a.mai)}h=false},jsonpCallback:"__mallbarBrand",error:function(){n.fire(i.E.ERROR);s.codeTracker.sendTrack(i.T.NUMLEV,"mallbar.asset.brandContent.get.failure","\u83b7\u53d6\u6211\u5173\u6ce8\u7684\u54c1\u724c\u5185\u5bb9\u5931\u8d25")}})}}var f=e.userInfo=n.getUserInfo();e.token="";e.isDetail=location.hostname.indexOf("detail.tmall.com")>=0||location.hostname.indexOf("detail.daily.tmall.net")>=0;e.bubbled=false;if(e.isList&&e.brandId){if(f.isLogin){g()}else{n.on(i.E.LOGIN_SUCCESS,function(a){s.log(a.type);g()})}}var h=true;e.on(i.E.VISIBILITY_CHANGE,function(a){if(e.showCoupon){e.showMemberCoupon();e.showCoupon=false}else{if(a.visible&&h){n.fire(i.E.SUPTIP_CHANGE,{show:false});d()}}});e.on(i.E.DATA_CHANGE,function(a){h=true;if(n.get(i.K.EXPAND)){d()}});function g(){var t=n.get(i.K.MALLBAR);t.getCueMsgInfo(function(t){a.log(t);if(t.s!=200){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 r=this;var n=e.m;if(a.isUndefined(n)){return}var o="";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}}

'+'
'+"
";o=m;var l=new t(o).render(n);r.mallbarItem.fire(i.E.BUBBLE_CHANGE,{show:true,html:l,isCustomContent:true,bubbleType:i.B.FOREVER,showed:function(){s.sendLog(i.ARR.COUPON_MEMBER_BUBBLE_B_SHOW)},clicked:function(){r.showCoupon=true;s.sendLog(i.ARR.COUPON_MEMBER_BUBBLE_B_CLICK)}})},showMemberCoupon:function(){var e=this;var r=['"].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 m=!!e.brandId?e.brandId:"";var l=!!e.memberRightType?e.memberRightType:0;if(e.isAjaxMemberRight){s.ajax({url:i.URL.GET_PLUGIN_MEMBER_RIGHT,data:{brandId:m,type:l},timeout:4,jsonpCallback:"__mallbarMemberRight",success:function(m){if(m.s!=200){e.mallbarItem.fire(i.E.ERROR);s.codeTracker.sendTrack(i.T.NUMLEV,"mallbar.asset.memberRight.get.failure","\u54c1\u724c\u83b7\u53d6\u4f1a\u5458\u6743\u76ca\u5238\u5931\u8d25")}e.token=m.t;if(m.c&&m.c.length){var l=m.c,u=m.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=s.addSCM(a.u,"1048.1.4.16"))});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=s.addSCM(t.u,"1048.1.4.18"));if(!!t.dit){a.each(t.dit,function(a){!!a.diu&&(a.diu=s.addSCM("http://detail.tmall.com/item.htm?id="+a.diu,"1048.1.4.19"));!!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=s.addSCM("http://shiyong.tmall.com/try/payTryItem.htm?id="+a.u,"1048.1.4.17"))});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;s.getStaticConf({cb:function(t){var i=e.get(o.K.CONTAINER);var r=e.get(o.K.MALLBAR_ITEM);i.html(u.render());i.one(".mui-mbarp-live-more").on("click",function(){e._getLiveData();s.sendLog(o.ARR.FOOT_MORE_CLICK)});var n=r.getUserInfo();var l=r.get(o.K.DATA);if(!n.isLogin||n.isLogin&&l.m>0){s.ajax({url:o.URL.GET_PLUGIN_LIVE_TIP,timeout:4,jsonpCallback:"__mallbarGetActiveMessage",success:function(i){if(i.s!==1||!i.t||!i.id){s.log("\u8bf7\u6c42\u6c14\u6ce1\u65f6\u670d\u52a1\u5668\u8fd4\u56de\u6709\u95ee\u9898");return}var n=i.id+"";m.get({k:c,success:function(l){var u=false;var b=t.liveBubMax;a.each(l,function(a,e){if(e===n&&a>=b){u=true;return false}});if(u){return}l=l||{};l[n]=l[n]||0;l[n]+=1;m.set({k:c,v:l});i.d11=t.isLiveD11;i.title=e.toStr(i.t,10);i.u=i.u?s.addSCM(i.u,o.SCM.LIVE_BUB_LINK):"";r.fire(o.E.BUBBLE_CHANGE,{show:true,isCustomContent:true,hideDelay:t.liveBubDur?t.liveBubDur*1e3:o.BUBBLE_HIDE_DELAY,html:f.render(i),showed:function(e){e.one(".mui-mbarp-live-close").on("click",function(a){a.stopPropagation();r.fire(o.E.BUBBLE_CHANGE,{show:false})});a.each(e.all("a"),function(e){a.one(e).on("click",function(a){s.sendLog(o.ARR.LIVE_BUB_LINK_CLICK);a.stopPropagation()})});s.sendLog(o.ARR.LIVE_SHOW)},clicked:function(){s.sendLog(o.ARR.LIVE_CLICK)},dismiss:function(){}})}})},error:function(){s.log("\u8bf7\u6c42\u6c14\u6ce1\u65f6\u670d\u52a1\u5668\u8d85\u65f6\u6216\u9519\u8bef")}})}var b=true;e.on(o.E.VISIBILITY_CHANGE,function(a){if(a.visible&&b){r.fire(o.E.SUPTIP_CHANGE,{show:false});e._getLiveData();b=false}});e.on(o.E.DATA_CHANGE,function(a){b=true;if(r.get(o.K.EXPAND)){e._getLiveData()}})}})},_getLiveData:function(){var e=this;var t=e.get(o.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(o.K.MALLBAR_ITEM);r.hide();m.show();s.ajax({url:o.URL.GET_PLUGIN_LIVE,data:{pageSize:10,lastId:b},timeout:4,jsonpCallback:"__mallbarReadRadiateMsg",success:function(u){m.hide();r.show();s.log("lastId",b);if(u.errorCode=="E01"){l.fire(o.E.LOGIN);return}if(u.errorCode!="E00"&&!b){l.fire(o.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}s.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=s.parseDate(a.date);a.date=s.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?s.addSCM(n.link,o.SCM.LIVE):"";a.src=n.src;a.desc=n.desc||n.t}});i.append(d.render(u));e.fixArrow(i)}})},error:function(){s.log("\u76f4\u64ad\u95f4\u6570\u636e\u8bf7\u6c42\u8d85\u65f6\u6216\u9519\u8bef");m.hide();r.show();if(!b){l.fire(o.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 A=false;var I=false;var C=false;var T=false;var E=7;var B=7;var L=20;var S=18;var R=96;var O=120;var N=105;var w=120;var M=["\u4eca\u5929","1\u5929\u524d","2\u5929\u524d","1\u5468\u524d"];var b=u.getUserInfo();var U=b.isLogin;var y=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 G=a.one('

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

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

');var K=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){I=true;setTimeout(function(){I=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(T){return}var e=u.get(s.K.EXPAND);if(e&&a.pageVisible&&!I){j()}});u.on(s.E.LOGIN_SUCCESS,function(){C=true});function F(){r.delegate(n,"click",".j_mui-mbar-foot-pfbtn",z)}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",jsonpCallback:"__mallbarFootGetHistory",data:{type:1,t:+new Date},timeout:5,success:Z,error:function(){u.fire(s.E.ERROR)}});new i({dataType:"jsonp",url:s.URL.GET_PLUGIN_FOOT_ITEMS2,jsonpCallback:"__mallbarFootGetPins",data:{type:2,t:+new Date},timeout:5,success:J,error:function(){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});A=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{Q(4)}}})}function J(e){m.log("::foot refreshPins::",e,+new Date);if(e.s&&e.s==-2){U=false;Y();X();return}U=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){A=false;var o=i.length;var s=Math.ceil(o/2)*w;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});A=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 z(e){e.preventDefault();if(C){T=true;C=false}else{T=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=A?r:r-o-19-l;s.height(u);i.removeClass("mui-mbar-foot-pfold");i.addClass("mui-mbar-foot-punfold");if(A){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(A){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*w;var v=b-94;f=f0){var T=parseInt(C.html());var E=T-1;C.html(E)}if(t){o.remove()}else{o.fadeOut(.3,function(){o.remove()})}},error:function(){a.one(n).on("click",q);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();Q(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 $(){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 Q(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();$();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(G);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(K);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,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");Q(2);return}if(!U){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 I=n.children(".mui-mbar-foot-hprice").html();var C=n.one(".mui-mbar-foot-hprice").attr("href");var T=C.split("?");var E=T[0];var B=T[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 w='
'+' '+_+''+' "+' '+'
'+' '+_+""+"
"+"
";if(A){if(a.one("#J_MuiMbarPinBd").height()==0){a.one("#J_MuiMbarPinBd").animate({height:156},.3,"easeOut",function(){X()});b.top-=156}else{var M=a.one(".j_mui-mbar-foot-pfbtn");M.removeClass("mui-mbar-foot-pfold");M.addClass("mui-mbar-foot-punfold")}}A=false;a.one(".mui-mbar-plugin-foot").prepend(w);var y=a.one(".mui-mbar-foot-psia");y.one(".j_mui-mbar-foot-ppin").on("click",q);m.log("aniItem width:"+y.width()+" height: "+y.height());y.animate({left:p+20,top:d-20},.5,"easeIn",function(){y.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(y);y.one(".mui-mbar-foot-ppin").fadeIn(.5);y.one(".mui-mbar-foot-pprice").fadeIn(.5);h=false;y.removeClass("mui-mbar-foot-psia");y.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");Q(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=w*(n+1);if(!t){e.height(s)}if(i&&i.length>0){var m=L+o*N;var l=S+n*w;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=w*(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 A=_;var I=a.all(".mui-mbar-foot-hsection");if(I&&I.length==1){var C=a.one("#J_MuiMbarHistoryBd").children();A=C}A&&A.fadeOut(1,function(){A.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 T=s-1;var E=Math.ceil(T/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=M[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 p='{0} \u5f00\u59cb\u4e86\uff01';var d=["\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 A="mui-mbarp-cal-week-tip";var C="mui-mbarp-cal-week-date-normal";var I="mui-mbarp-cal-week-date-today";var T="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.getUserInfo();if(s.isLogin){o.getStaticConf({cb:function(a){l.get({k:h,success:function(t){t=t||{};var i=e.now().getTime();for(var s in t){var m=t[s];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.log("__mallbarGetCalendar error\uff1a",a)},success:function(e){var m=e.status;if(m!==n.S.BAR_SUCCESS&&m!==n.S.BAR_NOT_LOGIN){return}t.set(g,e);l.get({k:h,success:function(m){m=m||{};e.today=i;var c=e.acts,p=1;for(var d=0;d11){p=11}_[3]=p;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 i=a.get(n.K.MALLBAR_ITEM);var t=i.get(n.K.MALLBAR);var s=i.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 d=s.one(".mui-mbarp-trip-disk");var p=s.one(".mui-mbarp-trip-logo");var b=d.width();function f(a){if(n.S.STANDARD===a){d.css({right:-b/4+"px"})}else if(n.S.MINI===a){d.css({right:0})}else if(n.S.EXPAND===a){i.get(n.K.EXPAND)?d.css({right:-b/2+"px"}):d.css({right:0})}}i.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(t.get(n.K.STATUS));if(a.visible&&a.first){e.html(o.fm('',n.U.TRIP_TMS))}var i=e.one(".mui-mbarp-trip-bd");i.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,i,t,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 i=e.get(r.K.MALLBAR_ITEM);var t=i.get(r.K.TAB);var o=a.one(window);o.on("scroll",a.buffer(function(a){var e=o.scrollTop();e>0?t.fadeIn(.2):t.fadeOut(.1)},100));o.fire("scroll");t.on("click",function(){n.log("top click");n.sendLog(r.ARR.BACKTOP_CLICK);s(0,0,300,"ease")});function s(e,i,t,r){if(!t){window.scrollTo(e,i)}else{a.one(window).animate({scrollLeft:e,scrollTop:i},t/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,i,t,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 i=e.get(r.K.MALLBAR_ITEM);var t=i.get(r.K.TAB);var n="http://ur.taobao.com/survey/view.htm?id=";var o=i.getGConfig();if(o.ueId){n=n+o.ueId;a.one(".mui-mbar-tab-ue").show();a.all("").appendTo("head");var s=t.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,i,t,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 t=e.mallbarItem=e.get(o.K.MALLBAR_ITEM);var r=t.get(o.K.MALLBAR);var n=r.get(o.K.ROOT);var m=t.get(o.K.TAB);var l=a.all('
').appendTo(n);e.renderTpl=false;e.qrcodeSrc="";e.isDetail=window.g_config.appId==1;e.isList=window.g_config.sysId=="list";e.isShop=window.g_config.appId==2||window.g_config.appId==7;if(e.isDetail||e.isList||e.isShop){e.renderTpl=true}if(e.isShop){var c=e.shopConfig=t.getShopConfig()||t.getGConfig()||{};e.sellerId=c.userId||c.sellerId;!!c.shopId&&(e.shopId=c.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=TB1scqHFVXXXXaSaXXXIqztGVXX-45-45.png&el=h&text="+d}if(e.isDetail){var b="";if(window.g_config&&window.g_config.itemId){b=window.g_config.itemId}if(b){e.qrcodeSrc="http://gqrcode.alicdn.com/img?v=1&type=bi&item_id="+b}}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 i=n.one(".mui-mbar-tab-logo-"+a.pid);if(i){l.css({top:i.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 t='';l.one(".mui-mbarp-qrcode-hd").html(t);e.renderTpl=false}l.show()}});l.one(".mui-mbarp-qrcode-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-qrcode-arr")){if(e.renderTpl){var n='';l.one(".mui-mbarp-qrcode-hd").html(n);e.renderTpl=false}l.show()}else{l.hide()}});var p=false;m.on("mouseenter",function(i){p=true;a.later(function(){if(p){e.fire(o.E.QRCODE_CHANGE)}},400)}).on("mouseleave",function(e){p=false;var t=a.one(e.toElement||e.relatedTarget);if(t){if(!i.hasClass(t,"mui-mbar-tabs-shadow")){if(!t.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 m="401";var l=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 m=n.get(s.K.MALLBAR);var l=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",type:"GET",url:s.URL.GET_PLUGIN_FAVOR_INFO,success:function(e){o.log("::favorList::",e);if(e.success&&e.status!=m){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==m){o.codeTracker.sendTrack(20,"mallbar.favor.getFavorItem.user.not-login","\u7528\u6237\u767b\u9646\u8d85\u65f6")}else{o.codeTracker.sendTrack(20,"mallbar.favor.getFavorItem.failure.bad-status","success:"+e.success+";"+"status:"+e.status)}a.fire(s.E.ERROR)}},error:function(){o.codeTracker.sendTrack(20,"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 m=this._itemListCache[n];m.recommandType=r;if(r=="match"){o.sendLog(s.ARR.FAVOR_TO_MATCH)}else{o.sendLog(s.ARR.FAVOR_TO_FX)}this._initItemDetail(m);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 m={left:0,top:40};n=t(n);n.css(s);o.append(n);n.animate({left:m.left,top:m.top,width:235,height:235},{duration:.3,easing:"easeOut",complete:function(){n.animate({opacity:0},{duration:.2,easing:"easeOut",complete:function(){n.remove()}})}})}var l=this._favorDetail||a.one(".mui-mbarp-favor-detail");l.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 m;if(e=="match"){n=this._tabContentMatch;m=s.URL.GET_PLUGIN_FAVOR_MATCH}else{n=this._tabContentFx;m=s.URL.GET_PLUGIN_FAVOR_FX}new r({url:m,dataType:"jsonp",type:"GET",data:{itemId:t.itemId,categoryId:t.categoryId,sellerId:t.sellerId},success:function(r){o.log("::favor item recommand::",r);var s=[];if(r.data&&r.data.length){s.push("
      ");a.each(r.data,function(e,t){if(t>11){return}e.picUrl=l(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.get(n.K.MALLBAR_ITEM);var r=i.get(n.K.TAB);function s(){t.one(".mui-mbarp-promotion-bd").height(t.height())}var l,u;var c=a.unparam(window.location.search.replace("?",""));function d(e){if(l&&u){e&&e({navUrl:l,navLogo:u})}else{window.__content_results=window.__content_results||[];new a.IO({url:"http://delta.taobao.com/home/delivery/AllContentByPage.do",type:"GET",dataType:"script",data:{resourceIds:20140703,wfType:c["wfType"],wfCode:c["wfCode"],_mock_:c["_mock_"]},success:function(){o.log("::content result::",__content_results);var a={};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);l=a.navUrl=__content_results[0].link;u=a.navLogo=__content_results[0].content;e&&e(a)}}})}}function b(){d(function(a){if(a.navLogo){r.append(o.fm(m,a.navLogo));r.show();e.on(n.E.VISIBILITY_CHANGE,function(e){if(a.navUrl){if(e.visible&&e.first){t.html(o.fm('',a.navUrl));s()}else{s()}}})}})}o.getStaticConf({cb:function(a){TB.Global.loginStatusReady(function(a){if(a.isLogin){b()}else{i.on(n.E.LOGIN_SUCCESS,function(a){b()})}})}})}});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,n,s,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 s=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()}});s.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(s.get("isBucket10")){n.sendLog(r.ARR.CART_TAB_CLICK_DOWN)}else{n.sendLog(r.ARR.CART_TAB_CLICK)}}});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(i&&i!="-1"){e.fire("suptipChange",{show:true,num:i})}});l.on("mallBarMiniCartNum",function(a){var t=a.data;var i=t.callback;var r=l.getNum("total");var n=e.getUserInfo();if(n&&n.isMallSeller){e.fire("suptipChange",{show:true,num:0})}else{e.fire("suptipChange",{show:true,num:r})}if(!i){return}i(!n.isLogin&&0===r)})},needLogin:function(a){a()},disableExpand:function(){var e=this;var t=e.get(r.K.MALLBAR_ITEM);var i=t.getUserInfo();if(i&&i.isMallSeller){n.sendLog("http://log.mmstat.com/tmalljy.2.5?action=openmini_v101");t.fire(r.E.BUBBLE_CHANGE,{show:true,showDelay:100,html:"\u60a8\u662f\u5929\u732b\u5356\u5bb6\uff0c\u4e0d\u80fd\u4f7f\u7528\u8d2d\u7269\u8f66"});return true}if(0===l.getNum("total")){n.sendLog("http://log.mmstat.com/tmalljy.2.5?action=openmini_v101");var s=a.one(".mui-mbar-tab-cart").one(".mui-mbar-tab-sup");for(var o=0;o<4;o++){s.fadeOut(.1).fadeIn(.1)}return true}return false},_bindResize:function(){var e=this;var i=e.get(r.K.MALLBAR_ITEM);var n=i.get(r.K.MALLBAR);t.delegate(document,"renderMiniCartList","#J_MBarMiniCart",function(){e._resize()});t.delegate(document,"miniCartEmpty","#J_MBarMiniCart",function(){a.later(function(){n.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 n=e.height();i.css({position:"absolute",top:t.currentTarget.scrollTop+n-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 n=e.height();var s=a.one(".mui-mbarp-cart-bd").innerHeight();t.height(n);if(s>=n){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 n=i.ie==6||i.ie==7;var s=t.get(r.K.MALLBAR_ITEM);var o=s.get(r.K.MALLBAR);var m=function(t){var i=t.uid;var r="TCART_234_"+i+"_q";var n=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:n})}else{n()}};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/);t.isDaily=a;var n=a?"daily.tmall.com.hk":"tmall.hk";var c=a?"daily.tmall.net":"tmall.com";var s=a?"daily.taobao.net":"taobao.com";var l=a?"yao.95095.daily.tmall.net":"yao.95095.com";o.superclass.constructor.call(t);t.set("_checkedMax",50);t.set("_numDanger",50);var m=r?n:i?l:c;if(a&&i){m=c}t.set("host:fbuy","http://{hostprefix}fbuy."+m);t.set("host:cart","http://{hostprefix}cart."+c);t.set("host:buy","http://{hostprefix}buy."+c);t.set("host:buyYY","http://{hostprefix}buy."+l);t.set("host:buyHK","http://{hostprefix}buy."+n);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."+s+"/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."+s+"/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 d=window.TB&&TB.Global&&TB.Global.setCartNum?TB.Global.setCartNum:function(){};t.on("numChange",function(){d(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(t){n.cancel();a.responseData=t;r.onXhrResponse(a)};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",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)}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,o){var s=[''].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 o=i.get(r.K.TAB);var u=o.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){o.append(n.fm(s,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){o.css("visibility","hidden")}}})}});return u},{requires:["base","node","event","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","mui/mallbar/plugin-nav.css"]});