ece3334.js 3.6 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[34],{582:function(t,e,o){},583:function(t,e,o){},670:function(t,e,o){"use strict";o(582)},671:function(t,e,o){"use strict";o(583)},766:function(t,e,o){"use strict";o.r(e);o(25),o(24),o(23),o(8),o(29),o(17),o(30);var n=o(4),r=(o(73),o(205)),c=o(12);function l(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,o)}return e}var d={name:"footprint",layout:"member",components:{},data:function(){return{timesArr:[],footPrintData:[],loading:!0,yes:!0}},created:function(){this.getFootPrintData()},computed:function(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?l(Object(source),!0).forEach((function(e){Object(n.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):l(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}({},Object(c.b)(["defaultGoodsImage"])),mounted:function(){var t=this;setTimeout((function(){t.yes=!1}),300)},methods:{getFootPrintData:function(){var t=this;Object(r.j)({page:1,page_size:0}).then((function(e){var data=e.data.list;t.footPrintData=[],t.timesArr=[];for(var i=0;i<data.length;i++){var o=timeStampTurnTime(data[i].browse_time).split(" ")[0];-1==util.inArray(o,t.timesArr)&&t.timesArr.push(o);var n={};n.id=data[i].id,n.sku_id=data[i].sku_id,n.browse_time=o,n.goods_image=data[i].sku_image.split(",")[0],n.goods_name=data[i].sku_name,n.goods_price=data[i].discount_price,t.footPrintData.push(n)}t.loading=!1})).catch((function(e){t.loading=!1}))},imageError:function(t){this.footPrintData[t].goods_image=this.defaultGoodsImage},deleteFootprint:function(t){var e=this;Object(r.h)({id:t}).then((function(t){e.loading=!1,e.getFootPrintData(),e.$message({message:t.message,type:"success"})})).catch((function(t){e.loading=!1,e.$message.error(t.message)}))},mouseenter:function(t){this.$set(t,"del",!0)},mouseleave:function(t){this.$set(t,"del",!1)}}},m=d,f=(o(670),o(671),o(7)),component=Object(f.a)(m,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"box"},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.yes,expression:"yes"}],staticClass:"null-page"}),t._v(" "),e("el-card",{staticClass:"box-card foot-print"},[e("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("我的足迹")])]),t._v(" "),""!=t.timesArr?e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[e("el-timeline",t._l(t.timesArr,(function(o,n){return e("el-timeline-item",{key:n,staticClass:"ns-time-line",attrs:{timestamp:o,placement:"top"}},[e("el-card",[e("div",{staticClass:"ns-goods-list"},t._l(t.footPrintData,(function(n,r){return o==n.browse_time?e("div",{key:r,staticClass:"ns-goods-li",on:{click:function(e){return t.$util.pushToTab("/sku/"+n.sku_id)}}},[e("span",{staticClass:"ns-btn-del",on:{click:function(e){return e.stopPropagation(),t.deleteFootprint(n.id)}}},[e("i",{staticClass:"iconfont icon-shanchu"})]),t._v(" "),e("el-image",{attrs:{src:t.$img(n.goods_image,{size:"mid"}),fit:"contain"},on:{error:function(e){return t.imageError(r)}}}),t._v(" "),e("p",{staticClass:"goods-name",attrs:{title:n.goods_name}},[t._v(t._s(n.goods_name))]),t._v(" "),e("span",{staticClass:"goods-price"},[t._v("¥"+t._s(n.goods_price))])],1):t._e()})),0)])],1)})),1)],1):e("div",{staticClass:"footprint"},[e("router-link",{attrs:{to:"/"}},[t._v("暂时没有足迹~")])],1)])],1)}),[],!1,null,"d074748e",null);e.default=component.exports}}]);