(window.webpackjsonp=window.webpackjsonp||[]).push([[44],{554:function(t,e,c){"use strict";c.r(e);c(30);var r=c(7),o=(c(64),c(13),c(26),c(220),c(31),c(51),{layout:"cn",name:"indexpage",head:function(){return{title:this.title,meta:[{hid:"description",name:"description",content:""}]}},asyncdata:function(t){return object(r.a)(regeneratorruntime.mark((function e(){var c,r,o,n,l,d,_,v,f,h,m,c,y,w,x,k,s,e,$,i;return regeneratorruntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=t.$axios,t.params,t.error,r=t.query,t.store,o=1,e.next=4,c({url:"/api/public/query/lgproductcategorycn",method:"post",data:{orderby:"seq",orderdir:"asc",perpage:999,page:1}});case 4:n=(n=e.sent).data.data.rows,console.log("categorys: ",n),l=[],n.foreach((function(t){t.parentid=0,l[t.id]=t,t.children&&t.children.foreach((function(t){l[t.id]=t,t.children&&t.children.foreach((function(t){l[t.id]=t}))}))})),d=r.category||"",console.log("category: ",d),_=r.c2||"",v=r.c3||"",f=[];try{f=l[d].children}catch(t){}h=[];try{h=l[_].children}catch(t){}return m=d,0!=_&&(m=_),0!=v&&(m=v),console.log("/api/public/lg/product_cn_list?cat_id="+m,"aaaa"),e.next=23,c({url:"/api/public/lg/product_cn_list?cat_id="+m+"&page="+o+"&size=8",method:"get"});case 23:c=e.sent,y=!0;try{c.data.data.count<=8&&(y=!1),c=c.data.data.rows}catch(t){c=[]}return e.next=28,c({url:"/api/public/lg/product_cn_list?cat_id="+d+"&page=1&size=1",method:"get"});case 28:w=e.sent;try{w=w.data.data.rows}catch(t){w=[]}return e.next=32,c.get("/api/public/getsolutionlistall");case 32:return x=(x=e.sent).data.data,e.next=36,c({url:"/api/public/lg//product_cn_cat?id="+d,method:"get"});case 36:return k=e.sent,s=[],e=[],x.foreach((function(t,e){e.push(t),(e+1)%6==0&&(s.push(e),e=[])})),e.length>0&&s.push(e),e.next=43,c({url:"/api/public/config/cnproduct",method:"get"});case 43:return $=e.sent,i=k.data.data,console.log("%c [ products_rec222 ]-253","font-size:13px; background:pink; color:#bf2c9f;",w),e.abrupt("return",{title:i.name+"_产品与解决方案_山东临工",categorys:n,category:d,products:c,page:o,showmore:y,flex_product:!1,compare_products:[],category_detail:k.data.data,conf:$.data.data,products_rec:w,c2_all:f,c3_all:h,c2:_,c3:v,solu:s});case 47:case"end":return e.stop()}}),e)})))()},methods:{iscompare:function(t){var e=!1;return this.compare_products.foreach((function(c){c.id==t&&(e=!0)})),e},delcompare:function(t){var e=this.compare_products;e.foreach((function(c,r){c.id==t.id&&e.splice(r,1)})),this.compare_products=e,localstorage.setitem("compare_products",json.stringify(e)),0==e.length&&(this.flex_product=!1)},compare:function(t){var e=this,c=localstorage.getitem("compare_products");c=null==c?[]:json.parse(c);var r=!1;c.foreach((function(e){e.id==t.id&&(r=!0)})),console.log(r,"iscompare"),r?c.foreach((function(e,r){e.id==t.id&&c.splice(r,1)})):c.push(t),c.length>2&&c.shift(),localstorage.setitem("compare_products",json.stringify(c)),this.compare_products=c,console.log(this.compare_products,"this.compare_products"),this.products.foreach((function(t){t.compare_select=!1,e.compare_products.foreach((function(e){t.id==e.id&&(t.compare_select=!0)}))})),0==c.length?this.flex_product=!1:this.flex_product=!0},cancelcompare:function(){this.flex_product=!1,this.compare_products=[],this.products.foreach((function(t){t.compare_select=!1})),localstorage.setitem("compare_products",json.stringify([]))},changec2:function(t){this.c2=t,""==t&&(this.c3="");var e="/product?category="+this.category;""!=this.c2&&(e+="&c2=".concat(t)),location.href=e},changec3:function(t){this.c3=t;var e="/product?category="+this.category+"&c2="+this.c2;""!=this.c3&&(e+="&c3=".concat(t)),location.href=e},more:function(){var t=this,e=this.page+1;this.page=e,this.$axios({url:"https://www.sdlg.cn/api/public/lg/product_cn_list?cat_id="+this.category+"&page="+this.page+"&size=8",method:"get"}).then((function(e){console.log("res: ",e);var c=e.data.data.rows;t.products=t.products.concat(c),c.length<8&&(t.showmore=!1)}))}},mounted:function(){var t=this,e=localstorage.getitem("compare_products");null!=e&&(this.compare_products=json.parse(e)),this.compare_products.length>0&&(this.flex_product=!0),this.products.foreach((function(e){t.compare_products.foreach((function(t){e.id==t.id&&(e.compare_select=!0)}))})),$(".flex-product-list li b").click((function(){$(this).parents("li").remove()}));new swiper(".solute-swiper",{speed:1e3,slidesperview:1,loop:!0,autoplay:!1,pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextel:".gallery-prev.next",prevel:".gallery-prev.prev"}});$(".comparebtn input").click((function(t){t.stoppropagation(),$(this).parents(".comparebtn").toggleclass("active")}))}}),n=c(6),component=object(n.a)(o,(function(){var t=this,e=t._self._c;return e("div",[e("div",{staticclass:"posite-box"},[e("div",{staticclass:"posite-wrap inner"},[e("a",{attrs:{href:"/"}},[t._v(t._s(t.$t("home")))]),t._v(" "),e("b",{staticclass:"iconfont"},[t._v("")]),t._v(" "),e("a",{attrs:{href:"/productssolutions"}},[t._v(t._s(t.$t("products&solutions")))]),t._v(" "),e("b",{staticclass:"iconfont"},[t._v("")]),t._v(" "),e("a",{attrs:{href:"/product?category="+t.category}},[t._v(t._s(t.category_detail.name))])])]),t._v(" "),e("div",{staticclass:"leval-menu-box"},[e("ul",{staticclass:"leval-menu-wrap inner"},[t._l(t.categorys,(function(c){return e("li",{key:c.id,class:{active:c.id==t.category}},[e("a",{attrs:{href:"/product?category="+c.id}},[t._v(t._s(c.name))])])})),t._v(" "),t._m(0),t._v(" "),t._m(1)],2)]),t._v(" "),e("div",{staticclass:"product-main inner"},[e("div",{staticclass:"product-info"},[t._m(2),t._v(" "),e("div",{staticclass:"product-wheel"},[e("strong",{staticclass:"article-block slidetop"},[t._v(t._s(t.category_detail.name))]),t._v(" "),e("p",{staticclass:"article-block slidetop detay1"},[t._v(t._s(t.conf.p1_desc))])])]),t._v(" "),e("div",{staticclass:"filter-product"},[e("h3",{staticclass:"filter-tt article-block slidetop"},[t._v("分类筛选")]),t._v(" "),e("div",{staticclass:"filter-select article-block slidetop"},[e("div",{staticclass:"filter-select-row"},[e("div",{staticclass:"filter-item",class:{active:0==t.c2}},[e("label",[e("input",{staticclass:"redio",attrs:{type:"radio",name:"c2"},on:{click:function(e){return t.changec2(0)}}}),t._v(" "),e("span"),t._v(" "),e("p",[t._v("全部")])])]),t._v(" "),t._l(t.c2_all,(function(c){return e("div",{staticclass:"filter-item",class:{active:t.c2==c.id},on:{click:function(e){return t.changec2(c.id)}}},[e("label",[e("input",{staticclass:"redio",attrs:{type:"radio",name:"c2"}}),t._v(" "),e("span"),t._v(" "),e("p",[t._v(t._s(c.name))])])])}))],2)])]),t._v(" "),e("div",{staticclass:"product-wraps"},[e("ul",{staticclass:"product-list"},t._l(t.products,(function(c,r){return e("li",{key:r},[e("div",{staticclass:"comparebtn",class:{active:c.compare_select}},[e("label",[e("input",{staticclass:"check",attrs:{type:"checkbox"},on:{click:function(e){return t.compare(c)}}}),t._v(" "),e("span"),t._v(" "),e("p",[t._v(t._s(t.$t("compare")))])])]),t._v(" "),e("a",{attrs:{href:"/product/"+c.id}},[e("figure",[e("img",{attrs:{src:c.img,alt:""}})]),t._v(" "),e("div",{staticclass:"product-text"},[e("strong",[t._v(t._s(c.title))]),t._v(" "),e("div",{staticclass:"proinfo"},t._l(c.params,(function(c,r){return"yes"==c.is_rec?e("p",[e("span",[e("img",{attrs:{src:c.icon,alt:""}})]),t._v("\n "+t._s(c.label)+":"),e("b",[t._v(t._s(c.value))])]):t._e()})),0),t._v(" "),e("div",{staticclass:"promore"},[e("span",[t._v(t._s(t.$t("more")))]),e("i",{staticclass:"iconfont"},[t._v("")])])])])])})),0),t._v(" "),t.showmore?e("div",{staticclass:"product-more"},[e("a",{staticstyle:{cursor:"pointer"},on:{click:function(e){return t.more()}}},[e("span",[t._v(t._s(t.$t("browsemore")))]),t._v(" "),e("i",{staticclass:"iconfont"},[t._v("")])])]):t._e(),t._v(" "),t._l(t.products_rec,(function(c){return e("div",{staticclass:"loader-wheel",staticstyle:{"background-image":"url(/img/12.png)"}},[e("div",{staticclass:"loader-imgs"},[e("img",{attrs:{src:c.img,alt:""}})]),t._v(" "),e("div",{staticclass:"loader-info"},[e("div",{staticclass:"loader-top article-block slidetop"},[e("strong",[t._v(t._s(c.title)+" ")]),t._v(" "),e("small",[t._v(t._s(t.category_detail.name))])]),t._v(" "),e("div",{staticclass:"loader-data article-block slidelist"},t._l(c.params,(function(c,r){return"yes"==c.is_rec?e("div",{staticclass:"loader-data-item"},[e("strong",[t._v(t._s(c.value))]),t._v(" "),e("p",[t._v(t._s(c.label))])]):t._e()})),0),t._v(" "),e("div",{staticclass:"loader-more article-block slidetop"},[e("a",{attrs:{href:"/product/"+c.id}},[e("span",[t._v(t._s(t.$t("more")))]),e("i",{staticclass:"iconfont"},[t._v("")])])])])])}))],2)]),t._v(" "),e("section",{directives:[{name:"show",rawname:"v-show",value:t.flex_product,expression:"flex_product"}],staticclass:"flex-product show"},[e("div",{staticclass:"flex-product-wrap inner"},[e("ul",{staticclass:"flex-product-list"},t._l(t.compare_products,(function(c){return e("li",[e("span",[t._v(t._s(c.title))]),t._v(" "),e("b",{staticclass:"iconfont",on:{click:function(e){return t.delcompare(c)}}},[t._v("")])])})),0),t._v(" "),e("div",{staticclass:"flex-product-btn"},[e("a",{attrs:{href:"/product/compare"}},[t._v(t._s(t.$t("compare")))]),t._v(" "),e("a",{staticclass:"cancel",staticstyle:{cursor:"pointer"},on:{click:function(e){return t.cancelcompare()}}},[t._v(t._s(t.$t("cancel")))])])])])])}),[function(){var t=this._self._c;return t("li",[t("a",{attrs:{target:"_blank",href:"/service/network?type=经销商"}},[this._v("经销商查询")])])},function(){var t=this._self._c;return t("li",[t("a",{attrs:{href:"/productssolutions#solute-boxs"}},[this._v("解决方案")])])},function(){var t=this._self._c;return t("figure",[t("img",{attrs:{src:"/img/9.jpg",alt:""}})])}],!1,null,null,null);e.default=component.exports}}]);