(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/gift/components/index/get-right-now"],{"1aed":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n("4795"));function r(t){return t&&t.__esModule?t:{default:t}}function o(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 u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e,n,i,r,o,u){try{var c=t[o](u),a=c.value}catch(s){return void n(s)}c.done?e(a):Promise.resolve(a).then(i,r)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function u(t){a(o,i,r,u,c,"next",t)}function c(t){a(o,i,r,u,c,"throw",t)}u(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,o,u;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?(o=e,t.navigateTo({url:"/plugins/gift/receive/receive?gift_id=".concat(e.gift_id,"&status=1"),success:function(){o.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:u=n.sent,0===u.code?e.loopAcquisition(u.data):(t.showModal({title:"提示",content:u.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:u({},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 o=2;o="direct_open"===n.type?2:3,t.navigateTo({url:"/plugins/gift/receive/receive?gift_id=".concat(n.gift_id,"&status=").concat(o)}),n.setGift()}}))},play:function(){this.music_play?this.$emit("music",!1):this.$emit("music",!0,this.bless_music)}},watch:{navBool:{handler:function(t){console.log(t)},immediate:!0}}};e.default=f}).call(this,n("543d")["default"])},"3d5f":function(t,e,n){"use strict";n.r(e);var i=n("1aed"),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=r.a},"4d36":function(t,e,n){},"5ed0":function(t,e,n){"use strict";var i=n("4d36"),r=n.n(i);r.a},c2aa:function(t,e,n){"use strict";var i,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}})},o=[];n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i}))},c45d:function(t,e,n){"use strict";n.r(e);var i=n("c2aa"),r=n("3d5f");for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);n("5ed0");var u,c=n("f0c5"),a=Object(c["a"])(r["default"],i["b"],i["c"],!1,null,"ffe8d5e4",null,!1,i["a"],u);e["default"]=a.exports}}]);
;(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__("c45d"))
        })
    },
    [['plugins/gift/components/index/get-right-now-create-component']]
]);
