(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/page-component/goods/bd-quick-share"],{1429:function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){return n}));var o=function(){var e=this,t=e.$createElement;e._self._c},r=[]},"15a5":function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){i.e("components/page-component/goods/app-goods-preview-poster").then(function(){return resolve(i("948c"))}.bind(null,i)).catch(i.oe)},o=function(){Promise.all([i.e("common/vendor"),i.e("components/page-component/app-share-video-number/app-share-video-number")]).then(function(){return resolve(i("307f"))}.bind(null,i)).catch(i.oe)},r={name:"bd-quick-share",components:{appGoodsPreviewPoster:n,appShareVideoNumber:o},props:{value:{type:Boolean,default:function(){return!1}},goodsId:{type:[Number,String]},extraQuickShare:{type:Object,required:!1},isVideoNumber:{type:Boolean,default:function(){return!1}},appSharePic:String,appShareTitle:String},data:function(){return{friendModel:!1,posterUrl:"",is_all_btn:!1,is_limit:!0,shareData:null,posterShow:!1,isShowVideoNumber:!1}},watch:{value:function(t,i){var n=this;t&&setTimeout((function(){var t=n,i=e.createSelectorQuery().in(t);i.select("#opacity-hide").boundingClientRect((function(i){var n=e.createSelectorQuery().in(t);n.select("#all_hide_text_0").boundingClientRect((function(e){t.is_all_btn=e.height+1>=i.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,i=this.$api.quick_share.poster_config+"&goods_id="+this.goodsId,n=this.$api.quick_share.poster_generate+"&goods_id="+this.goodsId;t="/pages/poster/goods?poster_config=".concat(escape(i),"&poster_generate=").concat(escape(n)),e.navigateTo({url:t})},batchCopy:function(){this.copyText(),this.saveImage(!0)},copyText:function(){this.$utils.uniCopy({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(n){if(0===n.code){var o=i.extraQuickShare.share_pic.map((function(e){return e.pic_url}));o.splice(-1,1,n.data.pic_url),i.$utils.batchSave(o,"image").then((function(n){var o=function(){e.showToast({title:"保存成功"})},r=function(){i.friendModel=!0,setTimeout((function(){i.friendModel=!1}),1500)};t?r():o()}))}})).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})},closeVideoNumber:function(){this.isShowVideoNumber=!1},videoNumber:function(){this.isShowVideoNumber=!0}}};t.default=r}).call(this,i("543d")["default"])},"6bba3":function(e,t,i){"use strict";var n=i("7678"),o=i.n(n);o.a},7678:function(e,t,i){},"8e23":function(e,t,i){"use strict";i.r(t);var n=i("1429"),o=i("d8b2");for(var r in o)"default"!==r&&function(e){i.d(t,e,(function(){return o[e]}))}(r);i("6bba3");var a,c=i("f0c5"),s=Object(c["a"])(o["default"],n["b"],n["c"],!1,null,"5f657fc7",null,!1,n["a"],a);t["default"]=s.exports},d8b2:function(e,t,i){"use strict";i.r(t);var n=i("15a5"),o=i.n(n);for(var r in n)"default"!==r&&function(e){i.d(t,e,(function(){return n[e]}))}(r);t["default"]=o.a}}]);
;(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__("8e23"))
        })
    },
    [['components/page-component/goods/bd-quick-share-create-component']]
]);
