(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/gift/components/index/get-right-now"],{"32e2":function(t,e,n){"use strict";var i=n("9d0a"),r=n.n(i);r.a},5395:function(t,e,n){"use strict";n.r(e);var i=n("ae62"),r=n("fdbb");for(var u in r)"default"!==u&&function(t){n.d(e,t,(function(){return r[t]}))}(u);n("32e2");var o,a=n("f0c5"),c=Object(a["a"])(r["default"],i["b"],i["c"],!1,null,"8d8815e6",null,!1,i["a"],o);e["default"]=c.exports},"9d0a":function(t,e,n){},ae62:function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return i}));var r=function(){var t=this,e=t.$createElement,n=(t._self._c,Number(t.background.top)),i=Number(t.background.left);t._isMounted||(t.e0=function(e){t.is_text=!0}),t.$mp.data=Object.assign({},{$root:{m0:n,m1:i}})},u=[]},fa95:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n("a34a"));function r(t){return t&&t.__esModule?t:{default:t}}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e,n,i,r,u,o){try{var a=t[u](o),c=a.value}catch(s){return void n(s)}a.done?e(c):Promise.resolve(c).then(i,r)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var u=t.apply(e,n);function o(t){c(u,i,r,o,a,"next",t)}function a(t){c(u,i,r,o,a,"throw",t)}o(void 0)}))}}var f={name:"figure-rule",data:function(){return{is_text:!1}},props:["theme","gift_id","turn_no","background","bless_word","nickname","avatar","type","template_message","bless_music","music_play"],methods:{setGift:function(){this.$emit("setGift",!1)},submit:function(){var e=this;return s(i.default.mark((function n(){var r,u,o;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t.showLoading({title:"获取中"}),!e.turn_no){n.next=9;break}return n.next=4,e.$request({url:e.$api.gift.get_turn,method:"get",data:{turn_no:e.turn_no}});case 4:r=n.sent,0===r.code?(u=e,t.navigateTo({url:"/plugins/gift/receive/receive?gift_id=".concat(e.gift_id,"&status=1"),success:function(){u.setGift()}})):(t.showModal({title:"提示",content:r.msg}),e.setGift()),t.hideLoading(),n.next=13;break;case 9:return n.next=11,e.$request({url:e.$api.gift.join,method:"get",data:{gift_id:e.gift_id}});case 11:o=n.sent,0===o.code?e.loopAcquisition(o.data):(t.showModal({title:"提示",content:o.msg}),e.setGift());case 13:case"end":return n.stop()}}),n)})))()},receiveGift:function(){var t=this;return s(i.default.mark((function e(){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:"direct_open"!==t.type?t.$subscribe(t.template_message).then((function(){t.submit()})).catch((function(){t.submit()})):t.submit();case 1:case"end":return e.stop()}}),e)})))()},loopAcquisition:function(e){var n=this;this.$request({url:this.$api.gift.join_status,data:o(o({},e),{},{gift_id:this.gift_id}),method:"get"}).then((function(i){if(0===i.code){if(i.data.hasOwnProperty("list")){t.hideLoading();var r=n;return t.navigateTo({url:"/plugins/gift/receive/receive?gift_id=".concat(n.gift_id,"&status=1"),success:function(){r.setGift()}}),i.data}setTimeout((function(){n.loopAcquisition(e)}),1e3)}else if(1===i.code){t.hideLoading();var u=2;u="direct_open"===n.type?2:3,t.navigateTo({url:"/plugins/gift/receive/receive?gift_id=".concat(n.gift_id,"&status=").concat(u)}),n.setGift()}}))},play:function(){this.music_play?this.$emit("music",!1):this.$emit("music",!0,this.bless_music)}}};e.default=f}).call(this,n("543d")["default"])},fdbb:function(t,e,n){"use strict";n.r(e);var i=n("fa95"),r=n.n(i);for(var u in i)"default"!==u&&function(t){n.d(e,t,(function(){return i[t]}))}(u);e["default"]=r.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'plugins/gift/components/index/get-right-now-create-component',
    {
        'plugins/gift/components/index/get-right-now-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('543d')['createComponent'](__webpack_require__("5395"))
        })
    },
    [['plugins/gift/components/index/get-right-now-create-component']]
]);
