(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/page-component/app-ad/app-ad"],{"28a9":function(t,n,e){"use strict";var i;e.d(n,"b",(function(){return o})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return i}));var o=function(){var t=this,n=t.$createElement;t._self._c},a=[]},"2de8":function(t,n,e){"use strict";e.r(n);var i=e("28a9"),o=e("c20d");for(var a in o)"default"!==a&&function(t){e.d(n,t,(function(){return o[t]}))}(a);e("8836");var d,r=e("f0c5"),c=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,"b01a8b4a",null,!1,i["a"],d);n["default"]=c.exports},"4a7c":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e={name:"app-ad",props:{type:String,unitId:String,picUrl:String,videoUrl:String,theme:{type:String,default:function(){return"white"}},couponUrl:String,couponParams:Object},data:function(){return{rewardedVideoAd:null,interstitialAd:null}},created:function(){this.init()},methods:{onAdLoad:function(){},onAdPlay:function(){},onAdClose:function(){},onAdError:function(){},init:function(){switch(this.type){case"rewarded-video":this.initRewardedVideoAd();break;case"interstitial":this.initInterstitialAd();break;default:break}},initRewardedVideoAd:function(){var t=this;wx.createRewardedVideoAd&&(this.rewardedVideoAd=wx.createRewardedVideoAd({adUnitId:this.unitId}),this.rewardedVideoAd.onClose((function(n){n&&n.isEnded&&t.getUserCoupon()})))},initInterstitialAd:function(){wx.createInterstitialAd&&(this.interstitialAd=wx.createInterstitialAd({adUnitId:this.unitId}))},showRewardedVideoAd:function(){var n=this;this.rewardedVideoAd.show().catch((function(){n.rewardedVideoAd.load().then((function(){return n.rewardedVideoAd.show()})).catch((function(n){t.showToast({title:n.errMsg,icon:"none"})}))}))},showInterstitialAd:function(){this.interstitialAd.show().catch((function(n){t.showToast({title:n.errMsg,icon:"none"})}))},getUserCoupon:function(){var n=this;this.$request({url:this.couponUrl,method:"POST",data:Object.assign({},this.couponParams)}).then((function(e){0===e.code?n.$store.dispatch("page/actionSetCoupon",{list:e.data.list,type:"award"}):t.showToast({title:e.msg,icon:"none"})}))}}};n.default=e}).call(this,e("543d")["default"])},8836:function(t,n,e){"use strict";var i=e("bb6f"),o=e.n(i);o.a},bb6f:function(t,n,e){},c20d:function(t,n,e){"use strict";e.r(n);var i=e("4a7c"),o=e.n(i);for(var a in i)"default"!==a&&function(t){e.d(n,t,(function(){return i[t]}))}(a);n["default"]=o.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/page-component/app-ad/app-ad-create-component',
    {
        'components/page-component/app-ad/app-ad-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('543d')['createComponent'](__webpack_require__("2de8"))
        })
    },
    [['components/page-component/app-ad/app-ad-create-component']]
]);
