bafa30c.js 16 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[27,14,17,19],{473:function(t,e,r){"use strict";var n=r(14),o=r(4),c=r(5),l=r(141),d=r(24),f=r(18),h=r(290),v=r(54),m=r(104),x=r(289),y=r(3),_=r(105).f,w=r(45).f,S=r(23).f,I=r(474),k=r(475).trim,C="Number",T=o.Number,N=T.prototype,O=o.TypeError,z=c("".slice),E=c("".charCodeAt),A=function(t){var e=x(t,"number");return"bigint"==typeof e?e:G(e)},G=function(t){var e,r,n,o,c,l,d,code,f=x(t,"number");if(m(f))throw O("Cannot convert a Symbol value to a number");if("string"==typeof f&&f.length>2)if(f=k(f),43===(e=E(f,0))||45===e){if(88===(r=E(f,2))||120===r)return NaN}else if(48===e){switch(E(f,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+f}for(l=(c=z(f,2)).length,d=0;d<l;d++)if((code=E(c,d))<48||code>o)return NaN;return parseInt(c,n)}return+f};if(l(C,!T(" 0o1")||!T("0b1")||T("+0x1"))){for(var L,M=function(t){var e=arguments.length<1?0:T(A(t)),r=this;return v(N,r)&&y((function(){I(r)}))?h(Object(e),r,M):e},D=n?_(T):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),j=0;D.length>j;j++)f(T,L=D[j])&&!f(M,L)&&S(M,L,w(T,L));M.prototype=N,N.constructor=M,d(o,C,M,{constructor:!0})}},474:function(t,e,r){var n=r(5);t.exports=n(1..valueOf)},475:function(t,e,r){var n=r(5),o=r(36),c=r(19),l=r(476),d=n("".replace),f="["+l+"]",h=RegExp("^"+f+f+"*"),v=RegExp(f+f+"*$"),m=function(t){return function(e){var r=c(o(e));return 1&t&&(r=d(r,h,"")),2&t&&(r=d(r,v,"")),r}};t.exports={start:m(1),end:m(2),trim:m(3)}},476:function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},477:function(t,e,r){var content=r(480);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(17).default)("7c52e05d",content,!0,{sourceMap:!1})},478:function(t,e,r){"use strict";r.r(e);r(473);var n={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=String(t).split("."),e.first=t[0],e.second=t[1],this.priceSlice=e)}}},o=(r(479),r(8)),component=Object(o.a)(n,(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},479:function(t,e,r){"use strict";r(477)},480:function(t,e,r){var n=r(16)(!1);n.push([t.i,".price-format{display:flex;align-items:baseline}",""]),t.exports=n},481:function(t,e,r){var content=r(483);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(17).default)("4bccbd40",content,!0,{sourceMap:!1})},482:function(t,e,r){"use strict";r(481)},483:function(t,e,r){var n=r(16)(!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},484:function(t,e,r){"use strict";r.r(e);var n={components:{},props:{img:{type:String},text:{type:String,default:"暂无数据"},imgStyle:{type:String,default:""}},methods:{}},o=(r(482),r(8)),component=Object(o.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},486:function(t,e,r){"use strict";r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return c}));r(29),r(63),r(46),r(40),r(20),r(64),r(65),r(47);var n=r(37);r(108),r(62),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 n=(new Date).getTime();if(n-r>time){for(var o=arguments.length,c=new Array(o),l=0;l<o;l++)c[l]=arguments[l];t.apply(e,c),r=n}}};function c(t){var p="";if("object"==Object(n.a)(t)){for(var e in p="?",t)p+="".concat(e,"=").concat(t[e],"&");p=p.slice(0,-1)}return p}},487:function(t,e,r){var content=r(495);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(17).default)("011c3f4c",content,!0,{sourceMap:!1})},494:function(t,e,r){"use strict";r(487)},495:function(t,e,r){var n=r(16)(!1);n.push([t.i,".goods-list[data-v-060944d1]{align-items:stretch}.goods-list .goods-item[data-v-060944d1]{display:block;box-sizing:border-box;width:224px;height:310px;margin-bottom:16px;padding:12px 12px 16px;border-radius:4px;transition:all .2s}.goods-list .goods-item[data-v-060944d1]:hover{transform:translateY(-8px);box-shadow:0 0 6px rgba(0,0,0,.1)}.goods-list .goods-item .goods-img[data-v-060944d1]{width:200px;height:200px}.goods-list .goods-item .name[data-v-060944d1]{margin-bottom:10px;height:40px;line-height:20px}.goods-list .goods-item .seckill .btn[data-v-060944d1]{padding:4px 12px;border-radius:4px;border:1px solid transparent}.goods-list .goods-item .seckill .btn.not-start[data-v-060944d1]{border-color:#ff2c3c;color:#ff2c3c;background-color:transparent}.goods-list .goods-item .seckill .btn.end[data-v-060944d1]{background-color:#e5e5e5;color:#fff}",""]),t.exports=n},498:function(t,e,r){"use strict";r.r(e);r(29),r(473);var n={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"已结束"}}}},o=(r(494),r(8)),component=Object(o.a)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"goods-list flex flex-wrap"},t._l(t.list,(function(r,n){return e("nuxt-link",{key:n,staticClass:"goods-item bg-white",style:{marginRight:(n+1)%t.num==0?0:"14px"},attrs:{to:"/goods_details/".concat(r.id||r.goods_id)}},[e("el-image",{staticClass:"goods-img",attrs:{lazy:"",src:r.image||r.goods_image,alt:""}}),t._v(" "),e("div",{staticClass:"name line-2"},[t._v(t._s(r.name||r.goods_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.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)+"\n ")])]):e("div",{staticClass:"flex row-between flex-wrap"},[e("div",{staticClass:"price flex col-baseline"},[e("div",{staticClass:"primary m-r-8"},[e("price-formate",{attrs:{price:r.min_price||r.price,"first-size":16}})],1),t._v(" "),e("div",{staticClass:"muted sm line-through"},[e("price-formate",{attrs:{price:r.market_price}})],1)]),t._v(" "),e("div",{staticClass:"muted xs"},[t._v(t._s(r.sales_total||r.sales_sum||0)+"人购买")])])],1)})),1)}),[],!1,null,"060944d1",null);e.default=component.exports;installComponents(component,{PriceFormate:r(478).default})},500:function(t,e,r){t.exports=r.p+"img/goods_null.38f1689.png"},561:function(t,e,r){var content=r(607);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(17).default)("2808c88c",content,!0,{sourceMap:!1})},606:function(t,e,r){"use strict";r(561)},607:function(t,e,r){var n=r(16)(!1);n.push([t.i,".category[data-v-7bc86c9d]{padding:16px 0}.category .category-hd .category-wrap[data-v-7bc86c9d]{padding:0 16px}.category .category-hd .category-con[data-v-7bc86c9d]{border-bottom:1px dashed #e5e5e5;align-items:flex-start;padding-top:16px}.category .category-hd .category-con .name[data-v-7bc86c9d]{flex:none}.category .category-hd .category-con .item[data-v-7bc86c9d]{margin-bottom:16px;width:84px;margin-left:14px;cursor:pointer}.category .category-hd .category-con .item.active[data-v-7bc86c9d],.category .category-hd .category-con .item[data-v-7bc86c9d]:hover{color:#ff2c3c}.category .category-hd .sort[data-v-7bc86c9d]{padding:15px 16px}.category .category-hd .sort .sort-name .item[data-v-7bc86c9d]{margin-right:30px;cursor:pointer}.category .category-hd .sort .sort-name .item.active[data-v-7bc86c9d]{color:#ff2c3c}",""]),t.exports=n},697:function(t,e,r){"use strict";r.r(e);r(29);var n=r(9),o=(r(12),r(473),r(53),r(486)),c={head:function(){return{title:this.$store.getters.headTitle,link:[{rel:"icon",type:"image/x-icon",href:this.$store.getters.favicon}]}},watchQuery:!0,asyncData:function(t){return Object(n.a)(regeneratorRuntime.mark((function e(){var r,n,data;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.query,r=t.$get,e.next=3,r("pc/category");case 3:return n=e.sent,data=n.data,e.abrupt("return",{categoryList:data});case 6:case"end":return e.stop()}}),e)})))()},data:function(){return{count:0,oneIndex:0,twoIndex:"",threeIndex:"",categoryOne:[],categoryTwo:[],categoryThree:[],sortType:"",saleSort:"desc",priceSort:"desc",page:"",goodsList:[],cateId:0,isHasGoods:!0}},created:function(){this.changeSortType=Object(o.b)(this.changeSortType,500,this)},methods:{changeData:function(t){var e=this.categoryList;this.setIndex(t),this.categoryOne=e,this.categoryTwo=e[this.oneIndex]?e[this.oneIndex].sons:[],this.categoryThree=this.categoryTwo[this.twoIndex]?this.categoryTwo[this.twoIndex].sons:[],this.setCateId(t),this.getGoods()},setCateId:function(t){""==this.twoIndex&&""==this.threeIndex&&""!==this.oneIndex&&(this.cateId=this.categoryOne[this.oneIndex].id),""==this.threeIndex&&""!==this.twoIndex&&(this.cateId=this.categoryTwo[this.twoIndex].id),t&&(this.cateId=t)},setIndex:function(t){var e=this;this.categoryList.some((function(r,n){return r.id===t?(e.oneIndex=n,e.twoIndex="",e.threeIndex="",!0):r.sons&&r.sons.some((function(r,o){return r.id===t?(e.oneIndex=n,e.twoIndex=o,e.threeIndex="",!0):r.sons&&r.sons.some((function(r,c){if(r.id===t)return e.oneIndex=n,e.twoIndex=o,e.threeIndex=c,!0}))}))}))},clickAllTwo:function(){this.twoIndex="",this.threeIndex="",this.changeData()},clickAll:function(){this.threeIndex="",this.changeData()},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,n,o,c,l,d,f,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.priceSort,n=t.sortType,o=t.saleSort,c={page_size:20,page_no:t.page,platform_cate_id:t.cateId},e.t0=n,e.next="price"===e.t0?5:"sales_sum"===e.t0?7:9;break;case 5:return c.sort_by_price=r,e.abrupt("break",9);case 7:return c.sort_by_sales=o,e.abrupt("break",9);case 9:return e.next=11,t.$get("goods/getGoodsList",{params:c});case 11:l=e.sent,d=l.data,f=d.lists,h=d.count,t.goodsList=f,f.length?t.isHasGoods=!0:t.isHasGoods=!1,t.count=h;case 18:case"end":return e.stop()}}),e)})))()}},watch:{categoryList:{immediate:!0,handler:function(t){var e=this.$route.query.id;this.changeData(Number(e))}}}},l=(r(606),r(8)),component=Object(l.a)(c,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"category"},[e("div",{staticClass:"category-hd bg-white"},[e("div",{staticClass:"category-wrap"},[e("div",{staticClass:"category-con flex"},[e("div",{staticClass:"name muted"},[t._v("一级分类:")]),t._v(" "),e("div",{staticClass:"category-list flex flex-wrap lighter"},t._l(t.categoryOne,(function(r,n){return e("div",{key:n,class:["item line1",{active:t.oneIndex==n}],on:{click:function(e){return t.changeData(r.id)}}},[t._v("\n "+t._s(r.name)+"\n ")])})),0)]),t._v(" "),e("div",{staticClass:"category-con flex"},[e("div",{staticClass:"name muted"},[t._v("二级分类:")]),t._v(" "),e("div",{staticClass:"category-list flex flex-wrap lighter"},[e("div",{class:["item line1",{active:""===t.twoIndex}],on:{click:t.clickAllTwo}},[t._v("\n 全部\n ")]),t._v(" "),t._l(t.categoryTwo,(function(r,n){return e("div",{key:n,class:["item line1",{active:t.twoIndex===n}],on:{click:function(e){return t.changeData(r.id)}}},[t._v("\n "+t._s(r.name)+"\n ")])}))],2)]),t._v(" "),e("div",{staticClass:"category-con flex"},[e("div",{staticClass:"name muted"},[t._v("三级分类:")]),t._v(" "),e("div",{staticClass:"category-list flex flex-wrap lighter"},[e("div",{class:["item line1",{active:""===t.threeIndex}],on:{click:t.clickAll}},[t._v("\n 全部\n ")]),t._v(" "),t._l(t.categoryThree,(function(r,n){return e("div",{key:n,class:["item line1",{active:t.threeIndex===n}],on:{click:function(e){return t.changeData(r.id)}}},[t._v("\n "+t._s(r.name)+"\n ")])}))],2)])]),t._v(" "),e("div",{staticClass:"sort m-b-16 flex bg-white"},[e("div",{staticClass:"title muted"},[t._v("排序方式:")]),t._v(" "),e("div",{staticClass:"sort-name m-l-16 flex lighter"},[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.isHasGoods?e("div",[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:"","hide-on-single-page":"",layout:"prev, pager, next",total:t.count,"prev-text":"上一页","next-text":"下一页","page-size":20},on:{"current-change":t.changePage}})],1):t._e()],1):e("null-data",{attrs:{img:r(500),text:"暂无商品~"}})],1)}),[],!1,null,"7bc86c9d",null);e.default=component.exports;installComponents(component,{GoodsList:r(498).default,NullData:r(484).default})}}]);