glhcp/server/public/_nuxt/a6e9157.js

1 line
9.7 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[51,16],{492:function(t,e,o){var content=o(494);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(18).default)("1e01d57a",content,!0,{sourceMap:!1})},493:function(t,e,o){"use strict";o(492)},494:function(t,e,o){var n=o(17)((function(i){return i[1]}));n.push([t.i,".null-data[data-v-93598fb0]{padding:100px}.null-data .img-null[data-v-93598fb0]{height:150px;width:150px}",""]),n.locals={},t.exports=n},495: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(493),o(9)),component=Object(c.a)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"bg-white flex-col col-center null-data"},[e("img",{staticClass:"img-null",style:t.imgStyle,attrs:{src:t.img,alt:""}}),t._v(" "),e("div",{staticClass:"muted mt8"},[t._v(t._s(t.text))])])}),[],!1,null,"93598fb0",null);e.default=component.exports},517:function(t,e,o){"use strict";var n=o(2),c=o(110).find,r=o(194),l="find",d=!0;l in[]&&Array(1)[l]((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)},591:function(t,e,o){var content=o(673);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(18).default)("46e43816",content,!0,{sourceMap:!1})},671:function(t,e,o){t.exports=o.p+"img/profit_null.1af4fa2.png"},672:function(t,e,o){"use strict";o(591)},673:function(t,e,o){var n=o(17)((function(i){return i[1]}));n.push([t.i,".user-collection-container[data-v-0ad89564]{padding:10px 10px 60px;width:980px}.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]{float:left;height:260px;margin-bottom:30px;margin-right:15px;width:180px}.user-collection-container .user-collection-content .goods-image[data-v-0ad89564]{cursor:pointer;height:180px;position:relative;width:180px}.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]{background-color:rgba(0,0,0,.2);bottom:0;color:#fff;height:26px;left:0;opacity:0;padding:8px 0;position:absolute;text-align:center;transition:opacity .2s linear;width:180px}.user-collection-container .user-collection-content .goods-image-wrap>div[data-v-0ad89564]{cursor:pointer;width:90px}.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]{color:#101010;height:36px}.user-collection-container .user-collection-content .shop[data-v-0ad89564]{border-bottom:1px solid #e5e5e5;padding:20px 0}.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]{background-position:50%;background-size:cover;border-radius:6px;height:220px;padding:10px;position:relative;width:148px}.user-collection-container .user-collection-content .shop .shop-item .shop-wrap[data-v-0ad89564]{background-color:rgba(0,0,0,.2);color:#fff;height:26px;left:0;opacity:0;padding:8px 0;position:absolute;text-align:center;top:0;transition:opacity .2s linear;width:148px}.user-collection-container .user-collection-content .shop .shop-item .shop-wrap>div[data-v-0ad89564]{cursor:pointer;width:74px}.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]{border-radius:50%;height:70px;margin-top:-45px;width:70px}.user-collection-container .user-collection-content .shop[data-v-0ad89564]:last-child{border-bottom:0}",""]),n.locals={},t.exports=n},729:function(t,e,o){"use strict";o.r(e);o(30);var n=o(8),c=(o(56),o(12),o(517),{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(672),o(9)),component=Object(r.a)(c,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"user-collection-container"},[e("div",{staticClass:"user-collection-content"},[e("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(n,c){return e("el-tab-pane",{key:c,attrs:{label:n.name,name:n.type+""}},[c==t.activeName?e("div",[t.userCollection[t.activeName].lists.length?[0==t.activeName?t._l(n.lists,(function(o,n){return e("div",{key:n,staticClass:"goods",on:{click:function(e){return e.stopPropagation(),t.$router.push({path:"/goods_details/"+o.id})}}},[e("div",{staticClass:"goods-image"},[e("el-image",{staticStyle:{width:"180px",height:"180px"},attrs:{src:o.image,fit:"fit"}}),t._v(" "),e("div",{staticClass:"goods-image-wrap flex"},[e("div",{on:{click:function(e){return e.stopPropagation(),t.cancelColl(o.id)}}},[t._v("取消收藏")]),t._v(" "),e("div",{on:{click:function(e){return e.stopPropagation(),t.$router.push({path:"/shop_street_detail",query:{id:o.shop_id}})}}},[t._v("进入店铺")])])],1),t._v(" "),e("div",{staticClass:"goods-name m-t-10"},[e("div",{staticClass:"line-2"},[t._v(t._s(o.name))])]),t._v(" "),e("div",{staticClass:"m-t-14"},[e("span",{staticClass:"primary xl"},[t._v("¥"+t._s(o.min_price))])])])})):t._e(),t._v(" "),1==t.activeName?t._l(n.lists,(function(o,n){return e("div",{key:n,staticClass:"shop flex",staticStyle:{width:"100%"}},[e("div",{staticClass:"shop-item flex-col row-right",style:{"background-image":"url(".concat(o.cover,")")}},[e("div",{staticClass:"shop-wrap xs flex"},[e("div",{on:{click:function(e){return e.stopPropagation(),t.cancelColl(o.id)}}},[t._v("取消收藏")]),t._v(" "),e("div",{on:{click:function(e){return e.stopPropagation(),t.$router.push({path:"/shop_street_detail",query:{id:o.shop_id}})}}},[t._v("进入店铺")])]),t._v(" "),e("div",{staticClass:"bg-white shop-info text-center"},[e("el-image",{staticClass:"logo",attrs:{src:o.logo}}),t._v(" "),e("div",{staticClass:"m-t-12 line-1 lg"},[t._v("\n "+t._s(o.name)+"\n ")])],1)]),t._v(" "),o.goods_list.length>=1?e("div",{staticClass:"flex-1 m-l-20",staticStyle:{width:"100%"}},[e("div",{staticClass:"shop-title flex row-between"},[e("span",[t._v("店铺推荐")]),t._v(" "),e("div",{staticClass:"pointer",on:{click:function(e){return e.stopPropagation(),t.$router.push({path:"/shop_street_detail",query:{id:o.shop_id}})}}},[t._v("\n 进入店铺"),e("i",{staticClass:"el-icon-arrow-right"})])]),t._v(" "),e("div",{staticClass:"m-t-20 flex"},t._l(o.goods_list,(function(o,n){return e("div",{key:n,staticClass:"m-r-16",on:{click:function(e){return e.stopPropagation(),t.$router.push({path:"/goods_details/"+o.id})}}},[e("el-image",{staticStyle:{width:"150px",height:"150px"},attrs:{src:o.image,fit:"fit"}}),t._v(" "),e("div",{staticClass:"primary flex row-center m-t-10"},[t._v("\n ¥"+t._s(o.min_price)+"\n ")])],1)})),0)]):t._e()])})):t._e()]:[e("null-data",{attrs:{img:o(671),text:"暂无收藏~"}})]],2):t._e()])})),1)],1)])}),[],!1,null,"0ad89564",null);e.default=component.exports;installComponents(component,{NullData:o(495).default})}}]);