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__News__index.async.js

1 line
13 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[89901],{76419:function(e,n,t){t.d(n,{Z:function(){return r}});var i=t(66820),a=t(59301),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},o=t(80109),l=function(e,n){return a.createElement(o.Z,(0,i.Z)({},e,{ref:n,icon:s}))};var r=a.forwardRef(l)},32766:function(e,n,t){t.d(n,{Z:function(){return r}});var i=t(66820),a=t(59301),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},o=t(80109),l=function(e,n){return a.createElement(o.Z,(0,i.Z)({},e,{ref:n,icon:s}))};var r=a.forwardRef(l)},96014:function(e,n,t){t.d(n,{Z:function(){return r}});var i=t(66820),a=t(59301),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},o=t(80109),l=function(e,n){return a.createElement(o.Z,(0,i.Z)({},e,{ref:n,icon:s}))};var r=a.forwardRef(l)},55999:function(e,n,t){t.r(n),t.d(n,{default:function(){return F}});var i=t(7557),a=t.n(i),s=t(37205),o=t.n(s),l=t(82242),r=t.n(l),c=t(41498),u=t.n(c),d=t(79800),f=t.n(d),p=t(59301),m=t(95237),v=t(43604),g=t(3113),h=t(9641),x=t(88402),y=t(44742),_="menuitem___sd1JA",b="semenuitem___lKUBf",j="description___WVudY",w="NewsItem___MsjJd",C="NewsItemTitle___qdIMb",E="NewsItemTime___ojfSF",k="NewsItemTagLabel___Kg1J_",N="tabs___WZtOY",Z="item_tab___lxzbP",O="active_tab___DeZPy",P="active_line___Rk4Aj",S="DivDownPlay___g5tIk",z="search___sWag6",M="searchIcon___vjfO2",A=t(33259),R=(t(23350),t(9498)),T=t.n(R),B=t(14735),I=t(71912),D=t(37712),F=(0,y.connect)((function(e){var n=e.homePage,t=e.loading,i=e.globalSetting,a=e.user;return{homePage:n,globalSetting:i,loading:t.models.homePage,user:a}}))((function(e){e.homePage;var n,t,i=e.globalSetting,s=(e.user,e.loading,e.dispatch,(0,p.useState)()),l=f()(s,2),c=l[0],d=l[1],R=(0,p.useState)([{name:"全部"}]),F=f()(R,2),L=F[0],$=F[1],V=(0,p.useState)({page:1,limit:10,tag_name:"全部"}),Y=f()(V,2),q=Y[0],Q=Y[1],W=(0,p.useState)([{name:"全部",type:""},{name:"编辑中",type:"0"},{name:"审核中",type:"1"},{name:"已公开",type:"2"}]),J=f()(W,2),U=J[0],G=(J[1],(0,p.useState)("")),H=f()(G,2),K=H[0],X=H[1],ee=(0,p.useState)(""),ne=f()(ee,2),te=ne[0],ie=ne[1];function ae(){return(ae=u()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,B.ZP)("/api/news_events/news_event_tag_names.json",{method:"get"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&$([].concat(o()(L),o()(null==n?void 0:n.data)));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function se(){return oe.apply(this,arguments)}function oe(){return(oe=u()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,B.ZP)("/api/news_events.json",{method:"get",params:r()(r()({status:K},q),{},{keyword:te})});case 2:0===(null==(n=e.sent)?void 0:n.status)&&d(null==n?void 0:n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,p.useEffect)((function(){!function(){ae.apply(this,arguments)}()}),[]),(0,p.useEffect)((function(){se()}),[q,K]),(0,D.jsxs)("section",{style:{background:"#fff",paddingBottom:60},children:[(0,D.jsx)("div",{style:{height:240,backgroundImage:"url(".concat(A.Z.IMG_SERVER,"/").concat(null==i||null===(n=i.setting)||void 0===n?void 0:n.news_banner_url,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",padding:"40px 120px"},children:(0,D.jsxs)(m.Z,{style:{width:1200,height:"100%",margin:"0 auto"},align:"middle",justify:"space-between",wrap:!1,children:[(0,D.jsxs)(v.Z,{children:[(0,D.jsx)("div",{style:{color:"#fff",fontSize:"36px",letterSpacing:"5px",fontWeight:600},children:"新闻动态"}),(0,I.Ny)()&&(0,D.jsx)(g.ZP,{className:"mt25 ".concat(S),icon:(0,D.jsx)("i",{className:"iconfont icon-icon_xinyong_xianxing_jijin-249"}),onClick:function(){y.history.push("/news/add")},children:"新建新闻动态"})]}),(0,D.jsx)(h.Z.Search,{placeholder:"请输入关键字进行搜索",size:"large",className:z,value:te,onChange:function(e){ie(e.target.value)},onSearch:function(e){ie(e)},suffix:(0,D.jsx)("i",{className:"iconfont icon-sousuo9 font14 ".concat(M),onClick:function(){ie(te),se()}})})]})}),(0,D.jsxs)("div",{style:{width:1200,margin:"0px auto",display:"flex",marginTop:30},children:[(0,D.jsx)("div",{style:{minWidth:180,background:"#FAFAFA",maxHeight:"100vh",overflow:"auto",borderRadius:"5px"},children:null==L?void 0:L.map((function(e){return(0,D.jsx)("div",{onClick:function(){q.tag_name=e.name,q.page=1,q.limit=10,Q(r()({},q))},className:q.tag_name===e.name?b:_,children:null==e?void 0:e.name})}))}),(0,D.jsxs)("div",{style:{marginLeft:20,width:"100%"},children:[(0,D.jsxs)("div",{children:[(0,I.Ny)()&&(0,D.jsx)("div",{className:N,children:U.map((function(e,n){return(0,D.jsx)("div",{className:"".concat(K==e.type?O:Z),onClick:function(){X(e.type)},children:(0,D.jsxs)("div",{style:{position:"relative"},children:[e.name,(0,D.jsx)("div",{className:"".concat(K==e.type?P:"")})]})},n)}))}),null==c||null===(t=c.list)||void 0===t?void 0:t.map((function(e,n){var t,i,a;return(0,D.jsx)("div",{style:{padding:"20px 0",borderBottom:"1px solid #EAEFFA"},children:(0,D.jsxs)("div",{className:w,onClick:function(){y.history.push("/news/".concat(e.id,"/detail"))},children:[(0,D.jsxs)("div",{style:{display:"flex",marginBottom:25},children:[(0,D.jsx)("div",{className:C,children:null==e?void 0:e.title}),(0,D.jsx)("div",{className:E,children:T()(null==e?void 0:e.publish_time).format("YYYY年MM月DD日")})]}),(0,D.jsx)("div",{className:j,children:null==e||null===(t=e.content)||void 0===t?void 0:t.replaceAll(/<[^>]+>/g,"")}),(0,D.jsxs)("div",{style:{marginTop:15,display:"flex"},children:[(0,D.jsxs)("div",{style:{display:"block",marginTop:15,width:200},children:[(0,D.jsx)("span",{className:k,children:"发布人"}),(0,D.jsx)("span",{children:null==e?void 0:e.publisher})]}),(null==e||null===(i=e.news_event_tags)||void 0===i?void 0:i.length)>0&&(0,D.jsxs)("div",{style:{display:"flex",flex:1,alignItems:"baseline"},children:[(0,D.jsx)("span",{className:k,children:"标签"}),(0,D.jsx)("div",{style:{flex:1},children:null==e||null===(a=e.news_event_tags)||void 0===a?void 0:a.map((function(e){return(0,D.jsx)("span",{style:{display:"inline-flex",justifyContent:"center",padding:"0px 14px",background:"#F6F7F9",borderRadius:16,height:32,lineHeight:"32px",color:"#AC651A",marginRight:10,marginTop:10},children:null==e?void 0:e.name})}))})]})]})]})},n)}))]}),(0,D.jsx)(x.Z,{total:null==c?void 0:c.count,hideOnSinglePage:!0,showTotal:function(e,n){return(0,D.jsxs)("span",{children:["共",(0,D.jsx)("span",{style:{color:"#2958D4"},children:e}),"条数据"]})},pageSize:null==q?void 0:q.limit,current:null==q?void 0:q.page,onChange:function(e,n){q.page=e,q.limit=n,Q(r()({},q))}})]})]})]})}))},23350:function(){},9641:function(e,n,t){t.d(n,{Z:function(){return M}});var i=t(92310),a=t.n(i),s=t(59301),o=t(36355),l=t(32441),r=t(9937);var c=e=>{const{getPrefixCls:n,direction:t}=(0,s.useContext)(o.E_),{prefixCls:i,className:c}=e,u=n("input-group",i),d=n("input"),[f,p]=(0,r.ZP)(d),m=a()(u,{[`${u}-lg`]:"large"===e.size,[`${u}-sm`]:"small"===e.size,[`${u}-compact`]:e.compact,[`${u}-rtl`]:"rtl"===t},p,c),v=(0,s.useContext)(l.aM),g=(0,s.useMemo)((()=>Object.assign(Object.assign({},v),{isFormItemInput:!1})),[v]);return f(s.createElement("span",{className:m,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},s.createElement(l.aM.Provider,{value:g},e.children)))},u=t(9432),d=t(66820),f={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},p=t(80109),m=function(e,n){return s.createElement(p.Z,(0,d.Z)({},e,{ref:n,icon:f}))};var v=s.forwardRef(m),g=t(76419),h=t(62805),x=t(76466),y=t(59412),_=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)n.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(t[i[a]]=e[i[a]])}return t};const b=e=>e?s.createElement(g.Z,null):s.createElement(v,null),j={click:"onClick",hover:"onMouseOver"};var w=s.forwardRef(((e,n)=>{const{visibilityToggle:t=!0}=e,i="object"==typeof t&&void 0!==t.visible,[l,r]=(0,s.useState)((()=>!!i&&t.visible)),c=(0,s.useRef)(null);s.useEffect((()=>{i&&r(t.visible)}),[i,t]);const d=(0,y.Z)(c),f=()=>{const{disabled:n}=e;n||(l&&d(),r((e=>{var n;const i=!e;return"object"==typeof t&&(null===(n=t.onVisibleChange)||void 0===n||n.call(t,i)),i})))},{className:p,prefixCls:m,inputPrefixCls:v,size:g}=e,w=_(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:C}=s.useContext(o.E_),E=C("input",v),k=C("input-password",m),N=t&&(n=>{const{action:t="click",iconRender:i=b}=e,a=j[t]||"",o=i(l),r={[a]:f,className:`${n}-icon`,key:"passwordIcon",onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return s.cloneElement(s.isValidElement(o)?o:s.createElement("span",null,o),r)})(k),Z=a()(k,p,{[`${k}-${g}`]:!!g}),O=Object.assign(Object.assign({},(0,h.Z)(w,["suffix","iconRender","visibilityToggle"])),{type:l?"text":"password",className:Z,prefixCls:E,suffix:N});return g&&(O.size=g),s.createElement(u.Z,Object.assign({ref:(0,x.sQ)(n,c)},O))})),C=t(62165),E=t(92343),k=t(3113),N=t(19716),Z=t(33234),O=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)n.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(t[i[a]]=e[i[a]])}return t};var P=s.forwardRef(((e,n)=>{const{prefixCls:t,inputPrefixCls:i,className:l,size:r,suffix:c,enterButton:d=!1,addonAfter:f,loading:p,disabled:m,onSearch:v,onChange:g,onCompositionStart:h,onCompositionEnd:y}=e,_=O(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:b,direction:j}=s.useContext(o.E_),w=s.useRef(!1),P=b("input-search",t),S=b("input",i),{compactSize:z}=(0,Z.ri)(P,j),M=(0,N.Z)((e=>{var n;return null!==(n=null!=r?r:z)&&void 0!==n?n:e})),A=s.useRef(null),R=e=>{var n;document.activeElement===(null===(n=A.current)||void 0===n?void 0:n.input)&&e.preventDefault()},T=e=>{var n,t;v&&v(null===(t=null===(n=A.current)||void 0===n?void 0:n.input)||void 0===t?void 0:t.value,e,{source:"input"})},B="boolean"==typeof d?s.createElement(C.Z,null):null,I=`${P}-button`;let D;const F=d||{},L=F.type&&!0===F.type.__ANT_BUTTON;D=L||"button"===F.type?(0,E.Tm)(F,Object.assign({onMouseDown:R,onClick:e=>{var n,t;null===(t=null===(n=null==F?void 0:F.props)||void 0===n?void 0:n.onClick)||void 0===t||t.call(n,e),T(e)},key:"enterButton"},L?{className:I,size:M}:{})):s.createElement(k.ZP,{className:I,type:d?"primary":void 0,size:M,disabled:m,key:"enterButton",onMouseDown:R,onClick:T,loading:p,icon:B},d),f&&(D=[D,(0,E.Tm)(f,{key:"addonAfter"})]);const $=a()(P,{[`${P}-rtl`]:"rtl"===j,[`${P}-${M}`]:!!M,[`${P}-with-button`]:!!d},l);return s.createElement(u.Z,Object.assign({ref:(0,x.sQ)(A,n),onPressEnter:e=>{w.current||p||T(e)}},_,{size:M,onCompositionStart:e=>{w.current=!0,null==h||h(e)},onCompositionEnd:e=>{w.current=!1,null==y||y(e)},prefixCls:S,addonAfter:D,suffix:c,onChange:e=>{e&&e.target&&"click"===e.type&&v&&v(e.target.value,e,{source:"clear"}),g&&g(e)},className:$,disabled:m}))})),S=t(1643);const z=u.Z;z.Group=c,z.Search=P,z.TextArea=S.Z,z.Password=w;var M=z}}]);