glhcp/server/public/_nuxt/088982d.js

1 line
13 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[31,5,13,16,18],{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(18).default)("d7ac674a",content,!0,{sourceMap:!1})},489: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=String(t).split("."),e.first=t[0],e.second=t[1],this.priceSlice=e)}}},n=(r(490),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},490:function(t,e,r){"use strict";r(488)},491:function(t,e,r){var o=r(17)((function(i){return i[1]}));o.push([t.i,".price-format{align-items:baseline;display:flex}",""]),o.locals={},t.exports=o},492:function(t,e,r){var content=r(494);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(18).default)("1e01d57a",content,!0,{sourceMap:!1})},493:function(t,e,r){"use strict";r(492)},494:function(t,e,r){var o=r(17)((function(i){return i[1]}));o.push([t.i,".null-data[data-v-93598fb0]{padding:100px}.null-data .img-null[data-v-93598fb0]{height:150px;width:150px}",""]),o.locals={},t.exports=o},495: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(493),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 mt8"},[t._v(t._s(t.text))])])}),[],!1,null,"93598fb0",null);e.default=component.exports},497:function(t,e,r){var content=r(503);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(18).default)("18c1d214",content,!0,{sourceMap:!1})},498:function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return c}));r(47),r(30),r(64),r(48),r(39),r(20),r(65),r(66),r(49);var o=r(22);r(109),r(63),r(12);var n=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}}};function c(t){var p="";if("object"==Object(o.a)(t)){for(var e in p="?",t)p+="".concat(e,"=").concat(t[e],"&");p=p.slice(0,-1)}return p}},499: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(18).default)("488d347e",content,!0,{sourceMap:!1})},502:function(t,e,r){"use strict";r(497)},503:function(t,e,r){var o=r(17)((function(i){return i[1]}));o.push([t.i,".goods-list[data-v-060944d1]{align-items:stretch}.goods-list .goods-item[data-v-060944d1]{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-060944d1]:hover{box-shadow:0 0 6px rgba(0,0,0,.1);transform:translateY(-8px)}.goods-list .goods-item .goods-img[data-v-060944d1]{height:200px;width:200px}.goods-list .goods-item .name[data-v-060944d1]{height:40px;line-height:20px;margin-bottom:10px}.goods-list .goods-item .seckill .btn[data-v-060944d1]{border:1px solid transparent;border-radius:4px;padding:4px 12px}.goods-list .goods-item .seckill .btn.not-start[data-v-060944d1]{background-color:transparent;border-color:#ff2c3c;color:#ff2c3c}.goods-list .goods-item .seckill .btn.end[data-v-060944d1]{background-color:#e5e5e5;color:#fff}",""]),o.locals={},t.exports=o},504: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"已结束"}}}},n=(r(502),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("nuxt-link",{key:o,staticClass:"goods-item bg-white",style:{marginRight:(o+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(489).default})},505:function(t,e,r){t.exports=r.p+"img/goods_null.d774c28.png"},506:function(t,e,r){"use strict";var o=r(2),n=r(507);o({target:"String",proto:!0,forced:r(508)("link")},{link:function(t){return n(this,"a","href",t)}})},507:function(t,e,r){"use strict";var o=r(4),n=r(36),c=r(19),l=/"/g,d=o("".replace);t.exports=function(t,e,r,o){var f=c(n(t)),m="<"+e;return""!==r&&(m+=" "+r+'="'+d(c(o),l,"&quot;")+'"'),m+">"+f+"</"+e+">"}},508:function(t,e,r){"use strict";var o=r(3);t.exports=function(t){return o((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},509:function(t,e,r){"use strict";r(499)},510:function(t,e,r){var o=r(17)((function(i){return i[1]}));o.push([t.i,".ad-item[data-v-368017b1]{cursor:pointer;height:100%;width:100%}",""]),o.locals={},t.exports=o},511:function(t,e,r){"use strict";r.r(e);r(506),r(89);var o=r(498),n={components:{},props:{item:{type:Object,default:function(){return{}}}},methods:{goPage:function(t){var e=t.link_type,link=t.link,r=t.params;if(3===e)window.open(t.link);else["/goods_details"].includes(link)?link+="/".concat(r.id):link+=Object(o.a)(r),this.$router.push({path:link})}}},c=(r(509),r(9)),component=Object(c.a)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"ad-item",on:{click:function(e){return e.stopPropagation(),t.goPage(t.item)}}},[e("el-image",{staticStyle:{width:"100%",height:"100%"},attrs:{src:t.item.image,fit:"cover"}})],1)}),[],!1,null,"368017b1",null);e.default=component.exports},606:function(t,e,r){var content=r(706);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(18).default)("57e76e4a",content,!0,{sourceMap:!1})},705:function(t,e,r){"use strict";r(606)},706:function(t,e,r){var o=r(17)((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},746:function(t,e,r){"use strict";r.r(e);var o=r(8),n=(r(30),r(56),r(498)),c={head:function(){return{title:this.$store.getters.headTitle,link:[{rel:"icon",type:"image/x-icon",href:this.$store.getters.favicon}]}},asyncData:function(t){return Object(o.a)(regeneratorRuntime.mark((function e(){var r,o,n,c,l,d,data;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.$get,o=t.params,t.query,n=o.type,c=0,l=[],e.t0=n,e.next="1"===e.t0?7:"2"===e.t0?9:11;break;case 7:return c=25,e.abrupt("break",11);case 9:return c=26,e.abrupt("break",11);case 11:return e.next=13,r("ad_content/lists",{params:{pid:c,terminal:2}});case 13:if(d=e.sent,(data=d.data).length){e.next=17;break}return e.abrupt("return");case 17:return l=data,e.abrupt("return",{ad:l});case 19:case"end":return e.stop()}}),e)})))()},components:{},data:function(){return{sortType:"",swiperOptions:{width:1180},saleSort:"desc",priceSort:"desc",page:"",count:0,ad:"",goodsList:[]}},created:function(){this.getGoods(),this.changeSortType=Object(n.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(o.a)(regeneratorRuntime.mark((function e(){var r,o,n,c,l,d,f,m,h;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,l="",e.t0=n,e.next="price"===e.t0?6:"sales_sum"===e.t0?8:10;break;case 6:return l=o,e.abrupt("break",10);case 8:return l=c,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:l,name:r}});case 12:d=e.sent,f=d.data,m=f.list,h=f.count,t.count=h,t.goodsList=m;case 18:case"end":return e.stop()}}),e)})))()}},watch:{"$route.query.name":function(){this.getGoods()}}},l=(r(705),r(9)),component=Object(l.a)(c,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"goods-list"},[e("div",{staticClass:"banner m-t-16"},[e("client-only",[e("swiper",{ref:"mySwiper",attrs:{options:t.swiperOptions}},t._l(t.ad,(function(t,r){return e("swiper-slide",{key:r,staticClass:"swiper-item"},[e("ad-item",{attrs:{item:t}})],1)})),1)],1)],1),t._v(" "),e("div",{staticClass:"sort m-b-16 flex bg-white"},[e("div",{staticClass:"sort-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 m-t-30 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(505),text:"暂无商品~"}})],2)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{AdItem:r(511).default,GoodsList:r(504).default,NullData:r(495).default})}}]);