diff --git a/public/css/iconfont.css b/public/css/iconfont.css index 9cface5a9..037ef59d9 100644 --- a/public/css/iconfont.css +++ b/public/css/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 2340181 */ - src: url('iconfont.woff2?t=1682403222759') format('woff2'), - url('iconfont.woff?t=1682403222759') format('woff'), - url('iconfont.ttf?t=1682403222759') format('truetype'); + src: url('iconfont.woff2?t=1686823554834') format('woff2'), + url('iconfont.woff?t=1686823554834') format('woff'), + url('iconfont.ttf?t=1686823554834') format('truetype'); } .iconfont { @@ -13,6 +13,22 @@ -moz-osx-font-smoothing: grayscale; } +.icon-a-zu2044:before { + content: "\e96d"; +} + +.icon-cuo:before { + content: "\e96c"; +} + +.icon-dui:before { + content: "\e96b"; +} + +.icon-zanting:before { + content: "\e96a"; +} + .icon-cangkuyuyanicon:before { content: "\e962"; } diff --git a/public/css/iconfont.js b/public/css/iconfont.js index 26c9209ee..2baa04e0d 100644 --- a/public/css/iconfont.js +++ b/public/css/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_2340181='',function(c){var a=(a=document.getElementsByTagName("script"))[a.length-1],l=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var h,i,o,z,t,p=function(a,l){l.parentNode.insertBefore(a,l)};if(l&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}h=function(){var a,l=document.createElement("div");l.innerHTML=c._iconfont_svg_string_2340181,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?p(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=h,z=c.document,t=!1,m(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,v())})}function v(){t||(t=!0,o())}function m(){try{z.documentElement.doScroll("left")}catch(a){return void setTimeout(m,50)}v()}}(window); \ No newline at end of file +window._iconfont_svg_string_2340181='',function(c){var a=(a=document.getElementsByTagName("script"))[a.length-1],l=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var h,i,o,z,t,p=function(a,l){l.parentNode.insertBefore(a,l)};if(l&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}h=function(){var a,l=document.createElement("div");l.innerHTML=c._iconfont_svg_string_2340181,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?p(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=h,z=c.document,t=!1,m(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,v())})}function v(){t||(t=!0,o())}function m(){try{z.documentElement.doScroll("left")}catch(a){return void setTimeout(m,50)}v()}}(window); \ No newline at end of file diff --git a/public/css/iconfont.json b/public/css/iconfont.json index c21fd868d..bcaf91ced 100644 --- a/public/css/iconfont.json +++ b/public/css/iconfont.json @@ -5,6 +5,34 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "36020261", + "name": "组 2044", + "font_class": "a-zu2044", + "unicode": "e96d", + "unicode_decimal": 59757 + }, + { + "icon_id": "5287658", + "name": "错", + "font_class": "cuo", + "unicode": "e96c", + "unicode_decimal": 59756 + }, + { + "icon_id": "8802648", + "name": "对", + "font_class": "dui", + "unicode": "e96b", + "unicode_decimal": 59755 + }, + { + "icon_id": "887857", + "name": "暂停", + "font_class": "zanting", + "unicode": "e96a", + "unicode_decimal": 59754 + }, { "icon_id": "34965902", "name": "仓库语言icon", diff --git a/public/css/iconfont.ttf b/public/css/iconfont.ttf index 3a879e105..7e2bf2dfa 100644 Binary files a/public/css/iconfont.ttf and b/public/css/iconfont.ttf differ diff --git a/public/css/iconfont.woff b/public/css/iconfont.woff index ec894a8ce..b39f48934 100644 Binary files a/public/css/iconfont.woff and b/public/css/iconfont.woff differ diff --git a/public/css/iconfont.woff2 b/public/css/iconfont.woff2 index 3d4905eed..0cc082d5f 100644 Binary files a/public/css/iconfont.woff2 and b/public/css/iconfont.woff2 differ diff --git a/public/index.html b/public/index.html index 4d064c775..be8e12f0f 100755 --- a/public/index.html +++ b/public/index.html @@ -72,9 +72,11 @@ window.location.hash = $(this).attr("name"); return false; }); - } - + // window.addEventListener("popstate", function(e) { + // console.log("popstate",e); + // history.go(-2); + // }, false); diff --git a/src/App.js b/src/App.js index d67c3c926..d1c049dc0 100644 --- a/src/App.js +++ b/src/App.js @@ -47,6 +47,10 @@ const ProjectDetail = Loadable({ loader: () => import("./forge/Main/DetailAdaptor"), loading: Loading, }); +const Information = Loadable({ + loader: () => import('./forge/Information/index'), + loading: Loading, +}) //forge安全设置 const Security = Loadable({ loader: () => import('./forge/SecuritySetting/Index'), @@ -156,7 +160,7 @@ const Topic = Loadable({ }) // 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。 -const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot"]; +const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone"]; class App extends Component { constructor(props) { @@ -376,6 +380,14 @@ class App extends Component { )} > + { + return () + } + }> + { nav && nav.list && nav.list.length>0 ? nav.list.map((item,key)=>{ return( -
  • + !item.hide &&
  • - {item.name} + {item.icon && } + {item.img && } + {item.name}

  • diff --git a/src/forge/Images/nodata.png b/src/forge/Images/nodata.png index 5a1231e7f..b67197269 100644 Binary files a/src/forge/Images/nodata.png and b/src/forge/Images/nodata.png differ diff --git a/src/forge/Images/nodata_big.png b/src/forge/Images/nodata_big.png new file mode 100644 index 000000000..5a1231e7f Binary files /dev/null and b/src/forge/Images/nodata_big.png differ diff --git a/src/forge/Information/Component/contributor.jsx b/src/forge/Information/Component/contributor.jsx new file mode 100644 index 000000000..d20823401 --- /dev/null +++ b/src/forge/Information/Component/contributor.jsx @@ -0,0 +1,58 @@ +import React , { useEffect, useState } from 'react'; +import Slider from 'react-slick'; +import { Link } from 'react-router-dom'; + +const settings = { + dots: true, + infinite: false, + speed: 500, + slidesToShow: 3, + slidesToScroll: 3, + arrows: false, + adaptiveHeight: true, +}; + +function Contributor(props) { + const { personList } = props + const [ showList, setShowList] = useState([]); + + function initList() { + if (personList.length % 3 !== 0) { + setShowList([].concat(personList, new Array(personList.length % 3 - 1).fill({}))) + } else { + setShowList( personList ) + } + } + + useEffect(()=>{ + initList(); + },[personList]) + + return( +
    + { + showList && showList.length > 0 ? + + { + showList.map((i,k)=>{ + return( +
    + { i.name && +
    + +
    {i.name}
    +

    {i.introduction || "暂无~"}

    +
    + } +
    + ) + }) + } +
    + :"" + } +
    + + ) +} +export default Contributor; \ No newline at end of file diff --git a/src/forge/Information/Component/defaultImg.jsx b/src/forge/Information/Component/defaultImg.jsx new file mode 100644 index 000000000..ddf9ff89a --- /dev/null +++ b/src/forge/Information/Component/defaultImg.jsx @@ -0,0 +1,22 @@ +import React from 'react'; + + +function DefaultImg({name,title}){ + + function randomNumberInRange(min, max) { + // ?️ 获取 min(含)和 max(含)之间的数字 + return Math.floor(Math.random() * (max - min + 1)) + min; + } + + return( +
    + + + + {name} + {title} + +
    + ) +} +export default DefaultImg; \ No newline at end of file diff --git a/src/forge/Information/Component/hot.jsx b/src/forge/Information/Component/hot.jsx new file mode 100644 index 000000000..7bacc5b0d --- /dev/null +++ b/src/forge/Information/Component/hot.jsx @@ -0,0 +1,26 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; + +function Hot({list , title, deptId, temp}){ + return( +
    +

    {title}

    + { + list && list.length>0 && +
      + { + list.map((i,k)=>{ + return( +
    • + {k+1} + {i.name} +
    • + ) + }) + } +
    + } +
    + ) +} +export default Hot; \ No newline at end of file diff --git a/src/forge/Information/Component/memberApply.jsx b/src/forge/Information/Component/memberApply.jsx new file mode 100644 index 000000000..2db9d8109 --- /dev/null +++ b/src/forge/Information/Component/memberApply.jsx @@ -0,0 +1,80 @@ +import React , {forwardRef, useEffect, useState} from 'react'; +import { Modal , Form , Input , Button, Icon } from 'antd'; +import UploadImage from '../../Team/Component/UploadImage'; +import { getImageUrlAbsolute, getZoneUrl } from 'educoder'; + +const { TextArea } = Input; + +function MemberApply(props){ + const { getFieldDecorator, validateFields , setFieldsValue } = props.form; + const { current_user, onOk, visible, onCancel } = props + const [imageUrl, setImageUrl] = useState(undefined) + + useEffect(()=>{ + if (current_user) { + setImageUrl(getImageUrlAbsolute(`/${current_user.image_url}`)); + } + },[current_user]) + + function onSure(){ + validateFields((error,values)=>{ + if(!error){ + values.imageUrl = imageUrl + onOk(values) + } + }) + } + + const layout = { + labelCol: { span: 5 }, + wrapperCol: { span: 18 }, + }; + return( + + + + + } + centered + > +
    +
    + + {getFieldDecorator("name", { + initialValue: current_user.nickname, + rules:[{ required:true,message:"请输入申请原因" }] + })( + + )} + + + setImageUrl(url) } url={ getImageUrlAbsolute(`/${current_user.image_url}`)} action={ getZoneUrl(`/api/cms/common/upload`) } /> + + + {getFieldDecorator("introduction",{ + rules:[{ required:true,message:"请输入会员简介" }] + })( +