!function(){function t(t,a){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var n,r,i,o,l=[],s=!0,u=!1;try{if(i=(a=a.call(t)).next,0===e){if(Object(a)!==a)return;s=!1}else for(;!(s=(n=i.call(a)).done)&&(l.push(n.value),l.length!==e);s=!0);}catch(c){u=!0,r=c}finally{try{if(!s&&null!=a.return&&(o=a.return(),Object(o)!==o))return}finally{if(u)throw r}}return l}}(t,a)||function(t,a){if(!t)return;if("string"==typeof t)return e(t,a);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,a)}(t,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a<e;a++)n[a]=t[a];return n}System.register(["./index-legacy.a084919e.js"],(function(e,a){"use strict";var n,r,i,o=document.createElement("style");return o.textContent=".base[data-v-1b408a11]{background:var(--color-white)}.base .header[data-v-1b408a11]{position:fixed;left:0;top:50px;width:100%;height:60px;background:var(--color-white);z-index:1}.header .header-content[data-v-1b408a11]{width:960px;height:100%;display:flex;margin:0 auto;align-items:center;justify-content:space-between}.header .el-button[data-v-1b408a11]{width:68px;height:25px;font-size:12px}.header .left b[data-v-1b408a11]{font-size:22px;margin-right:15px}.base .bottom[data-v-1b408a11]{padding-top:50px;padding-bottom:100px}.base .bottom.margin[data-v-1b408a11]{padding-top:100px}\n",document.head.appendChild(o),{setters:[function(t){n=t.n,r=t.W,i=t.F}],execute:function(){var a={name:"base",components:{Waterfall:r},data:function(){return{loading:!1,products:[],limit:5,page:1,totalPage:1}},mounted:function(){this.getProducts()},methods:{loadData:function(t){this.getProducts({page:t,newload:!1})},getProducts:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=e.page,n=void 0===a?this.page:a,r=e.columnSize,i=void 0===r?this.columnSize:r,o=e.newload,l=void 0===o||o;this.loading=!0,this.page=n;var s=this.$t("common.failure");this.$axios.get("/api/index/product_list",{params:{type:this.types,limit:this.limit,page:n,go:i}}).then((function(e){var a=e.data,n=a.code,r=a.msg,i=void 0===r?s:r,o=a.data,u=void 0===o?{}:o,c=u.items,d=void 0===c?[]:c,f=u.totalPage;0==n?(t.products=l?d:refillData(t.products,d),t.totalPage=f):t.$message.error(i)})).catch((function(){t.$message.error(s)})).finally((function(){t.loading=!1}))}},watch:{columnSize:function(t,e){this.getProducts({page:this.page,columnSize:t})},filterType:function(){this.getProducts({newload:!0})}},computed:{columnSize:function(){return this.$store.state.columnSize},nameKey:function(){return this.$store.state.nameKey},types:function(){if(this.filterType&&"all"!==this.filterType){var e=t(this.filterType.split(","),2),a=e[0],n=e[1];return[i.mode,a,n].join(",")}return[i.mode].join(",")},filterType:function(){return this.$route.query.filter},filterText:function(){var t=this;if("all"===this.filterType)return this.$t("common.filter.all");var e=this.filterType.split(",");return JSON.parse(sessionStorage.getItem("conf_filters")).map((function(a,n){return a.find((function(t){return t.id==e[n]}))[t.nameKey]})).join(" ")}}};e("default",n(a,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"base"},[t.filterType?e("div",{staticClass:"header",attrs:{id:"scrollHeader"}},[e("div",{staticClass:"header-content"},[e("div",{staticClass:"left v-center"},[e("b",[t._v(t._s(t.$t("header.navs.nav1")))]),t._v(" "+t._s(t.filterText)+" ")]),e("div",{staticClass:"right"},[e("router-link",{attrs:{to:{path:"/base",query:{filter:"all"}}}},[e("el-button",{attrs:{type:"primary",round:""}},[t._v(t._s(t.$t("common.viewAll")))])],1)],1)])]):t._e(),e("div",{class:["bottom",t.filterType?"margin":""]},[t.products.length?e("Waterfall",{attrs:{page:t.page,totalPage:t.totalPage,loading:t.loading,data:t.products},on:{loadData:t.loadData}}):t._e()],1)])}),[],!1,null,"1b408a11",null,null).exports)}}}))}();
