You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Forums__Detail__id.async.js

2 lines
22 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[508],{51355:function(xe,ee,m){m.d(ee,{Z:function(){return C}});var e=m(59301),w=m(44259),te=m(13879),C=()=>{const[p,B]=(0,e.useState)(""),[F,D]=(0,e.useState)(0);let[M,W]=(0,e.useState)(),[L,I]=(0,e.useState)();const[ce,me]=(0,e.useState)(!1),G=(0,e.useRef)("");(0,e.useEffect)(()=>w.Z.subscribe("preview-image",U=>{B(U),console.log(Z.current),document.body.style.overflow="hidden"}),[]),(0,e.useEffect)(()=>(document.addEventListener("keydown",J),()=>{document.removeEventListener("keydown",J)}),[]),(0,e.useEffect)(()=>{G.current=p},[p]);function J(N){N.keyCode==27&&G.current&&H()}function H(){document.body.style.overflow="auto",W(void 0),I(void 0),D(0),B("")}function _e(){D(F+90)}function he(){M=Z.current.width*1.1,L=Z.current.height*1.1,I(L),W(M)}function ge(){M=Z.current.width/1.1,L=Z.current.height/1.1,I(L),W(M)}const de=(0,e.useRef)(),ne=(0,e.useRef)(),Z=(0,e.useRef)(),le=N=>{(N.nativeEvent.target===de.current||N.nativeEvent.target===ne.current)&&H()};return e.createElement(e.Fragment,null,p?e.createElement("div",null,e.createElement("div",{className:"preview-wrp-group",ref:ne},e.createElement(te.Z,{className:"image-preview",src:p,style:{display:"none"},preview:{visible:!0,src:p,movable:!1,onVisibleChange:N=>{B("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},98107:function(xe,ee,m){m.r(ee),m.d(ee,{default:function(){return ft}});var e=m(59301),w=m(63144),te=m(46961),C=m(95237),p=m(43604),B=m(3113),F={wrap:"wrap___oiJRJ",head:"head___zCLJu",recommendItem:"recommendItem___Z46_0",buttonWrap:"buttonWrap___Gol4S",privateMessage:"privateMessage___UCiuy",flex1:"flex1___FVk7y",mWidth147:"mWidth147___f_pcl"},D=m(15376),M=Object.defineProperty,W=Object.defineProperties,L=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,G=(n,l,t)=>l in n?M(n,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[l]=t,J=(n,l)=>{for(var t in l||(l={}))ce.call(l,t)&&G(n,t,l[t]);if(I)for(var t of I(l))me.call(l,t)&&G(n,t,l[t]);return n},H=(n,l)=>W(n,L(l)),_e=(n,l)=>{var t={};for(var a in n)ce.call(n,a)&&l.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&I)for(var a of I(n))l.indexOf(a)<0&&me.call(n,a)&&(t[a]=n[a]);return t},he=(n,l,t)=>new Promise((a,f)=>{var y=o=>{try{s(t.next(o))}catch(d){f(d)}},v=o=>{try{s(t.throw(o))}catch(d){f(d)}},s=o=>o.done?a(o.value):Promise.resolve(o.value).then(y,v);s((t=t.apply(n,l)).next())});const ge=n=>{var l=n,{user:t,forumsDetail:a,globalSetting:f,loading:y,dispatch:v}=l,s=_e(l,["user","forumsDetail","globalSetting","loading","dispatch"]),o,d,E,_;const{author_info:u,memo:h,recommend_shixuns:r}=a.forumsDetailData||{},x=()=>he(void 0,null,function*(){(u!=null&&u.watched?yield(0,D.Sr)({user_id:u.user_id}):yield(0,D.YP)({user_id:u.user_id}))&&v({type:"forumsDetail/setForumsDetailData",payload:H(J({},a.forumsDetailData),{author_info:H(J({},u),{watched:!(u!=null&&u.watched)})})})});return e.createElement("section",{className:F.wrap},e.createElement("aside",{className:"ml20"},e.createElement("div",{className:`bg-white pt40 pb40 pl20 pr20 ${F.head}`},e.createElement("a",{href:`/users/${u==null?void 0:u.login}`,target:"_blank"},(u==null?void 0:u.image_url)&&e.createElement("img",{src:`${te.Z.API_SERVER}/images/${u==null?void 0:u.image_url}`})),e.createElement("div",{className:"tc font20"},u==null?void 0:u.username),e.createElement("div",{className:"tc c-grey-999"},u==null?void 0:u.identity),((o=t.userInfo)==null?void 0:o.user_id)!==(u==null?void 0:u.user_id)&&e.createElement(C.Z,{justify:"center",className:`mt30 ${F.buttonWrap}`},e.createElement(p.Z,null,e.createElement(B.ZP,{type:"primary",className:"mr10",onClick:x},u!=null&&u.watched?"\u53D6\u6D88\u5173\u6CE8":"\u5173\u6CE8")),e.createElement(p.Z,null,e.createElement(B.ZP,{className:F.privateMessage,href:`/messages/${(d=t.userInfo)==null?void 0:d.login}/message_detail?target_ids=${u==null?void 0:u.user_id}`,target:"_blank"},"\u79C1\u4FE1")))),!!((E=h==null?void 0:h.tag)!=null&&E.length)&&e.createElement("div",{className:"bg-white mt10 pt40 pb40 pl20 pr20"},e.createElement("div",{className:"font16"},"\u8BDD\u9898\u6807\u7B7E"),e.createElement("div",{className:`mt10 ${F.tag}`},(_=h==null?void 0:h.tag)==null?void 0:_.map((g,$)=>e.createElement("span",{key:$,className:"c-light-primary mr10"},g)))),e.createElement("div",{className:"pt10 pb10 pl10 pr10"},e.createElement("div",{className:"font16 mb20"},"\u63A8\u8350\u5B9E\u8BAD"),e.createElement("div",{className:F.recommend},r==null?void 0:r.map(g=>e.createElement("div",{className:F.recommendItem},e.createElement("a",{href:`/shixuns/${g.identifier}/challenges`,target:"_blank"},e.createElement("img",{alt:g.id,src:`${g.image_url}`})),e.createElement("div",{className:`${F.flex1} ml10`},e.createElement("a",{href:`/shixuns/${g.identifier}/challenges`,target:"_blank",title:g.name,className:`${F.mWidth147} multi-llipsis1e c-grey-666 mb10`},g.name),e.createElement("div",{className:"c-grey-999"},g.myshixuns_count," \u4EBA\u5B66\u4E60"))))))))};var de=(0,w.connect)(({user:n,forumsDetail:l,loading:t,globalSetting:a})=>({user:n,forumsDetail:l,globalSetting:a,loading:t.models.forumsDetail}))(ge),ne=m(99232),Z=m.n(ne),le=m(31272),N=m(8591),U=m(43418),Se=m(98135),Q=m(20834),fe=m(66104),Y=m(6848),Be=m(38854),ye=m(94646),Ie=m(20360),V={flex_box_center:"flex_box_center___nMc3G",flex_space_between:"flex_space_between___gTlaF",flex_box_vertical_center:"flex_box_vertical_center___GQv6O",flex_box_center_end:"flex_box_center_end___nrFEP",flex_box_column:"flex_box_column___Ls1oQ",reply:"reply___jb23w",replyList:"replyList___ryiUt",comment:"comment___QJ1eT",content:"content___X2UnY",commentItem:"commentItem___h_wnY"},Re=Object.defineProperty,je=Object.defineProperties,ke=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,be=(n,l,t)=>l in n?Re(n,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[l]=t,Me=(n,l)=>{for(var t in l||(l={}))$e.call(l,t)&&be(n,t,l[t]);if(De)for(var t of De(l))Ae.call(l,t)&&be(n,t,l[t]);return n},Le=(n,l)=>je(n,ke(l)),Ve=(n,l,t)=>new Promise((a,f)=>{var y=o=>{try{s(t.next(o))}catch(d){f(d)}},v=o=>{try{s(t.throw(o))}catch(d){f(d)}},s=o=>o.done?a(o.value):Promise.resolve(o.value).then(y,v);s((t=t.apply(n,l)).next())});Z().locale("ZH-cn");function Te({user:n,vlist:l=[],dispatch:t,params:a,id:f,memo_replies:y,forumsDetail:v}){return e.createElement("aside",{className:V.comment},l.map(function(s,o){var d,E;return e.createElement(C.Z,{key:o,className:V.commentItem},e.createElement(p.Z,{span:24},e.createElement(C.Z,null,e.createElement(p.Z,{flex:"1"},e.createElement("a",{href:`/users/${s.user_login}`,target:"_blank",className:"c-light-black"},s==null?void 0:s.username),e.createElement("span",{className:"c-light-black ml10"},s.time)),(s.can_delete||s.user_id===((d=n.userInfo)==null?void 0:d.user_id)||s.user_login===((E=n.userInfo)==null?void 0:E.login))&&e.createElement(p.Z,{className:"forums-comment-delete",style:{display:"none"}},e.createElement(Y.Z,{title:"\u5220\u9664"},e.createElement(Ie.Z,{className:"current",onClick:()=>{U.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:e.createElement("div",{className:"font16 tc"},"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"),onOk:()=>Ve(this,null,function*(){const _=yield(0,D.sW)({id:s.id}),u=y.find(h=>h.id===f).children.filter(h=>h.id!==s.id);y.find(h=>h.id===f).children=u,t({type:"forumsDetail/setForumsDetailData",payload:Le(Me({},v.forumsDetailData),{memo_replies:[...y]})})})})}}))))),e.createElement(p.Z,null,e.createElement(le.Z,{value:s.content})))}))}var ze=Te,We=m(15826),Ge=Object.defineProperty,Je=Object.defineProperties,He=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Ne=(n,l,t)=>l in n?Ge(n,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[l]=t,j=(n,l)=>{for(var t in l||(l={}))we.call(l,t)&&Ne(n,t,l[t]);if(ae)for(var t of ae(l))Ce.call(l,t)&&Ne(n,t,l[t]);return n},k=(n,l)=>Je(n,He(l)),Ue=(n,l)=>{var t={};for(var a in n)we.call(n,a)&&l.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&ae)for(var a of ae(n))l.indexOf(a)<0&&Ce.call(n,a)&&(t[a]=n[a]);return t},re=(n,l,t)=>new Promise((a,f)=>{var y=o=>{try{s(t.next(o))}catch(d){f(d)}},v=o=>{try{s(t.throw(o))}catch(d){f(d)}},s=o=>o.done?a(o.value):Promise.resolve(o.value).then(y,v);s((t=t.apply(n,l)).next())});Z().locale("ZH-cn");const Qe=(n,l)=>{var t=n,{user:a,forumsDetail:f,globalSetting:y,loading:v,dispatch:s,handleClick:o}=t,d=Ue(t,["user","forumsDetail","globalSetting","loading","dispatch","handleClick"]);const{memo:E,memo_replies:_}=f.forumsDetailData||{},u=(0,w.useParams)(),[h,r]=(0,e.useState)(""),[x,g]=(0,e.useState)(""),[$,X]=(0,e.useState)(-1),[se,ie]=(0,e.useState)(!1),[pe,ve]=(0,e.useState)(1),[Ee,q]=(0,e.useState)(!1);(0,e.useImperativeHandle)(l,()=>({onMdFouch:ue})),(0,e.useEffect)(()=>{ie((E==null?void 0:E.replies_count)>10)},[E==null?void 0:E.replies_count]);const c=()=>re(void 0,null,function*(){var i;const S=pe+1;ve(S);const O=yield(0,D.z5)({id:u.memoId,page:S});O!=null&&O.memo_replies&&(s({type:"forumsDetail/setForumsDetailData",payload:k(j({},f.forumsDetailData),{memo_replies:[..._,...O.memo_replies]})}),ie(((i=O.memo_replies)==null?void 0:i.length)===10))}),A=i=>{var S,O,b,R;return k(j({},i),{image_url:(S=a.userInfo)==null?void 0:S.image_url,children:[],user_id:(O=a.userInfo)==null?void 0:O.user_id,user_login:(b=a.userInfo)==null?void 0:b.login,username:(R=a.userInfo)==null?void 0:R.username,time:`${(0,We.li)((new Date().getTime()-new Date(i.created_at).getTime())/1e3)}\u524D`})},ue=()=>{q(!0)};return e.createElement("section",{className:V.wrap},!!(_!=null&&_.length)&&e.createElement("aside",{className:V.content},e.createElement("div",{style:{padding:"10px 15px 5px 15px",justifyContent:"space-between",display:"flex"}},e.createElement("span",null,"\u5168\u90E8\u56DE\u590D\uFF08",E.replies_count,"\uFF09")),e.createElement("aside",{className:V.replyList},_==null?void 0:_.map(function(i,S){var O;return e.createElement(C.Z,{gutter:[12,12],key:S},e.createElement(p.Z,{flex:"40px"},e.createElement("a",{href:`/users/${i.user_login}`,target:"_blank"},e.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",width:"50",height:"50",src:`${te.Z.IMG_SERVER}/images/${i==null?void 0:i.image_url}`}))),e.createElement(p.Z,{flex:"1"},e.createElement(C.Z,{align:"middle"},e.createElement(p.Z,{span:24},e.createElement("a",{href:`/users/${i.user_login}`,target:"_blank"},e.createElement("span",{className:"c-light-black"},i==null?void 0:i.username)),e.createElement("span",{className:"c-light-black ml10"},i.time)),e.createElement(p.Z,{span:24},e.createElement("div",{onClick:o},e.createElement(le.Z,{value:i.content}))),!!((O=i==null?void 0:i.children)!=null&&O.length)&&e.createElement(ze,{user:a,id:i==null?void 0:i.id,vlist:i==null?void 0:i.children,dispatch:s,params:u,memo_replies:_,forumsDetail:f}),e.createElement(p.Z,{span:24,className:"mt5 c-light-black"},$===S?e.createElement("aside",null,e.createElement(ye.Z,{onChange:b=>{g(b)},height:150,isFocus:!0,placeholder:"\u6211\u8981\u56DE\u590D..."}),e.createElement(C.Z,null,e.createElement(p.Z,{span:24,className:"tr"},e.createElement(B.ZP,{type:"primary",size:"middle",onClick:()=>re(this,null,function*(){if(x==="")N.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const b=yield(0,D.ts)({parent_id:i.id,content:x});g(null),b&&(X(-1),_.find(R=>R.id===b.parent_id).children.push(A(b)),s({type:"forumsDetail/setForumsDetailData",payload:k(j({},f.forumsDetailData),{memo:k(j({},E),{replies_count:E.replies_count+1}),memo_replies:[..._]})}))}})},"\u53D1\u9001")))):e.createElement("div",{className:"tr"},e.createElement("span",{className:"iconfont icon-huifu1 mr15 ml30 current",onClick:()=>X(S)}),e.createElement(Y.Z,{title:i.user_praise?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},e.createElement("span",{className:i.user_praise?"c-orange":"c-gery-888"},e.createElement("i",{className:"iconfont icon-dianzan mr3 current",onClick:()=>re(this,null,function*(){const b=yield(0,D.vL)({id:i.id,container_type:"Memo",type:i.user_praise?0:1});(b==null?void 0:b.praise_count)>=0&&(_.find(R=>R.id===i.id).user_praise=!i.user_praise,_.find(R=>R.id===i.id).praise_count=b==null?void 0:b.praise_count,s({type:"forumsDetail/setForumsDetailData",payload:k(j({},f.forumsDetailData),{memo_replies:[..._]})}))})}),i.praise_count>0?i.praise_count:"")))))))}))),se&&e.createElement("aside",{className:"bg-white pb20",style:{display:"flex",justifyContent:"center"}},e.createElement(C.Z,{justify:"space-between"},e.createElement(p.Z,null),e.createElement(p.Z,null,se&&e.createElement("a",{className:"c-black",onClick:c},"\u67E5\u770B\u66F4\u591A\u8BC4\u8BBA")))),e.createElement("aside",{className:V.reply},e.createElement(ye.Z,{onBlur:()=>q(!1),isFocus:Ee,defaultValue:h,id:"writeForumsReviewId",onChange:i=>{r(i)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),e.createElement(C.Z,null,e.createElement(p.Z,{flex:"1"}),e.createElement(p.Z,null,e.createElement(B.ZP,{type:"primary",size:"middle",onClick:()=>re(void 0,null,function*(){if(h==="")N.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const i=yield(0,D.ts)({parent_id:E.id,content:h});r(null),i&&s({type:"forumsDetail/setForumsDetailData",payload:k(j({},f.forumsDetailData),{memo:k(j({},E),{replies_count:E.replies_count+1}),memo_replies:[A(i),..._]})})}})},"\u53D1\u9001")))))};var Ye=(0,w.connect)(({user:n,forumsDetail:l,loading:t,globalSetting:a})=>({user:n,forumsDetail:l,globalSetting:a,loading:t.models.forumsDetail}),null,null,{forwardRef:!0})((0,e.forwardRef)(Qe)),P={wrap:"wrap___Soi3l",header:"header___vk3EC",title:"title___WJAyR",menu:"menu___yMPKF",top:"top___ZqzEM",line:"line___EQKlG",flexCenter:"flexCenter___Rcnhr",like:"like___uNtmq",canLike:"canLike___Lu04z",attachmentName:"attachmentName___nwdzp"},Ke=m(88289),Xe=m(51355),qe=m(44259),et=Object.defineProperty,tt=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,Oe=(n,l,t)=>l in n?et(n,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[l]=t,T=(n,l)=>{for(var t in l||(l={}))Pe.call(l,t)&&Oe(n,t,l[t]);if(oe)for(var t of oe(l))Fe.call(l,t)&&Oe(n,t,l[t]);return n},z=(n,l)=>tt(n,nt(l)),lt=(n,l)=>{var t={};for(var a in n)Pe.call(n,a)&&l.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&oe)for(var a of oe(n))l.indexOf(a)<0&&Fe.call(n,a)&&(t[a]=n[a]);return t},K=(n,l,t)=>new Promise((a,f)=>{var y=o=>{try{s(t.next(o))}catch(d){f(d)}},v=o=>{try{s(t.throw(o))}catch(d){f(d)}},s=o=>o.done?a(o.value):Promise.resolve(o.value).then(y,v);s((t=t.apply(n,l)).next())});const at={5:"\u6280\u672F\u5206\u4EAB",3:"\u64CD\u4F5C\u6307\u5357",16:"\u901A\u77E5\u516C\u544A"},rt=n=>{var l=n,{user:t,forumsDetail:a,globalSetting:f,loading:y,dispatch:v}=l,s=lt(l,["user","forumsDetail","globalSetting","loading","dispatch"]),o,d,E,_,u;const{author_info:h,memo:r,attachments_list:x}=a.forumsDetailData||{},g=(0,e.useRef)(),$=(0,e.useRef)(),X=()=>K(void 0,null,function*(){const c={id:r.id,sticky:r.sticky?0:1},A=yield(0,D.B0)(c);(A==null?void 0:A.status)===0&&v({type:"forumsDetail/setForumsDetailData",payload:z(T({},a.forumsDetailData),{memo:z(T({},r),{sticky:!(r!=null&&r.sticky)})})})}),se=()=>K(void 0,null,function*(){const c=yield(0,D.sW)({id:r==null?void 0:r.id});(c==null?void 0:c.status)===0&&(N.ZP.success("\u5220\u9664\u6210\u529F"),w.history.push("/forums")),(c==null?void 0:c.status)===-1&&w.history.push("/forums")}),ie=()=>K(void 0,null,function*(){U.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u5956\u52B1\u8BBE\u7F6E",content:e.createElement("div",{className:"font14 tc"},e.createElement(Se.default,{defaultValue:g.current,onChange:c=>g.current=c.target.value})),onOk:()=>K(void 0,null,function*(){const c=yield(0,D.eh)({id:r==null?void 0:r.id,container_type:"Memo",score:g.current?Number(g.current):0,user_id:h==null?void 0:h.user_id});if(g.current=null,(c==null?void 0:c.code)>0){v({type:"forumsDetail/setForumsDetailData",payload:z(T({},a.forumsDetailData),{memo:z(T({},r),{reward:c==null?void 0:c.code})})}),N.ZP.success("\u5956\u52B1\u6210\u529F");return}N.ZP.success("\u5956\u52B1\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7CFB\u7EDF\u7BA1\u7406\u5458\uFF01")})})}),pe=()=>{$.current.onMdFouch&&$.current.onMdFouch()},ve=()=>K(void 0,null,function*(){const c=yield(0,D.vL)({id:r.id,container_type:"Memo",type:1});(c==null?void 0:c.praise_count)>=0&&v({type:"forumsDetail/setForumsDetailData",payload:z(T({},a.forumsDetailData),{memo:z(T({},r),{user_praise:!(r!=null&&r.user_praise),memo_praise_count:c==null?void 0:c.praise_count})})})}),Ee=e.createElement(Q.default,{className:P.menu},((o=t.userInfo)==null?void 0:o.admin)&&(r==null?void 0:r.sticky)&&e.createElement(Q.default.Item,null,e.createElement("a",{onClick:()=>X()},"\u53D6\u6D88\u7F6E\u9876")),((d=t.userInfo)==null?void 0:d.admin)&&!(r!=null&&r.sticky)&&e.createElement(Q.default.Item,null,e.createElement("a",{onClick:()=>X()},"\u7F6E\xA0\xA0\u9876")),e.createElement(Q.default.Item,null,e.createElement(w.Link,{to:`/forums/${r==null?void 0:r.id}/edit`},"\u7F16\xA0\xA0\u8F91")),e.createElement(Q.default.Item,null,e.createElement("a",{onClick:()=>{U.default.confirm({title:"\u63D0\u793A",icon:e.createElement(Ke.Z,null),content:"\u5E16\u5B50\u5C06\u88AB\u5220\u9664\uFF0C\u65E0\u6CD5\u6062\u590D\u3002\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",okText:"\u786E\u8BA4",onOk:()=>{se()},cancelText:"\u53D6\u6D88"})}},"\u5220\xA0\xA0\u9664"))),q=c=>{let{nodeName:A,src:ue}=c.target;A==="IMG"&&(qe.Z.publish("preview-image",ue),console.log("src:",ue))};return(0,e.useEffect)(()=>{},[]),e.createElement("section",{className:P.wrap},e.createElement(fe.Z,{separator:"/",className:"mb5"},e.createElement(fe.Z.Item,null,e.createElement(w.Link,{to:`/forums/categories/${r==null?void 0:r.forum_id}`},at[r==null?void 0:r.forum_id])),e.createElement(fe.Z.Item,null,"\u8BE6\u60C5")),e.createElement("header",{className:`bg-white pt40 pb40 pl30 pr30 ${P.header}`},e.createElement(C.Z,{align:"middle"},e.createElement(p.Z,{flex:1,className:"font24 mb5"},e.createElement("span",{className:P.title},r==null?void 0:r.subject),(r==null?void 0:r.sticky)&&e.createElement("span",{className:P.top},"\u7F6E\u9876"),!!(r!=null&&r.reward)&&e.createElement(Y.Z,{placement:"bottom",title:`\u83B7\u5F97\u5E73\u53F0\u5956\u52B1\u91D1\u5E01\uFF1A${r==null?void 0:r.reward}`},e.createElement("span",{className:"ml10 c-orange-ff7"},e.createElement("i",{className:"iconfont icon-gift font16 mr5"}),e.createElement("span",{className:"font14"},r==null?void 0:r.reward)))),e.createElement(p.Z,null,(((E=t.userInfo)==null?void 0:E.admin)||((_=t.userInfo)==null?void 0:_.user_id)===(h==null?void 0:h.user_id))&&e.createElement(Be.Z,{dropdownRender:()=>Ee},e.createElement("i",{className:"fa fa-bars font-16 current c-grey-bcb"})))),e.createElement(C.Z,{align:"middle",className:"font14"},e.createElement(p.Z,{flex:1,className:"c-grey-999"},e.createElement("span",null,Z()(r==null?void 0:r.time).fromNow()," \u66F4\u65B0")),e.createElement(p.Z,{className:"c-grey-999"},((u=t.userInfo)==null?void 0:u.admin)&&e.createElement(Y.Z,{placement:"bottom",title:"\u5E16\u5B50\u5956\u52B1"},e.createElement("span",{className:`current pr10 ${P.line}`,onClick:ie},e.createElement("i",{className:"iconfont icon-jiangli font18 mr5"}))),e.createElement("span",{className:`pr10 pl10 ${r!=null&&r.replies_count?P.line:""}`},e.createElement("i",{className:"iconfont icon-liulanyan font18 mr5"}),r==null?void 0:r.viewed_count),!!(r!=null&&r.replies_count)&&e.createElement(Y.Z,{placement:"bottom",title:"\u5199\u8BC4\u8BBA"},e.createElement("span",{className:"current pl10",onClick:pe},e.createElement("i",{className:"iconfont icon-huifu1 font18 mr5"}),r==null?void 0:r.replies_count))))),e.createElement("main",{className:"bg-white pt40 pb40 pl40 pr40"},e.createElement("div",{onClick:q},e.createElement(le.Z,{value:r==null?void 0:r.content})),e.createElement("div",{className:"bg-white pl40 pr40 mt40"},e.createElement("div",{className:`mt10 mb20 ${P.flexCenter}`},e.createElement("div",{className:`${P.like} ${r!=null&&r.user_praise?"":P.canLike}`,onClick:ve},e.createElement("i",{className:"iconfont icon-dianzan font18"}),e.createElement("br",null),e.createElement("span",null,r==null?void 0:r.memo_praise_count)))),!!(x!=null&&x.length)&&e.createElement("div",{className:"mt40"},x==null?void 0:x.map(c=>e.createElement("div",{className:`c-grey-888 ${P.flexCenter}`},e.createElement("i",{className:"iconfont icon-fujian mr10 font14 c-green-29b"}),e.createElement("a",{href:c==null?void 0:c.url,title:c==null?void 0:c.title,className:`${P.attachmentName} mr10`},c==null?void 0:c.title),e.createElement("span",{className:"font12 c-grey-666 mt3"},c==null?void 0:c.filesize))))),e.createElement(Ye,{ref:$,handleClick:q}),e.createElement(Xe.Z,null))};var ot=(0,w.connect)(({user:n,forumsDetail:l,loading:t,globalSetting:a})=>({user:n,forumsDetail:l,globalSetting:a,loading:t.effects}))(rt),st={flex:"flex___fgmSn"},Ze=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,ct=(n,l)=>{var t={};for(var a in n)it.call(n,a)&&l.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&Ze)for(var a of Ze(n))l.indexOf(a)<0&&ut.call(n,a)&&(t[a]=n[a]);return t},mt=(n,l,t)=>new Promise((a,f)=>{var y=o=>{try{s(t.next(o))}catch(d){f(d)}},v=o=>{try{s(t.throw(o))}catch(d){f(d)}},s=o=>o.done?a(o.value):Promise.resolve(o.value).then(y,v);s((t=t.apply(n,l)).next())});const dt=n=>{var l=n,{forumsDetail:t,globalSetting:a,loading:f,dispatch:y}=l,v=ct(l,["forumsDetail","globalSetting","loading","dispatch"]);const s=(0,w.useParams)();(0,e.useEffect)(()=>{o()},[s.memoId]);const o=()=>mt(void 0,null,function*(){y({type:"forumsDetail/getForumsDetailData",payload:{id:s.memoId}})});return e.createElement("section",{className:`edu-container mb20 mt30 ${st.flex}`},e.createElement(ot,null),e.createElement(de,null))};var ft=(0,w.connect)(({forumsDetail:n,loading:l,globalSetting:t})=>({forumsDetail:n,globalSetting:t,loading:l.models.forumsDetail}))(dt)}}]);