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.
2 lines
4.9 KiB
2 lines
4.9 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6366],{6629:function(Z,E,n){var e=n(59301),O=n(93314),F=n(3113),y=Object.defineProperty,g=Object.defineProperties,C=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,_=(s,a,o)=>a in s?y(s,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[a]=o,i=(s,a)=>{for(var o in a||(a={}))x.call(a,o)&&_(s,o,a[o]);if(P)for(var o of P(a))d.call(a,o)&&_(s,o,a[o]);return s},j=(s,a)=>g(s,C(a));const D=({img:s,buttonProps:a={},styles:o={},customText:S,ButtonText:m,ButtonClick:A,Buttonclass:B,ButtonTwo:v,imgStyles:b,loading:M=!1})=>e.createElement("section",{className:"tc animated fadeIn",style:i(i({},{color:"#999",margin:"100px auto",visibility:M?"hidden":"visible"}),o)},e.createElement("img",{src:s||O,style:j(i({},b),{pointerEvents:"none",userSelect:"none"})}),e.createElement("p",{className:"mt20 font14"},S||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),m&&e.createElement(F.ZP,i({className:B,onClick:A},a),m),v&&v);E.Z=D},82921:function(Z,E,n){n.r(E),n.d(E,{default:function(){return z}});var e=n(59301),O=n(71796),F=n(99313),y=n(3113),g=n(28103),C=n(53864),P=n(22415),x=n(17011),d=n(63144),_=n(35099),i=n(76265),j=n(6629),D=n(99232),s=n.n(D),a={flex_box_center:"flex_box_center___usqtP",flex_space_between:"flex_space_between___Q1rHf",flex_box_vertical_center:"flex_box_vertical_center___iwfef",flex_box_center_end:"flex_box_center_end___UgC5k",flex_box_column:"flex_box_column___vaSfm",count:"count___EA_49",header:"header___K169U",title:"title___LKM3L"},o=n(46961),S=Object.defineProperty,m=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,v=(u,l,r)=>l in u?S(u,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):u[l]=r,b=(u,l)=>{for(var r in l||(l={}))A.call(l,r)&&v(u,r,l[r]);if(m)for(var r of m(l))B.call(l,r)&&v(u,r,l[r]);return u},M=(u,l,r)=>new Promise((N,c)=>{var R=t=>{try{p(r.next(t))}catch(f){c(f)}},h=t=>{try{p(r.throw(t))}catch(f){c(f)}},p=t=>t.done?N(t.value):Promise.resolve(t.value).then(R,h);p((r=r.apply(u,l)).next())});const{Paragraph:L}=O.default,{TabPane:K}=F.default,I=({dispatch:u})=>{var l;let[r,N]=(0,e.useState)({limit:10,page:1,tab:"public"});const[c,R]=(0,e.useState)([]);(0,e.useEffect)(()=>{h()},[]);function h(){return M(this,null,function*(){let t=yield(0,i.ZP)("/api/sci/projects.json",{method:"get",params:r});R(t)})}const p=()=>{if((c==null?void 0:c.my_sci_projects_num)>=10&&!(0,_.Ny)()){u({type:"innovation/openSimpleModal",payload:{title:"\u9879\u76EE\u6570\u91CF\u8FBE\u5230\u4E0A\u9650",children:"\u6BCF\u4F4D\u7528\u6237\u6700\u591A\u53EA\u80FD\u521B\u5EFA10\u4E2A\u9879\u76EE\uFF0C\u4F60\u7684\u9879\u76EE\u6570\u91CF\u5DF2\u7ECF\u8FBE\u5230\u4E0A\u9650\u3002",footer:e.createElement(y.ZP,{onClick:()=>u({type:"innovation/closeSimpleModal"}),type:"primary"},"\u6211\u77E5\u9053\u4E86")}});return}d.history.push("/innovation/project/create")};return e.createElement("div",null,e.createElement("div",{className:a.header},e.createElement("span",{className:a.title},"\u516C\u5F00\u9879\u76EE"),e.createElement(y.ZP,{type:"primary",onClick:p,className:a.createProjectBtn,icon:e.createElement(P.Z,null)},"\u521B\u5EFA\u9879\u76EE")),e.createElement(g.Z,null),(c==null?void 0:c.count)<=0&&e.createElement(j.Z,null),(l=c==null?void 0:c.sci_projects)==null?void 0:l.map((t,f)=>e.createElement("div",{key:f,style:{cursor:"pointer"},onClick:()=>{d.history.push(`/innovation/project/detail/${t==null?void 0:t.id}`)}},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",null,e.createElement("img",{style:{width:30,height:30,borderRadius:"50%",marginRight:10},src:o.Z.IMG_SERVER+"/images/"+t.avatar_url}),e.createElement("span",{style:{fontSize:"14px",color:"#6B758B",marginRight:10}},t==null?void 0:t.username),e.createElement("span",{style:{color:"#464F66",fontSize:"14px"}},t==null?void 0:t.name)),e.createElement("div",null,e.createElement("span",{style:{marginRight:20,color:"#464F66"}},e.createElement("i",{className:"iconfont icon-chakan1 current ml5",style:{marginRight:8,color:"#B1BACD",fontSize:12}}),t==null?void 0:t.visits),e.createElement("span",{style:{marginRight:20,color:"#464F66"}},e.createElement(x.Z,{style:{marginRight:8}}),t==null?void 0:t.forked_count))),e.createElement("div",{className:a.count,style:{marginTop:5,color:"#464F66",fontSize:14,marginLeft:40}},t==null?void 0:t.description),e.createElement("div",{style:{marginTop:15,color:"#B1BACD",fontSize:14,marginLeft:40}},"\u521B\u5EFA\u65F6\u95F4\uFF1A",s()(t==null?void 0:t.created_at).format("YYYY-MM-DD HH:mm")),e.createElement(g.Z,null))),e.createElement(C.Z,{style:{textAlign:"center",marginTop:20},current:r.page,pageSize:10,showSizeChanger:!1,total:c==null?void 0:c.count,hideOnSinglePage:!0,onChange:t=>{r.page=t,N(b({},r)),h()}}))};var z=(0,d.connect)(({innovation:u})=>({innovation:u}))(I)}}]);
|