| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7d2aa35d","chunk-0b96728a"],{"0867":function(t,s,o){},"39d5":function(t,s,o){},"775f":function(t,s,o){"use strict";o("7ea5")},"79b4":function(t,s,o){"use strict";o.r(s);var e=function(){var t=this,s=t._self._c;return s("div",{staticClass:"scope-topbar"},[s("div",{staticClass:"collapse"},[s("img",{staticClass:"avatar",attrs:{src:t._f("default_avatar")(t.logoUrl),alt:"花卉宝"}}),t._m(0)]),t.shopShow?s("el-dropdown",{staticClass:"user_top",attrs:{trigger:"click"},on:{command:t.shopCommand}},[s("div",[t._v(t._s(t.currentShop)+" "),s("i",{staticClass:"el-icon-caret-bottom"})]),s("el-dropdown-menu",{staticClass:"popper-dropdown-menu-user",attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.shopList,(function(o,e){return s("el-dropdown-item",{key:e,class:{shopActive:o.id==t.userInfo.currentShopId},attrs:{command:o}},[t._v(t._s(o.shopName))])})),1)],1):t._e(),s("div",{staticClass:"flex1"}),t.userInfo?s("div",{staticClass:"user"},[s("el-dropdown",{attrs:{trigger:"click","hide-on-click":!1},on:{command:t.onCommand}},[s("span",{staticClass:"el-dropdown-link"},[s("span",{staticClass:"name"},[t._v(t._s(t._f("default_name")(t.userInfo.name)))]),s("img",{staticClass:"avatar",attrs:{src:t._f("default_avatar")(t.userInfo.avatar),alt:""}}),s("i",{staticClass:"el-icon-caret-bottom"})]),s("el-dropdown-menu",{staticClass:"popper-dropdown-menu-user",attrs:{slot:"dropdown"},slot:"dropdown"},[s("el-dropdown-item",{attrs:{command:"exit"}},[t._v("退出")])],1)],1)],1):t._e()],1)},i=[function(){var t=this,s=t._self._c;return s("div",[s("span",[t._v("销花宝后台")])])}],a=(o("f16c"),o("45d2"),o("9052"),o("5880")),n=o("c081"),r=o("fbe1"),l={components:{LiNotice:r["default"]},data(){return{$projectName:this.$projectName,index:"0",shopList:[]}},mounted(){this.getAllShop()},computed:{...Object(a["mapGetters"])(["userInfo","shopInfo"]),logoUrl(){return this.$util.isEmpty(this.shopInfo)?"":this.shopInfo.smallLogoUrl},currentShop(){let t;return this.shopList.map(s=>{console.log(s.id,this.userInfo.currentShopId),s.id==this.userInfo.currentShopId&&(t=s.shopName)}),t},shopShow(){return 1==this.userInfo.super&&this.shopList.length>1}},methods:{...Object(a["mapMutations"])(["SET_MENU_GROUP","SET_MENU_LIST","COLLAPSE_MENU"]),onCommand(t){switch(t){case"my":this.$router.push("/my/info");break;case"exit":this.$store.dispatch("userLogout").done(()=>{n["utils"].href("/login")});break}},shopCommand(t){console.log(t),this.$service.common.toggleShop({shopId:t.id}).then(t=>{this.$router.go(0)}).catch(t=>{console.log(t,1111111)})},getAllShop(){this.$service.common.shopAll().then(t=>{console.log(t),this.shopList=t}).catch(t=>{})},layoutGlobalKd(){this.$router.push("/order/add")}}},c=l,d=(o("d63f"),o("775f"),o("1805")),p=Object(d["a"])(c,e,i,!1,null,"e76fea98",null);s["default"]=p.exports},"7ea5":function(t,s,o){},"8d14":function(t,s,o){"use strict";o("0867")},d63f:function(t,s,o){"use strict";o("39d5")},fbe1:function(t,s,o){"use strict";o.r(s);var e=function(){var t=this,s=t._self._c;return s("li",{staticClass:"tools-notice"},[s("i",{staticClass:"el-icon-message-solid"}),s("span",{staticClass:"tag"},[t._v("4")]),t.visible?s("div",{staticClass:"popover"},[s("div",{staticClass:"tips"},[s("span",[t._v("您有4条新通知")]),s("el-button",{attrs:{size:"mini",type:"primary",round:""}},[t._v("查看全部")])],1),t._m(0)]):t._e()])},i=[function(){var t=this,s=t._self._c;return s("div",{staticClass:"list"},[s("a",{staticClass:"block"},[s("div",{staticClass:"icon"},[s("i",{staticClass:"el-icon-s-promotion"})]),s("div",{staticClass:"det"},[s("p",{staticClass:"title"},[t._v("您的Apple ID 被用在iPhone 11 上登录 iCould")]),s("p",{staticClass:"sub-title"},[t._v("5分钟前")])])])])}],a=o("8bc2"),n={data(){return{visible:!1}},mounted(){document.onclick=t=>{let s=document.querySelector(".tools-notice .popover");"el-icon-message-solid"==t.target.className&&(this.visible=!this.visible),s&&(Object(a["contains"])(s,t.target)||(this.visible=!1))}}},r=n,l=(o("8d14"),o("1805")),c=Object(l["a"])(r,e,i,!1,null,"1efa0496",null);s["default"]=c.exports}}]);
|