1 line
9.7 KiB
JavaScript
1 line
9.7 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[48,16],{447:function(t,e,o){var content=o(449);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(15).default)("12a18d22",content,!0,{sourceMap:!1})},448:function(t,e,o){"use strict";o(447)},449:function(t,e,o){var n=o(14)(!1);n.push([t.i,".null-data[data-v-93598fb0]{padding:100px}.null-data .img-null[data-v-93598fb0]{width:150px;height:150px}",""]),t.exports=n},450:function(t,e,o){"use strict";o.r(e);var n={components:{},props:{img:{type:String},text:{type:String,default:"暂无数据"},imgStyle:{type:String,default:""}},methods:{}},c=(o(448),o(9)),component=Object(c.a)(n,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"bg-white flex-col col-center null-data"},[o("img",{staticClass:"img-null",style:t.imgStyle,attrs:{src:t.img,alt:""}}),t._v(" "),o("div",{staticClass:"muted mt8"},[t._v(t._s(t.text))])])}),[],!1,null,"93598fb0",null);e.default=component.exports},472:function(t,e,o){"use strict";var n=o(7),c=o(101).find,r=o(187),l="find",d=!0;l in[]&&Array(1).find((function(){d=!1})),n({target:"Array",proto:!0,forced:d},{find:function(t){return c(this,t,arguments.length>1?arguments[1]:void 0)}}),r(l)},543:function(t,e,o){var content=o(619);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(15).default)("3973d46b",content,!0,{sourceMap:!1})},617:function(t,e,o){t.exports=o.p+"img/profit_null.05cb92f.png"},618:function(t,e,o){"use strict";o(543)},619:function(t,e,o){var n=o(14)(!1);n.push([t.i,".user-collection-container[data-v-0ad89564]{width:980px;padding:10px 10px 60px}.user-collection-container[data-v-0ad89564] .el-tabs__header{margin-left:10px}.user-collection-container[data-v-0ad89564] .el-tabs .el-tabs__nav-scroll{padding:0}.user-collection-container .user-collection-content .goods[data-v-0ad89564]{width:180px;height:260px;margin-right:15px;margin-bottom:30px;float:left}.user-collection-container .user-collection-content .goods-image[data-v-0ad89564]{width:180px;height:180px;cursor:pointer;position:relative}.user-collection-container .user-collection-content .goods-image:hover .goods-image-wrap[data-v-0ad89564]{opacity:1}.user-collection-container .user-collection-content .goods-image-wrap[data-v-0ad89564]{left:0;bottom:0;width:180px;height:26px;padding:8px 0;color:#fff;text-align:center;position:absolute;opacity:0;transition:opacity .2s linear;background-color:rgba(0,0,0,.2)}.user-collection-container .user-collection-content .goods-image-wrap>div[data-v-0ad89564]{width:90px;cursor:pointer}.user-collection-container .user-collection-content .goods-image-wrap>div[data-v-0ad89564]:first-child{border-right:1px solid #fff}.user-collection-container .user-collection-content .goods[data-v-0ad89564]:nth-child(5n){margin-right:0}.user-collection-container .user-collection-content .goods-name[data-v-0ad89564]{height:36px;color:#101010}.user-collection-container .user-collection-content .shop[data-v-0ad89564]{padding:20px 0;border-bottom:1px solid #e5e5e5}.user-collection-container .user-collection-content .shop .shop-item:hover .shop-wrap[data-v-0ad89564]{opacity:1}.user-collection-container .user-collection-content .shop .shop-item[data-v-0ad89564]{width:148px;height:220px;background-size:cover;background-position:50%;padding:10px;border-radius:6px;position:relative}.user-collection-container .user-collection-content .shop .shop-item .shop-wrap[data-v-0ad89564]{top:0;left:0;position:absolute;width:148px;height:26px;padding:8px 0;color:#fff;opacity:0;text-align:center;transition:opacity .2s linear;background-color:rgba(0,0,0,.2)}.user-collection-container .user-collection-content .shop .shop-item .shop-wrap>div[data-v-0ad89564]{width:74px;cursor:pointer}.user-collection-container .user-collection-content .shop .shop-item .shop-wrap>div[data-v-0ad89564]:first-child{border-right:1px solid #fff}.user-collection-container .user-collection-content .shop .shop-item .shop-info[data-v-0ad89564]{border-radius:6px;padding:18px 15px}.user-collection-container .user-collection-content .shop .shop-item .shop-info .logo[data-v-0ad89564]{width:70px;height:70px;border-radius:50%;margin-top:-45px}.user-collection-container .user-collection-content .shop[data-v-0ad89564]:last-child{border-bottom:0}",""]),t.exports=n},672:function(t,e,o){"use strict";o.r(e);var n=o(6),c=(o(53),o(11),o(472),{head:function(){return{title:this.$store.getters.headTitle,link:[{rel:"icon",type:"image/x-icon",href:this.$store.getters.favicon}]}},layout:"user",data:function(){return{activeName:0,recodeList:{},userCollection:[{type:0,lists:[],name:"商品",count:0,page:1},{type:1,lists:[],name:"店铺",count:0,page:1}]}},fetch:function(){this.handleClick()},mounted:function(){this.getRecodeList()},methods:{handleClick:function(){this.getRecodeList()},changePage:function(t){var e=this;this.userCollection.some((function(o){o.type==e.activeName&&(o.page=t)})),this.getRecodeList()},getRecodeList:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var o,n,c,r,l,d,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.activeName,n=t.userCollection,c=n.find((function(t){return t.type==o})),0!=o){e.next=8;break}return e.next=5,t.$get("goods_collect/lists",{params:{page_size:10,page_no:c.page}});case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,t.$get("pc/shopFollowList",{params:{page_size:10,page_no:c.page}});case 10:e.t0=e.sent;case 11:r=e.t0,l=r.data,d=l.lists,h=l.count,1==r.code&&(t.recodeList={lists:d,count:h});case 17:case"end":return e.stop()}}),e)})))()},cancelColl:function(t){var e=this;return Object(n.a)(regeneratorRuntime.mark((function o(){var n,code;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(0!=e.activeName){o.next=6;break}return o.next=3,e.$post("goods_collect/changeStatus",{goods_id:t});case 3:o.t0=o.sent,o.next=9;break;case 6:return o.next=8,e.$post("shop_follow/changeStatus",{shop_id:t});case 8:o.t0=o.sent;case 9:n=o.t0,code=n.code,n.msg,1==code&&e.$message.success("取消成功"),e.getRecodeList();case 14:case"end":return o.stop()}}),o)})))()}},watch:{recodeList:{immediate:!0,handler:function(t){var e=this;console.log("val:",t),this.userCollection.some((function(o){if(o.type==e.activeName)return Object.assign(o,t),!0}))}}}}),r=(o(618),o(9)),component=Object(r.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"user-collection-container"},[n("div",{staticClass:"user-collection-content"},[n("el-tabs",{staticClass:"mt10",on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},t._l(t.userCollection,(function(e,c){return n("el-tab-pane",{key:c,attrs:{label:e.name,name:e.type+""}},[c==t.activeName?n("div",[t.userCollection[t.activeName].lists.length?[0==t.activeName?t._l(e.lists,(function(e,o){return n("div",{key:o,staticClass:"goods",on:{click:function(o){return o.stopPropagation(),t.$router.push({path:"/goods_details/"+e.id})}}},[n("div",{staticClass:"goods-image"},[n("el-image",{staticStyle:{width:"180px",height:"180px"},attrs:{src:e.image,fit:"fit"}}),t._v(" "),n("div",{staticClass:"goods-image-wrap flex"},[n("div",{on:{click:function(o){return o.stopPropagation(),t.cancelColl(e.id)}}},[t._v("取消收藏")]),t._v(" "),n("div",{on:{click:function(o){return o.stopPropagation(),t.$router.push({path:"/shop_street_detail",query:{id:e.shop_id}})}}},[t._v("进入店铺")])])],1),t._v(" "),n("div",{staticClass:"goods-name m-t-10"},[n("div",{staticClass:"line-2"},[t._v(t._s(e.name))])]),t._v(" "),n("div",{staticClass:"m-t-14"},[n("span",{staticClass:"primary xl"},[t._v("¥"+t._s(e.min_price))])])])})):t._e(),t._v(" "),1==t.activeName?t._l(e.lists,(function(e,o){return n("div",{key:o,staticClass:"shop flex",staticStyle:{width:"100%"}},[n("div",{staticClass:"shop-item flex-col row-right",style:{"background-image":"url("+e.cover+")"}},[n("div",{staticClass:"shop-wrap xs flex"},[n("div",{on:{click:function(o){return o.stopPropagation(),t.cancelColl(e.id)}}},[t._v("取消收藏")]),t._v(" "),n("div",{on:{click:function(o){return o.stopPropagation(),t.$router.push({path:"/shop_street_detail",query:{id:e.shop_id}})}}},[t._v("进入店铺")])]),t._v(" "),n("div",{staticClass:"bg-white shop-info text-center"},[n("el-image",{staticClass:"logo",attrs:{src:e.logo}}),t._v(" "),n("div",{staticClass:"m-t-12 line-1 lg"},[t._v("\n "+t._s(e.name)+"\n ")])],1)]),t._v(" "),e.goods_list.length>=1?n("div",{staticClass:"flex-1 m-l-20",staticStyle:{width:"100%"}},[n("div",{staticClass:"shop-title flex row-between"},[n("span",[t._v("店铺推荐")]),t._v(" "),n("div",{staticClass:"pointer",on:{click:function(o){return o.stopPropagation(),t.$router.push({path:"/shop_street_detail",query:{id:e.shop_id}})}}},[t._v("\n 进入店铺"),n("i",{staticClass:"el-icon-arrow-right"})])]),t._v(" "),n("div",{staticClass:"m-t-20 flex"},t._l(e.goods_list,(function(e,o){return n("div",{key:o,staticClass:"m-r-16",on:{click:function(o){return o.stopPropagation(),t.$router.push({path:"/goods_details/"+e.id})}}},[n("el-image",{staticStyle:{width:"150px",height:"150px"},attrs:{src:e.image,fit:"fit"}}),t._v(" "),n("div",{staticClass:"primary flex row-center m-t-10"},[t._v("\n ¥"+t._s(e.min_price)+"\n ")])],1)})),0)]):t._e()])})):t._e()]:[n("null-data",{attrs:{img:o(617),text:"暂无收藏~"}})]],2):t._e()])})),1)],1)])}),[],!1,null,"0ad89564",null);e.default=component.exports;installComponents(component,{NullData:o(450).default})}}]); |