diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 000000000..b6bb1a5df --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,1179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1584692398144 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..04a210b95 --- /dev/null +++ b/LICENSE @@ -0,0 +1,124 @@ +木兰宽松许可证, 第2版 + +2020年1月 http://license.coscl.org.cn/MulanPSL2 + +您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束: + +0. 定义 + +“软件” 是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。 + +“贡献” 是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。 + +“贡献者” 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。 + +“法人实体” 是指提交贡献的机构及其“关联实体”。 + +“关联实体” 是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 + +1. 授予版权许可 + +每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。 + +2. 授予专利许可 + +每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。 + +3. 无商标许可 + +“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。 + +4. 分发限制 + +您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。 + +5. 免责声明与责任限制 + +“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。 + +6. 语言 + +“本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。 + +条款结束 + +如何将木兰宽松许可证,第2版,应用到您的软件 + +如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步: + +1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字; + +2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中; + +3, 请将如下声明文本放入每个源文件的头部注释中。 + +Copyright (c) [Year] [name of copyright holder] +[Software Name] is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. +Mulan Permissive Software License,Version 2 +Mulan Permissive Software License,Version 2 (Mulan PSL v2) + +January 2020 http://license.coscl.org.cn/MulanPSL2 + +Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions: + +0. Definition + +Software means the program and related documents which are licensed under this License and comprise all Contribution(s). + +Contribution means the copyrightable work licensed by a particular Contributor under this License. + +Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License. + +Legal Entity means the entity making a Contribution and all its Affiliates. + +Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity. + +1. Grant of Copyright License + +Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not. + +2. Grant of Patent License + +Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken. + +3. No Trademark License + +No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4. + +4. Distribution Restriction + +You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software. + +5. Disclaimer of Warranty and Limitation of Liability + +THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +6. Language + +THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL. + +END OF THE TERMS AND CONDITIONS + +How to Apply the Mulan Permissive Software License,Version 2 (Mulan PSL v2) to Your Software + +To apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps: + +Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner; +Create a file named "LICENSE" which contains the whole context of this License in the first directory of your software package; +Attach the statement to the appropriate annotated syntax at the beginning of each source file. +Copyright (c) [Year] [name of copyright holder] +[Software Name] is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css index 0d146204c..8e39999c2 100644 --- a/public/css/edu-purge.css +++ b/public/css/edu-purge.css @@ -1268,11 +1268,17 @@ a.shixun-task-btn { /*-----------实训配置、评测脚本-------------*/ +@font-face { + font-family: "iconfont"; /* Project id 2340181 */ + src: url('iconfont.woff2?t=1631773579834') format('woff2'), + url('iconfont.woff?t=1631773579834') format('woff'), + url('iconfont.ttf?t=1631773579834') format('truetype'); +} html body { font-size: 14px; line-height: 2.0; background: #fafafa; - font-family: "Microsoft YaHei", "SimSun"; + font-family: "iconfont"; color: #05101a; height: 100%; position: relative; @@ -6705,10 +6711,13 @@ p{ right: 0px; top:4px; color: #999; +<<<<<<< HEAD +======= } .ant-input, .ant-input .ant-input-suffix{ background-color: #fff!important; } .has-error .ant-input{ background-color: #FEF1F0!important; +>>>>>>> pre_develop } \ No newline at end of file diff --git a/public/css/iconfont.css b/public/css/iconfont.css index 3866189c2..37a53c1c3 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=1632964996877') format('woff2'), - url('iconfont.woff?t=1632964996877') format('woff'), - url('iconfont.ttf?t=1632964996877') format('truetype'); + src: url('iconfont.woff2?t=1634881729644') format('woff2'), + url('iconfont.woff?t=1634881729644') format('woff'), + url('iconfont.ttf?t=1634881729644') format('truetype'); } .iconfont { diff --git a/public/css/iconfont.ttf b/public/css/iconfont.ttf index cffaad689..23055ead5 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 af2a764e6..5767eca9c 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 7d4cb19bb..1d83b46b8 100644 Binary files a/public/css/iconfont.woff2 and b/public/css/iconfont.woff2 differ diff --git a/public/favicon-.ico b/public/favicon-.ico new file mode 100755 index 000000000..05b9d163e Binary files /dev/null and b/public/favicon-.ico differ diff --git a/public/favicon.ico b/public/favicon.ico index 75a4c3dfd..961f30521 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/src/App.js b/src/App.js index 3072aca5b..272fb4781 100644 --- a/src/App.js +++ b/src/App.js @@ -10,7 +10,7 @@ import { import axios from 'axios'; import LoginDialog from './modules/login/LoginDialog'; import 'babel-polyfill'; -import Loading from './Loading' +import Loading from './Loading'; import Loadable from 'react-loadable'; import marked from './common/marked'; @@ -97,6 +97,10 @@ const ProjectIndex = Loadable({ loading: Loading, }); +const Home = Loadable({ + loader: () => import('./home/Index'), + loading: Loading, +}) // const CreateMerge = Loadable({ // loader: () => import('./forge/Merge/NewMerge'), // loading: Loading, @@ -353,34 +357,28 @@ class App extends Component { {/* 判断为用户/组织,并进入对应页面 */} { pathType === 'User' ? - { - return () - } + { + return () } - /> : pathType === 'Organization' ? { - return () - } - }> - : pathType === '404' ? : - ( - personal && personal.length > 0 ? - - : - - ) - } - /> - // - // + } + /> : pathType === 'Organization' ? { + return () + } + }> + : pathType === '404' ? : + "" } - - + ( + + ) + } + /> {/* 个人主页 */} -
+ {/* {value && showhtml(value)} */} +
- {value && showhtml(value)} - {/* -

© Copyright 2007~2021 国防科技大学Trustie团队 & IntelliDE 湘ICP备 17009477号

*/} + {value && showhtml(value)} + {/*
+
+
    + Gitlink(确实开源) +

    (确实开源)

    +
+ + +
    +
  • 加入我们
  • +
  • +
    +
  • 公众号
  • + 公众号 +
+
+
  • QQ群
  • + QQ群 +
    + + +
    +

    ©Copyright 2007~2021 国防科技大学Gitlink团队 & IntelliDE
    湘ICP备 17009477号

    +
    */} ) diff --git a/src/forge/Head/header.scss b/src/forge/Head/header.scss index 263cd1ee5..1d5ac90fc 100644 --- a/src/forge/Head/header.scss +++ b/src/forge/Head/header.scss @@ -262,4 +262,77 @@ .text-center{ text-align: center; +} + +.footEdition{ + background-color: #171B23; + .footContent{ + display: flex; + align-items: flex-start; + padding:86px 0px; + justify-content: space-around; + width: 1200px; + margin:0px auto; + ul{ + min-width: 120px; + text-align: left; + margin-right: 80px; + &.center{ + text-align: center; + } + &>p{ + height: 22px; + font-size: 16px; + font-weight: 400; + color: #FFFFFF; + line-height: 22px; + } + &>img{ + width: 100px; + height: 100%; + margin-bottom: 30px; + margin-top: 25px; + border-radius: 10px; + } + li{ + height: 20px; + font-size: 14px; + font-weight: 400; + line-height: 20px; + color: #BDC2D1; + margin-bottom: 15px!important; + a{ + color: #BDC2D1!important; + &:hover{ + text-decoration: underline; + } + } + &.thehead{ + height: 25px; + font-size: 18px; + font-weight: 600; + color: #FFFFFF; + line-height: 25px; + margin-bottom: 20px!important; + } + &.theline{ + display: flex; + img{ + width: 80px; + height: 80px; + border-radius: 3px; + } + } + } + } + } + .copyrightDesc{ + font-size: 12px; + font-weight: 400; + color: #BDC2D1; + line-height: 28px; + padding:15px 0px; + text-align: center; + background-color: #1B212C; + } } \ No newline at end of file diff --git a/src/forge/Index.js b/src/forge/Index.js index c2e369169..6620bd86e 100644 --- a/src/forge/Index.js +++ b/src/forge/Index.js @@ -60,12 +60,6 @@ class Index extends Component { )} >
    - {/* ( - - )} - > */} ( @@ -73,12 +67,12 @@ class Index extends Component { )} > - ( )} - > + >
    */} ); @@ -90,10 +84,3 @@ export default withRouter( parentSelector: ".newMain", })(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Index)))) ); - -// export default withRouter( -// ImageLayerOfCommentHOC({ -// imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget", -// parentSelector: ".newMain", -// })(Index) -// ); diff --git a/src/forge/Main/CoderRootBranch.js b/src/forge/Main/CoderRootBranch.js new file mode 100644 index 000000000..67bbb4619 --- /dev/null +++ b/src/forge/Main/CoderRootBranch.js @@ -0,0 +1,91 @@ +import React , { useState, useEffect } from 'react'; +import { Link } from "react-router-dom"; +import { Dropdown , Menu , Icon , Tooltip , Spin } from 'antd'; +import { truncateCommitId } from '../common/util'; +import { getBranch } from '../GetData/getData'; +import Nodata from '../Nodata'; +import './list.scss'; + +function turnbar(str){ + if(str && str.length>0 && str.indexOf("/")>-1){ + return str.replaceAll('/','%2F'); + } + return str; +} +export default ((props)=>{ + const [ data , setData ] =useState(undefined); + const [ isSpin , setIsSpin ] =useState(true); + + const { projectsId , owner } = props.match.params; + const { isManager , isDeveloper , projectDetail } = props; + useEffect(()=>{ + getBranchs(projectsId, owner); + },[projectsId]) + + async function getBranchs(id,owner){ + let result = await getBranch(id,owner); + setData(result); + setIsSpin(false); + } + + const list =()=>{ + if(data && data.length>0){ + return( + +
      + { + data.map((item,key)=>{ + return( +
    • +
      + {item.name} +

      + {item.last_commit && truncateCommitId(item.last_commit.sha)} + {item.last_commit && item.last_commit.message} + 最后更新于{item.last_commit && item.last_commit.time_from_now} +

      +
      + + { + (isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) && + 创建合并请求 + } + + + + + + +
    • + ) + }) + } +
    +
    + ) + }else if(data && data.length === 0){ + return ( ) + } + } + const menu =(zip_url,tar_url)=> ( + + ZIP + TAR.GZ + + ) + return( + +
    + +
    +

    分支列表

    +
    {list()}
    +
    +
    +
    +
    + ) +}) + + + diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index b4d17a81c..66822ddbc 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -3,6 +3,7 @@ import { Spin, Tooltip } from 'antd'; import { Link, Route, Switch } from 'react-router-dom'; import { Content, AlignTop } from '../Component/layout'; import DetailBanner from './sub/DetailBanner'; +import { numFormat } from 'educoder'; import '../css/index.scss' import './list.scss'; @@ -570,6 +571,18 @@ class Detail extends Component { } + {/*
    + { + projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ? + this.textFunc(projectDetail.forked_from_project_id,projectDetail.fork_info) + :"" + } + { + projectDetail && projectDetail.type && projectDetail.type !== 0 ? + 镜像自 {projectDetail.mirror_url} + :"" + } +
    */} { firstSync ? "" : { + this.getIssueList(); + } + // 获取列表数据 + getIssueList = () => { + const { projectsId, owner } = this.props.match.params; + const url = `/${owner}/${projectsId}/releases.json`; + axios.get(url).then((result) => { + if (result) { + this.setState({ + data: result.data, + releases:result.data.releases, + issues: result.data.issues, + isSpin: false + }) + } + }).catch((error) => { + console.log(error); + }) + } + + // 显示版本描述 + showBody=(key,flag)=>{ + let { releases } = this.state; + releases[key].bodyshow = !flag; + this.setState({ + releases + }) + } + + renderList = (releases) => { + const { projectsId , owner } = this.props.match.params; + if (releases && releases.length > 0) { + return ( + releases.map((item, key) => { + return ( +
    + + {item.draft} + {item.created_at} + + + {item.tag_name} + + +
    + + {item.name} + (编辑) + + + this.showBody(key,item.bodyshow)}> + {item.user_name}:发布了这个版本,并在发布后提交给{item.target_commitish} + + { + item.bodyshow && + } + +

    + TAR + ZIP +

    +
    +
    + ) + }) + ) + } else if (releases && releases.length === 0) { + return ( ) + } + } + + render() { + const { projectsId ,owner } = this.props.match.params; + const { data , releases , isSpin } = this.state + + return ( +
    +
    + 版本发布 + { + data && data.user_permission ? + + 发布新版 + : '' + } +
    +
    +
    {this.renderList(releases)}
    +
    +
    + ) + } +} +export default version; \ No newline at end of file diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js index 1cd3969de..0df0d910f 100644 --- a/src/forge/users/Infos.js +++ b/src/forge/users/Infos.js @@ -123,6 +123,8 @@ class Infos extends Component { }); const { current_user } = this.props; const { username } = this.props.match.params; + const { pathname } = this.props.location; + const { notice } = this.state; let url = `/users/${username || (current_user && current_user.login)}.json`; axios.get(url).then((result) => { diff --git a/src/forge/users/Team.jsx b/src/forge/users/Team.jsx index 2252d3efd..9ddfae161 100644 --- a/src/forge/users/Team.jsx +++ b/src/forge/users/Team.jsx @@ -48,7 +48,6 @@ function Team(props){ ) - return(
    diff --git a/src/home/FifthEdition.jsx b/src/home/FifthEdition.jsx new file mode 100644 index 000000000..6e709b434 --- /dev/null +++ b/src/home/FifthEdition.jsx @@ -0,0 +1,137 @@ +import React , { useEffect } from 'react'; +import Beijing from './Img/unit/beijing.png'; +import SHJT from './Img/unit/SHJT.png'; +import DD from './Img/unit/DD.png'; +import HW from './Img/unit/HW.png'; +import ML from './Img/unit/ML.png'; +import QH from './Img/unit/QH.png'; +import QZ from './Img/unit/QZ.png'; +import TX from './Img/unit/TX.png'; +import XH from './Img/unit/XH.png'; +import XJY from './Img/unit/XJY.png'; +import ZC from './Img/unit/ZC.png'; +import GFKJ from './Img/unit/GFKJ.png'; +import BJHKHT from './Img/unit/BJHKHT.png'; +import ISCAS from './Img/unit/ISCAS.png'; +import NJDX from './Img/unit/NJDX.png'; +import CEC from './Img/unit/CEC.png'; +import KYRJLM from './Img/unit/KYRJLM.png'; +import WXYJY from './Img/unit/WXYJY.png'; +import HSKY from './Img/unit/HSKY.png'; +import LSLM from './Img/unit/LSLM.png'; +import TG from './Img/unit/TG.png'; +import LC from './Img/unit/LC.png'; +import YKD from './Img/unit/YKD.png'; + +const list = [ + {image_url:GFKJ, name:"国防科技大学",src:"https://www.nudt.edu.cn/"}, + {image_url:TG, name:"头歌",src:"https://www.educoder.net/"}, + {image_url:XJY, name:"长沙先进技术研究院",src:"https://www.hnjmrh.gov.cn/newweb/service/detail/305/"}, + {image_url:Beijing, name:"北京大学",src:"https://www.pku.edu.cn/"}, + {image_url:BJHKHT, name:"北京航空航天",src:"https://www.buaa.edu.cn/"}, + {image_url:ISCAS, name:"ISCAS",src:"http://www.iscas.ac.cn/"}, + {image_url:NJDX, name:"南京大学",src:"https://www.nju.edu.cn/"}, + {image_url:DD, name:"滴滴",src:"https://www.didiglobal.com/"}, + {image_url:CEC, name:"CEC",src:"https://www.cec.com.cn/"}, + {image_url:HW, name:"华为",src:"https://www.huawei.com/"}, + {image_url:ML, name:"木兰开源社区",src:"https://www.mulanos.cn/"}, + {image_url:TX, name:"腾讯",src:"https://www.tencent.com/zh-cn"}, + {image_url:KYRJLM, name:"中国开源软件推进联盟",src:"http://www.copu.org.cn/"}, + {image_url:XH, name:"中国计算机学会",src:"https://www.ccf.org.cn/"}, + {image_url:QZ, name:"openi启智",src:"https://www.openi.org.cn/"}, + {image_url:HSKY, name:"红山开源",src:"https://osredm.com/"}, + {image_url:LSLM, name:"绿色产业联盟",src:"https://www.opengcc.org/"}, + {image_url:ZC, name:"中创软件",src:"http://www.cvicse.com/"}, + {image_url:LC, name:"浪潮",src:"https://cloud.inspur.com/"}, + {image_url:YKD, name:"ucloud",src:"https://www.ucloud.cn/"} +] +// const settings = { +// dots: false, +// infinite: true, +// slidesToShow: 6, +// slidesToScroll: 1, +// autoplay: true, +// speed: 2000, +// autoplaySpeed: 2000, +// cssEase: "linear", +// rows:2, +// arrows:false +// }; +function FifthEdition() { + + useEffect(()=>{ + if(list.length>10){ + Init(); + } + },[]) + + function Init() { + let box = document.getElementById('scrollBox1'); + scrollUp(); + var myTimer = setInterval(scrollUp, 10); + // 鼠标移入container 元素上 清除定时器 停止滚动 + box.onmouseover = () => { + clearInterval(myTimer); + } + // 鼠标移出container 元素上 继续滚动 + // 60表示每隔60毫秒向上滚动一次 + box.onmouseout = () => { + myTimer = setInterval(scrollUp, 10); + } + } + + function scrollUp() { + let box = document.getElementById('scrollBox1'); + if(box){ + let con1 = document.getElementById('box1'); + if (box.scrollLeft >= con1.clientWidth) { + box.scrollLeft = 0; + } else { + box.scrollLeft++; + } + } + } + + return( +
    +
    +
      + { + list && list.map((i,k)=>{ + return( +
    • {i.name}/
    • + ) + }) + } +
    + {list.length > 10 && +
      + { + list && list.map((i,k)=>{ + return( +
    • {i.name}/
    • + ) + }) + } +
    + } +
    + {/* + { + list && list.map((i,k)=>{ + return( +
  • {i.name}/
  • + ) + }) + } + {list.length > 10 && list && list.map((i,k)=>{ + return( +
  • {i.name}/
  • + ) + }) + } +
    */} +
    + ) +} +export default FifthEdition; \ No newline at end of file diff --git a/src/home/Footnav.jsx b/src/home/Footnav.jsx new file mode 100644 index 000000000..b39404050 --- /dev/null +++ b/src/home/Footnav.jsx @@ -0,0 +1,47 @@ +import React from 'react'; +import Img from './Img/gitlink.png'; +import qqImg from './Img/qq.png'; +function Footnav() { + return( +
    +
    +
      + Gitlink(确实开源) +

      (确实开源)

      +
    + + +
      +
    • 加入我们
    • +
    • + {/*
      +
    • 公众号
    • + 公众号 +
    */} +
    +
  • QQ群
  • +
    + QQ群 +
    +
    + + +
    +

    ©Copyright 2007~2021 国防科技大学GitLink团队 & IntelliDE
    湘ICP备 17009477号

    +
    + ) +} +export default Footnav; \ No newline at end of file diff --git a/src/home/Headnav.jsx b/src/home/Headnav.jsx new file mode 100644 index 000000000..0127e337b --- /dev/null +++ b/src/home/Headnav.jsx @@ -0,0 +1,31 @@ +import React from 'react'; +import './Index.scss'; +// import gitlink from './Img/gitlink.png'; +import { getImageUrl } from 'educoder'; + +function HeadNav({showLoginDialog,mygetHelmetapi}) { + const register = mygetHelmetapi && mygetHelmetapi.common && mygetHelmetapi.common.register; + const navbar = mygetHelmetapi && mygetHelmetapi.navbar; + return( +
    +
    +
      +
    • gitlink
    • + { + navbar && navbar.length>0&& + navbar.map((i,k)=>{ + return( +
    • {i.name}
    • + ) + }) + } +
    +
    + 登录 + 注册 +
    +
    +
    + ) +} +export default HeadNav; \ No newline at end of file diff --git a/src/home/Img/2-1bg.png b/src/home/Img/2-1bg.png new file mode 100644 index 000000000..eedd40394 Binary files /dev/null and b/src/home/Img/2-1bg.png differ diff --git a/src/home/Img/2-2-1.png b/src/home/Img/2-2-1.png new file mode 100644 index 000000000..5adfb747e Binary files /dev/null and b/src/home/Img/2-2-1.png differ diff --git a/src/home/Img/2-2-2.png b/src/home/Img/2-2-2.png new file mode 100644 index 000000000..1dde507a8 Binary files /dev/null and b/src/home/Img/2-2-2.png differ diff --git a/src/home/Img/2-2-3.png b/src/home/Img/2-2-3.png new file mode 100644 index 000000000..b0a9f6d02 Binary files /dev/null and b/src/home/Img/2-2-3.png differ diff --git a/src/home/Img/2-2-head.png b/src/home/Img/2-2-head.png new file mode 100644 index 000000000..19167bc1d Binary files /dev/null and b/src/home/Img/2-2-head.png differ diff --git a/src/home/Img/2-2-ring.png b/src/home/Img/2-2-ring.png new file mode 100644 index 000000000..f1278c5b4 Binary files /dev/null and b/src/home/Img/2-2-ring.png differ diff --git a/src/home/Img/2-3-1.png b/src/home/Img/2-3-1.png new file mode 100644 index 000000000..d3ffe77ec Binary files /dev/null and b/src/home/Img/2-3-1.png differ diff --git a/src/home/Img/2-3-1big.png b/src/home/Img/2-3-1big.png new file mode 100644 index 000000000..d3ffe77ec Binary files /dev/null and b/src/home/Img/2-3-1big.png differ diff --git a/src/home/Img/2-3-2.png b/src/home/Img/2-3-2.png new file mode 100755 index 000000000..754ed62b0 Binary files /dev/null and b/src/home/Img/2-3-2.png differ diff --git a/src/home/Img/2-3-2的副本.png b/src/home/Img/2-3-2的副本.png new file mode 100644 index 000000000..9d4bc7a75 Binary files /dev/null and b/src/home/Img/2-3-2的副本.png differ diff --git a/src/home/Img/2-3-3.png b/src/home/Img/2-3-3.png new file mode 100644 index 000000000..5728f8392 Binary files /dev/null and b/src/home/Img/2-3-3.png differ diff --git a/src/home/Img/2-3-4.png b/src/home/Img/2-3-4.png new file mode 100644 index 000000000..c3ba36e26 Binary files /dev/null and b/src/home/Img/2-3-4.png differ diff --git a/src/home/Img/2-3bg.png b/src/home/Img/2-3bg.png new file mode 100644 index 000000000..b79e16a26 Binary files /dev/null and b/src/home/Img/2-3bg.png differ diff --git a/src/home/Img/2-4-1.png b/src/home/Img/2-4-1.png new file mode 100644 index 000000000..e768466cf Binary files /dev/null and b/src/home/Img/2-4-1.png differ diff --git a/src/home/Img/2-4bg.png b/src/home/Img/2-4bg.png new file mode 100644 index 000000000..38271d613 Binary files /dev/null and b/src/home/Img/2-4bg.png differ diff --git a/src/home/Img/2-5-1.png b/src/home/Img/2-5-1.png new file mode 100644 index 000000000..788d52857 Binary files /dev/null and b/src/home/Img/2-5-1.png differ diff --git a/src/home/Img/2-5-2.png b/src/home/Img/2-5-2.png new file mode 100644 index 000000000..42ef098c7 Binary files /dev/null and b/src/home/Img/2-5-2.png differ diff --git a/src/home/Img/2-5bg.png b/src/home/Img/2-5bg.png new file mode 100644 index 000000000..e2fa217aa Binary files /dev/null and b/src/home/Img/2-5bg.png differ diff --git a/src/home/Img/2-6-1.png b/src/home/Img/2-6-1.png new file mode 100644 index 000000000..628b630f2 Binary files /dev/null and b/src/home/Img/2-6-1.png differ diff --git a/src/home/Img/2-6-2.png b/src/home/Img/2-6-2.png new file mode 100644 index 000000000..69c41ca7d Binary files /dev/null and b/src/home/Img/2-6-2.png differ diff --git a/src/home/Img/3-1-1.png b/src/home/Img/3-1-1.png new file mode 100644 index 000000000..cc43b5c5b Binary files /dev/null and b/src/home/Img/3-1-1.png differ diff --git a/src/home/Img/3-1-2.png b/src/home/Img/3-1-2.png new file mode 100644 index 000000000..b1d0f7c1e Binary files /dev/null and b/src/home/Img/3-1-2.png differ diff --git a/src/home/Img/3-1.png b/src/home/Img/3-1.png new file mode 100644 index 000000000..44d7cbd59 Binary files /dev/null and b/src/home/Img/3-1.png differ diff --git a/src/home/Img/3-2-1.png b/src/home/Img/3-2-1.png new file mode 100644 index 000000000..976193b42 Binary files /dev/null and b/src/home/Img/3-2-1.png differ diff --git a/src/home/Img/3-2-2.png b/src/home/Img/3-2-2.png new file mode 100644 index 000000000..85a19f950 Binary files /dev/null and b/src/home/Img/3-2-2.png differ diff --git a/src/home/Img/3-2.png b/src/home/Img/3-2.png new file mode 100644 index 000000000..faab6643d Binary files /dev/null and b/src/home/Img/3-2.png differ diff --git a/src/home/Img/3-3-1.png b/src/home/Img/3-3-1.png new file mode 100644 index 000000000..a03097a55 Binary files /dev/null and b/src/home/Img/3-3-1.png differ diff --git a/src/home/Img/3-3-2.png b/src/home/Img/3-3-2.png new file mode 100644 index 000000000..e8f6ac94f Binary files /dev/null and b/src/home/Img/3-3-2.png differ diff --git a/src/home/Img/3-3.png b/src/home/Img/3-3.png new file mode 100644 index 000000000..c2cf179b9 Binary files /dev/null and b/src/home/Img/3-3.png differ diff --git a/src/home/Img/3-4-1.png b/src/home/Img/3-4-1.png new file mode 100644 index 000000000..f2e48d8e8 Binary files /dev/null and b/src/home/Img/3-4-1.png differ diff --git a/src/home/Img/3-4-2.png b/src/home/Img/3-4-2.png new file mode 100644 index 000000000..340b169e4 Binary files /dev/null and b/src/home/Img/3-4-2.png differ diff --git a/src/home/Img/3-4.png b/src/home/Img/3-4.png new file mode 100644 index 000000000..d2d4385a8 Binary files /dev/null and b/src/home/Img/3-4.png differ diff --git a/src/home/Img/3-bg.png b/src/home/Img/3-bg.png new file mode 100644 index 000000000..38c05b768 Binary files /dev/null and b/src/home/Img/3-bg.png differ diff --git a/src/home/Img/4-1.png b/src/home/Img/4-1.png new file mode 100644 index 000000000..9dcf949d3 Binary files /dev/null and b/src/home/Img/4-1.png differ diff --git a/src/home/Img/4-2.png b/src/home/Img/4-2.png new file mode 100644 index 000000000..8705a787e Binary files /dev/null and b/src/home/Img/4-2.png differ diff --git a/src/home/Img/4-3.png b/src/home/Img/4-3.png new file mode 100644 index 000000000..1ea4b161b Binary files /dev/null and b/src/home/Img/4-3.png differ diff --git a/src/home/Img/4-4.png b/src/home/Img/4-4.png new file mode 100644 index 000000000..4f877fbc9 Binary files /dev/null and b/src/home/Img/4-4.png differ diff --git a/src/home/Img/4-bg.png b/src/home/Img/4-bg.png new file mode 100644 index 000000000..a63cac32c Binary files /dev/null and b/src/home/Img/4-bg.png differ diff --git a/src/home/Img/banner1.png b/src/home/Img/banner1.png new file mode 100644 index 000000000..a4dbfd8bf Binary files /dev/null and b/src/home/Img/banner1.png differ diff --git a/src/home/Img/banner2.png b/src/home/Img/banner2.png new file mode 100644 index 000000000..0e0e1025c Binary files /dev/null and b/src/home/Img/banner2.png differ diff --git a/src/home/Img/banner3.png b/src/home/Img/banner3.png new file mode 100644 index 000000000..e7c5b9074 Binary files /dev/null and b/src/home/Img/banner3.png differ diff --git a/src/home/Img/banner4.png b/src/home/Img/banner4.png new file mode 100644 index 000000000..9293cab69 Binary files /dev/null and b/src/home/Img/banner4.png differ diff --git a/src/home/Img/codeafter.png b/src/home/Img/codeafter.png new file mode 100644 index 000000000..189b000fe Binary files /dev/null and b/src/home/Img/codeafter.png differ diff --git a/src/home/Img/gitlink.png b/src/home/Img/gitlink.png new file mode 100644 index 000000000..d99de4801 Binary files /dev/null and b/src/home/Img/gitlink.png differ diff --git a/src/home/Img/qq.png b/src/home/Img/qq.png new file mode 100644 index 000000000..bc243e433 Binary files /dev/null and b/src/home/Img/qq.png differ diff --git a/src/home/Img/top-1.png b/src/home/Img/top-1.png new file mode 100644 index 000000000..3b64a7239 Binary files /dev/null and b/src/home/Img/top-1.png differ diff --git a/src/home/Img/top-2.png b/src/home/Img/top-2.png new file mode 100644 index 000000000..bab464033 Binary files /dev/null and b/src/home/Img/top-2.png differ diff --git a/src/home/Img/top-3.png b/src/home/Img/top-3.png new file mode 100644 index 000000000..3824c1d3f Binary files /dev/null and b/src/home/Img/top-3.png differ diff --git a/src/home/Img/top-bg.png b/src/home/Img/top-bg.png new file mode 100644 index 000000000..688046011 Binary files /dev/null and b/src/home/Img/top-bg.png differ diff --git a/src/home/Img/unit/BJHKHT.png b/src/home/Img/unit/BJHKHT.png new file mode 100644 index 000000000..f22552c94 Binary files /dev/null and b/src/home/Img/unit/BJHKHT.png differ diff --git a/src/home/Img/unit/CEC.png b/src/home/Img/unit/CEC.png new file mode 100644 index 000000000..0d9f02aad Binary files /dev/null and b/src/home/Img/unit/CEC.png differ diff --git a/src/home/Img/unit/DD.png b/src/home/Img/unit/DD.png new file mode 100644 index 000000000..675505028 Binary files /dev/null and b/src/home/Img/unit/DD.png differ diff --git a/src/home/Img/unit/GFKJ.png b/src/home/Img/unit/GFKJ.png new file mode 100644 index 000000000..4c6413c4c Binary files /dev/null and b/src/home/Img/unit/GFKJ.png differ diff --git a/src/home/Img/unit/HSKY.png b/src/home/Img/unit/HSKY.png new file mode 100644 index 000000000..8b50bdf26 Binary files /dev/null and b/src/home/Img/unit/HSKY.png differ diff --git a/src/home/Img/unit/HW.png b/src/home/Img/unit/HW.png new file mode 100644 index 000000000..cf7db256a Binary files /dev/null and b/src/home/Img/unit/HW.png differ diff --git a/src/home/Img/unit/ISCAS.png b/src/home/Img/unit/ISCAS.png new file mode 100644 index 000000000..0f9e58cf3 Binary files /dev/null and b/src/home/Img/unit/ISCAS.png differ diff --git a/src/home/Img/unit/KYRJLM.png b/src/home/Img/unit/KYRJLM.png new file mode 100644 index 000000000..9108aa421 Binary files /dev/null and b/src/home/Img/unit/KYRJLM.png differ diff --git a/src/home/Img/unit/LC.png b/src/home/Img/unit/LC.png new file mode 100644 index 000000000..7dd815021 Binary files /dev/null and b/src/home/Img/unit/LC.png differ diff --git a/src/home/Img/unit/LSLM.png b/src/home/Img/unit/LSLM.png new file mode 100644 index 000000000..0e6bf66bc Binary files /dev/null and b/src/home/Img/unit/LSLM.png differ diff --git a/src/home/Img/unit/ML.png b/src/home/Img/unit/ML.png new file mode 100644 index 000000000..6b208d38d Binary files /dev/null and b/src/home/Img/unit/ML.png differ diff --git a/src/home/Img/unit/NJDX.png b/src/home/Img/unit/NJDX.png new file mode 100644 index 000000000..ef81575bb Binary files /dev/null and b/src/home/Img/unit/NJDX.png differ diff --git a/src/home/Img/unit/QH.png b/src/home/Img/unit/QH.png new file mode 100644 index 000000000..6b91a993b Binary files /dev/null and b/src/home/Img/unit/QH.png differ diff --git a/src/home/Img/unit/QZ.png b/src/home/Img/unit/QZ.png new file mode 100644 index 000000000..5152155dd Binary files /dev/null and b/src/home/Img/unit/QZ.png differ diff --git a/src/home/Img/unit/SHJT.png b/src/home/Img/unit/SHJT.png new file mode 100644 index 000000000..ea1b7ba48 Binary files /dev/null and b/src/home/Img/unit/SHJT.png differ diff --git a/src/home/Img/unit/TG.png b/src/home/Img/unit/TG.png new file mode 100644 index 000000000..052f012b4 Binary files /dev/null and b/src/home/Img/unit/TG.png differ diff --git a/src/home/Img/unit/TX.png b/src/home/Img/unit/TX.png new file mode 100644 index 000000000..59f55a74c Binary files /dev/null and b/src/home/Img/unit/TX.png differ diff --git a/src/home/Img/unit/WXYJY.png b/src/home/Img/unit/WXYJY.png new file mode 100644 index 000000000..d92f14360 Binary files /dev/null and b/src/home/Img/unit/WXYJY.png differ diff --git a/src/home/Img/unit/XH.png b/src/home/Img/unit/XH.png new file mode 100644 index 000000000..10af112b9 Binary files /dev/null and b/src/home/Img/unit/XH.png differ diff --git a/src/home/Img/unit/XJY.png b/src/home/Img/unit/XJY.png new file mode 100644 index 000000000..26091222d Binary files /dev/null and b/src/home/Img/unit/XJY.png differ diff --git a/src/home/Img/unit/YKD.png b/src/home/Img/unit/YKD.png new file mode 100644 index 000000000..cd54486d1 Binary files /dev/null and b/src/home/Img/unit/YKD.png differ diff --git a/src/home/Img/unit/ZC.png b/src/home/Img/unit/ZC.png new file mode 100644 index 000000000..0ac9cbcd0 Binary files /dev/null and b/src/home/Img/unit/ZC.png differ diff --git a/src/home/Img/unit/beijing.png b/src/home/Img/unit/beijing.png new file mode 100644 index 000000000..fe0950b29 Binary files /dev/null and b/src/home/Img/unit/beijing.png differ diff --git a/src/home/Img/多层次bg@2x.png b/src/home/Img/多层次bg@2x.png new file mode 100644 index 000000000..526a93a15 Binary files /dev/null and b/src/home/Img/多层次bg@2x.png differ diff --git a/src/home/Index.jsx b/src/home/Index.jsx new file mode 100644 index 000000000..f61ac90ce --- /dev/null +++ b/src/home/Index.jsx @@ -0,0 +1,128 @@ +import React , { useEffect , useState } from 'react'; +import "./Index.scss"; +import HeadNav from './Headnav'; +import TopEdition from './TopEdition'; +import ThirdEdition from './ThirdEdition'; +import { Anchor } from 'antd'; +import F41 from './Img/4-1.png'; +import F42 from './Img/4-2.png'; +import F43 from './Img/4-3.png'; +import F44 from './Img/4-4.png'; +import SecondEdition from './SecondEdition'; +import FifthEdition from './FifthEdition'; +import Footnav from './Footnav'; +import { TPMIndexHOC } from '../modules/tpm/TPMIndexHOC'; + +function Index(props) { + const [ value , setValue ] = useState(""); + const [ flag , setFlag ] = useState(true); + const [ isRender , setIsRender ] = useState(false); + const [ isloginCancel , setIsloginCancel ] = useState(false); + const register = props && props.mygetHelmetapi && props.mygetHelmetapi.common && props.mygetHelmetapi.common.register; + + useEffect(()=>{ + window.addEventListener("scroll",scrollListener); + },[]) + + function scrollListener(event) { + let third = document.getElementById("thirdContent").offsetTop; + let top = document.documentElement.scrollTop + 60; + if(top>= third) + { + setFlag(false) + }else{ + setFlag(true) + } + } + + function changeActive(params) { + if(params){ + setValue(params); + let h = params.split("#")[1]; + let t = document.getElementById(h).offsetTop; + document.documentElement.scrollTop = t-100; + }else{ + setValue(""); + } + } + + + return( +
    + + +
    +

    Gitlink,新一代开源创新服务平台

    + { + flag && + +
  • changeActive("#hadoop")} className={value === "#hadoop"?"active":""}>分布式协作开发
  • +
  • changeActive("#oneStop")} className={value === "#oneStop"?"active":""}>一站式过程管理
  • +
  • changeActive("#highDevops")} className={value === "#highDevops"?"active":""}>高效流水线运维
  • +
  • changeActive("#multipleAnalyse")} className={value === "#multipleAnalyse"?"active":""}>多层次代码分析
  • +
  • changeActive("#multidimensional")} className={value === "#multidimensional"?"active":""}>多维度用户画像
  • +
    + } + +
    +
    + +
    + +
    +

    加入Gitlink,和社区伙伴们一起踏上开源创新的辉煌旅程!

    + 快速注册 +
      +
    • + + 发现 + 探索丰富优质的开发资源 +
    • +
    • + + 加入 + 寻找志同道合的协作伙伴 +
    • +
    • + + 合作 + 开启开放共享的协同之旅 +
    • +
    • + + 贡献 + 书写开源创新的精彩成就 +
    • +
    +
    + +
    +

    开源生态

    +

    Gitlink与各大企业、高校、科研机构开展广泛的技术合作,推动我国开源软件生态的快速构建与发展

    + +
    + +
    + ) +} +export default TPMIndexHOC(Index); \ No newline at end of file diff --git a/src/home/Index.scss b/src/home/Index.scss new file mode 100644 index 000000000..c62c3af96 --- /dev/null +++ b/src/home/Index.scss @@ -0,0 +1,1038 @@ + +body{ + overflow: auto!important; + background-color: #fff!important; +} +.homePage{ + background-color: #fff; +} +.topEdition{ + position: relative; + background-image: linear-gradient(to right,#081843,#000A1D); + margin-bottom: 159px; + .headNav{ + position: absolute; + width: 100%; + top:0px; + left: 0px; + color: #FFFFFF; + background-color: rgba(225,225,225,0.03); + z-index: 10000; + .headNavDiv{ + margin:0px auto; + padding:0px 30px; + height: 72px; + line-height: 72px; + display: flex; + justify-content: space-between; + align-items: center; + .headlist{ + display: flex; + font-weight: 400; + li{ + margin-right: 35px; + font-size: 16px; + a{ + color: #FFFFFF!important; + } + } + } + .regBtn{ + display: inline-block; + height: 30px; + line-height: 30px; + color: #fff!important; + width: 60px; + text-align: center; + border-radius: 5px; + background-color: #466AFF; + margin-left: 20px; + &:hover{ + background-color: rgba(70,106,255,0.85); + } + } + } + } + .slick-track{ + height: 679px; + display: flex; + .slick-slide{ + position: relative; + height:100%; + div{ + height: 100%; + .regform1{ + background:url('./Img/banner1.png') no-repeat center top; + background-size:cover; + } + .regform2{ + background:url('./Img/banner2.png') no-repeat center top; + background-size:cover; + } + .regform3{ + background:url('./Img/banner3.png') no-repeat center top; + background-size:cover; + } + .regform4{ + background:url('./Img/banner4.png') no-repeat center center; + background-size:cover; + } + .regPrg{ + position: absolute; + z-index: 2; + width: 1200px; + left: 50%; + margin-left: -600px; + top:50%; + margin-top: -23px; + a{ + color: #fff!important; + display: inline-block; + background-color: #466AFF; + border-radius: 5px; + height: 46px; + line-height: 46px; + width: 98px; + text-align: center; + font-size: 18px; + letter-spacing: 2px; + } + } + } + + // img{ + // position: absolute; + // width: 100%; + // height: 100%; + // top:0px; + // left: 0px; + // z-index: 1; + // } + } + } + .slick-slider{ + min-width: 1200px; + position: relative; + &:hover{ + .slick-arrow{ + display: block!important; + } + } + .slick-arrow{ + position: absolute; + top:50%; + z-index: 1000; + background: transparent; + border: none; + margin-top:-50px; + display: none!important; + &:hover{ + i{ + color: rgba(225,225,225,0.8); + } + } + i{ + font-size: 50px!important; + color: rgba(225,225,225,0.3); + transition: 0.3s; + } + &.slick-prev{ + left: 50px; + } + &.slick-next{ + right: 50px; + } + } + .slick-dots{ + width: 1200px; + text-align: left; + left: 50%; + margin-left: -600px; + bottom: 25%; + position: absolute; + display: flex!important; + li{ + background-color: rgba(225,225,225,0.5); + position: relative; + height: 3px; + width: 46px; + margin-right: 15px; + &::after{ + position: absolute; + left: 0px; + width: 0px; + top:0px; + height: 100%; + content: ""; + transition: 5.2s; + transition-property: width; + } + &.slick-active::after{ + background-color: #fff; + width: 100%; + } + button{ + position: absolute; + width: 100%; + height: 10px; + left:0px; + background-color: transparent!important; + border:none; + cursor: pointer; + color: transparent; + } + } + } + } + .topEditionUl{ + position: absolute; + width: 1244px; + background-image: url('./Img/top-bg.png'); + height: 244px; + bottom: -139px; + left: 50%; + margin-left: -622px; + display: flex; + align-items: center; + justify-content: center; + a{ + background-image: url('./Img/top-2.png'); + height: 139px; + width: 353px; + padding:30px 24px; + color: #fff; + margin:0px 17px; + border-radius: 11px; + background-size: 100% 100%; + color: #fff!important; + &:hover{ + box-shadow: 0px 2px 7px rgba(225,225,225,0.85); + } + &:first-child{ + background-image: url('./Img/top-1.png'); + } + &:last-child{ + background-image: url('./Img/top-3.png'); + } + } + } +} +.secondEdition{ + .theTitle{ + height: 53px; + line-height: 53px; + font-size: 38px; + font-weight: 500; + color: #1E1E1E; + text-align: center; + margin: 42px 0px 30px!important; + } + .ant-affix{ + background-color: #fff; + box-shadow: 0px 2px 7px 0px rgba(0,0 ,0 ,0.09); + } + .ant-anchor-wrapper{ + width: 1200px; + margin:0px auto; + padding-left: 0px; + .ant-anchor{ + display: flex; + align-items: center; + justify-content: center; + .ant-anchor-ink{ + width: 100%; + height: 1px; + border-bottom: 1px solid rgba(153, 153, 153, 0.5); + bottom: 0px; + top:initial; + } + li{ + padding:18px 19px; + margin:0px 10px; + position: relative; + font-size: 18px; + a{ + color: #333333!important; + } + &.active::after{ + position: absolute; + left: 0px; + bottom: 0px; + height:2px; + background-color: #466AFF; + content: ""; + width: 100%; + } + } + } + } + .secondEditionContent{ + padding:65px 0px; + width: 1200px; + margin:0px auto; + .hadoop{ + background:url('./Img/2-1bg.png') no-repeat center center; + background-size:cover; + min-height: 753px; + padding:50px 56px; + .hadoopCon{ + display: flex; + width: 100%; + } + .descBox{ + max-width: 352px; + word-break: break-all; + .desc1{ + height: 50px; + line-height: 50px; + font-size: 36px; + font-weight: 600; + color: #FFFFFF; + background: -webkit-linear-gradient(90deg, #50EDFF 0%, #557CFF 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + } + .desc2{ + height: 72px; + font-size: 18px; + font-weight: 500; + color: #69DAF5; + line-height: 36px; + margin-top: 97px; + } + .desc3{ + height: 108px; + font-size: 18px; + font-weight: 500; + color: #FFFFFF; + line-height: 36px; + margin-top: 70px; + } + } + + .hadoopdesc{ + color: #FFFFFF; + background: -webkit-linear-gradient(112deg, #FF8B75 0%, #DD2476 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + font-size: 18px; + line-height: 25px; + font-weight: 500; + text-align: center; + margin-top: 40px; + } + } + .oneStop{ + text-align: center; + opacity: 0.3; + transition: 2s; + .oneStopContent{ + display: flex; + .osLeftMain{ + display: flex; + justify-content: flex-start; + align-items: flex-start; + position: relative; + margin-bottom: 182px; + } + .osRightMain{ + margin-left: 22px; + text-align: left; + .osRightTitle{ + height: 50px; + font-size: 36px; + font-weight: 600; + color: #FFFFFF; + line-height: 50px; + background: -webkit-linear-gradient(112deg, #FF8B75 0%, #DD2476 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + margin-top: 28px; + } + p{ + font-size: 20px; + color: #637497; + line-height: 36px; + margin-top: 50px; + margin-bottom: 0px!important; + span{ + color: #000; + font-weight: 500; + } + } + } + } + .osleftPosi,.imgring{ + transition: 3s; + opacity: 0; + } + .osleftPosi1,.osleftPosi2{ + position: absolute; + right:-200px; + top:102px; + transition: 2s; + opacity: 0; + z-index: 1; + } + .osleftPosi2{ + top:317px; + right:10px; + transition: 2.5s; + z-index: 2; + } + &.activeCode{ + opacity: 1; + .osleftPosi,.osleftPosi1,.osleftPosi2{ + opacity: 1; + } + .osleftPosi1{ + right:10px; + } + .osleftPosi2{ + top:217px; + } + .imgring{ + opacity: 1; + } + } + } + .highDevops{ + text-align: center; + &.activeCode{ + .highDoContent img{ + opacity: 1; + &.highImg1{ + bottom:62px; + } + &.highImg2{ + bottom:215px; + } + } + } + .highDoTitle{ + position: relative; + padding:2px; + width: 384px; + height: 90px; + margin:7px auto 0px; + border-radius: 10px; + span{ + position: absolute; + z-index: 3; + width: 380px; + height: 86px; + line-height: 86px; + border-radius: 10px; + left: 2px; + top:2px; + display: inline-block; + font-size: 36px; + font-weight: 600; + background: -webkit-linear-gradient(1deg, #D57CA0 12%, #4877F3 57%, #20C3EF 76%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + } + &::before{ + position: absolute; + z-index: 2; + width: 380px; + height: 86px; + line-height: 86px; + background-color: #fff; + border-radius: 10px; + content: ""; + top:2px; + left: 2px; + } + &::after{ + position: absolute; + content: ""; + width: 100%; + height: 100%; + top:0px; + left: 0px; + border-radius: 10px; + background: -webkit-linear-gradient(1deg, #D57CA0 12%, #4877F3 57%, #20C3EF 76%); + z-index: 1; + } + } + .highDoSubtitle{ + color: #637497; + font-size: 20px; + line-height: 36px; + max-width: 950px; + margin:30px auto 28px; + text-align: center; + span{ + color: #000; + font-weight: 500; + } + } + .highDoContent{ + background:url('./Img/2-3bg.png') no-repeat center center; + background-size:cover; + height: 920px; + padding:20px 0px 114px; + position: relative; + display: flex; + flex-direction: column; + align-items: center; + &>div{ + display: flex; + flex-direction: column; + align-items: center; + } + img{ + opacity: 0; + transition: 2.4s; + } + .highImg1{ + position: absolute; + bottom:0px; + transition: 1s; + transition-delay: 1s; + left:10px; + } + .highImg2{ + position: absolute; + bottom:0px; + right:10px; + transition: 2s; + transition-delay: 1s; + } + .highDoBottondesc{ + font-size: 20px; + font-weight: 500; + color: #000000; + line-height: 39px + } + } + } + .multipleAnalyse{ + background:url('./Img/2-4bg.png') no-repeat center center; + background-size:cover; + height: 710px; + padding-left: 58px; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + opacity: 0.3; + transition: 2s; + &.activeCode{ + opacity: 1; + .maContent{ + transform: rotateY(360deg); + } + } + .title{ + display: inline-block; + font-size: 36px; + font-weight: 600; + margin-bottom: 26px; + background: -webkit-linear-gradient(1deg, #6D66FF 12%, #C148FF 57%, #F59F77 76%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + line-height: 50px; + margin-top: 20px; + } + .maContent{ + height: 400px; + width: 763px; + background:url('./Img/2-4-1.png') no-repeat; + background-size:100% 100%; + margin:26px 0px; + transition: 3s; + } + .desc{ + text-align: center; + max-width: 869px; + line-height: 30px; + color:#69DAF5 ; + font-weight: 400; + font-size: 18px; + } + } + .multidimensional{ + background:url('./Img/2-5bg.png') no-repeat center center; + background-size:cover; + height: 1139px; + padding:100px 0px 0px; + display: flex; + flex-direction: column; + opacity: 0.3; + transition: 1s; + .multidimensinalhalf{ + display: flex; + align-items: center; + position: relative; + height: 447px; + img{ + position: absolute; + left: 0px; + bottom: -20px; + opacity: 0; + transition: 3s; + } + .halfTitle{ + height: 50px; + font-size: 36px; + font-weight: 600; + color: #FFFFFF; + line-height: 50px; + background: -webkit-linear-gradient(112deg, #D57CA0 0%, #4877F3 51%, #20C3EF 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + margin-bottom: 70px!important; + } + .halfsubTitle{ + font-size: 20px; + font-weight: 500; + line-height: 36px; + color: #000; + span{ + color: #637497; + font-weight: normal; + } + } + } + .activeCode{ + opacity: 1; + .multidimensinalPart{ + img{ + left: 0px; + opacity: 1; + } + } + .multidimensinalhalf{ + img{ + left: 380px; + opacity: 1; + } + } + } + } + .multidimensinalPart{ + display: flex; + align-items: center; + margin-top: 50px; + position: relative; + height: 396px; + transition: 4s; + img{ + position: absolute; + left: 620px; + bottom: -20px; + opacity: 0; + transition: 3s; + } + p{ + max-width: 422px; + text-align: left; + font-weight: 500; + line-height: 32px; + color: #000; + font-size: 20px; + span{ + color: #637497; + font-weight: normal; + } + &:first-child{ + margin-bottom: 55px!important; + } + } + } + } +} + +.thirdEdition{ + background:url('./Img/3-bg.png') no-repeat center center; + background-size:cover; + min-height: 846px; + min-width: 1200px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + .title{ + height: 53px; + font-size: 38px; + font-weight: 500; + color: #FFFFFF; + line-height: 53px; + margin-bottom: 13px; + } + .subtitle{ + height: 39px; + font-size: 18px; + font-weight: 500; + color: #FFFFFF; + line-height: 39px; + } + .thirdUl{ + display: flex; + align-items: center; + padding-top: 50px; + padding-bottom: 25px; + margin-bottom: 0px; + li{ + padding:0px 67px; + color: #fff; + position: relative; + cursor: pointer; + &:hover{ + .hoverli1 img{ + &:first-child{ + transform: translate(5px,7px); + } + &:last-child{ + transform: translate(-2px,0px); + } + } + .hoverli2 img{ + &:first-child{ + transform: translate(6px,-7px); + } + &:last-child{ + transform: translate(-2px,0px); + } + } + .hoverli3 img{ + &:first-child{ + right: -3px!important; + } + &:last-child{ + left: -3px; + } + } + .hoverli4 img{ + &:first-child{ + top: -5px; + } + &:last-child{ + top:13px!important; + } + } + } + &.active::after{ + position: absolute; + content: ""; + width: 10px; + height: 10px; + border-radius: 50%; + background-color: #466AFF; + left: 50%; + margin-left: -5px; + bottom: -25px; + } + &>span{ + font-weight: 500; + font-size: 22px; + margin-top:10px; + display: block; + height: 30px; + line-height: 30px; + } + &>div{ + position: relative; + height: 40px; + width: 40px; + margin:0px 20px; + img{ + position: absolute; + transition: .1s; + &:first-child{ + z-index: 2; + } + &:last-child{ + z-index: 1; + } + } + } + } + } + .thirdLists{ + display: flex; + align-items: center; + margin-top: 48px; + .listbox{ + margin-left: 54px; + .listTitle{ + height: 30px; + font-size: 18px; + font-weight: 400; + color: #FFFFFF; + line-height: 30px; + position: relative; + margin-bottom: 75px!important; + &::after{ + position: absolute; + left: 0px; + width: 39px; + height: 3px; + content: ""; + bottom: -20px; + background-color: #466AFF; + } + } + } + li{ + display: flex; + height: 22px; + line-height: 22px; + font-size: 16px; + color: #fff; + margin-bottom: 30px!important; + a{ + flex:1; + color: #fff!important; + &:hover{ + text-decoration: underline; + } + } + span{ + margin-left: 40px; + } + } + } +} + +.forthEdition{ + background:url('./Img/4-bg.png') no-repeat center center; + background-size:cover; + min-height: 621px; + min-width: 1200px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + .theTitle{ + height: 42px; + line-height: 42px; + font-size: 30px; + font-weight: 500; + color: #1E1E1E; + margin-bottom: 50px!important; + } + .qulikyreg{ + display: inline-block; + width: 137px; + text-align: center; + height: 58px; + line-height: 58px; + color: #fff!important; + background-color: #466AFF; + border-radius: 6px; + font-size: 18px; + margin-bottom: 80px; + } + .forthUl{ + display: flex; + align-items: flex-end; + li{ + margin:0px 40px; + display: flex; + flex-direction: column; + align-items: center; + .forthtitle{ + height: 30px; + font-size: 22px; + font-weight: 500; + color: #1E1E1E; + line-height: 30px; + display: block; + margin-top: 25px; + } + .forthsubtitle{ + height: 22px; + font-size: 16px; + font-weight: 400; + color: #1E1E1E; + line-height: 22px; + margin-top: 15px; + } + } + } +} + +.fifthEdition{ + display: flex; + flex-direction: column; + align-items: center; + padding:68px 0px; + min-width: 1200px; + .footSlider{ + width: 100%; + .slick-track{ + display: flex; + .slick-slide{ + margin:0px 20px; + & > div{ + width: 300px; + height: 120px; + padding:15px; + display: flex; + align-items: center; + justify-content: center; + background: linear-gradient(180deg, #F1F7FF 0%, #F7FAFF 53%, #FFFFFF 100%); + box-shadow: 0px 1px 10px 3px rgba(0, 0, 0, 0.06); + border-radius: 4px; + margin:30px 0px; + a{ + display: block; + height: 100%; + width: 100%; + text-align: center; + img{ + max-width: 100%; + max-height: 100%; + } + } + } + } + } + } + .title{ + height: 53px; + font-size: 38px; + font-weight: 500; + color: #000000; + line-height: 53px; + } + .subtitle{ + height: 39px; + font-size: 18px; + font-weight: 500; + color: #1E1E1E; + line-height: 39px; + margin-top: 13px; + margin-bottom: 54px; + } + #scrollBox1{ + max-height: 332px; + overflow: hidden; + margin: 35px 0px 0px; + width: 100%; + } + ul.fifthList{ + display: flex; + flex-wrap: wrap; + flex-direction: column; + height: 332px; + width: 100%; + float: left; + li{ + border-bottom: none; + width: 320px; + height: 130px; + margin:15px 0px!important; + display: flex; + justify-content: center; + align-items: center; + &:nth-child(2n){ + margin:12px 0px 12px 30px!important; + } + &:nth-child(2n+1){ + margin:12px 30px 12px 0px!important; + } + &:hover a{ + width: 100%; + height: 100%; + box-shadow: 0px 1px 15px 7px rgba(0, 0, 0, 0.08); + } + a{ + width: 300px; + height: 120px; + background: #fff; + box-shadow: 0px 1px 10px 3px rgba(0, 0, 0, 0.06); + border-radius: 4px; + border: 2px solid #FFFFFF; + display: flex; + align-items: center; + justify-content: center; + transition:.2s; + } + img{ + max-width: 100%; + max-height: 100%; + } + } + + } +} +.footEdition{ + background-color: #171B23; + .footContent{ + display: flex; + align-items: flex-start; + padding:86px 0px; + justify-content: space-around; + width: 1200px; + margin:0px auto; + ul{ + min-width: 120px; + text-align: left; + margin-right: 80px; + &.center{ + text-align: center; + } + &>p{ + height: 22px; + font-size: 16px; + font-weight: 400; + color: #FFFFFF; + line-height: 22px; + } + &>img{ + width: 100px; + height: 100%; + margin-bottom: 30px; + margin-top: 25px; + border-radius: 10px; + } + li{ + height: 20px; + font-size: 14px; + font-weight: 400; + line-height: 20px; + color: #BDC2D1; + margin-bottom: 15px!important; + a{ + color: #BDC2D1!important; + &:hover{ + text-decoration: underline; + } + } + &.thehead{ + height: 25px; + font-size: 18px; + font-weight: 600; + color: #FFFFFF; + line-height: 25px; + margin-bottom: 20px!important; + } + &.theline{ + display: flex; + .imgCon{ + padding:5px; + background-color: #fff; + border-radius: 3px; + } + img{ + width: 80px; + height: 80px; + } + } + } + } + } + .copyrightDesc{ + font-size: 12px; + font-weight: 400; + color: #BDC2D1; + line-height: 28px; + padding:15px 0px; + text-align: center; + background-color: #1B212C; + } +} \ No newline at end of file diff --git a/src/home/SecondEdition.jsx b/src/home/SecondEdition.jsx new file mode 100644 index 000000000..0d7896d14 --- /dev/null +++ b/src/home/SecondEdition.jsx @@ -0,0 +1,210 @@ +import React , { useEffect , useState } from 'react'; +import Img1 from './Img/2-2-1.png'; +import ImgHead from './Img/2-2-head.png'; +import Img2 from './Img/2-2-2.png'; +import Img3 from './Img/2-2-3.png'; +import Imgring from './Img/2-2-ring.png'; +import ImgS1 from './Img/2-3-1.png'; +import ImgS2 from './Img/2-3-2.png'; +import ImgS3 from './Img/2-3-3.png'; +import ImgS4 from './Img/2-3-4.png'; +import ImgM2 from './Img/2-6-2.png'; +import ImgM4 from './Img/2-6-1.png'; +import Codeafter from './Img/codeafter.png'; +import './code.scss'; + +const code=[ + {str:git remote add origin https://git.trustie.net/Gitlink/Gitlink.git}, + {str:git push -u origin master}, + {str:git branch dev}, + {str:git checkout dev}, + {str:git add .}, + {str:git commit -m "xxx"}, + {str:git push origin dev}, + {str:git checkout master}, + {str:git pull origin master}, + {str:git merge dev}, + {str:git push origin master} +] +const codes=[ + {str:latest: Pulling from appleboy/drone-ssh}, + {str:Digest:sha256:095ca4ceafcb751f1f22fe416057d3e2a6302f7b1f7011b17010973cb6bbdd9f}, + {str:Status:Image is up to date for appleboy/drone-ssh:latest}, + {str:======CMD======}, + {str:echo ====暂停容器开始======= }, + {str:docker rm -f mo-test}, + {str:docker rmi mo-test:1.0}, + {str:cd /opt/demo}, + {str:echo ====开始部署=======}, + {str:docker build -t mo-test:1.0 .}, + {str:docker run -d -p 8080:8080 --name mo-test mo-test:1.0}, + {str:echo ====部署成功======}, + {str:======END======}, +] + +function SecondEdition({setValue}) { + useEffect(()=>{ + window.addEventListener('scroll', handleScroll); + },[]) + + const [ hadoop , setHadoop ] = useState(false); + const [ highDevops , setHighDevops ] = useState(false); + const [ multipleAnalyse , setMultipleAnalyse ] = useState(false); + const [ multidimensional , setMultidimensional ] = useState(false); + + const [ oneStop , setOneStop ] = useState(false); + + function handleScroll() { + let clientHeight = document.documentElement.clientHeight; //可视区域高度 + let scrollTop = document.documentElement.scrollTop; //滚动条滚动高度 + let f = checkPosi("hadoop",clientHeight,scrollTop); + if(f){ + setValue("#hadoop"); + setHadoop(true); + }else{ + setHadoop(false); + } + let f1 = checkPosi("oneStop",clientHeight,scrollTop); + if(f1){ + setValue("#oneStop"); + setOneStop(true); + }else{ + setOneStop(false); + setOneStop(false); + } + let f3 = checkPosi("highDevops",clientHeight,scrollTop); + if(f3){ + setValue("#highDevops"); + setHighDevops(true); + }else{ + setHighDevops(false); + setHighDevops(false); + } + let f4 = checkPosi("multipleAnalyse",clientHeight,scrollTop); + if(f4){ + setValue("#multipleAnalyse"); + setMultipleAnalyse(true); + }else{ + setMultipleAnalyse(false); + setMultipleAnalyse(false); + } + let f5 = checkPosi("multidimensional",clientHeight,scrollTop); + if(f5){ + setValue("#multidimensional"); + setMultidimensional(true); + }else{ + setMultidimensional(false); + setMultidimensional(false); + } + } + + function checkPosi(ele,clientHeight,scrollTop) { + var a = document.getElementById(ele).offsetTop - scrollTop -(clientHeight/3); + var b = document.getElementById(ele).clientHeight + (clientHeight/4); + if(a>0 || a<-b){ + return false; + }else{ + return true; + } + } + return( +
    +
    +
    +
    +

    分布式协作开发

    +

    基于Git打造分布式代码托管环境,提供免费公、私有代码仓库;

    +

    支持在线文件编辑、代码分支管理、协作贡献统计、代码仓库复刻(Fork)、贡献合并请求(PR)、群智贡献审阅等功能;

    +
    +
    + { + code.map((i,k)=>{ + return( +
  • {k+1}{i.str}
  • + ) + }) + } + 运行结果 +
    +
    +

    让您的项目在这里健康、快速的成长!

    +
    +
    +
    +
    + + + + +
    +
    +

    一站式过程管理

    +

    提供易修(Issue)、里程碑、通知提醒、标签归档等多样化任务管理工具,支持各类开发任务的发布、指派与跟踪;

    +

    同时提供在线Wiki文档、组织多粒度管理等功能,为您搭建一站式的项目过程管理环境;

    +

    让您的团队协作更高效、过程更透明!

    +
    +
    + +
    +
    +
    + 高效流水线运维 +
    +
    + 融合DevOps思想,提供轻量级的工作流引擎(Engine), + 打通编码、测试、构建、部署等开发运维环节;支持 + 自定义配置、代码静态扫描、构建自动触发、容器镜像托管等功能,同时支持接入第三方运维工具。 +
    +
    +
    + +
    + + {/*
    + { + codes.map((i,k)=>{ + return( +
  • {k+1}{i.str}
  • + ) + }) + } +
    */} +
    + + +
    +

    让您的代码更加快速、可靠地形成高质量的产品!

    +
    +
    +
    + 多层次代码分析 +
    +

    提供软件软代码和芯片RTL代码的溯源分析、文件级和组件级许可证识别及风险分析、输入性开源漏洞检测和加固建议,支持分析结果的多层次可视化展示。

    +
    +
    +
    +
    +
    +
    +

    多维度用户画像

    +

    实时采集和分析平台中的各类开源资源数
    据,
    搭建多维度用户画像评估系统;

    +
    +
    + +
    +
    +
    +
    + +
    +
    +

    提供开发活动统计、贡献度日历、用户能力建模、角色与专业定位分析等功能。

    +

    让您在个人主页展示开发动态与创新能力!

    +
    +
    +
    +
    +
    + ) +} +export default SecondEdition \ No newline at end of file diff --git a/src/home/ThirdEdition.jsx b/src/home/ThirdEdition.jsx new file mode 100644 index 000000000..395697d1b --- /dev/null +++ b/src/home/ThirdEdition.jsx @@ -0,0 +1,176 @@ +import React,{ useState , useEffect , useMemo } from 'react'; +import T311 from './Img/3-1-1.png'; +import T312 from './Img/3-1-2.png'; +import T321 from './Img/3-2-1.png'; +import T322 from './Img/3-2-2.png'; +import T331 from './Img/3-3-1.png'; +import T332 from './Img/3-3-2.png'; +import T341 from './Img/3-4-1.png'; +import T342 from './Img/3-4-2.png'; +import bg3 from './Img/3-1.png'; +import bg32 from './Img/3-2.png'; +import bg33 from './Img/3-3.png'; +import bg34 from './Img/3-4.png'; + +import './Index.scss'; + +const list1 = [ + {name:"CCF开源发展委员会首批执行委员名单发布",src:"https://forum.trustie.net/forums/4666/detail",count:32,time:"2021-09-22"}, + {name:"Gitlink项目协同开发模块使用说明及问题反馈",src:"https://forum.trustie.net/forums/4665/detail",count:4,time:"2021-09-22"}, + {name:"MindSpore框架介绍及赛题说明",src:"https://forum.trustie.net/forums/4664/detail",count:3,time:"2021-09-22"}, + {name:"OpenHarmony系统介绍及赛题说明",src:"https://forum.trustie.net/forums/4663/detail",count:4,time:"2021-09-22"}, + {name:"openGauss系统介绍及赛题说明",src:"https://forum.trustie.net/forums/4662/detail",count:5,time:"2021-09-22"}, +] +const list2 = [ + {name:"Gitlink/Gitlink",src:"https://forgeplus.trustie.net/Gitlink/forgeplus",count:304}, + {name:"泛在操作系统实验室/矽璓工业物联操作系统XiUOS",src:"https://forgeplus.trustie.net/xuos/xiuos",count:50}, + {name:"华为技术有限公司/openGauss-operator",src:"https://forgeplus.trustie.net/Huawei_Technology/openGauss-operator",count:100}, + {name:"开放原子开源基金会/BitXHub",src:"https://forgeplus.trustie.net/openatom_foundation/bitxhub",count:40}, + {name:"华为技术有限公司/openEuler-datenlord",src:"https://forgeplus.trustie.net/Huawei_Technology/openEuler-datenlord",count:98}, +] +const list3 = [ + {name:"Gitlink平台DevOps模块使用说明",src:"https://forum.trustie.net/forums/4682/detail",count:10,time:"2021-09-23"}, + {name:"Gitlink如何将临时分支push到远端对应的新分支?",src:"https://forum.trustie.net/forums/4705/detail",count:8,time:"2021-09-23"}, + {name:"了解什么是 DevOps?",src:"https://forum.trustie.net/forums/4704/detail",count:4,time:"2021-09-23"}, + {name:"EduCoder平台简介",src:"https://forum.trustie.net/forums/4701/detail",count:26,time:"2021-09-23"}, + {name:"Webhooks指南",src:"https://forum.trustie.net/forums/4683/detail",count:3,time:"2021-09-23"}, +] +const list4 = [ + {name:"小学生都能读懂的网络协议之:WebSocket",src:"https://forum.trustie.net/forums/4708/detail",count:4,time:"2021-09-23"}, + {name:"容器神话 Docker 是如何一分为二的",src:"https://forum.trustie.net/forums/4707/detail",count:5,time:"2021-09-23"}, + {name:"一文揭示,DevOps与企业数字化究竟有何联系?",src:"https://forum.trustie.net/forums/4706/detail",count:3,time:"2021-09-23"}, + {name:"GitHub上最流行的10000个Java都使用了哪些库?",src:"https://forum.trustie.net/forums/4703/detail",count:8,time:"2021-09-23"}, + {name:"如何正确下载CentOS各个版本镜像",src:"https://forum.trustie.net/forums/4684/detail",count:2,time:"2021-09-23"}, +] + +function ThirdEdition() { + const [ active , setActive ] = useState(1); + const [ flag , setFlag ] = useState(true); + + const doubleFlag = useMemo(()=>{ + return flag; + },[flag]) + + useEffect(()=>{ + let box = document.getElementById('thirdUl'); + var myTimer = setTimeout(intervalActive, 2500); + box.onmouseover = () => { + clearTimeout(myTimer); + setFlag(false); + } + box.onmouseleave = () => { + myTimer = setTimeout(intervalActive, 2500); + setFlag(true); + } + },[active,flag]) + + function intervalActive() { + if(doubleFlag){ + if(active < 4){ + let i = active + 1; + setActive(i); + }else{ + setActive(1); + } + } + } + + return( +
    +

    开发者的家园

    +

    一个实现100%开源,产学研联合面向软件创新的开源社区

    +
    +
      +
    • {setFlag(false);setActive(1)}}> +
      + + +
      + 平台动态 +
    • +
    • {setFlag(false);setActive(2)}}> +
      + + +
      + 优秀仓库 +
    • +
    • {setFlag(false);setActive(3)}}> +
      + + +
      + 精选文章 +
    • +
    • {setFlag(false);setActive(4)}}> +
      + + +
      + 经验分享 +
    • +
    +
    + +
    +

    + {active === 1 ? "Gitlink分享最新平台资讯、社区活动通知、开源竞赛信息,把握开源生态发展脉搏" + : active===2 ? "Gitlink汇聚精英企业仓库、前沿技术仓库、人气热门仓库,孵化优质开源创新成果" + :active===3 ? "Gitlink集萃社区精选项目介绍、平台使用技巧等优秀文章,助力开源开放协同创新" + :"Gitlink甄选技术研究、心得体会、经验交流等高质量内容,推动社区健康稳定发展"} +

    + { + active === 1&& + list1.map((i,k)=>{ + return( +
  • + {i.name} + {i.count} + {i.time} +
  • + ) + }) + } + { + active === 2&& + list2.map((i,k)=>{ + return( +
  • + {i.name} + {i.count} + {/* {i.time} */} +
  • + ) + }) + } + { + active === 3&& + list3.map((i,k)=>{ + return( +
  • + {i.name} + {i.count} + {i.time} +
  • + ) + }) + } + { + active === 4&& + list4.map((i,k)=>{ + return( +
  • + {i.name} + {i.count} + {i.time} +
  • + ) + }) + } +
    +
    +
    +
    + ) +} +export default ThirdEdition; \ No newline at end of file diff --git a/src/home/TopEdition.jsx b/src/home/TopEdition.jsx new file mode 100644 index 000000000..abf41a57e --- /dev/null +++ b/src/home/TopEdition.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import Slider from 'react-slick'; +let setting={ + dots:true, + infinite: true, + speed: 2000, + slidesToShow: 1, + slidesToScroll: 1, + pauseOnDotsHover:true, + autoplaySpeed:5000, + pauseOnFocus:true, + autoplay:true, + arrows:true, + prevArrow:, + nextArrow: +} +function TopEdition({register}) { + return( + +
    +
    +
    +
    +
    +

    注册

    +
    +
    + ) +} +export default TopEdition; \ No newline at end of file diff --git a/src/home/code.scss b/src/home/code.scss new file mode 100644 index 000000000..57badcc76 --- /dev/null +++ b/src/home/code.scss @@ -0,0 +1,79 @@ +.hadoopCode{ + margin-left: 32px; + box-shadow: 0 0 0 2px rgba(255,255,255,0.1); + border-radius: 10px; + padding:18px 20px; + flex: 1; + margin-top: 60px; + position: relative; + &>img{ + position: absolute; + right: -50px; + bottom: -50px; + width: 805px; + border-radius: 4px; + opacity: 0; + z-index: 1; + } + li{ + display: flex; + flex-wrap: wrap; + font-size: 14px; + font-weight: 500; + line-height: 30px; + color: #E1E1E1; + } +} +pre { + font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + word-break: break-all; + overflow: initial ; + .codenum{ + display: inline-block; + width: 15px; + text-align: left; + margin-right: 15px; + } + .code-green{ + color: #00FA30; + } + .code-red{ + color: #FF5058; + } + .code-blue{ + color: #05CFC8; + } +} +.highCodes{ + position: absolute; + top:0px; + right:0px; + width: 50%; + height: 100%; + padding:40px 30px; + color: #E1E1E1; +} +.activeCode{ + .word-item{ + animation: show .2s 1 forwards; + } + &>img.activeImg{ + right: 0px; + bottom: -20px; + opacity: 1; + width: 705px; + transition: 1s; + transition-delay: 3s; + } +} +.word-item { + opacity: 0; +} +@keyframes show { + from { + opacity: 0; + } + to { + opacity: 1; + } +} diff --git a/src/images/login/logo.png b/src/images/login/logo.png new file mode 100644 index 000000000..961f30521 Binary files /dev/null and b/src/images/login/logo.png differ diff --git a/src/modules/login/EducoderLogin.js b/src/modules/login/EducoderLogin.js index 9a5526734..21c6f23a0 100644 --- a/src/modules/login/EducoderLogin.js +++ b/src/modules/login/EducoderLogin.js @@ -1,11 +1,11 @@ -import React, {Component} from "react"; +import React, { Component } from "react"; import moment from 'moment'; import { getImageUrl } from 'educoder'; import '../courses/css/members.css'; import "../courses/common/formCommon.css"; import '../courses/css/Courses.css'; import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png'; -import educodernet from '../../../src/images/login/educodernet.png'; +import educodernet from '../../../src/images/login/logo.png'; import LoginRegisterComponent from '../user/LoginRegisterComponent'; import FindPasswordComponent from '../user/FindPasswordComponent'; //educoder登入页面 @@ -47,7 +47,6 @@ class EducoderLogin extends Component { } }else if(props.match.url === "/register"){ - // showbool: 1, this.state = { showbool: 1, loginstatus:false, @@ -64,18 +63,14 @@ class EducoderLogin extends Component { loginstatus:true, } } - } } Setlogins=(i)=>{ - console.log("96ye"); - console.log(i) this.setState({ logini:i }) - } gohome=()=>{ window.location.href="/" @@ -94,84 +89,39 @@ class EducoderLogin extends Component { render() { - let {showbool,loginstatus,logini} = this.state; + let { showbool } = this.state; + const { mygetHelmetapi } = this.props; return (
    - -
    -
    -
    - {this.props.mygetHelmetapi === null ? "" - : - this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.login_logo_url===null|| this.props.mygetHelmetapi.login_logo_url===undefined? - this.gohome()} src={educodernet}/> - : - this.gohome()} src={getImageUrl(this.props.mygetHelmetapi.login_logo_url)}/> - } - -
    - - +
    +
    + { + mygetHelmetapi && mygetHelmetapi.login_logo_url ? + this.gohome()} width="80px" src={getImageUrl(mygetHelmetapi.login_logo_url)}/> + : + this.gohome()} src={educodernet} width="80px"/> + }
    { showbool === 1 ? -
    -
    - - this.Setshowbool(e)} > - -
    - +
    +
    + this.Setshowbool(e)} >
    +
    : -
    -
    - this.Setshowbool(e)}> - -
    -
    +
    +
    + this.Setshowbool(e)}> +
    +
    } - {this.props.mygetHelmetapi === null ?
    -
    © {moment().year()} EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
    -
    : - this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.main_site===null|| this.props.mygetHelmetapi.main_site===undefined?
    -
    © {moment().year()} EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
    -
    :this.props.mygetHelmetapi.main_site===true? -
    -
    © {moment().year()} EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
    -
    - :"" - } - +
    © {moment().year()} Trustie湘ICP备17009477号Trustie   &   IntelliDE inside.
    ) diff --git a/src/modules/login/LoginDialog.css b/src/modules/login/LoginDialog.css index 833a17e3d..409832b61 100644 --- a/src/modules/login/LoginDialog.css +++ b/src/modules/login/LoginDialog.css @@ -157,5 +157,5 @@ } .MuiModal-root-15 { - z-index: 1000 !important; + z-index: 10001 !important; } diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js index c20e75b1f..2597950f3 100644 --- a/src/modules/tpm/TPMIndexHOC.js +++ b/src/modules/tpm/TPMIndexHOC.js @@ -150,6 +150,16 @@ export function TPMIndexHOC(WrappedComponent) { } fetchUsers = () => { + console.log(this.props.match) + if (this.props.match.path === "/") { + this.setState({ + publicNav:false + }) + }else{ + this.setState({ + publicNav:true + }) + } let url = `/users/get_user_info.json`; axios.get(url).then((response) => { if (response && response.data) { @@ -158,8 +168,13 @@ export function TPMIndexHOC(WrappedComponent) { tpmLoading: false, completeProfile:response.data.profile_completed }) - if (this.props.match.path === "/" && response.data.login) { - this.props.history.push(`/${response.data.login}`); + if(response.data && response.data.login){ + if(response.data.need_edit_info){ + this.setState({ + giteaVisible:true, + email:response.data.email + }) + } } if(response.data && response.data.login){ if(response.data.need_edit_info){ @@ -216,7 +231,7 @@ export function TPMIndexHOC(WrappedComponent) { } render() { - let { isRender , current_user , giteaVisible , email , completeProfile , showCP , mygetHelmetapi } = this.state; + let { isRender , current_user , giteaVisible , email , completeProfile , showCP , publicNav , mygetHelmetapi } = this.state; const common = { showLoginDialog: this.showLoginDialog, checkIfLogin: this.checkIfLogin, @@ -241,12 +256,12 @@ export function TPMIndexHOC(WrappedComponent) { {...this.props} {...this.state} /> : ""} -
    + { publicNav &&
    }
    -
    + { publicNav &&
    } { current_user && this.initCommonState(user)} @@ -255,7 +270,7 @@ export function TPMIndexHOC(WrappedComponent) { }
    - + { publicNav && }
    ); } diff --git a/src/modules/user/LoginRegisterComponent.js b/src/modules/user/LoginRegisterComponent.js index db369458b..a379f67e3 100644 --- a/src/modules/user/LoginRegisterComponent.js +++ b/src/modules/user/LoginRegisterComponent.js @@ -1,6 +1,6 @@ -import React, {Component} from 'react'; -import {setmiyah,broadcastChannelPostMessage} from 'educoder'; -import {Tabs, Input, Checkbox, Button, notification,Menu} from 'antd'; +import React, { Component } from 'react'; +import { setmiyah, broadcastChannelPostMessage } from 'educoder'; +import { Tabs, Input, Checkbox, Button, notification, Menu } from 'antd'; import passopen from '../../../src/images/login/passopen.png'; import passoff from '../../../src/images/login/passoff.png'; import axios from 'axios'; @@ -11,7 +11,7 @@ import './common.css' import './commontwo.css' const { TabPane } = Tabs; const loginInputsyl = { - "width":"434px", + "width": "434px", "height": "462px", "-webkit-box-shadow": "3px 10px 21px 0px rgba(76,76,76,0.15)", "box-shadow": "3px 10px 21px 0px rgba(76,76,76,0.15)", @@ -24,15 +24,9 @@ class LoginRegisterComponent extends Component { constructor(props) { super(props) - - // - // console.log("LoginRegisterComponent"); - // console.log("29"); - // console.log(props.loginstatus); - if(props.loginstatus === true){ - // console.log(props.loginstatus); + if (props.loginstatus === true) { this.state = { - tab:["0"], + tab: ["0"], classpass: "text", // 登录 passopens: passoff, @@ -53,25 +47,25 @@ class LoginRegisterComponent extends Component { codes: "", Phonenumberisnotco: undefined, Phonenumberisnotcos: undefined, - Phonenumberisnotcosyzm:undefined, - Phonenumberisnotcosymmm:undefined, - Phonenumberisnotcosytdhk:undefined, - Phonenumberisnotcosyfwtk:undefined, - Phonenumberisnotcodmm:undefined, + Phonenumberisnotcosyzm: undefined, + Phonenumberisnotcosymmm: undefined, + Phonenumberisnotcosytdhk: undefined, + Phonenumberisnotcosyfwtk: undefined, + Phonenumberisnotcodmm: undefined, Phonenumberisnotcobool: false, - Whethertoverify:false, - pciphone:true, - MyEduCoderModals:false, - registered:undefined, - Phonenumberisnotcodmms:undefined, - weixinlogin:false, - qqlogin:false + Whethertoverify: false, + pciphone: true, + MyEduCoderModals: false, + registered: undefined, + Phonenumberisnotcodmms: undefined, + weixinlogin: false, + qqlogin: false } } - if(props.loginstatus === false){ + if (props.loginstatus === false) { // console.log(props.loginstatus); this.state = { - tab:["1"], + tab: ["1"], classpass: "text", // 登录 passopens: passoff, @@ -92,25 +86,25 @@ class LoginRegisterComponent extends Component { codes: "", Phonenumberisnotco: undefined, Phonenumberisnotcos: undefined, - Phonenumberisnotcosyzm:undefined, - Phonenumberisnotcosymmm:undefined, - Phonenumberisnotcosytdhk:undefined, - Phonenumberisnotcosyfwtk:undefined, + Phonenumberisnotcosyzm: undefined, + Phonenumberisnotcosymmm: undefined, + Phonenumberisnotcosytdhk: undefined, + Phonenumberisnotcosyfwtk: undefined, Phonenumberisnotcobool: false, - Phonenumberisnotcodmm:undefined, - Whethertoverify:false, - pciphone:true, - MyEduCoderModals:false, - registered:undefined, - Phonenumberisnotcodmms:undefined, - weixinlogin:false, - qqlogin:false + Phonenumberisnotcodmm: undefined, + Whethertoverify: false, + pciphone: true, + MyEduCoderModals: false, + registered: undefined, + Phonenumberisnotcodmms: undefined, + weixinlogin: false, + qqlogin: false } } } //判断是否是手机端 - IsPC=()=> { + IsPC = () => { var userAgentInfo = navigator.userAgent; var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", @@ -124,58 +118,48 @@ class LoginRegisterComponent extends Component { } return flag; } -// 点击表单后,改变type + // 点击表单后,改变type changeType = () => { - this.setState({classpass: 'password'}); + this.setState({ classpass: 'password' }); + } + IsPC = () => { + var userAgentInfo = navigator.userAgent; + var Agents = ["Android", "iPhone", + "SymbianOS", "Windows Phone", + "iPad", "iPod"]; + var flag = true; + for (var v = 0; v < Agents.length; v++) { + if (userAgentInfo.indexOf(Agents[v]) > 0) { + flag = false; + break; + } + } + return flag; } - IsPC=()=>{ - var userAgentInfo = navigator.userAgent; - var Agents = ["Android", "iPhone", - "SymbianOS", "Windows Phone", - "iPad", "iPod"]; - var flag = true; - for (var v = 0; v < Agents.length; v++) { - if (userAgentInfo.indexOf(Agents[v]) > 0) { - flag = false; - break; - } - } - return flag; - } componentDidMount = () => { - let flag = this.IsPC(); //true为PC端,false为手机端 - this.setState({ - isphone:flag - }) - // console.log("componentDidUpdate"); - // console.log(this.props); - let pcipns=this.IsPC(); + let flag = this.IsPC(); //true为PC端,false为手机端 + this.setState({ + isphone: flag + }) + let pcipns = this.IsPC(); if (this.props.match.url === "/login") { - // this.state = { - // tab:["0"], - // - // } this.setState({ - tab:["0"] + tab: ["0"] }) } else if (this.props.match.url === "/register") { - // this.state = { - // tab:["1"], - // - // } this.setState({ - tab:["1"] + tab: ["1"] }) } this.setState({ - pciphone:pcipns, + pciphone: pcipns, }) } - openNotification = (messge,type) => { + openNotification = (messge, type) => { // type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色 notification.open({ message: "提示", @@ -198,8 +182,6 @@ class LoginRegisterComponent extends Component { StudyMakeMoney = () => { // 调用父组件方法 - - // this.props.Setlogins(3); this.setState({ login: "", password: "", @@ -209,7 +191,7 @@ class LoginRegisterComponent extends Component { }); try { this.props.Setshowbool(3); - }catch (e) { + } catch (e) { } } @@ -219,7 +201,7 @@ class LoginRegisterComponent extends Component { // -------------------- LOGIN START //下次自动登入 onAutoLoginChange = (e) => { - this.setState({autoLogin: e.target.checked}) + this.setState({ autoLogin: e.target.checked }) } // -------------------- LOGIN END @@ -248,19 +230,19 @@ class LoginRegisterComponent extends Component { } // -------------------- REGISTER START onReadAgreementChange = (e) => { - this.setState({readAgreement: e.target.checked}) + this.setState({ readAgreement: e.target.checked }) } //是否验证通过 dragOkCallback = () => { this.setState({ - Phonenumberisnotcosytdhk:undefined, + Phonenumberisnotcosytdhk: undefined, }) if (this.state.logins.length === 0) { this.setState({ - Phonenumberisnotcos:"账号不能为空", + Phonenumberisnotcos: "账号不能为空", Phonenumberisnotcobool: true, - dragOk:false, - Whethertoverify:this.state.Whethertoverify===true?false:true, + dragOk: false, + Whethertoverify: this.state.Whethertoverify === true ? false : true, }) @@ -278,14 +260,14 @@ class LoginRegisterComponent extends Component { this.setState({ Phonenumberisnotcos: undefined, Phonenumberisnotcobool: false, - dragOk:true, + dragOk: true, }) } else { this.setState({ Phonenumberisnotcos: undefined, Phonenumberisnotcobool: false, - dragOk:true, + dragOk: true, }); this.Emailphonenumberverification(this.state.logins, 2); return @@ -301,8 +283,8 @@ class LoginRegisterComponent extends Component { this.setState({ Phonenumberisnotcos: stringdata, Phonenumberisnotcobool: true, - dragOk:false, - Whethertoverify:this.state.Whethertoverify===true?false:true, + dragOk: false, + Whethertoverify: this.state.Whethertoverify === true ? false : true, }); @@ -312,14 +294,14 @@ class LoginRegisterComponent extends Component { this.setState({ Phonenumberisnotcos: undefined, Phonenumberisnotcobool: false, - dragOk:true, + dragOk: true, }) this.Emailphonenumberverification(this.state.logins, 2); return } this.setState({ - Phonenumberisnotcosytdhk:undefined, + Phonenumberisnotcosytdhk: undefined, }) this.Emailphonenumberverification(this.state.logins, 2) @@ -338,12 +320,12 @@ class LoginRegisterComponent extends Component { if (this.state.login === undefined || this.state.login == "") { this.setState({ - Phonenumberisnotco:"账号不能为空", + Phonenumberisnotco: "账号不能为空", }) return } else if (this.state.password === undefined || this.state.password == "") { this.setState({ - Phonenumberisnotcodmm:"密码不能为空", + Phonenumberisnotcodmm: "密码不能为空", }) return } @@ -357,38 +339,38 @@ class LoginRegisterComponent extends Component { return } - if(response.data.status === -2){ - if(response.data.message==="该手机号尚未注册" || response.data.message==="该邮箱尚未注册"){ + if (response.data.status === -2) { + if (response.data.message === "该手机号尚未注册" || response.data.message === "该邮箱尚未注册") { this.setState({ - Phonenumberisnotco:response.data.message, + Phonenumberisnotco: response.data.message, }) return; } - else if(response.data.message==="错误的账号或密码"){ + else if (response.data.message === "错误的账号或密码") { this.setState({ - Phonenumberisnotcodmms:response.data.message, + Phonenumberisnotcodmms: response.data.message, }) return; } - else if(response.data.message==="违反平台使用规范,账号已被锁定"){ + else if (response.data.message === "违反平台使用规范,账号已被锁定") { this.setState({ - Phonenumberisnotco:response.data.message, + Phonenumberisnotco: response.data.message, }) return; } else if (response.data.message === "登录密码出错已达上限,账号已被锁定, 请10分钟后重新登录或找回密码") { const messge = ( -
    -

    - 登录密码出错已达上限,账号已被锁定; +

    +

    + 登录密码出错已达上限,账号已被锁定;

    -

    - 请10分钟后重新登录或找回密码 -

    -
    +

    + 请10分钟后重新登录或找回密码 +

    +
    ) this.openNotifications(messge); return; @@ -400,11 +382,6 @@ class LoginRegisterComponent extends Component { } - // if(response.data.profile_completed !== null || response.data.profile_completed === false){ - // this.setMyEduCoderModals(); - // return; - // } - if (response.status === 200) { if (response.data.status === 402) { window.location.href = response.data.url; @@ -414,14 +391,14 @@ class LoginRegisterComponent extends Component { isRender: false }) var weekArray = JSON.parse(window.sessionStorage.getItem('yslgeturls')); - if(weekArray===undefined){ - weekArray="/"; + if (weekArray === undefined) { + weekArray = "/"; } - if(weekArray===null){ - weekArray="/"; + if (weekArray === null) { + weekArray = "/"; } - if(weekArray==="null"){ - weekArray="/"; + if (weekArray === "null") { + weekArray = "/"; } window.location.href = weekArray; } @@ -435,74 +412,37 @@ class LoginRegisterComponent extends Component { } //注册接口 postregistered = () => { - // if (this.state.logins === undefined || this.state.logins === "") { - // this.openNotification(`请输入登录手机号码或邮箱`,2); - // - // return - // } else if (this.state.dragOk === false) { - // this.openNotification(`请拖动滑块验证`,2); - // return - // } else if (this.state.codes === undefined || this.state.codes == "") { - // this.openNotification(`请输入验证码`,2); - // return - // } else if (this.state.passwords === undefined || this.state.passwords == "") { - // this.openNotification(`请输入密码`,2); - // return - // } else if (this.state.Agreetotheterms === false) { - // this.openNotification(`请同意服务协议条款`,2); - // return; - // } - if (this.state.logins === undefined || this.state.logins === ""||this.state.logins.length===0) { + if (this.state.logins === undefined || this.state.logins === "" || this.state.logins.length === 0) { this.setState({ - Phonenumberisnotcos:"账号不能为空", + Phonenumberisnotcos: "账号不能为空", Phonenumberisnotcobool: true, - dragOk:false, - Whethertoverify:this.state.Whethertoverify===true?false:true, + dragOk: false, + Whethertoverify: this.state.Whethertoverify === true ? false : true, }) return } - if(this.state.pciphone===true){ - if (this.state.dragOk === false) { - // this.openNotification(`请拖动滑块完成验证`,2); - this.setState({ - Phonenumberisnotcosytdhk:"请拖动滑块完成验证", - dragOk:false, - Whethertoverify:this.state.Whethertoverify===true?false:true, - }) - return - } - } - if (this.state.codes === undefined || this.state.codes == ""||this.state.codes.length===0) { - // this.openNotification(`请输入验证码`,2); + if (this.state.passwords === undefined || this.state.passwords == "" || this.state.passwords.length === 0) { this.setState({ - Phonenumberisnotcosyzm:"验证码不能为空", + Phonenumberisnotcosymmm: "密码不能为空", }) return - } else if (this.state.passwords === undefined || this.state.passwords == "" ||this.state.passwords.length===0) { + } else if (this.state.passwords !== undefined && this.state.passwords.length > 0 && this.state.passwords.length < 8) { this.setState({ - Phonenumberisnotcosymmm:"密码不能为空", + Phonenumberisnotcosymmm: "密码不能少于8位", }) return - } else if (this.state.passwords !==undefined &&this.state.passwords.length>0&&this.state.passwords.length<8){ + } else if (this.state.passwords !== undefined && this.state.passwords.length > 0 && this.state.passwords.length > 16) { this.setState({ - Phonenumberisnotcosymmm:"密码不能少于8位", + Phonenumberisnotcosymmm: "密码不能超过16位", }) return - } else if (this.state.passwords !==undefined &&this.state.passwords.length>0&&this.state.passwords.length>16){ - this.setState({ - Phonenumberisnotcosymmm:"密码不能超过16位", - }) - return - } else if (this.state.Agreetotheterms === false) { - this.openNotification(`请同意服务协议条款`,2); - return; } let url; - if(this.props.weixinlogin){ - url= '/weapps/register.json'; - }else{ + if (this.props.weixinlogin) { + url = '/weapps/register.json'; + } else { url = "/accounts/register.json"; } @@ -511,34 +451,9 @@ class LoginRegisterComponent extends Component { password: this.state.passwords, code: this.state.codes, }).then((result) => { - if(result){ - if(result.data.status===-2){ - if(result.data.message==="验证码不正确"){ - this.setState({ - Phonenumberisnotcosyzm:"验证码不正确", - }) - - return; - }else if(result.data.message==="验证码已失效"){ - this.setState({ - Phonenumberisnotcosyzm:"验证码不正确", - }) - - return; - }else { - this.openNotification(result.data.message); - return; - } - }else { - // this.setState({ - // logins: "", - // dragOk: false, - // codes: "", - // passwords: "", - // Agreetotheterms: "", - // }) - this.setMyEduCoderModals(); - } + if (result && result.data) { + this.openNotification("注册成功!"); + this.props.history.push('/'); } }).catch((error) => { @@ -559,21 +474,21 @@ class LoginRegisterComponent extends Component { // console.log(result); // this.setState({dragOk: true}) - if(result){ - if(result.data.status===-2){ + if (result) { + if (result.data.status === -2) { if (id === 1) { - if(result.data.message==="该手机号码或邮箱已被注册"){ + if (result.data.message === "该手机号码或邮箱已被注册") { this.setState({ Phonenumberisnotco: undefined, Phonenumberisnotcobool: false, - dragOk:true, + dragOk: true, }) - }else { + } else { this.setState({ Phonenumberisnotco: result.data.message, Phonenumberisnotcobool: true, - dragOk:false, - Whethertoverify:this.state.Whethertoverify===true?false:true, + dragOk: false, + Whethertoverify: this.state.Whethertoverify === true ? false : true, }) @@ -583,26 +498,26 @@ class LoginRegisterComponent extends Component { this.setState({ Phonenumberisnotcos: result.data.message, Phonenumberisnotcobool: true, - dragOk:false, - Whethertoverify:this.state.Whethertoverify===true?false:true, + dragOk: false, + Whethertoverify: this.state.Whethertoverify === true ? false : true, }) return; } - }else { + } else { if (id === 1) { this.setState({ Phonenumberisnotco: undefined, Phonenumberisnotcobool: false, - dragOk:true, + dragOk: true, }) return; } else if (id === 2) { this.setState({ Phonenumberisnotcos: undefined, Phonenumberisnotcobool: false, - dragOk:true, + dragOk: true, }) return; } @@ -615,20 +530,20 @@ class LoginRegisterComponent extends Component { }; //短信验证 SMSverification = () => { - let logins=this.state.logins; + let logins = this.state.logins; var url = `/accounts/get_verification_code.json`; axios.get((url), { params: { login: this.state.logins, type: 1, - smscode:setmiyah(logins) + smscode: setmiyah(logins) } }).then((result) => { //验证有问题{"status":1,"message":"success"} // console.log(result); - if(result.data.status===1){ + if (result.data.status === 1) { this.openNotification("验证码已发送,请注意查收"); - }else if(result.data.status===-2){ + } else if (result.data.status === -2) { this.openNotification(result.data.message); } }).catch((error) => { @@ -641,13 +556,13 @@ class LoginRegisterComponent extends Component { if (this.state.classpassbool === true) { this.setState({ - passopens:passoff , + passopens: passoff, classpass: "text", classpassbool: false, }) } else { this.setState({ - passopens: passopen , + passopens: passopen, classpass: "password", classpassbool: true, }) @@ -659,19 +574,19 @@ class LoginRegisterComponent extends Component { getverificationcode = () => { // console.log(this.state.Phonenumberisnotcobool); // console.log(this.state.dragOk); - if(this.state.logins === undefined || this.state.logins.length===0){ + if (this.state.logins === undefined || this.state.logins.length === 0) { this.openNotification("请输入手机号或邮箱"); return; } //这是判断是否手机正确 - if(this.state.Phonenumberisnotcobool === true){ + if (this.state.Phonenumberisnotcobool === true) { this.openNotification(this.state.Phonenumberisnotcos); this.setState({ - Whethertoverify:this.state.Whethertoverify===true?false:true, + Whethertoverify: this.state.Whethertoverify === true ? false : true, }) return; } - if(this.state.pciphone===true) { + if (this.state.pciphone === true) { if (this.state.dragOk === false) { this.openNotification("请拖动滑块验证"); return; @@ -723,25 +638,25 @@ class LoginRegisterComponent extends Component { loginInputonChange = (e) => { // console.log(e.target.value); var stirngt; - if(e.target.value.length>0){ - var str= e.target.value.replace(/\s*/g,"") - stirngt=str; - }else{ - stirngt= e.target.value; + if (e.target.value.length > 0) { + var str = e.target.value.replace(/\s*/g, "") + stirngt = str; + } else { + stirngt = e.target.value; } if (e.target.value.length === 0) { this.setState({ Phonenumberisnotco: undefined, Phonenumberisnotcobool: false, - Phonenumberisnotcodmms:undefined, + Phonenumberisnotcodmms: undefined, login: stirngt, }) - }else{ + } else { this.setState({ login: stirngt, - Phonenumberisnotco:undefined, - Phonenumberisnotcodmms:undefined, + Phonenumberisnotco: undefined, + Phonenumberisnotcodmms: undefined, }) } @@ -758,20 +673,17 @@ class LoginRegisterComponent extends Component { }) return; } - // var telephone = $("#telephoneAdd.tianjia_phone").val(); var regph = /^[1][3,4,5,6,7,8,9][0-9]{9}$/; - // var email = $("#add_email.tianjia_email").val(); var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/; - // [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。 var stringdata = undefined; if (!regph.test(e.target.value)) { stringdata = "手机号格式不正确"; this.setState({ Phonenumberisnotcos: stringdata, Phonenumberisnotcobool: true, - dragOk:false, - Whethertoverify:this.state.Whethertoverify===true?false:true, + dragOk: false, + Whethertoverify: this.state.Whethertoverify === true ? false : true, }) } else { this.setState({ @@ -792,8 +704,8 @@ class LoginRegisterComponent extends Component { this.setState({ Phonenumberisnotcos: stringdata, Phonenumberisnotcobool: true, - dragOk:false, - Whethertoverify:this.state.Whethertoverify===true?false:true, + dragOk: false, + Whethertoverify: this.state.Whethertoverify === true ? false : true, }) return } else { @@ -809,47 +721,43 @@ class LoginRegisterComponent extends Component { } //获取登入密码 passwordonChange = (e) => { - // console.log(e.target.value); var stirngt; - if(e.target.value.length>0){ - var str= e.target.value.replace(/\s*/g,"") - stirngt=str; - }else{ - stirngt= e.target.value; + if (e.target.value.length > 0) { + var str = e.target.value.replace(/\s*/g, "") + stirngt = str; + } else { + stirngt = e.target.value; } this.setState({ password: stirngt, - Phonenumberisnotcodmm:undefined, - Phonenumberisnotcodmms:undefined, + Phonenumberisnotcodmm: undefined, + Phonenumberisnotcodmms: undefined, }) - // this.setState({ - // password: e.target.value - // }) } //获取注册登入 loginInputonChanges = (e) => { var stirngt; - if(e.target.value.length>0){ - var str= e.target.value.replace(/\s*/g,"") - stirngt=str; - }else{ - stirngt= e.target.value; + if (e.target.value.length > 0) { + var str = e.target.value.replace(/\s*/g, "") + stirngt = str; + } else { + stirngt = e.target.value; } if (e.target.value.length === 0) { this.setState({ Phonenumberisnotcos: undefined, Phonenumberisnotcobool: false, logins: stirngt, - dragOk:false, - Whethertoverify:this.state.Whethertoverify===true?false:true, + dragOk: false, + Whethertoverify: this.state.Whethertoverify === true ? false : true, }) - }else{ + } else { this.setState({ logins: stirngt, Phonenumberisnotcos: undefined, - dragOk:false, - Whethertoverify:this.state.Whethertoverify===true?false:true, + dragOk: false, + Whethertoverify: this.state.Whethertoverify === true ? false : true, }) } @@ -858,449 +766,123 @@ class LoginRegisterComponent extends Component { passwordonChanges = (e) => { // console.log(e.target.value); var stirngt; - if(e.target.value.length>0){ - var str= e.target.value.replace(/\s*/g,"") - stirngt=str; - }else{ - stirngt= e.target.value; + if (e.target.value.length > 0) { + var str = e.target.value.replace(/\s*/g, "") + stirngt = str; + } else { + stirngt = e.target.value; } this.setState({ passwords: stirngt, - Phonenumberisnotcosymmm:undefined, + Phonenumberisnotcosymmm: undefined, }) } //获取code codesonChange = (e) => { this.setState({ codes: e.target.value, - Phonenumberisnotcosyzm:undefined, + Phonenumberisnotcosyzm: undefined, }) } //切换tab - changeTab=(e)=>{ + changeTab = (e) => { this.setState({ - tab:e.key + tab: e.key }) - - if(e.key === 0){ + if (e.key === 0) { this.setState({ - Phonenumberisnotcos:undefined + Phonenumberisnotcos: undefined }) - }else{ + } else { this.setState({ - Phonenumberisnotco:undefined + Phonenumberisnotco: undefined }) - } - - // this.props.history.push(`/classrooms/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key) - } - loginonkeyup =(e)=>{ - if(e.keyCode==32){ - - return false; - } - }; - setNotcompleteds=()=>{ + setMyEduCoderModals = () => { this.setState({ - Notcompleteds:true, - MyEduCoderModals:false, - registered:undefined, - - }) - }; - setMyEduCoderModals=()=>{ - this.setState({ - MyEduCoderModals:true, - registered:"注册成功" + MyEduCoderModals: true, + registered: "注册成功" }) }; - openweixinlogin=()=>{ - this.setState({ - weixinlogin:true - }) - } - hideweixinlogin=()=>{ - this.setState({ - weixinlogin:false, - qqlogin:false, - tab:["0"] - }) - } - - openqqlogin=()=>{ - this.setState({ - qqlogin:true - }) - //window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2f${window.location.host}%2otherloginqq&response_type=code` - window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginqq&state=null,${window.location.host}&response_type=code` - // window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&tp=qq&response_type=code` - } - - openphoneqqlogin=()=>{ - window.open( - `https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginqq&state=null,${window.location.host}&response_type=code` - ) - } render() { - const { - // 登录 - autoLogin, - classpass, - passopens, - seconds, - getverificationcodes, - Agreetotheterms, - Phonenumberisnotco, - Phonenumberisnotcos, - codes, - tab, - dragOk, - Whethertoverify, - classpassbool, - Phonenumberisnotcosytdhk, - Phonenumberisnotcosyzm, - Phonenumberisnotcosymmm, - Phonenumberisnotcodmm, - // 注册 - readAgreement, - pciphone, - Phonenumberisnotcodmms, - weixinlogin - } = this.state - // height: 346px; - if (this.state.seconds === 0) { - // window.location.href='http://www.cnblogs.com/a-cat/'; - } - - + const {passopens,Agreetotheterms,Phonenumberisnotcos,tab,classpassbool,Phonenumberisnotcosymmm} = this.state return ( - -
    - + } + -
    - {weixinlogin===false&&this.props.weixinlogin===undefined? - 登录 - 注册 - :""} - - { - weixinlogin===false&&parseInt(tab[0])==0 && -
    - - - this.inputOnBlur(e, 1)} - style={{marginTop: '30px', height: '38px'}} - onPressEnter={() => this.postLogin()} - > - - { - Phonenumberisnotco && Phonenumberisnotco != "" ? -

    - {Phonenumberisnotco} -

    - :
    - } - - this.postLogin()} - className={Phonenumberisnotcodmm && Phonenumberisnotcodmm !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"} - placeholder="密码"> - { - Phonenumberisnotcodmm && Phonenumberisnotcodmm != "" ? -

    - {Phonenumberisnotcodmm} -

    - : (Phonenumberisnotcodmms=== undefined?
    :"") - } - { - Phonenumberisnotcodmms && Phonenumberisnotcodmms != "" ? -

    - {Phonenumberisnotcodmms} -

    - : "" - } - - - - - {this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?this.state.isphone===true?

    - - ———————— 快速登录 ———————— -

    -

    :

    - ———————— 快速登录 ———————— -

    -

    :""} -
    - } - - - - { - weixinlogin===false&&parseInt(tab[0])==1 && -
    - this.inputOnBlurzhuche(e, 2)} - style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}> - { - Phonenumberisnotcos && Phonenumberisnotcos !== "" ? -

    - {Phonenumberisnotcos} -

    - :
    - - } - {this.state.MyEduCoderModals===true? {this.setNotcompleteds()}} - />:""} - - { - Whethertoverify===false&&pciphone===true? - - - : - "" - - } - { - Whethertoverify===true&&pciphone===true? - - - : - "" - } - -
    - { - pciphone===true? - ( - Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !== "" ? -

    - {Phonenumberisnotcosytdhk} -

    - :
    - - ) - :"" - } -
    - - - -
    - - - - { - getverificationcodes === undefined ? - - : getverificationcodes === true ? - - : - - } - -
    -
    - { - Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ? -

    - {Phonenumberisnotcosyzm} -

    - :
    - - } -
    - - - - - this.Showandhide(key)}> - - }> - { - Phonenumberisnotcosymmm && Phonenumberisnotcosymmm !== "" ? -

    - {Phonenumberisnotcosymmm} + } + ` + } + + this.Showandhide(key)}> + + }> + { + Phonenumberisnotcosymmm && Phonenumberisnotcosymmm !== "" ? +

    + {Phonenumberisnotcosymmm}

    - :
    + :
    - } - {this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?我已阅读并同意 - - 《服务协议条款》 - :""} - - - {this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?this.state.isphone===true?

    - - ———————— 快速登录 ———————— -

    -

    :

    - ———————— 快速登录 ———————— -

    -

    :"" - } -
    - } - - - - - {weixinlogin===true?:""} - {weixinlogin===true?

    - this.hideweixinlogin()}>返回登录注册 -

    :""} -
    - -
    + } + +
    +
    +
    ); } }