index-legacy.e4746b3b.js 3.0 KB

1
  1. System.register(["./index-legacy.88892f9c.js"],(function(t,e){"use strict";var i,a,o,n,r,s=document.createElement("style");return s.textContent=".other[data-v-b2815fb5]{background:var(--color-white);min-height:calc(100vh - 112px)}.other .header[data-v-b2815fb5]{position:fixed;left:0;top:50px;width:100%;height:60px;color:var(--color-black);background:var(--color-white);z-index:1}.header .header-content[data-v-b2815fb5]{width:960px;height:100%;display:flex;margin:0 auto;align-items:center;justify-content:space-between}.header .el-button[data-v-b2815fb5]{width:68px;height:25px;font-size:12px}.header .left[data-v-b2815fb5]{font-size:12px;line-height:17px}.header .left b[data-v-b2815fb5]{font-size:22px;line-height:30px;margin-right:14px}.other .bottom[data-v-b2815fb5]{padding:100px 0}\n",document.head.appendChild(s),{setters:[function(t){i=t.n,a=t.W,o=t.d,n=t.F,r=t.O}],execute:function(){var e={name:"other",components:{Waterfall:a},data:function(){return{loading:!1,products:[],limit:10,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]:{},i=e.page,a=void 0===i?this.page:i,o=e.columnSize,n=void 0===o?this.columnSize:o,r=e.newload,s=void 0===r||r;this.loading=!0,this.page=a;var l=this.$t("common.failure");this.$axios.get("/api/index/product_list",{params:{type:this.types,limit:this.limit,page:a,go:n}}).then((function(e){var i=e.data,a=i.code,o=i.msg,n=void 0===o?l:o,r=i.data,d=void 0===r?{}:r,c=d.items,h=void 0===c?[]:c,u=d.totalPage;0==a?(t.products=s?h:refillData(t.products,h),t.totalPage=u):t.$message.error(n)})).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},types:function(){return this.filterType?o[n.index][this.filterType]?[n.mode,o[n.mode][this.filterType]].join(","):[n.mode].join(","):this.$store.getters.strTypes},filterType:function(){return this.$route.query.filter},filterText:function(){return this.filterType?r.filterTexts[this.filterType]:""}}};t("default",i(e,(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("".concat(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)])}),[],!1,null,"b2815fb5",null,null).exports)}}}));