41ac39b.js 12 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[38,13,19,20],{483:function(t,e,r){var content=r(487);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(20).default)("bc98bd04",content,!0,{sourceMap:!1})},484:function(t,e,r){"use strict";r(21),r(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}]}}}},485:function(t,e,r){"use strict";r.r(e);r(300);var o={data:function(){return{priceSlice:{}}},components:{},props:{firstSize:{type:Number,default:14},secondSize:{type:Number,default:14},color:{type:String},weight:{type:[String,Number],default:400},price:{type:[String,Number],default:""},showSubscript:{type:Boolean,default:!0},subscriptSize:{type:Number,default:14},lineThrough:{type:Boolean,default:!1}},created:function(){this.priceFormat()},watch:{price:function(t){this.priceFormat()}},methods:{priceFormat:function(){var t=this.price,e={};null!==t&&(t=parseFloat(t),t=String(t).split("."),e.first=t[0],e.second=t[1],this.priceSlice=e)}}},n=(r(486),r(9)),component=Object(n.a)(o,(function(){var t=this,e=t._self._c;return e("span",{class:(t.lineThrough?"line-through":"")+"price-format",style:{color:t.color,"font-weight":t.weight}},[t.showSubscript?e("span",{style:{"font-size":t.subscriptSize+"px","margin-right":"1px"}},[t._v("¥")]):t._e(),t._v(" "),e("span",{style:{"font-size":t.firstSize+"px","margin-right":"1px"}},[t._v(t._s(t.priceSlice.first))]),t._v(" "),t.priceSlice.second?e("span",{style:{"font-size":t.secondSize+"px"}},[t._v("."+t._s(t.priceSlice.second))]):t._e()])}),[],!1,null,null,null);e.default=component.exports},486:function(t,e,r){"use strict";r(483)},487:function(t,e,r){var o=r(19)((function(i){return i[1]}));o.push([t.i,".price-format{align-items:baseline;display:flex}",""]),o.locals={},t.exports=o},488:function(t,e,r){var content=r(491);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(20).default)("a3b07d2a",content,!0,{sourceMap:!1})},490:function(t,e,r){"use strict";r(488)},491:function(t,e,r){var o=r(19)((function(i){return i[1]}));o.push([t.i,".null-data[data-v-847c0814]{padding:100px}.null-data .img-null[data-v-847c0814]{height:150px;width:150px}",""]),o.locals={},t.exports=o},492:function(t,e,r){"use strict";r.r(e);var o={components:{},props:{img:{type:String},text:{type:String,default:"暂无数据"},imgStyle:{type:String,default:""}},methods:{}},n=(r(490),r(9)),component=Object(n.a)(o,(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 m-t-8"},[t._v(t._s(t.text))])])}),[],!1,null,"847c0814",null);e.default=component.exports},493:function(t,e,r){"use strict";r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return n}));r(30),r(65),r(47),r(37),r(21),r(61),r(66),r(48),r(18),r(100),r(63),r(12);var o=function(t){var time=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,e=arguments.length>2?arguments[2]:void 0,r=new Date(0).getTime();return function(){var o=(new Date).getTime();if(o-r>time){for(var n=arguments.length,c=new Array(n),l=0;l<n;l++)c[l]=arguments[l];t.apply(e,c),r=o}}};var n=function(t){var e=document.createElement("input");e.setAttribute("value",t),document.body.appendChild(e),e.select();try{if(document.execCommand("copy"))return Promise.resolve();throw new Error}catch(t){return Promise.reject(t)}finally{document.body.removeChild(e)}}},497:function(t,e,r){var content=r(510);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(20).default)("7ff6d7ed",content,!0,{sourceMap:!1})},509:function(t,e,r){"use strict";r(497)},510:function(t,e,r){var o=r(19)((function(i){return i[1]}));o.push([t.i,".goods-list[data-v-03a8098d]{align-items:stretch}.goods-list .goods-item[data-v-03a8098d]{border-radius:4px;box-sizing:border-box;display:block;height:310px;margin-bottom:16px;padding:12px 12px 16px;transition:all .2s;width:224px}.goods-list .goods-item[data-v-03a8098d]:hover{box-shadow:0 0 6px rgba(0,0,0,.1);transform:translateY(-8px)}.goods-list .goods-item .goods-img[data-v-03a8098d]{height:200px;width:200px}.goods-list .goods-item .name[data-v-03a8098d]{height:40px;line-height:20px;margin-bottom:10px}.goods-list .goods-item .seckill .btn[data-v-03a8098d]{border:1px solid transparent;border-radius:4px;padding:4px 12px}.goods-list .goods-item .seckill .btn.not-start[data-v-03a8098d]{background-color:transparent;border-color:#ff2c3c;color:#ff2c3c}.goods-list .goods-item .seckill .btn.end[data-v-03a8098d]{background-color:#e5e5e5;color:#fff}",""]),o.locals={},t.exports=o},519:function(t,e,r){"use strict";r.r(e);r(30),r(300);var o={props:{list:{type:Array,default:function(){return[]}},num:{type:Number,default:5},type:{type:String},status:{type:Number}},watch:{list:{immediate:!0,handler:function(t){}}},computed:{getSeckillText:function(){switch(this.status){case 0:return"未开始";case 1:return"立即抢购";case 2:return"已结束"}}},methods:{goTo:function(t){"seckill"==this.type?this.$router.push("/goods_details_seckill?id="+t.id):this.$router.push("/goods_details?id="+t.id)}}},n=(r(509),r(9)),component=Object(n.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"goods-list flex flex-wrap"},t._l(t.list,(function(r,o){return e("div",{key:o,staticClass:"goods-item bg-white pointer",style:{marginRight:(o+1)%t.num==0?0:"14px"},on:{click:function(e){return t.goTo(r)}}},[e("el-image",{staticClass:"goods-img",attrs:{lazy:"",src:r.image,alt:""}}),t._v(" "),e("div",{staticClass:"name line-2"},[t._v(t._s(r.name))]),t._v(" "),"seckill"==t.type?e("div",{staticClass:"seckill flex row-between"},[e("div",{staticClass:"primary flex"},[t._v("\n 秒杀价\n "),e("price-formate",{attrs:{price:r.min_seckill_price,"first-size":18}})],1),t._v(" "),e("div",{class:["btn bg-primary white",{"not-start":0==t.status,end:2==t.status}]},[t._v(t._s(t.getSeckillText))])]):e("div",{staticClass:"flex row-between flex-wrap"},[e("div",{staticClass:"price flex"},[e("div",{staticClass:"primary m-r-8"},[e("price-formate",{attrs:{price:r.sell_price,"first-size":16}})],1),t._v(" "),Number(r.lineation_price)?e("div",{staticClass:"muted sm line-through"},[e("price-formate",{attrs:{price:r.lineation_price}})],1):t._e()]),t._v(" "),e("div",{staticClass:"muted xs"},[t._v(t._s(r.sales_num)+"人购买")])])],1)})),0)}),[],!1,null,"03a8098d",null);e.default=component.exports;installComponents(component,{PriceFormate:r(485).default})},520:function(t,e,r){t.exports=r.p+"img/goods_null.38f1689.png"},603:function(t,e,r){var content=r(689);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(20).default)("65eb34e0",content,!0,{sourceMap:!1})},684:function(t,e,r){"use strict";var o=r(2),n=r(4),c=r(54),l=r(39),d=r(49),f=r(304),m=r(17),h=r(3),v=r(303),x=r(198),y=r(685),_=r(686),w=r(104),S=r(687),k=[],C=n(k.sort),T=n(k.push),z=h((function(){k.sort(void 0)})),N=h((function(){k.sort(null)})),j=x("sort"),M=!h((function(){if(w)return w<70;if(!(y&&y>3)){if(_)return!0;if(S)return S<603;var code,t,e,r,o="";for(code=65;code<76;code++){switch(t=String.fromCharCode(code),code){case 66:case 69:case 70:case 72:e=3;break;case 68:case 71:e=4;break;default:e=2}for(r=0;r<47;r++)k.push({k:t+r,v:e})}for(k.sort((function(a,b){return b.v-a.v})),r=0;r<k.length;r++)t=k[r].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}}));o({target:"Array",proto:!0,forced:z||!N||!j||!M},{sort:function(t){void 0!==t&&c(t);var e=l(this);if(M)return void 0===t?C(e):C(e,t);var r,o,n=[],h=d(e);for(o=0;o<h;o++)o in e&&T(n,e[o]);for(v(n,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:m(e)>m(r)?1:-1}}(t)),r=d(n),o=0;o<r;)e[o]=n[o++];for(;o<h;)f(e,o++);return e}})},685:function(t,e,r){var o=r(83).match(/firefox\/(\d+)/i);t.exports=!!o&&+o[1]},686:function(t,e,r){var o=r(83);t.exports=/MSIE|Trident/.test(o)},687:function(t,e,r){var o=r(83).match(/AppleWebKit\/(\d+)\./);t.exports=!!o&&+o[1]},688:function(t,e,r){"use strict";r(603)},689:function(t,e,r){var o=r(19)((function(i){return i[1]}));o.push([t.i,".goods-list .banner img{display:block;width:100%}.goods-list .sort{padding:15px 16px}.goods-list .sort .sort-name .item{cursor:pointer;margin-right:30px}.goods-list .sort .sort-name .item.active{color:#ff2c3c}",""]),o.locals={},t.exports=o},727:function(t,e,r){"use strict";r.r(e);var o=r(10),n=r(5),c=(r(46),r(30),r(684),r(493)),l={mixins:[r(484).a],components:{},watchQuery:!0,asyncData:function(t){return Object(n.a)(regeneratorRuntime.mark((function e(){var r,n,c,l,d,f,data,m,h,v,x;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.$get,c=t.params,l=t.query,d=c.type,f=l.name,r={page_size:20,type:d,name:f},Object(o.a)(r,"type",d),Object(o.a)(r,"presell",0),data=r,1==d&&(data.sort="desc",data.sort_type="sales_sum"),e.next=7,n("goods/lists",{params:data});case 7:return m=e.sent,h=m.data,v=h.lists,x=h.count,e.abrupt("return",{goodsList:v,count:x});case 12:case"end":return e.stop()}}),e)})))()},data:function(){return{sortType:"",saleSort:"desc",priceSort:"desc",page:""}},created:function(){this.changeSortType=Object(c.b)(this.changeSortType,500,this)},methods:{changeSortType:function(t){switch(this.sortType=t,t){case"price":"asc"==this.priceSort?this.priceSort="desc":"desc"==this.priceSort&&(this.priceSort="asc");break;case"sales_sum":"asc"==this.saleSort?this.saleSort="desc":"desc"==this.saleSort&&(this.saleSort="asc")}this.getGoods()},changePage:function(t){this.page=t,this.getGoods()},getGoods:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var r,o,n,c,l,d,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.$route.query.name,o=t.priceSort,n=t.sortType,c=t.saleSort,"",e.t0=n,e.next="price"===e.t0?6:"sales_sum"===e.t0?8:10;break;case 6:return o,e.abrupt("break",10);case 8:return c,e.abrupt("break",10);case 10:return e.next=12,t.$get("goods/lists",{params:{page_size:20,page_no:t.page,price:"price"==t.sortType?t.priceSort:"",sale:"sales_sum"==t.sortType?t.saleSort:"",name:r,presell:0}});case 12:l=e.sent,d=l.data,f=d.lists,d.count,t.goodsList=f;case 17:case"end":return e.stop()}}),e)})))()}}},d=(r(688),r(9)),component=Object(d.a)(l,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"goods-list"},[e("div",{staticClass:"sort m-b-16 flex bg-white"},[e("div",{staticClass:"title"},[t._v("排序方式:")]),t._v(" "),e("div",{staticClass:"sort-name m-l-16 flex"},[e("div",{class:["item",{active:""==t.sortType}],on:{click:function(e){return t.changeSortType("")}}},[t._v("\n 综合\n ")]),t._v(" "),e("div",{class:["item",{active:"price"==t.sortType}],on:{click:function(e){return t.changeSortType("price")}}},[t._v("\n 价格\n "),e("i",{directives:[{name:"show",rawName:"v-show",value:"desc"==t.priceSort,expression:"priceSort == 'desc'"}],staticClass:"el-icon-arrow-down"}),t._v(" "),e("i",{directives:[{name:"show",rawName:"v-show",value:"asc"==t.priceSort,expression:"priceSort == 'asc'"}],staticClass:"el-icon-arrow-up"})]),t._v(" "),e("div",{class:["item",{active:"sales_sum"==t.sortType}],on:{click:function(e){return t.changeSortType("sales_sum")}}},[t._v("\n 销量\n "),e("i",{directives:[{name:"show",rawName:"v-show",value:"desc"==t.saleSort,expression:"saleSort == 'desc'"}],staticClass:"el-icon-arrow-down"}),t._v(" "),e("i",{directives:[{name:"show",rawName:"v-show",value:"asc"==t.saleSort,expression:"saleSort == 'asc'"}],staticClass:"el-icon-arrow-up"})])])]),t._v(" "),t.goodsList.length?[e("goods-list",{attrs:{list:t.goodsList}}),t._v(" "),t.count?e("div",{staticClass:"pagination flex row-center",staticStyle:{"padding-bottom":"38px"}},[e("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:t.count,"prev-text":"上一页","next-text":"下一页","hide-on-single-page":"","page-size":20},on:{"current-change":t.changePage}})],1):t._e()]:e("null-data",{attrs:{img:r(520),text:"暂无商品~"}})],2)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{GoodsList:r(519).default,NullData:r(492).default})}}]);