(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/page-component/goods/bd-quick-share"],{"132b":function(e,t,i){"use strict";i.r(t);var a=i("e102"),n=i("b007");for(var r in n)"default"!==r&&function(e){i.d(t,e,(function(){return n[e]}))}(r);i("9b77");var o,c=i("f0c5"),s=Object(c["a"])(n["default"],a["b"],a["c"],!1,null,"62099c85",null,!1,a["a"],o);t["default"]=s.exports},9794:function(e,t,i){},"9b77":function(e,t,i){"use strict";var a=i("9794"),n=i.n(a);n.a},b007:function(e,t,i){"use strict";i.r(t);var a=i("e8b3"),n=i.n(a);for(var r in a)"default"!==r&&function(e){i.d(t,e,(function(){return a[e]}))}(r);t["default"]=n.a},e102:function(e,t,i){"use strict";var a;i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){return a}));var n=function(){var e=this,t=e.$createElement;e._self._c},r=[]},e8b3:function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(){i.e("components/page-component/goods/app-goods-preview-poster").then(function(){return resolve(i("908b"))}.bind(null,i)).catch(i.oe)},n={name:"bd-quick-share",components:{appGoodsPreviewPoster:a},props:{value:{type:Boolean,default:function(){return!1}},goodsId:Number,extraQuickShare:Object,appSharePic:String,appShareTitle:String},data:function(){return{friendModel:!1,posterUrl:"",is_all_btn:!1,is_limit:!0,shareData:null,posterShow:!1}},watch:{value:function(t,i){if(t){var a=this,n=e.createSelectorQuery().in(a);n.select("#opacity-hide").boundingClientRect((function(t){var i=e.createSelectorQuery().in(a);i.select("#all_hide_text_0").boundingClientRect((function(e){a.is_all_btn=e.height+1>=t.height})).exec()})).exec()}}},methods:{showText:function(){this.is_limit=!this.is_limit},close:function(){this.$emit("input",!1),this.posterShow=!1},open:function(){var t=this.$api.quick_share.poster_config+"&goods_id="+this.goodsId,i=this.$api.quick_share.poster_generate+"&goods_id="+this.goodsId;e.navigateTo({url:"/pages/poster/goods?poster_config=".concat(escape(t),"&poster_generate=").concat(escape(i))})},batchCopy:function(){this.copyText(),this.saveImage(!0)},copyText:function(){e.setClipboardData({data:this.extraQuickShare.share_text,success:function(){}})},saveImage:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this;if(!i.extraQuickShare.share_pic)return"";e.showLoading({title:"图片保存中"}),i.$request({url:i.$api.quick_share.poster_list,data:{goods_id:i.goodsId}}).then((function(a){if(0===a.code){var n=i.extraQuickShare.share_pic.map((function(e){return e.pic_url}));n.splice(-1,1,a.data.pic_url),i.$utils.batchSave(n,"image").then((function(a){var n=function(){e.showToast({title:"保存成功"})},r=function(){i.friendModel=!0,setTimeout((function(){i.friendModel=!1}),1500)};t?r():n()}))}})).catch((function(t){e.hideLoading()}))},shareCard:function(){var e=this.appShareTitle?this.appShareTitle:this.extraQuickShare.share_text,t="";this.extraQuickShare.share_pic[0].pic_url&&(t=this.extraQuickShare.share_pic[0].pic_url),this.appSharePic&&(t=this.appSharePic),this.$emit("quickShare",{title:e,imageUrl:t,path:0===this.goodsId?"/pages/index/index":"/pages/goods/goods",params:0===this.goodsId?{}:{id:this.goodsId}})},previewImage:function(t){if(!this.extraQuickShare.share_pic)return"";var i=this.extraQuickShare.share_pic.map((function(e){return e.pic_url}));e.previewImage({urls:i,current:t})}}};t.default=n}).call(this,i("543d")["default"])}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/page-component/goods/bd-quick-share-create-component',
    {
        'components/page-component/goods/bd-quick-share-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('543d')['createComponent'](__webpack_require__("132b"))
        })
    },
    [['components/page-component/goods/bd-quick-share-create-component']]
]);
