subsidy.js 4.3 KB

1
  1. require('./common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageA/subsidy"],{"0007":function(t,i,n){"use strict";var a=n("fb98"),e=n.n(a);e.a},5041:function(t,i,n){"use strict";n.r(i);var a=n("e090"),e=n.n(a);for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(i,t,(function(){return a[t]}))}(s);i["default"]=e.a},"88f4":function(t,i,n){"use strict";(function(t,i){var a=n("47a9");n("abeb");a(n("3240"));var e=a(n("cd3f"));t.__webpack_require_UNI_MP_PLUGIN__=n,i(e.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},abff:function(t,i,n){"use strict";n.d(i,"b",(function(){return e})),n.d(i,"c",(function(){return s})),n.d(i,"a",(function(){return a}));var a={uNavbar:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-navbar/u-navbar")]).then(n.bind(null,"f3ae"))},uIcon:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-icon/u-icon")]).then(n.bind(null,"b73a"))},uTabs:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-tabs/u-tabs")]).then(n.bind(null,"4b1e"))}},e=function(){var t=this,i=t.$createElement,n=(t._self._c,t.__map(t.list,(function(i,n){var a=t.__get_orig(i),e=1==t.show?i.price.slice(0,-3):null,s=1==t.show?i.price.slice(-3):null,o=2==t.show||3==t.show?i.price.slice(0,-3):null,c=2==t.show||3==t.show?i.price.slice(-3):null;return{$orig:a,g0:e,g1:s,g2:o,g3:c}})));t.$mp.data=Object.assign({},{$root:{l0:n}})},s=[]},cd3f:function(t,i,n){"use strict";n.r(i);var a=n("abff"),e=n("5041");for(var s in e)["default"].indexOf(s)<0&&function(t){n.d(i,t,(function(){return e[t]}))}(s);n("0007");var o=n("828b"),c=Object(o["a"])(e["default"],a["b"],a["c"],!1,null,"63482d8a",null,!1,a["a"],void 0);i["default"]=c.exports},e090:function(t,i,n){"use strict";(function(t){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n={data:function(){return{list1:[],show:1,list:[],Pleaseproductname:"",language:"zh-CN",keyword:"",parent_id:"",page:1,limit:10,last_page:1}},onReachBottom:function(){this.page<this.last_page?(this.page++,1==this.show&&this.subsid(),2==this.show&&this.pack(),3==this.show&&this.shipp()):this.$u.toast("已无更多数据")},computed:{i18n:function(){return this.$t("index")}},onLoad:function(t){this.show=t.show},onShow:function(){""!=t.getStorageSync("language")&&(this.language=t.getStorageSync("language")),1==this.show&&this.subsid(""),2==this.show&&this.pack(""),3==this.show&&this.shipp(""),this.category()},methods:{retur:function(){t.navigateBack()},todetail:function(i){console.log(i),t.navigateTo({url:"/pageA/productdetails?id="+i})},changetab:function(t){this.parent_id=t.id,1==this.show&&this.subsid(t.id),2==this.show&&this.pack(t.id),3==this.show&&this.shipp(t.id)},search:function(t){1==this.show&&this.subsid(this.parent_id),2==this.show&&this.pack(this.parent_id),3==this.show&&this.shipp(this.parent_id)},category:function(){var i=this;t.$u.http.get("/api/goods/category",{params:{parent_id:0}}).then((function(t){var n=t;i.list1=[{name:"",category_id:""}],"en-US"==i.language&&(n.forEach((function(t){t.name=t.name_en})),i.list1[0].name="selection"),"es-ES"==i.language&&(n.forEach((function(t){t.name=t.name_es})),i.list1[0].name="Una selección de"),"it-IT"==i.language&&(n.forEach((function(t){t.name=t.name_ita})),i.list1[0].name="selezionate"),"zh-CN"==i.language&&(n.forEach((function(t){t.name=t.name_cn})),i.list1[0].name="精选"),i.list1=i.list1.concat(n),console.log(i.list1)})).catch((function(){}))},shipp:function(i){var n=this;t.$u.http.post("api/goods/shipping",{page:this.page,limit:this.limit,parent_id:i,keyword:this.keyword}).then((function(t){n.last_page=t.last_page,1==n.page?n.list=t.data:n.list=n.list.concat(t.data)})).catch((function(){}))},pack:function(i){var n=this;t.$u.http.post("/api/goods/pack",{page:this.page,limit:this.limit,parent_id:i,keyword:this.keyword}).then((function(t){n.last_page=t.last_page,1==n.page?n.list=t.data:n.list=n.list.concat(t.data)})).catch((function(){}))},subsid:function(i){var n=this;t.$u.http.post("/api/goods/subsidy",{page:this.page,limit:this.limit,parent_id:i,keyword:this.keyword}).then((function(t){n.last_page=t.last_page,1==n.page?n.list=t.data:n.list=n.list.concat(t.data)})).catch((function(){}))}}};i.default=n}).call(this,n("df3c")["default"])},fb98:function(t,i,n){}},[["88f4","common/runtime","common/vendor"]]]);