dfa6276.js 6.2 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[11],{1038:function(t,e,o){"use strict";o.r(e);var d=o(4),n=(o(29),o(22),o(14),o(90),o(12),o(13),o(6),o(16),o(11),o(17),o(720)),r=o(719),f=o(236),c=o(238),l=o(718),h=o(716),v=o(775),m=o(5);function _(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,o)}return e}var w={data:function(){return{slides:{name:""},cate_id:"",categoryList:[],goodList:{total:0,data:[]},sort_name:"comment_num",sort_status:"desc",hotGoods:[],brandId:"",filterId:""}},components:{box:r.default,goods:f.default,set:c.default,swiper:l.default,pagination:h.default,catgory2:v.default,serviceBox:n.default},head:function(){return{title:"".concat(this.slides.name,"-").concat(this.basicSet.seo.title),meta:[{name:"keywords",content:"".concat(this.slides.name,",").concat(this.basicSet.seo.keywords)},{name:"description",content:"".concat(this.basicSet.seo.description)}]}},computed:function(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?_(Object(source),!0).forEach((function(e){Object(d.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):_(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}({},Object(m.b)(["basicSet"])),mounted:function(){var t=this;this.cate_id=this.$route.params.id,this.getSlides(),this.handleCurrentChange({page:1}),this.$nextTick((function(){2==t.basicSet.set.pc_temp&&t.getRecommend()}))},methods:{changeGoods:function(t){this.goodList=t},getRecommend:function(){var t=this;this.fun.$post("plugin.pc-terminal-two.frontend.home.category-other",{}).then((function(e){1===e.result&&(t.hotGoods=e.data.hotGoods)}))},getSlides:function(){var t=this;this.fun.$post("plugin.pc-terminal.api.goods.get-category-advert",{id:this.cate_id}).then((function(e){1===e.result&&(t.slides=e.data)}))},changeStatus:function(t){1==t.sort_name?this.sort_name="comment_num":2==t.sort_name?this.sort_name="show_sales":3==t.sort_name&&(this.sort_name="price"),1==t.sort_status?this.sort_status="desc":this.sort_status="asc",this.handleCurrentChange({page:1},"good")},handleCurrentChange:function(t,e){var o=this;this.fun.$post("goods.goods.search-goods",{search:{category:this.cate_id,brand_id:this.brandId,filtering:this.filterId},page:t.page,order_field:this.sort_name,order_by:this.sort_status},"正在获取").then((function(t){1===t.result?("good"!==e?document.body.scrollIntoView():o.$nextTick((function(){document.documentElement.scrollTop=document.getElementById("index_content").offsetTop-115})),o.goodList=t.data):(o.goodList={data:[],total:0},o.$message.error(t.msg))}))},handleChange:function(data){this.sort_name=data.sort_name,this.sort_status=data.sort_status,this.brandId=data.brandId,this.filterId=data.filterId,this.handleCurrentChange({page:1},"good")}}},x=w,y=(o(974),o(1)),component=Object(y.a)(x,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"catgory_index",style:{background:1==t.basicSet.set.pc_temp?"#fff":"#F0F2F4"}},[1==t.basicSet.set.pc_temp?o("swiper",{attrs:{list:t.slides,from:"category"}}):t._e(),t._v(" "),o("div",{staticClass:"index_content m-auto ",attrs:{id:"index_content"}},[o("div",{staticClass:"introduce_goods"},[1==t.basicSet.set.pc_temp?[o("div",{staticClass:"class-box"},[t._v(" "+t._s(t.slides.parent&&t.slides.parent.name?t.slides.parent.name:"全部")+" > "),o("span",{staticStyle:{color:"var(--color)"}},[t._v(t._s(t.slides.name))])]),t._v(" "),o("set",{on:{changeStatus:t.changeStatus}}),t._v(" "),o("goods",{attrs:{list:t.goodList.data}})]:[o("catgory2",{attrs:{slides:t.slides,goodList:t.goodList.data,hotGoods:t.hotGoods},on:{change:t.changeGoods,handleChange:t.handleChange}})]],2)]),t._v(" "),1!=t.basicSet.set.pc_temp?o("service-box"):t._e(),t._v(" "),o("div",{staticClass:"pagination_box"},[o("pagination",{attrs:{total:t.goodList.total,pageSize:t.goodList.per_page},on:{pagination:function(e){return t.handleCurrentChange(e,"good")}}})],1)],1)}),[],!1,null,"6df9fdf5",null);e.default=component.exports},839:function(t,e,o){var content=o(975);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(8).default)("27fe9704",content,!0,{sourceMap:!1})},974:function(t,e,o){"use strict";o(839)},975:function(t,e,o){var d=o(7)(!1);d.push([t.i,".col_red[data-v-6df9fdf5]{color:#f11111}.col_green[data-v-6df9fdf5]{color:#44be95}.col_white[data-v-6df9fdf5]{color:#fff}.flex-col[data-v-6df9fdf5]{flex-direction:column}.flex-j-c[data-v-6df9fdf5]{justify-content:center}.flex-j-sb[data-v-6df9fdf5]{justify-content:space-between}.flex-j-ar[data-v-6df9fdf5]{justify-content:space-around}.flex-a-c[data-v-6df9fdf5]{align-items:center}.flex-a-e[data-v-6df9fdf5]{align-items:flex-end}.w[data-v-6df9fdf5]{width:1200px}.m-auto[data-v-6df9fdf5]{margin:0 auto}.height-one[data-v-6df9fdf5]{height:100%}.flex[data-v-6df9fdf5]{display:flex}.text-overflow[data-v-6df9fdf5]{-webkit-line-clamp:4}.text-overflow[data-v-6df9fdf5],.text-overflow-2[data-v-6df9fdf5]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.text-overflow-2[data-v-6df9fdf5]{-webkit-line-clamp:2}.text-overflow-3[data-v-6df9fdf5]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.overflow-hide[data-v-6df9fdf5],.text-overflow-3[data-v-6df9fdf5]{overflow:hidden;text-overflow:ellipsis}.overflow-hide[data-v-6df9fdf5]{white-space:nowrap}.hiddenScroll[data-v-6df9fdf5]{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll}.hiddenScroll[data-v-6df9fdf5]::-webkit-scrollbar{display:none}.finger-point[data-v-6df9fdf5]{cursor:pointer}.cursor-default[data-v-6df9fdf5]{cursor:default}.el-icon-circle-close[data-v-6df9fdf5]{color:#fff}.catgory_index[data-v-6df9fdf5]{background-color:#fff;padding-bottom:20px}.catgory_index .index_content[data-v-6df9fdf5]{width:1200px}.pagination_box[data-v-6df9fdf5]{margin-top:10px;text-align:center}.class-box[data-v-6df9fdf5]{font-size:16px;font-weight:700;margin:15px 0}",""]),t.exports=d}}]);