2023-10-23 16:11:09 +08:00

1 line
16 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([[24,12,14,15],{434:function(t,e,r){"use strict";var n=r(15),o=r(2),c=r(3),d=r(137),l=r(27),h=r(17),f=r(273),v=r(53),m=r(136),y=r(272),x=r(4),w=r(93).f,_=r(45).f,S=r(23).f,I=r(435),C=r(436).trim,k="Number",T=o.Number,N=T.prototype,E=o.TypeError,A=c("".slice),O=c("".charCodeAt),z=function(t){var e=y(t,"number");return"bigint"==typeof e?e:G(e)},G=function(t){var e,r,n,o,c,d,l,code,h=y(t,"number");if(m(h))throw E("Cannot convert a Symbol value to a number");if("string"==typeof h&&h.length>2)if(h=C(h),43===(e=O(h,0))||45===e){if(88===(r=O(h,2))||120===r)return NaN}else if(48===e){switch(O(h,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+h}for(d=(c=A(h,2)).length,l=0;l<d;l++)if((code=O(c,l))<48||code>o)return NaN;return parseInt(c,n)}return+h};if(d(k,!T(" 0o1")||!T("0b1")||T("+0x1"))){for(var L,M=function(t){var e=arguments.length<1?0:T(z(t)),r=this;return v(N,r)&&x((function(){I(r)}))?f(Object(e),r,M):e},j=n?w(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(","),D=0;j.length>D;D++)h(T,L=j[D])&&!h(M,L)&&S(M,L,_(T,L));M.prototype=N,N.constructor=M,l(o,k,M)}},435:function(t,e,r){var n=r(3);t.exports=n(1..valueOf)},436:function(t,e,r){var n=r(3),o=r(31),c=r(16),d=r(437),l=n("".replace),h="["+d+"]",f=RegExp("^"+h+h+"*"),v=RegExp(h+h+"*$"),m=function(t){return function(e){var r=c(o(e));return 1&t&&(r=l(r,f,"")),2&t&&(r=l(r,v,"")),r}};t.exports={start:m(1),end:m(2),trim:m(3)}},437:function(t,e){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},438:function(t,e,r){var content=r(441);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(19).default)("03051d40",content,!0,{sourceMap:!1})},439:function(t,e,r){"use strict";r.r(e);r(434),r(39),r(274);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:500},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)}}},o=(r(440),r(11)),component=Object(o.a)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("span",{class:(t.lineThrough?"line-through":"")+"price-format",style:{color:t.color,"font-weight":t.weight}},[t.showSubscript?r("span",{style:{"font-size":t.subscriptSize+"px","margin-right":"1px"}},[t._v("¥")]):t._e(),t._v(" "),r("span",{style:{"font-size":t.firstSize+"px","margin-right":"1px"}},[t._v(t._s(t.priceSlice.first))]),t._v(" "),t.priceSlice.second?r("span",{style:{"font-size":t.secondSize+"px"}},[t._v("."+t._s(t.priceSlice.second))]):t._e()])}),[],!1,null,null,null);e.default=component.exports},440:function(t,e,r){"use strict";r(438)},441:function(t,e,r){var n=r(18)(!1);n.push([t.i,".price-format{display:flex;align-items:baseline}",""]),t.exports=n},442:function(t,e,r){var content=r(444);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(19).default)("7277513c",content,!0,{sourceMap:!1})},443:function(t,e,r){"use strict";r(442)},444:function(t,e,r){var n=r(18)(!1);n.push([t.i,".null-data[data-v-7fa0e58c]{padding:100px}.null-data .img-null[data-v-7fa0e58c]{width:150px;height:150px}",""]),t.exports=n},445: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(443),r(11)),component=Object(o.a)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"bg-white column-center null-data"},[r("img",{staticClass:"img-null",style:t.imgStyle,attrs:{src:t.img,alt:""}}),t._v(" "),r("div",{staticClass:"muted mt8"},[t._v(t._s(t.text))])])}),[],!1,null,"7fa0e58c",null);e.default=component.exports},446:function(t,e,r){"use strict";r.d(e,"d",(function(){return o})),r.d(e,"c",(function(){return c})),r.d(e,"a",(function(){return d})),r.d(e,"b",(function(){return l}));var n=r(34);r(39),r(274),r(97),r(60),r(10),r(40),r(61),r(46),r(20),r(62),r(63),r(47);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),d=0;d<o;d++)c[d]=arguments[d];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}var d=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)}},l=function(t){return new Promise((function(e,r){var n=document.getElementById(t);if(n)return e(n);try{var o=document.createElement("script");o.setAttribute("id",t),o.setAttribute("src",t),document.body.append(o);var c="onload"in o?function(t){return new Promise((function(e,r){t.onload=function(){this.onerror=this.onload=null,e(t)},t.onerror=function(){this.onerror=this.onload=null,r()}}))}:function(t){return new Promise((function(e,r){t.onreadystatechange=function(){"loaded"!==this.readyState&&"complete"!==this.readyState||(this.onreadystatechange=null,e(t))}}))};c(o).then((function(){return e(o)})).catch((function(){return r()}))}catch(t){r(t)}}))}},450:function(t,e,r){var content=r(459);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(19).default)("f37a30f2",content,!0,{sourceMap:!1})},458:function(t,e,r){"use strict";r(450)},459:function(t,e,r){var n=r(18)(!1);n.push([t.i,".goods-list[data-v-483dfcdd]{align-items:stretch}.goods-list .goods-item[data-v-483dfcdd]{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-483dfcdd]:hover{transform:translateY(-8px);box-shadow:0 0 6px rgba(0,0,0,.1)}.goods-list .goods-item .goods-img[data-v-483dfcdd]{width:200px;height:200px}.goods-list .goods-item .name[data-v-483dfcdd]{margin-bottom:10px;height:40px;line-height:20px}.goods-list .goods-item .seckill .btn[data-v-483dfcdd]{padding:4px 12px;border-radius:4px;border:1px solid transparent}.goods-list .goods-item .seckill .btn.not-start[data-v-483dfcdd]{border-color:#ff2c3c;color:#ff2c3c;background-color:transparent}.goods-list .goods-item .seckill .btn.end[data-v-483dfcdd]{background-color:#e5e5e5;color:#fff}",""]),t.exports=n},467:function(t,e,r){"use strict";r.r(e);r(434);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(458),r(11)),component=Object(o.a)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"goods-list row wrap"},t._l(t.list,(function(e,n){return r("nuxt-link",{key:n,staticClass:"goods-item bg-white",style:{marginRight:(n+1)%t.num==0?0:"14px"},attrs:{to:"/goods_details/"+e.id}},[r("el-image",{staticClass:"goods-img",attrs:{lazy:"",src:e.image,alt:""}}),t._v(" "),r("div",{staticClass:"name line2"},[t._v(t._s(e.name))]),t._v(" "),"seckill"==t.type?r("div",{staticClass:"seckill row-between"},[r("div",{staticClass:"primary row"},[t._v("\n 秒杀价"),r("price-formate",{attrs:{price:e.seckill_price,"first-size":18}})],1),t._v(" "),r("div",{class:["btn bg-primary white",{"not-start":0==t.status,end:2==t.status}]},[t._v(t._s(t.getSeckillText))])]):r("div",{staticClass:"row-between wrap"},[r("div",{staticClass:"price row"},[r("div",{staticClass:"primary mr8"},[r("price-formate",{attrs:{price:e.price,"first-size":16}})],1),t._v(" "),r("div",{staticClass:"muted sm line-through"},[r("price-formate",{attrs:{price:e.market_price}})],1)]),t._v(" "),r("div",{staticClass:"muted xs"},[t._v(t._s(e.sales_sum)+"人购买")])])],1)})),1)}),[],!1,null,"483dfcdd",null);e.default=component.exports;installComponents(component,{PriceFormate:r(439).default})},477:function(t,e,r){t.exports=r.p+"img/goods_null.38f1689.png"},511:function(t,e,r){var content=r(549);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(19).default)("38d10b78",content,!0,{sourceMap:!1})},548:function(t,e,r){"use strict";r(511)},549:function(t,e,r){var n=r(18)(!1);n.push([t.i,".category[data-v-97320974]{padding:16px 0}.category .category-hd .category-wrap[data-v-97320974]{padding:0 16px}.category .category-hd .category-con[data-v-97320974]{border-bottom:1px dashed #e5e5e5;align-items:flex-start;padding-top:16px}.category .category-hd .category-con .name[data-v-97320974]{flex:none}.category .category-hd .category-con .item[data-v-97320974]{margin-bottom:16px;width:84px;margin-left:14px;cursor:pointer}.category .category-hd .category-con .item.active[data-v-97320974],.category .category-hd .category-con .item[data-v-97320974]:hover{color:#ff2c3c}.category .category-hd .sort[data-v-97320974]{padding:15px 16px}.category .category-hd .sort .sort-name .item[data-v-97320974]{margin-right:30px;cursor:pointer}.category .category-hd .sort .sort-name .item.active[data-v-97320974]{color:#ff2c3c}",""]),t.exports=n},631:function(t,e,r){"use strict";r.r(e);var n=r(6),o=(r(10),r(434),r(52),r(446)),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("goods_category/lists",{params:{client:2}});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.d)(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,d,l,h,f,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.priceSort,n=t.sortType,o=t.saleSort,c=t.cateId,d="",e.t0=n,e.next="price"===e.t0?6:"sales_sum"===e.t0?8:10;break;case 6:return d=r,e.abrupt("break",10);case 8:return d=o,e.abrupt("break",10);case 10:return e.next=12,t.$get("pc/goodsList",{params:{page_size:20,page_no:t.page,sort_type:n,sort:d,category_id:c}});case 12:l=e.sent,h=l.data,f=h.list,v=h.count,t.goodsList=f,f.length?t.isHasGoods=!0:t.isHasGoods=!1,t.count=v;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))}}}},d=(r(548),r(11)),component=Object(d.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"category"},[n("div",{staticClass:"category-hd bg-white"},[n("div",{staticClass:"category-wrap"},[n("div",{staticClass:"category-con row"},[n("div",{staticClass:"name muted"},[t._v("一级分类:")]),t._v(" "),n("div",{staticClass:"category-list row wrap lighter"},t._l(t.categoryOne,(function(e,r){return n("div",{key:r,class:["item line1",{active:t.oneIndex==r}],on:{click:function(r){return t.changeData(e.id)}}},[t._v("\n "+t._s(e.name)+"\n ")])})),0)]),t._v(" "),n("div",{staticClass:"category-con row"},[n("div",{staticClass:"name muted"},[t._v("二级分类:")]),t._v(" "),n("div",{staticClass:"category-list row wrap lighter"},[n("div",{class:["item line1",{active:""===t.twoIndex}],on:{click:t.clickAllTwo}},[t._v("\n 全部\n ")]),t._v(" "),t._l(t.categoryTwo,(function(e,r){return n("div",{key:r,class:["item line1",{active:t.twoIndex===r}],on:{click:function(r){return t.changeData(e.id)}}},[t._v("\n "+t._s(e.name)+"\n ")])}))],2)]),t._v(" "),n("div",{staticClass:"category-con row"},[n("div",{staticClass:"name muted"},[t._v("三级分类:")]),t._v(" "),n("div",{staticClass:"category-list row wrap lighter"},[n("div",{class:["item line1",{active:""===t.threeIndex}],on:{click:t.clickAll}},[t._v("\n 全部\n ")]),t._v(" "),t._l(t.categoryThree,(function(e,r){return n("div",{key:r,class:["item line1",{active:t.threeIndex===r}],on:{click:function(r){return t.changeData(e.id)}}},[t._v("\n "+t._s(e.name)+"\n ")])}))],2)])]),t._v(" "),n("div",{staticClass:"sort mb16 row bg-white"},[n("div",{staticClass:"title muted"},[t._v("排序方式:")]),t._v(" "),n("div",{staticClass:"sort-name ml16 row lighter"},[n("div",{class:["item",{active:""==t.sortType}],on:{click:function(e){return t.changeSortType("")}}},[t._v("\n 综合\n ")]),t._v(" "),n("div",{class:["item",{active:"price"==t.sortType}],on:{click:function(e){return t.changeSortType("price")}}},[t._v("\n 价格\n "),n("i",{directives:[{name:"show",rawName:"v-show",value:"desc"==t.priceSort,expression:"priceSort == 'desc'"}],staticClass:"el-icon-arrow-down"}),t._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:"asc"==t.priceSort,expression:"priceSort == 'asc'"}],staticClass:"el-icon-arrow-up"})]),t._v(" "),n("div",{class:["item",{active:"sales_sum"==t.sortType}],on:{click:function(e){return t.changeSortType("sales_sum")}}},[t._v("\n 销量\n "),n("i",{directives:[{name:"show",rawName:"v-show",value:"desc"==t.saleSort,expression:"saleSort == 'desc'"}],staticClass:"el-icon-arrow-down"}),t._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:"asc"==t.saleSort,expression:"saleSort == 'asc'"}],staticClass:"el-icon-arrow-up"})])])])]),t._v(" "),t.isHasGoods?n("div",[n("goods-list",{attrs:{list:t.goodsList}}),t._v(" "),t.count?n("div",{staticClass:"pagination row-center",staticStyle:{"padding-bottom":"38px"}},[n("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):n("null-data",{attrs:{img:r(477),text:"暂无商品~"}})],1)}),[],!1,null,"97320974",null);e.default=component.exports;installComponents(component,{GoodsList:r(467).default,NullData:r(445).default})}}]);