73d5edd.js 15 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[33,13,19,20],{498:function(t,e,r){var content=r(502);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(21).default)("1df0c15c",content,!0,{sourceMap:!1})},499:function(t,e,r){"use strict";r(22),r(65);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}]}}}},500:function(t,e,r){"use strict";r.r(e);r(309);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(501),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},501:function(t,e,r){"use strict";r(498)},502:function(t,e,r){var o=r(20)((function(i){return i[1]}));o.push([t.i,".price-format{align-items:baseline;display:flex}",""]),o.locals={},t.exports=o},503:function(t,e,r){var content=r(506);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(21).default)("36820b1b",content,!0,{sourceMap:!1})},505:function(t,e,r){"use strict";r(503)},506:function(t,e,r){var o=r(20)((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},507: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(505),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},508:function(t,e,r){"use strict";r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return n}));r(22),r(65),r(69),r(70),r(32),r(38),r(49),r(50),r(51),r(19),r(106),r(67),r(13);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)}}},512:function(t,e,r){var content=r(525);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(21).default)("641ea8d7",content,!0,{sourceMap:!1})},524:function(t,e,r){"use strict";r(512)},525:function(t,e,r){var o=r(20)((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},534:function(t,e,r){"use strict";r.r(e);r(32),r(309);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(524),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(500).default})},535:function(t,e,r){t.exports=r.p+"img/goods_null.38f1689.png"},586:function(t,e,r){var content=r(632);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(21).default)("10021650",content,!0,{sourceMap:!1})},631:function(t,e,r){"use strict";r(586)},632:function(t,e,r){var o=r(20)((function(i){return i[1]}));o.push([t.i,".category[data-v-6338ac26]{padding:16px 0}.category .category-hd .category-wrap[data-v-6338ac26]{padding:0 16px}.category .category-hd .category-con[data-v-6338ac26]{align-items:flex-start;border-bottom:1px dashed #e5e5e5;padding-top:16px}.category .category-hd .category-con .name[data-v-6338ac26]{flex:none}.category .category-hd .category-con .item[data-v-6338ac26]{cursor:pointer;margin-bottom:16px;margin-left:14px;width:84px}.category .category-hd .category-con .item.active[data-v-6338ac26],.category .category-hd .category-con .item[data-v-6338ac26]:hover{color:#ff2c3c}.category .category-hd .sort[data-v-6338ac26]{padding:15px 16px}.category .category-hd .sort .sort-name .item[data-v-6338ac26]{cursor:pointer;margin-right:30px}.category .category-hd .sort .sort-name .item.active[data-v-6338ac26]{color:#ff2c3c}",""]),o.locals={},t.exports=o},715:function(t,e,r){"use strict";r.r(e);r(32);var o=r(7),n=(r(309),r(13),r(48),r(508)),c={mixins:[r(499).a],watchQuery:!0,asyncData:function(t){return Object(o.a)(regeneratorRuntime.mark((function e(){var r,o,data;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.query,r=t.$get,e.next=3,r("goodsCategory/lists",{});case 3:return o=e.sent,data=o.data,console.log("goodsCategory",data),e.abrupt("return",{categoryList:data.lists});case 7: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(n.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.categoryTwo&&(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,o){return r.id===t?(e.oneIndex=o,e.twoIndex="",e.threeIndex="",!0):r.sons&&r.sons.some((function(r,n){return r.id===t?(e.oneIndex=o,e.twoIndex=n,e.threeIndex="",!0):r.sons&&r.sons.some((function(r,c){if(r.id===t)return e.oneIndex=o,e.twoIndex=n,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(o.a)(regeneratorRuntime.mark((function e(){var r,o,n,c,l,d,h,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.priceSort,o=t.sortType,n=t.saleSort,c=t.cateId,e.t0=o,e.next="price"===e.t0?6:"sales_sum"===e.t0?8:10;break;case 6:return e.abrupt("break",10);case 8:return e.abrupt("break",10);case 10:return e.next=12,t.$get("goods/lists",{params:{page_size:20,page_no:t.page,category_id:c,price:"price"==t.sortType?t.priceSort:"",sale:"sales_sum"==t.sortType?t.saleSort:"",presell:0}});case 12:l=e.sent,d=l.data,h=d.lists,f=d.count,t.goodsList=h,h.length?t.isHasGoods=!0:t.isHasGoods=!1,t.count=f;case 19: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(631),r(9)),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"},[t.categoryOne.length?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,o){return e("div",{key:o,class:["item line1",{active:t.oneIndex==o}],on:{click:function(e){return t.changeData(r.id)}}},[t._v("\n "+t._s(r.name)+"\n ")])})),0)]):t._e(),t._v(" "),t.categoryTwo&&t.categoryTwo.length?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.categoryTwo,(function(r,o){return e("div",{key:o,class:["item line1",{active:t.twoIndex===o}],on:{click:function(e){return t.changeData(r.id)}}},[t._v("\n "+t._s(r.name)+"\n ")])})),0)]):t._e(),t._v(" "),t.categoryThree&&t.categoryThree.length?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,o){return e("div",{key:o,class:["item line1",{active:t.threeIndex===o}],on:{click:function(e){return t.changeData(r.id)}}},[t._v("\n "+t._s(r.name)+"\n ")])}))],2)]):t._e()]),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(535),text:"暂无商品~"}})],1)}),[],!1,null,"6338ac26",null);e.default=component.exports;installComponents(component,{GoodsList:r(534).default,NullData:r(507).default})}}]);