(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{1500:function(e,t,a){e.exports={phone:"screen and (max-width: 500px), screen and (max-height: 500px)",phoneLandscape:"screen and (max-height: 500px) and (orientation: landscape)",phonePortrait:"screen and (max-width: 500px) and (orientation: portrait)",shareBox:"mIUyNy4Euw4AMXl-U8nAv",header:"G07nCYGOH7TYQ10Um1zV0",title:"_1-eoTFSrZ7x67ImKdJYXos",eventDesc:"_2ND8U4onvJ30uFtQOXBI1B",top:"_2Usp0bKEWqjgtXsiA-LA4g",wechatShare:"_20uldfy-N8FqJW9cssHUxT",wechatShareImg:"_1ldL6DwQp3q8gXQXnC5MKU",separator:"_3mX41_kGRXNG82UeGRDNFn",webShare:"_114cst31FN_T4QDyIEiIG8",webShareIconContainer:"_2h4nKCvqZ-zMfkjU55YCz2",webShareIcon:"J_G3dwbLOd7PHAfbdx3-v",webShareDesc:"_2B6HVaRsjKqHQiLIP7nP_6",bottom:"jp8xD8TJrCn9q7vhM278O",shareUrlNotice:"PI7CQS6TGu4uyQDnek1k5",urlContainer:"_2kuPb923swUG6rfx7-tyjv",url:"_62VIxRJDby0fHryENXkZm",copyBtn:"_14Ob2i1VVouGzw6BJE1jQ",closeIcon:"_2rFhMaPgHpl2uIksu9TAE-"}},989:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return E}));var r=a(1),s=a(506),o=a.n(s),n=a(2),c=(e=>(e[e.QQ=1]="QQ",e[e.QZone=2]="QZone",e[e.Weibo=3]="Weibo",e[e.Tieba=4]="Tieba",e))(c||{});var i=a(19),l=a(24),m=a(62),p=a(51),h=a(104);const d=JSON.parse('{"copy_link":"QmTKN5eAzKJyx71wQtrS1Xm3j5TKFTFyh7S2194uQijW4C.png","gift":"QmbH6fjjm4U7q92TG6RSdJRhijQ59FcGSkePzro3b1LHhX.png","random_gift":"QmZrr7hzPDbWbw6rsjP1JnDChf67w29xw9ciPDS7AvnJVs.png","scroll_left":"QmTRnyK9EbKmhQMe84AFrHTk2Tg9N9H87RuwcCPbjpwt25.png","scroll_right":"Qme5c5J7RAA5nz3jFbUqXR9NeH3r2XsvdpUv8pWM7rpc6S.png"}');var u=Object.defineProperty,w=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,f=(e,t,a)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;const N=a(1500);class E extends r.Component{constructor(e){super(e),this.copyUrl=e=>{e.preventDefault(),e.stopPropagation(),this._ref&&(this._ref.select(),document.execCommand("copy"),this.reporter({share_method:"复制链接"}),i.a.success(Object(n.e)("copySuccess")))},this.reporter=e=>{var t,a,r,s;if(this.props.id&&this.props.id>0){(new m.a).workShare(((e,t)=>{for(var a in t||(t={}))b.call(t,a)&&f(e,a,t[a]);if(w)for(var a of w(t))v.call(t,a)&&f(e,a,t[a]);return e})({platform:(null==(t=this.props)?void 0:t.platform)||"",fail_reason:"",work_type:(null==(a=this.props)?void 0:a.workType)||"",work_name:(null==(r=this.props)?void 0:r.workName)||"",work_ID:""+((null==(s=this.props)?void 0:s.id)||""),triggered_from:this.props.fromGame?m.b.ACTIVITY:m.b.DESCRIPTION_PAGE},e))}},this.state={qrcodeBase64:""}}componentDidMount(){const e=o.a(0,"L");e.addData(this.props.url),e.make(),this.setState({qrcodeBase64:e.createDataURL()})}shareToPlatform(e){this.reporter({share_method:e}),function(e){switch(e.platform){case 1:window.open(`http://connect.qq.com/widget/shareqq/index.html?url=${encodeURIComponent(e.url)}&sharesource=qzone&title=${e.title}&pics=${encodeURIComponent(e.image)}&summary=${e.desc}&desc=${e.desc}`);break;case 2:window.open(`https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=${encodeURIComponent(e.url)}&site=site&title=${e.title}&pics=${encodeURIComponent(e.image)}&desc=${e.desc}&summary=${e.desc}`);break;case 3:window.open(`http://service.weibo.com/share/share.php?url=${encodeURIComponent(e.url)}&sharesource=weibo&title=${e.title}${e.desc}&pic=${encodeURIComponent(e.image)}`);break;case 4:window.open(`http://tieba.baidu.com/f/commit/share/openShareApi?title=${e.title}&desc=${e.desc}&comment=&url=${encodeURIComponent(e.url)}?entry=tieba`);break;default:;}}({platform:e,title:this.props.title,url:this.props.url,image:this.props.image,desc:this.props.desc})}render(){return r.createElement("div",{className:N.shareBox},this.props.fromGame&&r.createElement("div",{className:N.header},r.createElement("div",{className:N.title},"分享作品"),r.createElement(l.a,{icon:"close",size:24,onClick:()=>this.props.onClose&&this.props.onClose(!1),style:{color:"rgba(0, 0, 0, 0.4)"},className:N.closeIcon})),this.props.fromGame&&r.createElement("div",{className:N.eventDesc},"扫描二维码后点击右上角 ··· 分享,好友进入您分享的页面,您即可获得对应奖励哦~"),r.createElement("div",{className:N.top},r.createElement("div",{className:N.wechatShare},r.createElement("div",{className:N.wechatShareImg},r.createElement("img",{src:this.state.qrcodeBase64,alt:""})),r.createElement("div",{className:N.wechatShareNotice},Object(n.e)("wechatShare"))),r.createElement("div",{className:N.separator}),r.createElement("div",{className:N.webShare},r.createElement("div",{className:N.webShareIconContainer},r.createElement("div",{className:N.webShareIcon},r.createElement(p.c,{hash:h.a.qzone,width:40,height:40,onClick:()=>this.shareToPlatform(c.QZone)}),r.createElement("div",{className:N.webShareDesc},"QQ空间")),r.createElement("div",{className:N.webShareIcon},r.createElement(l.a,{icon:"qq",size:40,onClick:()=>this.shareToPlatform(c.QQ),className:"rounded-full"}),r.createElement("div",{className:N.webShareDesc},"QQ")),r.createElement("div",{className:N.webShareIcon},r.createElement(l.a,{icon:"weibo",size:40,onClick:()=>this.shareToPlatform(c.Weibo),className:"rounded-full"}),r.createElement("div",{className:N.webShareDesc},Object(n.e)("weibo")))))),r.createElement("div",{className:N.bottom},r.createElement("div",{className:N.shareUrl},r.createElement("div",{className:N.shareUrlNotice},Object(n.e)("shareUrl")),r.createElement("div",{className:N.urlContainer},r.createElement("input",{className:N.url,value:this.props.url,readOnly:!0,ref:e=>{e&&(this._ref=e)}}),r.createElement(p.c,{hash:d.copy_link,width:40,height:40,onClick:this.copyUrl})))))}}}}]);