subsidy.js 4.3 KB

1
  1. require('./common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageA/subsidy"],{"154d":function(t,i,n){"use strict";n.r(i);var a=n("9c27"),e=n("7211");for(var s in e)["default"].indexOf(s)<0&&function(t){n.d(i,t,(function(){return e[t]}))}(s);n("4927");var o,c=n("f0c5"),u=Object(c["a"])(e["default"],a["b"],a["c"],!1,null,"2882b389",null,!1,a["a"],o);i["default"]=u.exports},3617:function(t,i,n){"use strict";(function(t,i){var a=n("4ea4");n("f93b");a(n("66fd"));var e=a(n("154d"));t.__webpack_require_UNI_MP_PLUGIN__=n,i(e.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},4112: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(this.i18n.Nofurtherdata)},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("543d")["default"])},4927:function(t,i,n){"use strict";var a=n("fdda"),e=n.n(a);e.a},7211:function(t,i,n){"use strict";n.r(i);var a=n("4112"),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},"9c27":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,"b6bd"))},uIcon:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-icon/u-icon")]).then(n.bind(null,"01eb"))},uTabs:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-tabs/u-tabs")]).then(n.bind(null,"5506"))}},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=[]},fdda:function(t,i,n){}},[["3617","common/runtime","common/vendor"]]]);