import{n as h,W as p,c as o,F as a,O as f}from"./index.13f93d3a.js";const m={name:"other",components:{Waterfall:p},data(){return{loading:!1,products:[],limit:5,page:1,totalPage:1}},mounted(){this.getProducts()},methods:{loadData(s){this.getProducts({page:s,newload:!1})},getProducts({page:s=this.page,columnSize:t=this.columnSize,newload:e=!0}={}){this.loading=!0,this.page=s;const r=this.$t("common.failure");this.$axios.get("/api/index/product_list",{params:{type:this.types,limit:this.limit,page:s,go:t}}).then(l=>{const{code:n,msg:d=r,data:c={}}=l.data,{items:i=[],totalPage:u}=c;n==0?(this.products=e?i:refillData(this.products,i),this.totalPage=u):this.$message.error(d)}).catch(()=>{this.$message.error(r)}).finally(()=>{this.loading=!1})}},watch:{columnSize(s,t){this.getProducts({page:this.page,columnSize:s})},filterType(){this.getProducts({newload:!0})}},computed:{columnSize(){return this.$store.state.columnSize},types(){return this.filterType?o[a.index][this.filterType]?[a.mode,o[a.mode][this.filterType]].join(","):[a.mode].join(","):this.$store.getters.strTypes},filterType(){return this.$route.query.filter},filterText(){return this.filterType?f.filterTexts[this.filterType]:""}}};var _=function(){var t=this,e=t._self._c;return e("div",{staticClass:"other"},[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.nav3")))]),t._v(" "+t._s(t.$t(`${t.filterText}`))+" ")]),e("div",{staticClass:"right"},[e("router-link",{attrs:{to:{path:"/other",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)])},g=[],v=h(m,_,g,!1,null,"da6dabbd",null,null);const T=v.exports;export{T as default};
