(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/page-component/goods/app-goods-quick-share"],{"0c62":function(e,t,i){"use strict";var n,o=function(){var e=this,t=e.$createElement;e._self._c},a=[];i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return n}))},"20ef3":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("4de6"))}.bind(null,i)).catch(i.oe)},o={name:"app-goods-quick-share",components:{appGoodsPreviewPoster:n},props:{goods:Object,value:{type:Boolean,default:function(){return!1}}},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 n=this,o=e.createSelectorQuery().in(n);o.select("#opacity-hide").boundingClientRect((function(t){var i=e.createSelectorQuery().in(n);i.select("#all_hide_text_0").boundingClientRect((function(e){n.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(){this.posterUrl=this.$api.quick_share.poster+"&goods_id="+this.goods.id,this.posterShow=!0},batchCopy:function(){this.copyText(),this.saveImage(!0)},copyText:function(){e.setClipboardData({data:this.goods.extra_quick_share.share_text,success:function(){}})},saveImage:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this;if(!i.goods.extra_quick_share.share_pic)return"";e.showLoading({title:"图片保存中"}),i.$request({url:i.$api.quick_share.poster_list,data:{goods_id:i.goods.id}}).then((function(n){if(0===n.code){var o=i.goods.extra_quick_share.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:"保存成功"})},a=function(){i.friendModel=!0,setTimeout((function(){i.friendModel=!1}),1500)};t?a():o()}))}})).catch((function(t){e.hideLoading()}))},shareCard:function(){var e=this.goods,t=e.app_share_title?e.app_share_title:e.extra_quick_share.share_text,i="";e.extra_quick_share.share_pic[0].pic_url&&(i=e.extra_quick_share.share_pic[0].pic_url),e.app_share_pic&&(i=e.app_share_pic),this.$emit("quickShare",{title:t,imageUrl:i,path:0===e.id?"/pages/index/index":"/pages/goods/goods",params:0===e.id?{}:{id:e.id}})},previewImage:function(t){if(!this.goods.extra_quick_share.share_pic)return"";var i=this.goods.extra_quick_share.share_pic.map((function(e){return e.pic_url}));e.previewImage({urls:i,current:t})}}};t.default=o}).call(this,i("543d")["default"])},"6d12":function(e,t,i){"use strict";i.r(t);var n=i("0c62"),o=i("cec3");for(var a in o)"default"!==a&&function(e){i.d(t,e,(function(){return o[e]}))}(a);i("d6d2");var r,s=i("f0c5"),c=Object(s["a"])(o["default"],n["b"],n["c"],!1,null,"2a65ef1d",null,!1,n["a"],r);t["default"]=c.exports},a70d:function(e,t,i){},cec3:function(e,t,i){"use strict";i.r(t);var n=i("20ef3"),o=i.n(n);for(var a in n)"default"!==a&&function(e){i.d(t,e,(function(){return n[e]}))}(a);t["default"]=o.a},d6d2:function(e,t,i){"use strict";var n=i("a70d"),o=i.n(n);o.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/page-component/goods/app-goods-quick-share-create-component',
    {
        'components/page-component/goods/app-goods-quick-share-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('543d')['createComponent'](__webpack_require__("6d12"))
        })
    },
    [['components/page-component/goods/app-goods-quick-share-create-component']]
]);
