diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 00000000..b6bb1a5d --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,1179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1584692398144 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css index 9877c4ea..8fe59797 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; @@ -6708,10 +6714,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.ttf b/public/css/iconfont.ttf index cffaad68..23055ead 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 af2a764e..5767eca9 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 7d4cb19b..1d83b46b 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 00000000..05b9d163 Binary files /dev/null and b/public/favicon-.ico differ diff --git a/public/favicon.ico b/public/favicon.ico index 75a4c3df..961f3052 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/src/App.js b/src/App.js index 5b745a70..50808276 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, @@ -360,34 +364,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)} - {/* -

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

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

    (确实开源)

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

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

    + // */} ) } export default Footer; diff --git a/src/forge/Head/header.scss b/src/forge/Head/header.scss index 263cd1ee..1d5ac90f 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 a3770fcc..3356687d 100644 --- a/src/forge/Index.js +++ b/src/forge/Index.js @@ -65,12 +65,6 @@ class Index extends Component { )} >
    - {/* ( - - )} - > */} ( @@ -84,12 +78,6 @@ class Index extends Component { )} > - ( - - )} - > ); @@ -101,10 +89,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 index 4982414a..67bbb461 100644 --- a/src/forge/Main/CoderRootBranch.js +++ b/src/forge/Main/CoderRootBranch.js @@ -73,7 +73,6 @@ export default ((props)=>{ TAR.GZ ) - return(
    diff --git a/src/forge/Team/Group/GroupForm.jsx b/src/forge/Team/Group/GroupForm.jsx index 94825905..30b10816 100644 --- a/src/forge/Team/Group/GroupForm.jsx +++ b/src/forge/Team/Group/GroupForm.jsx @@ -157,6 +157,17 @@ export default Form.create()( setAuth(params.target.value) } + function checkname(rule, value, callback){ + if(!value){ + callback(); + } + if(value && !value.match(/^[a-zA-Z][a-zA-Z\d]{3,14}$/)){ + callback("只能使用英文字母和数字,以字母开头,长度为4到15个字符"); + } + callback(); + } + + function checkname(rule, value, callback){ if(!value){ callback(); diff --git a/src/forge/Version/version.js b/src/forge/Version/version.js new file mode 100644 index 00000000..99223e1d --- /dev/null +++ b/src/forge/Version/version.js @@ -0,0 +1,122 @@ +import React, { Component } from "react"; +import { Link } from 'react-router-dom'; +import { Spin } from 'antd'; +import NoneData from '../Nodata'; +import './version.css'; +import axios from 'axios'; +import RenderHtml from '../../components/render-html'; + +/** + * issue_chosen:下拉的筛选列表, + * data:列表接口返回的所有数据, + * issues:列表数组, + * isSpin:加载中, + */ +class version extends Component { + constructor(props) { + super(props); + this.state = { + issue_chosen: undefined, + data: undefined, + releases:undefined, + issues: undefined, + isSpin: true, + search: undefined, + search_count: undefined, + } + } + + componentDidMount = () => { + 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 1cd3969d..0df0d910 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 2252d3ef..9ddfae16 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 00000000..6e709b43 --- /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 00000000..b3940405 --- /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 00000000..0127e337 --- /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 00000000..eedd4039 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 00000000..5adfb747 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 00000000..1dde507a 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 00000000..b0a9f6d0 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 00000000..19167bc1 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 00000000..f1278c5b 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 00000000..d3ffe77e 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 00000000..d3ffe77e 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 00000000..754ed62b 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 00000000..9d4bc7a7 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 00000000..5728f839 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 00000000..c3ba36e2 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 00000000..b79e16a2 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 00000000..e768466c 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 00000000..38271d61 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 00000000..788d5285 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 00000000..42ef098c 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 00000000..e2fa217a 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 00000000..628b630f 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 00000000..69c41ca7 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 00000000..cc43b5c5 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 00000000..b1d0f7c1 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 00000000..44d7cbd5 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 00000000..976193b4 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 00000000..85a19f95 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 00000000..faab6643 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 00000000..a03097a5 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 00000000..e8f6ac94 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 00000000..c2cf179b 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 00000000..f2e48d8e 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 00000000..340b169e 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 00000000..d2d4385a 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 00000000..38c05b76 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 00000000..9dcf949d 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 00000000..8705a787 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 00000000..1ea4b161 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 00000000..4f877fbc 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 00000000..a63cac32 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 00000000..a4dbfd8b 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 00000000..0e0e1025 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 00000000..e7c5b907 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 00000000..9293cab6 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 00000000..189b000f 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 00000000..d99de480 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 00000000..bc243e43 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 00000000..3b64a723 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 00000000..bab46403 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 00000000..3824c1d3 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 00000000..68804601 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 00000000..f22552c9 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 00000000..0d9f02aa 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 00000000..67550502 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 00000000..4c6413c4 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 00000000..8b50bdf2 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 00000000..cf7db256 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 00000000..0f9e58cf 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 00000000..9108aa42 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 00000000..7dd81502 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 00000000..0e6bf66b 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 00000000..6b208d38 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 00000000..ef81575b 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 00000000..6b91a993 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 00000000..5152155d 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 00000000..ea1b7ba4 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 00000000..052f012b 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 00000000..59f55a74 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 00000000..d92f1436 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 00000000..10af112b 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 00000000..26091222 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 00000000..cd54486d 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 00000000..0ac9cbcd 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 00000000..fe0950b2 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 00000000..526a93a1 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 00000000..f61ac90c --- /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 00000000..c62c3af9 --- /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 00000000..0d7896d1 --- /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 00000000..395697d1 --- /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 00000000..abf41a57 --- /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 00000000..57badcc7 --- /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 00000000..961f3052 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 c687f5f5..b4485efe 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,59 +89,37 @@ 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 ?
    { + 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 f3258174..8ccc64b1 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'; @@ -12,7 +12,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)", @@ -25,15 +25,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, @@ -54,25 +48,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, @@ -93,25 +87,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", @@ -125,58 +119,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: "提示", @@ -199,8 +183,6 @@ class LoginRegisterComponent extends Component { StudyMakeMoney = () => { // 调用父组件方法 - - // this.props.Setlogins(3); this.setState({ login: "", password: "", @@ -210,7 +192,7 @@ class LoginRegisterComponent extends Component { }); try { this.props.Setshowbool(3); - }catch (e) { + } catch (e) { } } @@ -220,7 +202,7 @@ class LoginRegisterComponent extends Component { // -------------------- LOGIN START //下次自动登入 onAutoLoginChange = (e) => { - this.setState({autoLogin: e.target.checked}) + this.setState({ autoLogin: e.target.checked }) } // -------------------- LOGIN END @@ -249,19 +231,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, }) @@ -279,14 +261,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 @@ -302,8 +284,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, }); @@ -313,14 +295,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) @@ -339,12 +321,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 } @@ -358,38 +340,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; @@ -401,11 +383,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; @@ -415,14 +392,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; } @@ -436,74 +413,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"; } @@ -512,34 +452,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) => { @@ -560,21 +475,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, }) @@ -584,26 +499,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; } @@ -616,20 +531,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) => { @@ -642,13 +557,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, }) @@ -660,19 +575,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; @@ -724,25 +639,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, }) } @@ -759,20 +674,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({ @@ -793,8 +705,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 { @@ -810,47 +722,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, }) } @@ -859,186 +767,81 @@ 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? - 登录 - 注册 - :""} +
    + + 注册 + + +
    + + { + Phonenumberisnotcos && Phonenumberisnotcos !== "" ? +

    + {Phonenumberisnotcos} +

    + :
    - { - weixinlogin===false&&parseInt(tab[0])==0 && -
    - + }

    - } @@ -1214,24 +1016,24 @@ class LoginRegisterComponent extends Component { } .ant-input-group .ant-input:hover { z-index: 0 !important; - } - ` - } - - this.Showandhide(key)}> - - }> - { - Phonenumberisnotcosymmm && Phonenumberisnotcosymmm !== "" ? -

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

    + {Phonenumberisnotcosymmm}

    :