require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/coupon_goods_list/index"],{"0a2a":function(e,t,o){"use strict";(function(e,t){var n=o("47a9");o("1d3c");n(o("3240"));var i=n(o("77c9"));e.__webpack_require_UNI_MP_PLUGIN__=o,t(i.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},"25ee":function(e,t,o){"use strict";var n=o("a610"),i=o.n(n);i.a},"48da":function(e,t,o){"use strict";o.d(t,"b",(function(){return i})),o.d(t,"c",(function(){return r})),o.d(t,"a",(function(){return n}));var n={WaterfallsFlow:function(){return Promise.all([o.e("common/vendor"),o.e("components/WaterfallsFlow/WaterfallsFlow")]).then(o.bind(null,"7fbb"))},WaterfallsFlowItem:function(){return Promise.all([o.e("common/vendor"),o.e("components/WaterfallsFlowItem/WaterfallsFlowItem")]).then(o.bind(null,"6d02"))}},i=function(){var e=this,t=e.$createElement,o=(e._self._c,e.productList.length),n=o>0?e.productList.length>0&&e.is_switch:null,i=e.productList.length,r=0==e.productList.length&&e.isShow&&e.where.page>1&&1===e.tabIndex&&!e.loading;e.$mp.data=Object.assign({},{$root:{g0:o,g1:n,g2:i,g3:r}})},r=[]},"5ebc":function(e,t,o){"use strict";o.r(t);var n=o("9e76"),i=o.n(n);for(var r in n)["default"].indexOf(r)<0&&function(e){o.d(t,e,(function(){return n[e]}))}(r);t["default"]=i.a},"77c9":function(e,t,o){"use strict";o.r(t);var n=o("48da"),i=o("5ebc");for(var r in i)["default"].indexOf(r)<0&&function(e){o.d(t,e,(function(){return i[e]}))}(r);o("25ee");var a=o("828b"),c=Object(a["a"])(i["default"],n["b"],n["c"],!1,null,"9e6d906c",null,!1,n["a"],void 0);t["default"]=c.exports},"9e76":function(e,t,o){"use strict";(function(e){var n=o("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o("de22"),r=o("953a"),a=o("8f59"),c=(n(o("4d9b")),o("0466")),s=getApp(),l={computed:(0,a.mapGetters)(["uid"]),components:{WaterfallsFlow:function(){Promise.all([o.e("common/vendor"),o.e("components/WaterfallsFlow/WaterfallsFlow")]).then(function(){return resolve(o("7fbb"))}.bind(null,o)).catch(o.oe)},easyLoadimage:function(){Promise.all([o.e("common/vendor"),o.e("components/base/easy-loadimage")]).then(function(){return resolve(o("0dff"))}.bind(null,o)).catch(o.oe)},WaterfallsFlowItem:function(){Promise.all([o.e("common/vendor"),o.e("components/WaterfallsFlowItem/WaterfallsFlowItem")]).then(function(){return resolve(o("6d02"))}.bind(null,o)).catch(o.oe)},productListVertical:function(){Promise.all([o.e("common/vendor"),o.e("pages/goods/components/productListVertical/index")]).then(function(){return resolve(o("dcba"))}.bind(null,o)).catch(o.oe)}},mounted:function(){},data:function(){return{urlDomain:this.$Cache.get("imgHost"),theme:s.globalData.theme,keyword:"",tabIndex:1,productList:[],is_switch:!0,where:{keyword:"",page:1,limit:20,userCouponId:0,couponId:0},loadend:!1,loading:!1,loadTitle:"加载更多",goodScroll:!0,isShow:!1,userCouponId:0,minPrice:0,money:0,isUserReceive:!1,type:""}},onPageScroll:function(t){e.$emit("scroll")},onLoad:function(e){this.$store.dispatch("MerTypeList"),this.type=e.type,this.minPrice=e.minPrice?Number(e.minPrice):0,this.money=e.money?Number(e.money):0,this.isUserReceive=JSON.parse(e.isUserReceive),1==e.type?this.where.couponId=e.userCouponId?Number(e.userCouponId):0:this.where.userCouponId=e.userCouponId?Number(e.userCouponId):0,this.get_product_list()},methods:{goDetail:function(e){(0,c.goProductDetail)(e.id,0,"")},goStore:function(t){e.navigateTo({url:"/pages/merchant/home/index?merId=".concat(t)})},receiveCoupon:function(t){var o=this;(0,r.couponReceiveApi)(this.where.couponId).then((function(t){o.isUserReceive=!0,e.showToast({title:"领取成功",icon:"none"})})).catch((function(t){e.showToast({title:t,icon:"none"})}))},searchSubmit:function(e){this.loadend=!1,this.$set(this,"keyword",e.detail.value||""),this.$set(this.where,"page",1),this.get_product_list(!0)},confirm:function(e){this.loadend=!1},goback:function(){return e.navigateBack({delta:1})},Changswitch:function(){this.is_switch=!this.is_switch},get_product_list:function(e){var t=this,o=this,n=1==this.type?i.getSystemCouponProList:i.getCouponProList;o.loadend||o.loading||(!0===e&&o.$set(o,"productList",[]),o.loading=!0,o.loadTitle="",o.where.keyword=encodeURIComponent(o.keyword),n(o.where).then((function(e){var n=e.data.list,i=o.$util.SplitArray(n,o.productList),r=n.length<o.where.limit;o.loadend=r,o.loading=!1,o.loadTitle=r?"已全部加载":"加载更多",o.$set(o,"productList",i),o.$set(o.where,"page",o.where.page+1),t.isShow=!0})).catch((function(e){o.loading=!1,o.loadTitle="加载更多"})))}},onReachBottom:function(){this.productList.length>0&&this.get_product_list()}};t.default=l}).call(this,o("df3c")["default"])},a610:function(e,t,o){}},[["0a2a","common/runtime","common/vendor"]]]);