From 2d8c3c5853a623cd1fc41cddbef8d2bf461e44ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= <792998983@qq.com> Date: Thu, 25 Nov 2021 09:24:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5=E5=8A=A8?= =?UTF-8?q?=E6=95=88=E6=9E=9C=EF=BC=8C=E5=9B=BE=E7=89=87=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/home/FifthSection/index.jsx | 175 ++++- src/home/FifthSection/index.scss | 32 +- src/home/FirstSection/index.jsx | 76 ++- src/home/FirstSection/index.scss | 602 +++++++++++++++--- src/home/FourthSection/index.jsx | 82 +-- src/home/FourthSection/index.scss | 124 +++- src/home/SecondSection/index.jsx | 96 +-- src/home/SecondSection/index.scss | 36 +- src/home/SeventhSection/index.jsx | 26 + src/home/SeventhSection/index.scss | 6 +- src/home/SixthSection/index.jsx | 22 + src/home/ThirdSection/index.jsx | 20 +- src/home/ThirdSection/index.scss | 5 +- src/home/img/1-box1.png | Bin 0 -> 12837 bytes src/home/img/1-box2.png | Bin 0 -> 16242 bytes src/home/img/1-box3.png | Bin 0 -> 26708 bytes src/home/img/1-box4.png | Bin 0 -> 10578 bytes src/home/img/1-circle.png | Bin 0 -> 95670 bytes src/home/img/1-code-bed.png | Bin 0 -> 132828 bytes src/home/img/1-code.png | Bin 0 -> 79242 bytes src/home/img/{glass.png => 1-glass.png} | Bin src/home/img/{logo.png => 1-logo.png} | Bin src/home/img/{text1.png => 1-text1.png} | Bin src/home/img/{text2.png => 1-text2.png} | Bin src/home/img/{text3.png => 1-text3.png} | Bin src/home/img/{text4.png => 1-text4.png} | Bin src/home/img/{ballBg.png => 3-ballBg.png} | Bin .../img/{dashCircle.png => 3-dashCircle.png} | Bin .../img/{codeManage.png => 4-codeManage.png} | Bin .../{editorInline.png => 4-editorInline.png} | Bin src/home/img/{logoLine.png => 4-logo.png} | Bin src/home/img/{map.png => 4-map.png} | Bin src/home/img/{task.png => 4-task.png} | Bin src/home/img/{teamwork.png => 4-teamwork.png} | Bin ...{versionManage.png => 4-versionManage.png} | Bin src/home/img/gridbak.png | Bin 230694 -> 0 bytes src/home/index.jsx | 18 +- 37 files changed, 1043 insertions(+), 277 deletions(-) create mode 100644 src/home/img/1-box1.png create mode 100644 src/home/img/1-box2.png create mode 100644 src/home/img/1-box3.png create mode 100644 src/home/img/1-box4.png create mode 100644 src/home/img/1-circle.png create mode 100644 src/home/img/1-code-bed.png create mode 100644 src/home/img/1-code.png rename src/home/img/{glass.png => 1-glass.png} (100%) rename src/home/img/{logo.png => 1-logo.png} (100%) rename src/home/img/{text1.png => 1-text1.png} (100%) rename src/home/img/{text2.png => 1-text2.png} (100%) rename src/home/img/{text3.png => 1-text3.png} (100%) rename src/home/img/{text4.png => 1-text4.png} (100%) rename src/home/img/{ballBg.png => 3-ballBg.png} (100%) rename src/home/img/{dashCircle.png => 3-dashCircle.png} (100%) rename src/home/img/{codeManage.png => 4-codeManage.png} (100%) rename src/home/img/{editorInline.png => 4-editorInline.png} (100%) rename src/home/img/{logoLine.png => 4-logo.png} (100%) rename src/home/img/{map.png => 4-map.png} (100%) rename src/home/img/{task.png => 4-task.png} (100%) rename src/home/img/{teamwork.png => 4-teamwork.png} (100%) rename src/home/img/{versionManage.png => 4-versionManage.png} (100%) delete mode 100755 src/home/img/gridbak.png diff --git a/src/home/FifthSection/index.jsx b/src/home/FifthSection/index.jsx index 70150aeb5..4fee6b129 100644 --- a/src/home/FifthSection/index.jsx +++ b/src/home/FifthSection/index.jsx @@ -1,47 +1,123 @@ -import React, { memo } from 'react'; +import React, { memo, useState, useEffect } from 'react'; import { Collapse, Button } from 'antd'; +import moment from 'moment'; import Line from '../Line'; +import { getTaskCategory } from '../../military/task/api'; +import { taskModeIdArr } from '../../military/task/static'; + import './index.scss'; const { Panel } = Collapse; +const taskModeNameArr = []; +for (const item of taskModeIdArr) { + taskModeNameArr[item.dicItemCode] = item.dicItemName; +} + + + + +let taskArrMock = [ + { + id: 447, + name: "研发配置要求为包含网络化协同控制仿真验证与多样化目标识别仿真验证模块的1套软件和1份测试报告。", + taskModeId: 1, //悬赏模式 + bounty: 1.0, //赏金 + description: "
统筹管理员能看到不?
", //详情 + createdAt: "2021-11-10 17:42:38", //创建时间 + publishedAt: "2021-11-10 17:43:41", //发布时间 + collectingDays: 30, //成果提交天数 + }, + { + id: 448, + name: "研发配置要求验证与多样化目标识别仿真验证模块的1套软件和1份测试报告。", + taskModeId: 2, //悬赏模式 + bounty: 100.0, //赏金 + description: "统筹管理员能看到不?
", //详情 + createdAt: "2021-11-10 17:42:38", + publishedAt: "2021-11-11 17:43:41", + collectingDays: 30, + }, + { + id: 449, + name: "研发配置要求为包含网络", + taskModeId: 3, //悬赏模式 + bounty: 10000.0, //赏金 + description: "统筹管理员能看到不?
", //详情 + createdAt: "2021-11-10 17:42:38", + publishedAt: "2021-11-12 17:43:41", + collectingDays: 30, + } +] + +function getSomeDayAfter(initailDate, nDay) { + return moment(new Date(initailDate).setDate(new Date(initailDate).getDate() + nDay)).format('YYYY-MM-DD'); +} function FifthSection({ fifth }) { + + const [taskCategoryArr, setTaskCategoryArr] = useState([]); + const [taskArr, serTaskArr] = useState(taskArrMock); + + // 获取分类数据 + useEffect(() => { + getTaskCategory().then(data => { + if (data) { + for (const item of data) { + switch (item.name) { + case "军事理论": + item.icon = "junshililun1"; + break; + case "政策法规": + item.icon = "zhengcefagui1"; + break; + case "医学": + item.icon = "yixue1"; + break; + case "电子": + item.icon = "dianzi1"; + break; + case "通信": + item.icon = "tongxin1"; + break; + case "计算机科学": + item.icon = "jisuanji1"; + item.name = "计算机"; + break; + case "软件工程": + item.icon = "ruanjiangongcheng1"; + break; + case "人工智能": + item.icon = "rengongzhineng"; + break; + case "知识图谱": + item.icon = "zhishitupu"; + break; + case "大数据": + item.icon = "dashuju"; + break; + default: + item.icon = "dianzi1"; + } + } + setTaskCategoryArr(data.slice(0, 10)); + } + }); + }, []); + + return ({item.name}
++ + {taskModeNameArr[item.taskModeId]} + ¥ {item.bounty} +
+ ++ + 发布时间 + {moment(item.publishedAt || item.createdAt).format('YYYY-MM-DD')} +
+ ++ + 截止时间 + {getSomeDayAfter(item.publishedAt || item.createdAt, item.collectingDays)} +
+研发配置要求为包含网络化协同控制仿真验证与多样化目标识别仿真验证模块的1套软件和1份测试报告。
@@ -89,6 +193,7 @@ function FifthSection({ fifth }) {
研发配置要求为包含网络化协同控制仿真验证与多样化目标识别仿真验证模块的1套软件和1份测试报告。
- 1 - - c - d - /o - pt - /Us - ers - /de - mo - /app - /sta - tic - --
{k + 2}{i.str}
+ 1 + + ~/ + c + d + + /opt + /Us + ers + /de + mo + /app + /sta + tic + + ++
{k + 2}{i.str}
免费提供海量代码仓储
记录和维护软件演化全过程
@@ -97,7 +101,7 @@ function FourthSection({ fourth }) {轻量级修改和提交
@@ -106,7 +110,7 @@ function FourthSection({ fourth }) {代码安全和质量管控
diff --git a/src/home/FourthSection/index.scss b/src/home/FourthSection/index.scss index 7ce99075a..34ab2b09d 100644 --- a/src/home/FourthSection/index.scss +++ b/src/home/FourthSection/index.scss @@ -2,8 +2,7 @@ text-align: center; min-height: 45vh; padding: 30px 0 20px 0; - // background: linear-gradient(#fff 0%, #cbdcff 100%); - background: url(../img/map.png) no-repeat; + background: url(../img/4-map.png) no-repeat; .fourth-main { margin: 20px auto; @@ -87,9 +86,29 @@ color: #05cfc8; } } + .code-input{ + position: relative; + } + .animation-is-typing::before { + position: absolute; + top: 0; + right: -0.8em; + bottom: 0; + display: block; + height: 100%; + margin-top: auto; + margin-bottom: auto; + font-size: 1em; + line-height: 1em; + content: "▊"; + } .word-item { opacity: 0; } + .js-type-letters{ + opacity: 0; + } + .fourth-projects { position: relative; @@ -162,36 +181,36 @@ } } - .project-item:nth-child(2){ - margin-top:80px; - border-color: #DF0757; - .fourth-item-circle{ + .project-item:nth-child(2) { + margin-top: 80px; + border-color: #df0757; + .fourth-item-circle { animation: turnCircle2 infinite 10s linear; } .fourth-item-circle::before, .fourth-item-circle::after { - background: linear-gradient(-45deg, #DF0757 0, #ffa38d 100%); + background: linear-gradient(-45deg, #df0757 0, #ffa38d 100%); } } - .project-item:nth-child(3){ - margin-top:160px; - border-color: #00FFA4; + .project-item:nth-child(3) { + margin-top: 160px; + border-color: #00ffa4; .fourth-item-circle::before, .fourth-item-circle::after { - background: linear-gradient(-45deg, #00FFA4 0, #f2FFA4 100%); + background: linear-gradient(-45deg, #00ffa4 0, #f2ffa4 100%); } } - .project-item:nth-child(4){ - margin-top:140px; - border-color: #8B5FF0; - .fourth-item-circle{ + .project-item:nth-child(4) { + margin-top: 140px; + border-color: #8b5ff0; + .fourth-item-circle { animation: turnCircle2 infinite 10s linear; } .fourth-item-circle::before, .fourth-item-circle::after { - background: linear-gradient(-45deg, #8B5FF0 0, #fe86ff 100%); + background: linear-gradient(-45deg, #8b5ff0 0, #fe86ff 100%); } } @@ -200,17 +219,64 @@ animation: taskPicture 1s 1 forwards; } .code-box-code { - animation: taskCode 1s 1 .75s forwards; + animation: taskCode 1s 1 0.75s forwards; } + .hadoopCode .code-content { + margin: 0; + animation: showBackgroud 16s 2s infinite; + } + + .animation-is-typing::before { + animation: BlinkingCursor .8s infinite; + } + + .js-type-letters{ + animation: BlinkingCursor-1 16s infinite; + } + .word-item { - animation: show 0.2s 1 forwards; + animation: show 16s infinite; } - &.fourth-projects{ - animation: taskPicture 1s 1 1.5s forwards; + &.fourth-projects { + animation: taskPicture 1s 1 1s forwards; } } @keyframes show { + 0% { + opacity: 0; + } + 1% { + opacity: 1; + } + 70% { + opacity: 1; + } + 71% { + opacity: 0; + } + 100% { + opacity: 0; + } + } + + @keyframes BlinkingCursor-1 { + 0% { + opacity: 0; + } + 2% { + opacity: 1; + } + 4% { + opacity: 0; + } + 100% { + opacity: 0; + } + + } + + @keyframes BlinkingCursor { 0% { opacity: 0; } @@ -219,6 +285,21 @@ } } + @keyframes showBackgroud { + 0% { + opacity: 1; + } + 71% { + opacity: 1; + } + 72% { + opacity: 0; + } + 100% { + opacity: 0; + } + } + @keyframes taskPicture { 0% { opacity: 0; @@ -240,8 +321,6 @@ } } - - @keyframes turnCircle { 0% { transform: rotate(0deg); @@ -259,5 +338,4 @@ transform: rotate(270deg); } } - } diff --git a/src/home/SecondSection/index.jsx b/src/home/SecondSection/index.jsx index cd175a4e6..97587e85f 100644 --- a/src/home/SecondSection/index.jsx +++ b/src/home/SecondSection/index.jsx @@ -23,11 +23,44 @@ let setting = { vertical: true, } +const sliderData = [ + { + id: 1, + type: 1, + tag: '热点资讯', + title: "数字化转型要重视开源", + content: "习主席指出,要紧跟科技强国建设进程,优化国防创新布局和环境条件,用好用足各方面优势力量和资源, sunt in culpa qui officia deserunt mollit id est laborum.", + time: "2021-09-13", + }, + { + id: 2, + type: 1, + tag: '热点资讯', + title: "数字化转型要重视开源数字化转型要重视开源数字化转型要重视开源", + content: "习主席指出,要紧跟科技强国建设进程,优化国防创新布局和环境条件,用好用足各方面优势力量和资源,加快推进国防科技创新加优化国防创新布局和环境条件,用好用足各方面优势力量和资源,大幅加强科研投入,提高科研产出优化国防创新布局和环境条件,用好用足各方面优势力量和资源,大幅加强科研投入,提高科研产出", + time: "2021-09-13", + }, + { + id: 3, + type: 2, + tag: '红山书籍', + title: "数字化转型要重视开源数字化转型要重视开源数字化转型要重视开源", + content: "习主席指出,要紧跟科技强国建设进程,优化国防创新布局和环境条件,用好用足各方面优势力量和资源, sunt in culpa qui officia deserunt mollit id est laborum.", + time: "2021-09-13", + }, + { + id: 4, + type: 3, + tag: '热点资讯', + title: "数字化转型要重视开源", + content: "习主席指出,要紧跟科技强国建设进程,优化国防创新布局和环境条件,用好用足各方面优势力量和资源, sunt in culpa qui officia deserunt mollit id est laborum.", + time: "2021-09-13", + } +] + function SecondSection({ second }) { return ( - //习主席指出,要紧跟科技强国建设进程,优化国防创新布局和环境条件,用好用足各方面优势力量和资源, sunt in culpa qui officia deserunt mollit id est laborum.
- 2021-09-13 - -加快推进国防科技创新加优化国防创新布局和环境条件,用好用足各方面优势力量和资源,大幅加强科研投入,提高科研产出优化国防创新布局和环境条件,用好用足各方面优势力量和资源,大幅加强科研投入,提高科研产出.
- 2021-09-15 - -习主席指出,要紧跟科技强国建设进程,优化国防创新布局和环境条件,用好用足各方面优势力量和资源,大幅加强科研投入,提高科研产出
- 2021-09-12 - -加快推进国防科技创新加优化国防创新布局和环境条件,用好用足各方面优势力量和资源,大幅加强科研投入,提高科研产出.
- 2021-09-15 - -{item.content}
+ {item.time} +>HdbHx_Ep8`=oe7i_vw6vr)VOZ!7o-nW(J}rDJpPNgQzEI
z6VK!_YT{E94DnLqni^_Fr&_xAiRKQQe7B{BGLF<_X{UAgvYD6P%6*NN#?8+@^xZA6
zI;}(HIn^H4-Ec$C@R8adq9(UBDvb^nys0U2$mRq;8ff9zPK?k@CvTd%Ds#yEWFRke
za(`%xr x3l`5 rfAxuQ1Ks2o3bxH!@G5+#&T1+(o`#$+5Is(C~PUeJWbdInxj
z%)-lw4tz>~VD}TdAOG<~^YIHc-FdTenpRV3q(;tPb{X=-r7#+U>^)b-%lfDgBFKv3
zdOEBY4Z &k74nZc;rTdlAjzyJ%PmS0U!+8$S(N6u_rrFP{a7!N{mtAgBFngt+@bY
zL_Vwx79?3*TVPfI^3+&>nz`YV$6>*UlwW5ySC+aFu -yZ6BE=g6<_-o5P`GiS7}uT<-|W8K$uDFpz5<=*d`
zq$_^;B>+bR5p?XwXevV@o#IhWC>#TFnzjr)cwCdC+CX4f#x*`{T{zLdOod0MAy4=L
zgE?ena3*BlF`8)kbcxr8tJEx8SZuDFd_YE;ad71EH0K9B$ir{5eU<+v;&am~J!|_8
z?fP5D1Q)u*EtW4|ciw1y^iKit0sQVhD{cA7xd(tB^i@N|qg4|G8BK!$mVqdABmf@1
zN}2No3`9Vh4?vm7FhM7oIKjYzVYt07#2gtqf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