(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/page-component/app-exclusive-coupon/app-exclusive-coupon"],{2929:function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){return n}));var o=function(){var e=this,t=e.$createElement;e._self._c},r=[]},8536:function(e,t,i){"use strict";i.r(t);var n=i("869d"),o=i.n(n);for(var r in n)"default"!==r&&function(e){i.d(t,e,(function(){return n[e]}))}(r);t["default"]=o.a},"869d":function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={name:"app-exclusive-coupon",props:{receiveBg:{type:String,default:function(){return""},required:!1},list:{type:Array,default:function(){return[]},required:!1},textColor:{type:String,default:function(){return"#ffffff"},required:!1},unclaimedBg:{type:String,default:function(){return""},required:!1},index:{type:Number,required:!1},sign:{type:String,required:!1},showTop:{type:Boolean,default:function(){return!0},required:!1},noneColor:{type:Boolean,default:function(){return!1},required:!1},background:{type:String,required:!1},page_id:{type:Number,required:!1},is_required:{type:Boolean,required:!1},coupon_req:{type:Boolean,required:!1}},data:function(){return{coupon_list:[],tempList:[]}},computed:{receiveTip:function(){var e="立即领取";return"integral-mall"===this.sign&&(e="立即兑换"),e}},methods:{receive:function(t){var i=this,n=this.coupon_list;if("integral-mall"!==this.sign){if(1==n[t].is_receive)return e.showToast({mask:!0,title:"已领取",icon:"none"}),!0;e.showLoading({mask:!0,title:"领取中"}),this.$request({url:this.$api.coupon.receive,data:{coupon_id:n[t].id}}).then((function(o){if(e.hideLoading(),0===o.code){0==o.data.rest&&(o.data.is_receive=1),i.coupon_list[t]=Object.assign(n[t],o.data);var r=i.$storage.getStorageSync("INDEX_MALL");r.home_pages[i.index].list=i.coupon_list,i.$storage.setStorageSync("INDEX_MALL",r),i.$store.dispatch("page/actionSetCoupon",{list:[i.coupon_list[t]],type:"receive"})}else e.showModal({title:"提示",content:o.msg,showCancel:!1})})).catch((function(){e.hideLoading()}))}else this.$jump({url:n[t].page_url,open_type:"navigate"})},loadData:function(){var e=this;this.$request({url:this.$api.index.extra,data:{type:"mall",key:"coupon",page_id:this.page_id,index:this.index}}).then((function(t){if(e.coupon_list=t.data,0===e.page_id){var i=e.$storage.getStorageSync("INDEX_MALL");i.home_pages[e.index].list=t.data,e.$storage.setStorageSync("INDEX_MALL",i)}}))},cloneData:function(e){return JSON.parse(JSON.stringify(e))},splitData:function(){var e=this;if(this.tempList.length){var t=this.tempList[0];this.coupon_list.push(t),this.tempList.splice(0,1),this.tempList.length&&setTimeout((function(){e.splitData()}),300)}},route:function(){e.navigateTo({url:"/pages/coupon/list/list"})}},mounted:function(){if(this.coupon_req)this.coupon_list=this.list;else if(this.is_required)this.loadData();else{var e=this.$storage.getStorageSync("INDEX_MALL");this.coupon_list=e.home_pages[this.index].list}}};t.default=i}).call(this,i("543d")["default"])},aa2d:function(e,t,i){"use strict";var n=i("c6e5"),o=i.n(n);o.a},c6e5:function(e,t,i){},efac:function(e,t,i){"use strict";i.r(t);var n=i("2929"),o=i("8536");for(var r in o)"default"!==r&&function(e){i.d(t,e,(function(){return o[e]}))}(r);i("aa2d");var a,u=i("f0c5"),s=Object(u["a"])(o["default"],n["b"],n["c"],!1,null,"331c1e7e",null,!1,n["a"],a);t["default"]=s.exports}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/page-component/app-exclusive-coupon/app-exclusive-coupon-create-component',
    {
        'components/page-component/app-exclusive-coupon/app-exclusive-coupon-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('543d')['createComponent'](__webpack_require__("efac"))
        })
    },
    [['components/page-component/app-exclusive-coupon/app-exclusive-coupon-create-component']]
]);
