2 lines
6.1 KiB
JavaScript
2 lines
6.1 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{2655:function(e,t,n){"use strict";n.r(t);var o=n(14),a=n(15),i=n(16),r=n(17),c=n(9),l=n(2),s=n(1),u=n(3),b=n.n(u),d=n(11),f=n.n(d),p=n(1283),v=n(234),h=n(27),j=n(400),g=n(134),O=n(368),m=n(1024),k=n(97);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(c.a)(e);if(t){var a=Object(c.a)(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return Object(r.a)(this,n)}}var L=function(e){Object(i.a)(n,e);var t=w(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(){var e=this.props,t=e.onClose,n=e.shown,o=e.data,a=e.paging,i=(a=void 0===a?{}:a).isEnd,r=void 0!==i&&i,c=a.isLoading,s=void 0!==c&&c,u=a.totals,b=e.loadAnswerRecognizerList,d=e.answerId;return Object(l.b)(g.b,{size:"fullPage",onClose:t,children:n&&Object(l.c)("div",{className:"RecognizerListModal",children:[Object(l.c)("div",{className:"RecognizerListModal-header",children:["已有 ",u||"-"," 位用户对该回答送出了专业徽章",Object(l.b)("div",{className:"RecognizerListModal-headerDescription",children:"社区内具有专业创作水平的用户可以对其他创作用户送出「专业徽章」,用于认可回答的专业性,以示对其他用户创作专业内容的鼓励"})]}),Object(l.b)(O.b,{isDrained:r,isLoading:s,onLoad:function(){b(d)},children:o.map((function(e){return Object(l.b)(m.a,{className:"UserItem",user:e},e.id)}))})]})})}}]),n}(s.Component);L.propTypes={onClose:b.a.func.isRequired,shown:b.a.bool.isRequired,answerId:b.a.number.isRequired};var y=Object(h.connect)((function(e,t){var n=Object(j.a)(e,t.answerId)||{},o=n.data,a=void 0===o?[]:o,i=n.paging,r=void 0===i?{}:i;return{data:a.map((function(t){return Object(k.c)(e,{urlToken:t})})),paging:r}}),{loadAnswerRecognizerList:j.d})(L),R=n(30),I=n(366),z=n(371),P=n(53),B=function(e){var t=e.data;return Object(l.b)(p.e,{data:Object(s.useMemo)((function(){var e,n;return{name:t.verb,link:t.targetLink,linkText:t.entryVerb,iconUrl:null===(e=t.pictures)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.url}}),[t])})},C=function(e){var t=e.data,n=t.id,o=t.title,a=Object(P.o)(),i="https://www.zhihu.com/zvideo/campaign/".concat(n);return Object(l.b)(I.a,{trackCardShow:!0,view:{id:7726},extra:{button:{text:o},link:{url:i}},children:Object(l.b)(p.e,{data:Object(s.useMemo)((function(){return{name:"视频活动",link:i,linkText:o}}),[i,o]),shouldTrackShow:!0,"data-za-not-track-link":!0,zaText:o,extra:{link:{url:i}},onClick:function(e){R.a.trackEvent(e.target,{id:7727,action:"OpenUrl"},{button:{text:o},link:{url:i}}),a&&(e.preventDefault(),Object(z.e)("zhihu://zvideo/campaign/".concat(n)))}})})};function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(c.a)(e);if(t){var a=Object(c.a)(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return Object(r.a)(this,n)}}var D=function(e){Object(i.a)(n,e);var t=M(n);function n(){var e;Object(o.a)(this,n);for(var a=arguments.length,i=new Array(a),r=0;r<a;r++)i[r]=arguments[r];return(e=t.call.apply(t,[this].concat(i))).state={recognizerListModalShown:!1},e.handlePositiveLabelClick=function(t,n,o){"professional"===o&&e.toggleRecognizerModal()},e.toggleRecognizerModal=function(){e.setState({recognizerListModalShown:!e.state.recognizerListModalShown})},e}return Object(a.a)(n,[{key:"render",value:function(){var e=this.props,t=e.data,n=e.item,o=e.collapseReasonProps,a=e.abnormalDetailProps,i=e.commercialProps,r=e.annotationProps,c=e.editing,s=e.className,u=this.state.recognizerListModalShown,b=this.positiveLabel;return Object(l.c)("div",{className:f()("LabelContainer-wrapper",s),children:[Object(l.b)(p.h,{className:"LabelContainer",answerCollapsed:Boolean(o&&!c)&&Object(l.b)(p.c,Object.assign({},o)),answerAbnormal:Boolean(a&&!c)&&Object(l.b)(p.b,Object.assign({},a)),thanksForInviting:this.thanksForInviting,positive:b,annotation:Boolean(r)&&Object(l.b)(p.a,Object.assign({},r)),commercial:Boolean(i)&&Object(l.b)(p.f,Object.assign({},i)),disclaimer:Boolean(null==t?void 0:t.disclaimerInfo)&&Object(l.b)(p.g,{disclaimerInfo:t.disclaimerInfo}),campaign:this.campaignLabel,bluebook:Boolean(null==t?void 0:t.bluebookInfo)&&Object(l.b)(p.d,{data:t.bluebookInfo})}),Boolean(b)&&Object(l.b)(y,{onClose:this.toggleRecognizerModal,answerId:Number(n.id),shown:u})]})}},{key:"campaignLabel",get:function(){var e=this.props,t=e.data,n=e.item,o=n.type;if("answer"===o){var a,i=null==t||null===(a=t.bannerInfo)||void 0===a?void 0:a[0];if(null==i?void 0:i.verb)return Object(l.b)(B,{data:i})}return"zvideo"===o&&n.campaign?Object(l.b)(C,{data:n.campaign}):null}},{key:"positiveLabel",get:function(){var e,t=this.props,n=t.data,o=t.item;return t.showLegacyPositiveLabel?Object(l.b)(p.i,{}):n?(Boolean(null===(e=n.includedInfos)||void 0===e?void 0:e.length)||n.onlineRoundtable||n.relevantInfo||n.recognitionInfo)&&Object(l.b)(p.j,{isMobile:!1,data:n,onLinkClick:this.handlePositiveLabelClick}):o.isLabeled?Object(l.b)("div",{className:"LabelContainer-placeholder"}):null}},{key:"thanksForInviting",get:function(){var e=this.props,t=e.data,n=e.item.isLabeled,o=e.editing,a=e.commercialProps,i=e.showDeleteButton,r=e.onDelete;return n&&!o&&!a&&(null==t?void 0:t.thankInviterInfo)&&Object(l.b)(p.k,{inviter:t.thankInviterInfo,showDeleteButton:i,onDelete:r})}}]),n}(s.PureComponent);D.propTypes={data:b.a.object,item:b.a.object.isRequired,showLegacyPositiveLabel:b.a.bool,collapseReasonProps:b.a.object,abnormalDetailProps:b.a.object,commercialProps:b.a.object,annotationProps:b.a.object,editing:b.a.bool,showDeleteButton:b.a.bool,inviter:b.a.object,onDelete:b.a.func};t.default=Object(v.a)()(D)}}]);
|
|
//# sourceMappingURL=main.Labels.e2b86cccced5d98f3f01.js.map
|