(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{484:function(t,e,o){"use strict";o(21),o(61);e.a={head:function(){var t=this.$store.getters.headerMeta;return{title:t.title,link:[{rel:"icon",type:"image/x-icon",href:t.ico}],meta:[{hid:"description",name:"description",content:t.description},{hid:"keywords",name:"keywords",content:t.keywords}]}}}},586:function(t,e,o){var content=o(653);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(20).default)("6a59f040",content,!0,{sourceMap:!1})},651:function(t,e,o){t.exports=o.p+"img/profit_null.05cb92f.png"},652:function(t,e,o){"use strict";o(586)},653:function(t,e,o){var n=o(19)((function(i){return i[1]}));n.push([t.i,".user-collection{padding:10px}.user-collection .collection-header{border-bottom:1px solid hsla(0,0%,90%,.898);padding:10px 5px}.user-collection .collection-list{display:flex;flex-direction:column;justify-content:space-between;min-height:690px}.user-collection .collection-list .goods-item{border-bottom:1px dashed hsla(0,0%,90%,.898);padding:26px 20px}.user-collection .collection-list .goods-item .goods-info{flex:1;margin-left:10px;width:500px}.user-collection .collection-list .goods-item .goods-info .goods-name{margin-bottom:8px}.user-collection .collection-list .goods-item .to-buy-btn{border:1px solid #ff2c3c;font-size:13px;height:32px;width:104px}.user-collection .collection-list .goods-item .cancel-btn{border:1px solid hsla(0,0%,90%,.898);cursor:pointer;font-size:13px;height:32px;margin-left:10px;width:104px}.user-collection .data-null{padding-top:100px;text-align:center}",""]),n.locals={},t.exports=n},713:function(t,e,o){"use strict";o.r(e);o(30);var n=o(5),c=(o(46),{mixins:[o(484).a],layout:"user-layout",asyncData:function(t){return Object(n.a)(regeneratorRuntime.mark((function e(){var o,n,c,r,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.$post,o=t.$get,n=[],c=0,r=5,e.next=6,o("collect/lists",{params:{page_no:1,page_size:r}});case 6:return 1==(l=e.sent).code&&(n=l.data.lists,c=l.data.count),e.abrupt("return",{collectList:n,goodsCount:c,pageSize:r});case 9:case"end":return e.stop()}}),e)})))()},data:function(){return{currentPage:1}},methods:{changePage:function(t){var e=this;return Object(n.a)(regeneratorRuntime.mark((function o(){var n;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return e.currentPage=t,o.next=3,e.$get("collect/lists",{params:{page_no:t,page_size:e.pageSize}});case 3:1==(n=o.sent).code&&(e.collectList=n.data.lists,e.goodsCount=n.data.count);case 5:case"end":return o.stop()}}),o)})))()},cancelCollection:function(t){var e=this;return Object(n.a)(regeneratorRuntime.mark((function o(){return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,e.$post("collect/handleCollectgoods",{is_collect:0,goods_id:t});case 2:1==o.sent.code&&(e.$message.success("已取消收藏"),e.changePage(e.currentPage));case 4:case"end":return o.stop()}}),o)})))()}}}),r=(o(652),o(9)),component=Object(r.a)(c,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"user-collection"},[e("div",{staticClass:"collection-header lg"},[t._v("\n 收藏\n ")]),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.goodsCount>0,expression:"goodsCount > 0"}],staticClass:"collection-list m-t-10"},[e("div",t._l(t.collectList,(function(o,n){return e("div",{key:n,staticClass:"goods-item flex row-between"},[e("div",{staticStyle:{display:"flex","flex-direction":"flex"}},[e("el-image",{staticStyle:{width:"72px",height:"72px"},attrs:{fit:"cover",src:o.image,lazy:""}}),t._v(" "),e("div",{staticClass:"goods-info"},[e("div",{staticClass:"goods-name line2"},[t._v(t._s(o.name))]),t._v(" "),e("div",{staticClass:"primary nr",staticStyle:{"font-weight":"500"}},[t._v("¥"+t._s(o.min_price))])])],1),t._v(" "),e("div",{staticClass:"flex"},[e("nuxt-link",{staticClass:"to-buy-btn primary flex row-center",attrs:{to:"/goods_details/?id="+o.goods_id}},[t._v("去购买")]),t._v(" "),e("el-popconfirm",{attrs:{title:"确定删除该收藏吗?","confirm-button-text":"确定","cancel-button-text":"取消",icon:"el-icon-info","icon-color":"red"},on:{confirm:function(e){return t.cancelCollection(o.goods_id)}}},[e("div",{staticClass:"cancel-btn lighter flex row-center",attrs:{slot:"reference"},slot:"reference"},[t._v("取消收藏")])])],1)])})),0),t._v(" "),e("div",{staticClass:"flex row-center",staticStyle:{"margin-top":"30px"}},[e("el-pagination",{attrs:{"hide-on-single-page":"",background:"",layout:"prev, pager, next",total:t.goodsCount,"prev-text":"上一页","next-text":"下一页","page-size":t.pageSize},on:{"current-change":t.changePage}})],1)]),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.goodsCount<=0,expression:"goodsCount <= 0"}],staticClass:"data-null"},[e("img",{staticStyle:{width:"150px",height:"150px"},attrs:{src:o(651)}}),t._v(" "),e("div",{staticClass:"muted xs"},[t._v("暂无收藏商品~")])])])}),[],!1,null,null,null);e.default=component.exports}}]);