(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/gift/share/share"],{"0d64":function(t,e,n){"use strict";n.r(e);var i=n("b0c7"),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},"9c85":function(t,e,n){"use strict";(function(t){n("2d0a");i(n("66fd"));var e=i(n("c673"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},ad02:function(t,e,n){"use strict";var i=n("b654"),r=n.n(i);r.a},b0c7:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=o(n("a34a")),r=n("2f62");function o(t){return t&&t.__esModule?t:{default:t}}function a(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 c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e,n,i,r,o,a){try{var c=t[o](a),u=c.value}catch(s){return void n(s)}c.done?e(u):Promise.resolve(u).then(i,r)}function f(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){s(o,i,r,a,c,"next",t)}function c(t){s(o,i,r,a,c,"throw",t)}a(void 0)}))}}var d=function(){n.e("plugins/gift/components/announcement/share-gift-text").then(function(){return resolve(n("53ee"))}.bind(null,n)).catch(n.oe)},l=function(){n.e("plugins/gift/components/share/gift-content").then(function(){return resolve(n("2c1e"))}.bind(null,n)).catch(n.oe)},p=function(){n.e("components/page-component/app-share-qr-code-poster/app-share-qr-code-poster").then(function(){return resolve(n("c169"))}.bind(null,n)).catch(n.oe)},h={name:"share",data:function(){return{gift_id:-1,gift_detail:{},share:!1,url:"",loading:!1,is_play:!1,innerAudioContext:""}},onLoad:function(e){if(this.$commonLoad.onload(e),JSON.parse(e.pay_data).gift_id){this.gift_id=JSON.parse(e.pay_data).gift_id,this.request(JSON.parse(e.pay_data).gift_id),this.$storage.removeStorageSync("GIFT_CART");var n=this;this.innerAudioContext=t.createInnerAudioContext(),this.innerAudioContext.autoplay=!0,this.innerAudioContext.onEnded((function(t){n.is_play=!1}))}else t.redirectTo({url:"/plugins/gift/index/index"})},onShareAppMessage:function(){return this.hShareAppMessage()},methods:{hShareAppMessage:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.$shareAppMessage({path:"/plugins/gift/index/index",imageUrl:0===this.gift_detail.is_big_gift?this.gift_detail.list.sendOrder[0].detail[0].goods.goodsWarehouse.cover_pic:this.big_gift_pic,params:{gift_id:this.gift_id},title:this.gift_detail.list.bless_word},t)},request:function(e){var n=this;return f(i.default.mark((function r(){var o;return i.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return n.$utils.showLoading(),i.next=3,n.$request({url:n.$api.gift.gift,method:"get",data:{gift_id:e}});case 3:o=i.sent,n.$utils.hideLoading(),0===o.code?(n.url="".concat(n.$api.gift.poster,"&gift_id=").concat(e),n.gift_detail=o.data,n.loading=!0):t.showModal({title:"提示",content:o.msg});case 6:case"end":return i.stop()}}),r)})))()},setShare:function(){this.share=!0},play:function(t,e){this.is_play=t,t?(this.innerAudioContext.src=e,this.innerAudioContext.play()):this.innerAudioContext.stop()}},computed:c({},(0,r.mapState)("gift",{theme:function(t){return t.theme},big_gift_pic:function(t){return t.big_gift_pic}})),onHide:function(){this.is_play=!1,this.innerAudioContext.stop()},components:{"share-gift-text":d,"gift-content":l,"app-share-qr-code-poster":p}};e.default=h}).call(this,n("543d")["default"])},b654:function(t,e,n){},c673:function(t,e,n){"use strict";n.r(e);var i=n("c9d8"),r=n("0d64");for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);n("ad02");var a,c=n("f0c5"),u=Object(c["a"])(r["default"],i["b"],i["c"],!1,null,"daec6756",null,!1,i["a"],a);e["default"]=u.exports},c9d8:function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i}));var r=function(){var t=this,e=t.$createElement;t._self._c},o=[]}},[["9c85","common/runtime","common/vendor"]]]);