Merge remote-tracking branch 'gitlink/gitlink_server' into gitlink_server
|
@ -3947,7 +3947,7 @@ html>body #ajax-indicator {
|
||||||
}
|
}
|
||||||
.head-nav {
|
.head-nav {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 70px;
|
height: 58px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
@ -3959,14 +3959,14 @@ html>body #ajax-indicator {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
height: 70px;
|
height: 58px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.head-nav ul#header-nav li {
|
.head-nav ul#header-nav li {
|
||||||
float: left;
|
float: left;
|
||||||
height: 70px;
|
height: 58px;
|
||||||
line-height: 70px;
|
line-height: 58px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
@ -3980,9 +3980,6 @@ html>body #ajax-indicator {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
.head-right i{
|
|
||||||
color: #fff!important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.head-nav ul#header-nav li a:hover,.head-nav ul#header-nav li.active a {
|
.head-nav ul#header-nav li a:hover,.head-nav ul#header-nav li.active a {
|
||||||
color: #5091FF;
|
color: #5091FF;
|
||||||
|
@ -3992,10 +3989,6 @@ html>body #ajax-indicator {
|
||||||
margin-right: 0px
|
margin-right: 0px
|
||||||
}
|
}
|
||||||
|
|
||||||
.head-nav ul#header-nav li.active{
|
|
||||||
/* background-color: #3B3B3B; */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.head-nav ul#header-nav li p:hover {
|
.head-nav ul#header-nav li p:hover {
|
||||||
color: #cccccc;
|
color: #cccccc;
|
||||||
|
@ -6714,13 +6707,10 @@ p{
|
||||||
right: 0px;
|
right: 0px;
|
||||||
top:4px;
|
top:4px;
|
||||||
color: #999;
|
color: #999;
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
}
|
}
|
||||||
.ant-input, .ant-input .ant-input-suffix{
|
.ant-input, .ant-input .ant-input-suffix{
|
||||||
background-color: #fff!important;
|
background-color: #fff!important;
|
||||||
}
|
}
|
||||||
.has-error .ant-input{
|
.has-error .ant-input{
|
||||||
background-color: #FEF1F0!important;
|
background-color: #FEF1F0!important;
|
||||||
>>>>>>> pre_develop
|
|
||||||
}
|
}
|
|
@ -341,7 +341,6 @@ class App extends Component {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
{/* 组织 */}
|
{/* 组织 */}
|
||||||
<Route path={"/organize"}
|
<Route path={"/organize"}
|
||||||
render={
|
render={
|
||||||
|
@ -518,3 +517,4 @@ moment.defineLocale('zh-cn', {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
export default SnackbarHOC()(App);
|
export default SnackbarHOC()(App);
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ export default ({history}) => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<i className="iconfont icon-sousuo font-18 ml30" onClick={() => {
|
<i className="iconfont icon-sousuo font-18 ml30" style={{color:"#a5a5a5"}} onClick={() => {
|
||||||
setOpenSearch(true)
|
setOpenSearch(true)
|
||||||
}} />
|
}} />
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,25 +3,40 @@ import { Modal , Button } from 'antd';
|
||||||
import './Index.scss';
|
import './Index.scss';
|
||||||
import '../../css/index.scss';
|
import '../../css/index.scss';
|
||||||
import RenderHtml from '../../../components/render-html';
|
import RenderHtml from '../../../components/render-html';
|
||||||
import cookie from 'react-cookies';
|
// import cookie from 'react-cookies';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
function SystemNotice({system_notification,history}){
|
function SystemNotice({showNotice,system_notification,history,login,hideSystemNotice}){
|
||||||
const [ visible , setVisible ] = useState(false);
|
const [ visible , setVisible ] = useState(false);
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(system_notification && !cookie.load('notice_stage')){
|
if(system_notification && !system_notification.is_read && showNotice && login){
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
}
|
}
|
||||||
},[system_notification,history.location])
|
},[system_notification])
|
||||||
|
|
||||||
function sureContinue() {
|
function sureContinue() {
|
||||||
cookie.remove('notice_stage');
|
if(login && ( system_notification && system_notification.id )){
|
||||||
|
const url = `/users/${login}/system_notification_histories.json`;
|
||||||
let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//一天
|
axios.post(url,{
|
||||||
// let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//一分钟
|
system_notification_id:system_notification.id
|
||||||
cookie.save('notice_stage', true,{ expires: inFifteenMinutes,path:"/" });
|
}).then(result=>{
|
||||||
|
if(result){
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
|
hideSystemNotice();
|
||||||
|
}
|
||||||
|
}).catch(error=>{})
|
||||||
|
}else{
|
||||||
|
setVisible(false);
|
||||||
|
hideSystemNotice();
|
||||||
|
}
|
||||||
|
// cookie.remove('notice_stage');
|
||||||
|
|
||||||
|
// let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//一天
|
||||||
|
// // let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//一分钟
|
||||||
|
// cookie.save('notice_stage', true,{ expires: inFifteenMinutes,path:"/" });
|
||||||
|
|
||||||
|
// setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -18,7 +18,9 @@ function Footer(){
|
||||||
}
|
}
|
||||||
|
|
||||||
return(
|
return(
|
||||||
value && showhtml(value)
|
<div>
|
||||||
|
{value && showhtml(value)}
|
||||||
|
</div>
|
||||||
// {/* <div className="footEdition">
|
// {/* <div className="footEdition">
|
||||||
// <div className="footContent">
|
// <div className="footContent">
|
||||||
// <ul className="center">
|
// <ul className="center">
|
||||||
|
|
|
@ -279,7 +279,7 @@ class NewHeader extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { match ,resetUserInfo ,showNotification} = this.props;
|
const { match ,resetUserInfo ,showNotification,publicNav} = this.props;
|
||||||
let current_user = this.props.user;
|
let current_user = this.props.user;
|
||||||
let {
|
let {
|
||||||
AccountProfiletype,
|
AccountProfiletype,
|
||||||
|
@ -368,7 +368,7 @@ class NewHeader extends Component {
|
||||||
|
|
||||||
let search_url = settings && settings.common && settings.common.search;
|
let search_url = settings && settings.common && settings.common.search;
|
||||||
return (
|
return (
|
||||||
<div className="newHeaders" id="nHeader">
|
<div className={publicNav ? `newHeaders publicNav`:`newHeaders`} id="nHeader">
|
||||||
<div className="headerContent">
|
<div className="headerContent">
|
||||||
{isRender === true ?
|
{isRender === true ?
|
||||||
<LoginDialog
|
<LoginDialog
|
||||||
|
@ -433,7 +433,8 @@ class NewHeader extends Component {
|
||||||
{
|
{
|
||||||
current_user && (current_user.main_site || current_user.login) && (settings && settings.add && settings.add.length>0)?
|
current_user && (current_user.main_site || current_user.login) && (settings && settings.add && settings.add.length>0)?
|
||||||
<Dropdown overlay={this.addMenu(settings && settings.add)} placement="bottomRight">
|
<Dropdown overlay={this.addMenu(settings && settings.add)} placement="bottomRight">
|
||||||
<i className="iconfont icon-tianjiafangda ml30 mr15"></i>
|
{/* <i className="iconfont icon-tianjiafangda ml30 mr15"></i> */}
|
||||||
|
<img src={require(`./img/add.png`)} alt="" width="16px" className="mr15 ml30"/>
|
||||||
</Dropdown>:""
|
</Dropdown>:""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -448,7 +449,8 @@ class NewHeader extends Component {
|
||||||
>
|
>
|
||||||
<Link to={"/settings/notice"} className="message-icon">
|
<Link to={"/settings/notice"} className="message-icon">
|
||||||
{current_user && <Badge count={current_user.message_unread_total}>
|
{current_user && <Badge count={current_user.message_unread_total}>
|
||||||
<i className="iconfont icon-xiaoxilingdang ml15 mr15"></i>
|
{/* <i className="iconfont icon-xiaoxilingdang ml15 mr15"></i> */}
|
||||||
|
<img src={require(`./img/ring.png`)} alt="" width="16px" className="ml15 mr15"/>
|
||||||
</Badge>}
|
</Badge>}
|
||||||
</Link>
|
</Link>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
|
@ -315,18 +315,24 @@
|
||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
margin-bottom: 20px!important;
|
margin-bottom: 20px!important;
|
||||||
}
|
}
|
||||||
&.theline{
|
}
|
||||||
display: flex;
|
.theline{
|
||||||
|
.imgCon{
|
||||||
|
width: 90px;
|
||||||
|
height: 90px;
|
||||||
|
padding:5px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #fff;
|
||||||
img{
|
img{
|
||||||
width: 80px;
|
width: 100%;
|
||||||
height: 80px;
|
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.copyrightDesc{
|
}
|
||||||
|
.copyrightDesc{
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #BDC2D1;
|
color: #BDC2D1;
|
||||||
|
@ -334,5 +340,7 @@
|
||||||
padding:15px 0px;
|
padding:15px 0px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #1B212C;
|
background-color: #1B212C;
|
||||||
|
a{
|
||||||
|
color: #BDC2D1!important;
|
||||||
}
|
}
|
||||||
}
|
}
|
After Width: | Height: | Size: 749 B |
After Width: | Height: | Size: 615 B |
|
@ -27,12 +27,6 @@ const ProjectHome = Loadable({
|
||||||
loading: Loading,
|
loading: Loading,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 项目详情放在用户和组织下作为二级菜单存在
|
|
||||||
// const ProjectDetail = Loadable({
|
|
||||||
// loader: () => import("./Main/Detail"),
|
|
||||||
// loading: Loading,
|
|
||||||
// });
|
|
||||||
|
|
||||||
class Index extends Component {
|
class Index extends Component {
|
||||||
|
|
||||||
componentDidUpdate = () => {
|
componentDidUpdate = () => {
|
||||||
|
|
|
@ -328,7 +328,7 @@ function CoderDepot(props){
|
||||||
function okUpdate(d,w,l){
|
function okUpdate(d,w,l){
|
||||||
const url = `/${owner}/${projectsId}.json`;
|
const url = `/${owner}/${projectsId}.json`;
|
||||||
axios.put(url,{
|
axios.put(url,{
|
||||||
description:d,website:w,lesson_url:l
|
description:d,website:w || "",lesson_url:l||""
|
||||||
}).then(result=>{
|
}).then(result=>{
|
||||||
if(result && result.data && result.data.id){
|
if(result && result.data && result.data.id){
|
||||||
setDesc(result.data.description);
|
setDesc(result.data.description);
|
||||||
|
|
Before Width: | Height: | Size: 240 KiB After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 1.2 KiB |
|
@ -74,7 +74,7 @@ function Index() {
|
||||||
<div className="leftLists">
|
<div className="leftLists">
|
||||||
<div className="leftTitles">
|
<div className="leftTitles">
|
||||||
<span>开源项目</span>
|
<span>开源项目</span>
|
||||||
<Link to={`/explore/all`}>更多<i className="iconfont icon-triangle font-12"></i></Link>
|
<Link to={`/explore/all`} target="_blank">更多<i className="iconfont icon-triangle font-12"></i></Link>
|
||||||
</div>
|
</div>
|
||||||
<Spin spinning={isSpin}>
|
<Spin spinning={isSpin}>
|
||||||
<div style={{minHeight:"400px"}}>
|
<div style={{minHeight:"400px"}}>
|
||||||
|
@ -85,10 +85,10 @@ function Index() {
|
||||||
projectsList.map((i,k)=>{
|
projectsList.map((i,k)=>{
|
||||||
return(
|
return(
|
||||||
<li>
|
<li>
|
||||||
<Link to={`/${i.author && i.author.login}`}><img src={getImageUrl(`/${i.author && i.author.image_url}`)} alt="" /></Link>
|
<Link to={`/${i.author && i.author.login}`} target="_blank"><img src={getImageUrl(`/${i.author && i.author.image_url}`)} alt="" /></Link>
|
||||||
<div className="itemTitle">
|
<div className="itemTitle">
|
||||||
<div className="item-title-infos">
|
<div className="item-title-infos">
|
||||||
<Link to={`/${i.author && i.author.login}/${i.identifier}`} className="infotitle">{i.author && i.author.name}/{i.name}</Link>
|
<Link to={`/${i.author && i.author.login}/${i.identifier}`} target="_blank" className="infotitle task-hide">{i.author && i.author.name}/{i.name}</Link>
|
||||||
{i.praises_count > 0 ? <span><i className="iconfont icon-dianzan11 mr3 font-16"></i>{i.praises_count}</span> :"" }
|
{i.praises_count > 0 ? <span><i className="iconfont icon-dianzan11 mr3 font-16"></i>{i.praises_count}</span> :"" }
|
||||||
{i.forked_count > 0 ? <span><i className="iconfont icon-fork2 mr3 font-13"></i>{i.forked_count}</span>:""}
|
{i.forked_count > 0 ? <span><i className="iconfont icon-fork2 mr3 font-13"></i>{i.forked_count}</span>:""}
|
||||||
</div>
|
</div>
|
||||||
|
@ -113,9 +113,12 @@ function Index() {
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</Spin>
|
</Spin>
|
||||||
|
{
|
||||||
|
projectsList && projectsList.length > 0 &&
|
||||||
<div className="left-bottom-btn">
|
<div className="left-bottom-btn">
|
||||||
<Link to={`/explore/all`}>查看更多开源项目<img src={more} alt="" /></Link>
|
<Link to={`/explore/all`} target="_blank">查看更多开源项目<img src={more} alt="" /></Link>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<SubList />
|
<SubList />
|
||||||
|
|
|
@ -318,7 +318,6 @@
|
||||||
background: url('../img/index/typebg.png');
|
background: url('../img/index/typebg.png');
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
box-shadow: 0px 0px 4px 5px rgba(0, 0, 0, 0.02);
|
box-shadow: 0px 0px 4px 5px rgba(0, 0, 0, 0.02);
|
||||||
padding:12px 0px;
|
|
||||||
a{
|
a{
|
||||||
padding:0px 20px;
|
padding:0px 20px;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
|
@ -386,6 +385,7 @@
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
line-height: 21px;
|
line-height: 21px;
|
||||||
color: #333!important;
|
color: #333!important;
|
||||||
|
max-width: 458px;
|
||||||
&:hover{
|
&:hover{
|
||||||
color: #466AFF!important;
|
color: #466AFF!important;
|
||||||
}
|
}
|
||||||
|
@ -413,7 +413,7 @@
|
||||||
height: 20px;
|
height: 20px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: center;
|
||||||
.category{
|
.category{
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-left: 11px;
|
padding-left: 11px;
|
||||||
|
@ -439,7 +439,7 @@
|
||||||
height: 10px;
|
height: 10px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border-left: 1px solid #9e9e9e;
|
border-left: 1px solid #9e9e9e;
|
||||||
bottom: 4px;
|
bottom: 5px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -539,11 +539,11 @@
|
||||||
}
|
}
|
||||||
.sInfos{
|
.sInfos{
|
||||||
background: #F7F8F9;
|
background: #F7F8F9;
|
||||||
padding:5px;
|
padding:0px 5px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
line-height: 22px;
|
line-height: 24px;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ import { getImageUrl } from 'educoder';
|
||||||
import Eye from '../img/index/eye.png';
|
import Eye from '../img/index/eye.png';
|
||||||
import Data from '../img/index/data.png';
|
import Data from '../img/index/data.png';
|
||||||
import Earth from '../img/index/earth.png';
|
import Earth from '../img/index/earth.png';
|
||||||
import Imgs from '../img/tree.png';
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
// const list =[
|
// const list =[
|
||||||
|
@ -51,8 +50,8 @@ function SubBanner() {
|
||||||
return(
|
return(
|
||||||
<div className="banners">
|
<div className="banners">
|
||||||
<div className="bannersCenter">
|
<div className="bannersCenter">
|
||||||
<p className="bTitle"><span>新一代开源创新服务平台</span></p>
|
<p className="bTitle"><span>GitLink 确实开源</span></p>
|
||||||
<p className="bSubTitle">Gitlink(确实开源)-CCF官网指定的产学研融合面向软件开源创新的开源社区</p>
|
<p className="bSubTitle">新一代开发创新服务平台 让你的创意在这里释放</p>
|
||||||
<div className="bannerBox">
|
<div className="bannerBox">
|
||||||
{
|
{
|
||||||
list && list.length > 0 ?
|
list && list.length > 0 ?
|
||||||
|
|
|
@ -56,11 +56,11 @@ function SubList() {
|
||||||
return(
|
return(
|
||||||
<li>
|
<li>
|
||||||
<div>
|
<div>
|
||||||
<Link to={`/${i.login}`}><img src={getImageUrl(`/${i.avatar_url}`)} alt=""/></Link>
|
<Link target="_blank" to={`/${i.login}`}><img src={getImageUrl(`/${i.avatar_url}`)} alt=""/></Link>
|
||||||
<div>
|
<div>
|
||||||
<Link to={`/${i.login}`} className="font-15">{i.name}</Link>
|
<Link target="_blank" to={`/${i.login}`} className="font-15">{i.name}</Link>
|
||||||
<p className="task-hide" style={{maxWidth:"260px"}}>
|
<p className="task-hide" style={{maxWidth:"260px"}}>
|
||||||
<Link to={`/${i.login}/${i.project && i.project.identifier}`}><i className="iconfont icon-daimakuicon1 font-14 mr8"></i>{i.project && i.project.name}</Link>
|
<Link target="_blank" to={`/${i.login}/${i.project && i.project.identifier}`}><i className="iconfont icon-daimakuicon1 font-14 mr8"></i>{i.project && i.project.name}</Link>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -84,7 +84,7 @@ function SubList() {
|
||||||
<li>
|
<li>
|
||||||
<div className="mInfos">
|
<div className="mInfos">
|
||||||
<span className="num">{k+1}</span>
|
<span className="num">{k+1}</span>
|
||||||
<Link to={`/${i.owner && i.owner.login}/${i.identifier}`} className="name task-hide">{i.owner && i.owner.name}/{i.name}</Link>
|
<Link target="_blank" to={`/${i.owner && i.owner.login}/${i.identifier}`} className="name task-hide">{i.owner && i.owner.name}/{i.name}</Link>
|
||||||
<span>
|
<span>
|
||||||
<i className="iconfont icon-dianzan11 font-16 mr4"></i>{i.praises}
|
<i className="iconfont icon-dianzan11 font-16 mr4"></i>{i.praises}
|
||||||
</span>
|
</span>
|
||||||
|
@ -113,7 +113,7 @@ function SubList() {
|
||||||
<li>
|
<li>
|
||||||
<div className="mInfos">
|
<div className="mInfos">
|
||||||
<span className="num">{k+1}</span>
|
<span className="num">{k+1}</span>
|
||||||
<Link to={`/${i.owner && i.owner.login}/${i.identifier}`} className="name task-hide">{i.owner && i.owner.name}/{i.name}</Link>
|
<Link target="_blank" to={`/${i.owner && i.owner.login}/${i.identifier}`} className="name task-hide">{i.owner && i.owner.name}/{i.name}</Link>
|
||||||
<span>
|
<span>
|
||||||
<i className="iconfont icon-dianzan11 font-16 mr4"></i>{i.praises}
|
<i className="iconfont icon-dianzan11 font-16 mr4"></i>{i.praises}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -289,7 +289,8 @@ class Index extends Component {
|
||||||
let second = first.split('.')[0];
|
let second = first.split('.')[0];
|
||||||
if(!second)return;
|
if(!second)return;
|
||||||
this.props.form.setFieldsValue({
|
this.props.form.setFieldsValue({
|
||||||
repository_name:second
|
repository_name:second,
|
||||||
|
name:second
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
this.props.form.setFieldsValue({
|
this.props.form.setFieldsValue({
|
||||||
|
|
|
@ -181,7 +181,7 @@ export default Form.create()(
|
||||||
)}
|
)}
|
||||||
<p>选择头像:</p>
|
<p>选择头像:</p>
|
||||||
<UploadImage url={getImageUrl(`/${image}`)} getImage={getImage}/>
|
<UploadImage url={getImageUrl(`/${image}`)} getImage={getImage}/>
|
||||||
<Button type={"primary"} onClick={updateDetail}>更新仓库设置</Button>
|
<Button type={"primary"} onClick={updateDetail}>更新组织设置</Button>
|
||||||
</Form>
|
</Form>
|
||||||
</Div>
|
</Div>
|
||||||
</WhiteBack>
|
</WhiteBack>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React , { useEffect } from 'react';
|
import React , { useEffect } from 'react';
|
||||||
|
import Slider from 'react-slick';
|
||||||
import Beijing from './Img/unit/beijing.png';
|
import Beijing from './Img/unit/beijing.png';
|
||||||
import SHJT from './Img/unit/SHJT.png';
|
import SHJT from './Img/unit/SHJT.png';
|
||||||
import DD from './Img/unit/DD.png';
|
import DD from './Img/unit/DD.png';
|
||||||
|
@ -22,6 +23,9 @@ import LSLM from './Img/unit/LSLM.png';
|
||||||
import TG from './Img/unit/TG.png';
|
import TG from './Img/unit/TG.png';
|
||||||
import LC from './Img/unit/LC.png';
|
import LC from './Img/unit/LC.png';
|
||||||
import YKD from './Img/unit/YKD.png';
|
import YKD from './Img/unit/YKD.png';
|
||||||
|
import Axios from 'axios';
|
||||||
|
import { useState } from 'react';
|
||||||
|
import { getImageUrl } from 'educoder';
|
||||||
|
|
||||||
const list = [
|
const list = [
|
||||||
{image_url:GFKJ, name:"国防科技大学",src:"https://www.nudt.edu.cn/"},
|
{image_url:GFKJ, name:"国防科技大学",src:"https://www.nudt.edu.cn/"},
|
||||||
|
@ -45,26 +49,40 @@ const list = [
|
||||||
{image_url:LC, name:"浪潮",src:"https://cloud.inspur.com/"},
|
{image_url:LC, name:"浪潮",src:"https://cloud.inspur.com/"},
|
||||||
{image_url:YKD, name:"ucloud",src:"https://www.ucloud.cn/"}
|
{image_url:YKD, name:"ucloud",src:"https://www.ucloud.cn/"}
|
||||||
]
|
]
|
||||||
// const settings = {
|
|
||||||
// dots: false,
|
const settings = {
|
||||||
// infinite: true,
|
dots: false,
|
||||||
// slidesToShow: 6,
|
infinite: true,
|
||||||
// slidesToScroll: 1,
|
slidesToShow: 1,
|
||||||
// autoplay: true,
|
slidesToScroll: 1,
|
||||||
// speed: 2000,
|
vertical: true,
|
||||||
// autoplaySpeed: 2000,
|
verticalSwiping: true,
|
||||||
// cssEase: "linear",
|
autoplay:true,
|
||||||
// rows:2,
|
arrows:false
|
||||||
// arrows:false
|
};
|
||||||
// };
|
|
||||||
function FifthEdition() {
|
function FifthEdition() {
|
||||||
|
const [ topics ,setTopics ] = useState(undefined);
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(list.length>10){
|
// if(list.length>10){
|
||||||
Init();
|
// Init();
|
||||||
}
|
// }
|
||||||
|
getUnit();
|
||||||
},[])
|
},[])
|
||||||
|
|
||||||
|
function getUnit(){
|
||||||
|
const url =`/topics.json`;
|
||||||
|
Axios.get(url,{params:{
|
||||||
|
topic_type:"cooperator",
|
||||||
|
limit:20,
|
||||||
|
group_size:5
|
||||||
|
}}).then(result=>{
|
||||||
|
if(result){
|
||||||
|
setTopics(result.data.topics);
|
||||||
|
}
|
||||||
|
}).catch(error=>{})
|
||||||
|
}
|
||||||
|
|
||||||
function Init() {
|
function Init() {
|
||||||
let box = document.getElementById('scrollBox1');
|
let box = document.getElementById('scrollBox1');
|
||||||
scrollUp();
|
scrollUp();
|
||||||
|
@ -94,12 +112,12 @@ function FifthEdition() {
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div id={"scrollBox1"}>
|
<div id={"scrollBox1"}>
|
||||||
<div style={{width:370*list.length+"px"}}>
|
{/* <div style={{width:370*list.length+"px"}}>
|
||||||
<ul className="fifthList" id="box1" style={{width:(370*list.length)/2+"px"}}>
|
<ul className="fifthList" id="box1" style={{width:(370*list.length)/2+"px"}}>
|
||||||
{
|
{
|
||||||
list && list.map((i,k)=>{
|
list && list.map((i,k)=>{
|
||||||
return(
|
return(
|
||||||
<li><a href={i.src}><img src={i.image_url} alt={i.name}/></a></li>
|
<li><a href={i.src} target="_blank"><img src={i.image_url} alt={i.name}/></a></li>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -109,28 +127,34 @@ function FifthEdition() {
|
||||||
{
|
{
|
||||||
list && list.map((i,k)=>{
|
list && list.map((i,k)=>{
|
||||||
return(
|
return(
|
||||||
<li><a href={i.src}><img src={i.image_url} alt={i.name}/></a></li>
|
<li><a href={i.src} target="_blank"><img src={i.image_url} alt={i.name}/></a></li>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
}
|
}
|
||||||
</div>
|
</div> */}
|
||||||
{/* <Slider {...settings} className="footSlider">
|
|
||||||
{
|
{
|
||||||
list && list.map((i,k)=>{
|
topics && topics.length>0 ?
|
||||||
|
<Slider {...settings} className="unitMainSlider">
|
||||||
|
{
|
||||||
|
topics.map((i,k)=>{
|
||||||
return(
|
return(
|
||||||
<li><Link to={i.src}><img src={i.image_url} alt={i.name}/></Link></li>
|
<div className="slickMainline">
|
||||||
|
{
|
||||||
|
i.map((j,k1)=>{
|
||||||
|
return(
|
||||||
|
<a href={j.url} target="_blank"><img src={getImageUrl(j.image)} alt=""/></a>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
{list.length > 10 && list && list.map((i,k)=>{
|
</div>
|
||||||
return(
|
|
||||||
<li><Link to={i.src}><img src={i.image_url} alt={i.name}/></Link></li>
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</Slider> */}
|
</Slider>
|
||||||
|
:""
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 769 KiB After Width: | Height: | Size: 730 KiB |
Before Width: | Height: | Size: 428 KiB After Width: | Height: | Size: 414 KiB |
Before Width: | Height: | Size: 458 KiB After Width: | Height: | Size: 461 KiB |
Before Width: | Height: | Size: 914 KiB After Width: | Height: | Size: 877 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 114 KiB |
|
@ -1,6 +1,5 @@
|
||||||
import React , { useEffect , useState } from 'react';
|
import React , { useEffect , useState } from 'react';
|
||||||
import "./Index.scss";
|
import "./Index.scss";
|
||||||
import HeadNav from './Headnav';
|
|
||||||
import TopEdition from './TopEdition';
|
import TopEdition from './TopEdition';
|
||||||
import ThirdEdition from './ThirdEdition';
|
import ThirdEdition from './ThirdEdition';
|
||||||
import { Anchor } from 'antd';
|
import { Anchor } from 'antd';
|
||||||
|
@ -10,21 +9,37 @@ import F43 from './Img/4-3.png';
|
||||||
import F44 from './Img/4-4.png';
|
import F44 from './Img/4-4.png';
|
||||||
import SecondEdition from './SecondEdition';
|
import SecondEdition from './SecondEdition';
|
||||||
import FifthEdition from './FifthEdition';
|
import FifthEdition from './FifthEdition';
|
||||||
import Footnav from './Footnav';
|
|
||||||
import { TPMIndexHOC } from '../modules/tpm/TPMIndexHOC';
|
import { TPMIndexHOC } from '../modules/tpm/TPMIndexHOC';
|
||||||
|
import Axios from 'axios';
|
||||||
|
|
||||||
function Index(props) {
|
function Index(props) {
|
||||||
const [ value , setValue ] = useState("");
|
const [ value , setValue ] = useState("");
|
||||||
const [ flag , setFlag ] = useState(true);
|
const [ flag , setFlag ] = useState(true);
|
||||||
const [ isRender , setIsRender ] = useState(false);
|
|
||||||
const [ isloginCancel , setIsloginCancel ] = useState(false);
|
const [ bannerTab , setBannerTab ] = useState(undefined);
|
||||||
const register = props && props.mygetHelmetapi && props.mygetHelmetapi.common && props.mygetHelmetapi.common.register;
|
const register = props && props.mygetHelmetapi && props.mygetHelmetapi.common && props.mygetHelmetapi.common.register;
|
||||||
|
|
||||||
|
const { current_user } = props;
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
window.addEventListener("scroll",scrollListener);
|
window.addEventListener("scroll",scrollListener);
|
||||||
|
getTab();
|
||||||
},[])
|
},[])
|
||||||
|
|
||||||
|
function getTab() {
|
||||||
|
const url = `/topics.json?topic_type=card`;
|
||||||
|
Axios.get(url,{
|
||||||
|
params:{
|
||||||
|
limit:3
|
||||||
|
}
|
||||||
|
}).then(result=>{
|
||||||
|
if(result){
|
||||||
|
setBannerTab(result.data.topics);
|
||||||
|
}
|
||||||
|
}).catch(error=>{})
|
||||||
|
}
|
||||||
|
|
||||||
function scrollListener(event) {
|
function scrollListener(event) {
|
||||||
|
|
||||||
let third = document.getElementById("thirdContent").offsetTop;
|
let third = document.getElementById("thirdContent").offsetTop;
|
||||||
let top = document.documentElement.scrollTop + 60;
|
let top = document.documentElement.scrollTop + 60;
|
||||||
if(top>= third)
|
if(top>= third)
|
||||||
|
@ -50,8 +65,24 @@ function Index(props) {
|
||||||
return(
|
return(
|
||||||
<div className="homePage">
|
<div className="homePage">
|
||||||
<div className="topEdition">
|
<div className="topEdition">
|
||||||
<HeadNav {...props}/>
|
{/* <HeadNav {...props}/> */}
|
||||||
<TopEdition register={register}/>
|
<TopEdition register={register} current_user={current_user}/>
|
||||||
|
{
|
||||||
|
bannerTab && bannerTab.lenth > 0 ?
|
||||||
|
<ul className="topEditionUl">
|
||||||
|
{
|
||||||
|
bannerTab.map((i,k)=>{
|
||||||
|
return(
|
||||||
|
<a href={i.url} target="_blank" className="font-18">
|
||||||
|
<li>
|
||||||
|
{i.title}
|
||||||
|
</li>
|
||||||
|
</a>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
:
|
||||||
<ul className="topEditionUl">
|
<ul className="topEditionUl">
|
||||||
<a href="https://forum.trustie.net/forums/4666/detail" target="_blank" className="font-18">
|
<a href="https://forum.trustie.net/forums/4666/detail" target="_blank" className="font-18">
|
||||||
<li>
|
<li>
|
||||||
|
@ -69,10 +100,12 @@ function Index(props) {
|
||||||
</li>
|
</li>
|
||||||
</a>
|
</a>
|
||||||
</ul>
|
</ul>
|
||||||
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="secondEdition">
|
<div className="secondEdition">
|
||||||
<p className="theTitle">Gitlink,新一代开源创新服务平台</p>
|
<p className="theTitle">GitLink,新一代开源创新服务平台</p>
|
||||||
{
|
{
|
||||||
flag &&
|
flag &&
|
||||||
<Anchor>
|
<Anchor>
|
||||||
|
@ -90,8 +123,10 @@ function Index(props) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="forthEdition">
|
<div className="forthEdition">
|
||||||
<p className="theTitle">加入Gitlink,和社区伙伴们一起踏上开源创新的辉煌旅程!</p>
|
<p className="theTitle">加入GitLink,和社区伙伴们一起踏上开源创新的辉煌旅程!</p>
|
||||||
<a className="qulikyreg" href={register}>快速注册</a>
|
<div style={{marginBottom:"80px"}}>
|
||||||
|
{ !(current_user && current_user.login) && <a className="qulikyreg" href={register}>立即注册</a> }
|
||||||
|
</div>
|
||||||
<ul className="forthUl">
|
<ul className="forthUl">
|
||||||
<li>
|
<li>
|
||||||
<img src={F41} alt="" width={"100px"}/>
|
<img src={F41} alt="" width={"100px"}/>
|
||||||
|
@ -118,10 +153,9 @@ function Index(props) {
|
||||||
|
|
||||||
<div className="fifthEdition">
|
<div className="fifthEdition">
|
||||||
<p className="title">开源生态</p>
|
<p className="title">开源生态</p>
|
||||||
<p className="subtitle">Gitlink与各大企业、高校、科研机构开展广泛的技术合作,推动我国开源软件生态的快速构建与发展</p>
|
<p className="subtitle">GitLink与各大企业、高校、科研机构开展广泛的技术合作,推动我国开源软件生态的快速构建与发展</p>
|
||||||
<FifthEdition />
|
<FifthEdition />
|
||||||
</div>
|
</div>
|
||||||
<Footnav />
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,21 +61,12 @@ body{
|
||||||
height:100%;
|
height:100%;
|
||||||
div{
|
div{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
.regform1{
|
.regform{
|
||||||
background:url('./Img/banner1.png') no-repeat center top;
|
&>div{
|
||||||
background-size:cover;
|
background-size:cover;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
.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{
|
.regPrg{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -590,6 +581,7 @@ body{
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
color: #000;
|
color: #000;
|
||||||
|
max-width: 350px;
|
||||||
span{
|
span{
|
||||||
color: #637497;
|
color: #637497;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
@ -675,6 +667,8 @@ body{
|
||||||
padding-top: 50px;
|
padding-top: 50px;
|
||||||
padding-bottom: 25px;
|
padding-bottom: 25px;
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
|
justify-content: space-between;
|
||||||
|
min-width: 1200px;
|
||||||
li{
|
li{
|
||||||
padding:0px 67px;
|
padding:0px 67px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
@ -755,8 +749,10 @@ body{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 48px;
|
margin-top: 48px;
|
||||||
|
min-height: 365px;
|
||||||
.listbox{
|
.listbox{
|
||||||
margin-left: 54px;
|
margin-left: 54px;
|
||||||
|
flex: 1;
|
||||||
.listTitle{
|
.listTitle{
|
||||||
height: 30px;
|
height: 30px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
@ -775,6 +771,9 @@ body{
|
||||||
background-color: #466AFF;
|
background-color: #466AFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.ant-skeleton-title,.ant-skeleton-paragraph > li{
|
||||||
|
background-color: rgba(242,242,242 ,0.2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
li{
|
li{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -793,6 +792,12 @@ body{
|
||||||
span{
|
span{
|
||||||
margin-left: 40px;
|
margin-left: 40px;
|
||||||
}
|
}
|
||||||
|
.listboxcount{
|
||||||
|
min-width: 60px;
|
||||||
|
text-align: left;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -824,11 +829,12 @@ body{
|
||||||
background-color: #466AFF;
|
background-color: #466AFF;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
margin-bottom: 80px;
|
|
||||||
}
|
}
|
||||||
.forthUl{
|
.forthUl{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
|
min-width: 1200px;
|
||||||
|
justify-content: space-between;
|
||||||
li{
|
li{
|
||||||
margin:0px 40px;
|
margin:0px 40px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -913,6 +919,41 @@ body{
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin: 35px 0px 0px;
|
margin: 35px 0px 0px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
.unitMainSlider{
|
||||||
|
width: 1200px;
|
||||||
|
margin:0px auto;
|
||||||
|
.slick-list{
|
||||||
|
height: 140px;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
.slickMainline{
|
||||||
|
display: flex!important;
|
||||||
|
padding:10px 2px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
a{
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0px 1px 8px 1px rgba(0, 0, 0, 0.06);
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 2px solid #FFFFFF;
|
||||||
|
margin-right: 20px;
|
||||||
|
padding:20px;
|
||||||
|
height: 120px;
|
||||||
|
width: 220px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
img{
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
}
|
||||||
|
&:last-child{
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ul.fifthList{
|
ul.fifthList{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -1011,22 +1052,23 @@ body{
|
||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
margin-bottom: 20px!important;
|
margin-bottom: 20px!important;
|
||||||
}
|
}
|
||||||
&.theline{
|
}
|
||||||
display: flex;
|
.theline{
|
||||||
.imgCon{
|
.imgCon{
|
||||||
padding:5px;
|
padding:5px;
|
||||||
|
border-radius: 4px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
img{
|
img{
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.copyrightDesc{
|
}
|
||||||
|
.copyrightDesc{
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #BDC2D1;
|
color: #BDC2D1;
|
||||||
|
@ -1034,5 +1076,7 @@ body{
|
||||||
padding:15px 0px;
|
padding:15px 0px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #1B212C;
|
background-color: #1B212C;
|
||||||
|
a{
|
||||||
|
color: #BDC2D1!important;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -99,6 +99,7 @@ function SecondEdition({setValue}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkPosi(ele,clientHeight,scrollTop) {
|
function checkPosi(ele,clientHeight,scrollTop) {
|
||||||
|
if(document.getElementById(ele)){
|
||||||
var a = document.getElementById(ele).offsetTop - scrollTop -(clientHeight/3);
|
var a = document.getElementById(ele).offsetTop - scrollTop -(clientHeight/3);
|
||||||
var b = document.getElementById(ele).clientHeight + (clientHeight/4);
|
var b = document.getElementById(ele).clientHeight + (clientHeight/4);
|
||||||
if(a>0 || a<-b){
|
if(a>0 || a<-b){
|
||||||
|
@ -107,6 +108,7 @@ function SecondEdition({setValue}) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return(
|
return(
|
||||||
<div className="secondEditionContent">
|
<div className="secondEditionContent">
|
||||||
<div className="hadoop" id="hadoop">
|
<div className="hadoop" id="hadoop">
|
||||||
|
@ -187,7 +189,7 @@ function SecondEdition({setValue}) {
|
||||||
<div className={"multidimensinalhalf"}>
|
<div className={"multidimensinalhalf"}>
|
||||||
<div>
|
<div>
|
||||||
<p className="halfTitle">多维度用户画像</p>
|
<p className="halfTitle">多维度用户画像</p>
|
||||||
<p className="halfsubTitle"><span>实时采集和分析平台中的各类开源资源数<br/>据,</span>搭建多维度用户画像评估系统;</p>
|
<p className="halfsubTitle"><span>实时采集和分析平台中的各类开源资源数据,</span>搭建多维度用户画像评估系统;</p>
|
||||||
</div>
|
</div>
|
||||||
<div style={{width:"820px",marginLeft:"34px"}}>
|
<div style={{width:"820px",marginLeft:"34px"}}>
|
||||||
<img src={ImgM4} alt="" width="820px" />
|
<img src={ImgM4} alt="" width="820px" />
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React,{ useState , useEffect , useMemo } from 'react';
|
import React,{ useState , useEffect , useMemo } from 'react';
|
||||||
|
import { Spin , Skeleton } from 'antd';
|
||||||
import T311 from './Img/3-1-1.png';
|
import T311 from './Img/3-1-1.png';
|
||||||
import T312 from './Img/3-1-2.png';
|
import T312 from './Img/3-1-2.png';
|
||||||
import T321 from './Img/3-2-1.png';
|
import T321 from './Img/3-2-1.png';
|
||||||
|
@ -13,39 +14,16 @@ import bg33 from './Img/3-3.png';
|
||||||
import bg34 from './Img/3-4.png';
|
import bg34 from './Img/3-4.png';
|
||||||
|
|
||||||
import './Index.scss';
|
import './Index.scss';
|
||||||
|
import Axios from 'axios';
|
||||||
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() {
|
function ThirdEdition() {
|
||||||
const [ active , setActive ] = useState(1);
|
const [ active , setActive ] = useState(1);
|
||||||
|
const [ isSpin , setIsSpin ] = useState(true);
|
||||||
const [ flag , setFlag ] = useState(true);
|
const [ flag , setFlag ] = useState(true);
|
||||||
|
const [ list1, setList1 ] = useState([]);
|
||||||
|
const [ list2, setList2 ] = useState([]);
|
||||||
|
const [ list3, setList3 ] = useState([]);
|
||||||
|
const [ list4, setList4 ] = useState([]);
|
||||||
|
|
||||||
const doubleFlag = useMemo(()=>{
|
const doubleFlag = useMemo(()=>{
|
||||||
return flag;
|
return flag;
|
||||||
|
@ -75,6 +53,41 @@ function ThirdEdition() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
if(active){
|
||||||
|
getList(active);
|
||||||
|
}
|
||||||
|
},[active])
|
||||||
|
|
||||||
|
function getList(a) {
|
||||||
|
let params = a === 1 ? "activity_forum" : a===2 ? "excellent_project" : a=== 3 ? "pinned_forum" : "experience_forum";
|
||||||
|
if(a===1 && (list1 && list1.length>0)){return}
|
||||||
|
if(a===2 && (list2 && list2.length>0)){return}
|
||||||
|
if(a===3 && (list3 && list3.length>0)){return}
|
||||||
|
if(a===4 && (list4 && list4.length>0)){return}
|
||||||
|
setIsSpin(true);
|
||||||
|
const url = `/topics.json?topic_type=${params}`;
|
||||||
|
Axios.get(url,{
|
||||||
|
params:{
|
||||||
|
limit:5
|
||||||
|
}
|
||||||
|
}).then(result=>{
|
||||||
|
if(result){
|
||||||
|
let l = result.data.topics;
|
||||||
|
if(a===1){
|
||||||
|
setList1(l);
|
||||||
|
}else if(a===2){
|
||||||
|
setList2(l);
|
||||||
|
}else if(a===3){
|
||||||
|
setList3(l);
|
||||||
|
}else{
|
||||||
|
setList4(l);
|
||||||
|
}
|
||||||
|
setIsSpin(false);
|
||||||
|
}
|
||||||
|
}).catch(error=>{})
|
||||||
|
}
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div className="thirdEdition">
|
<div className="thirdEdition">
|
||||||
<p className="title">开发者的家园</p>
|
<p className="title">开发者的家园</p>
|
||||||
|
@ -114,59 +127,89 @@ function ThirdEdition() {
|
||||||
<img src={active === 1 ? bg3 : active===2 ? bg32 :active===3 ? bg33 :bg34 } alt="" width="336px"/>
|
<img src={active === 1 ? bg3 : active===2 ? bg32 :active===3 ? bg33 :bg34 } alt="" width="336px"/>
|
||||||
<div className="listbox">
|
<div className="listbox">
|
||||||
<p className="listTitle">
|
<p className="listTitle">
|
||||||
{active === 1 ? "Gitlink分享最新平台资讯、社区活动通知、开源竞赛信息,把握开源生态发展脉搏"
|
{active === 1 ? "GitLink分享最新平台资讯、社区活动通知、开源竞赛信息,把握开源生态发展脉搏"
|
||||||
: active===2 ? "Gitlink汇聚精英企业仓库、前沿技术仓库、人气热门仓库,孵化优质开源创新成果"
|
: active===2 ? "GitLink汇聚精英企业仓库、前沿技术仓库、人气热门仓库,孵化优质开源创新成果"
|
||||||
:active===3 ? "Gitlink集萃社区精选项目介绍、平台使用技巧等优秀文章,助力开源开放协同创新"
|
:active===3 ? "GitLink集萃社区精选项目介绍、平台使用技巧等优秀文章,助力开源开放协同创新"
|
||||||
:"Gitlink甄选技术研究、心得体会、经验交流等高质量内容,推动社区健康稳定发展"}
|
:"GitLink甄选技术研究、心得体会、经验交流等高质量内容,推动社区健康稳定发展"}
|
||||||
</p>
|
</p>
|
||||||
|
<div style={{minHeight:"260px"}}>
|
||||||
{
|
{
|
||||||
active === 1&&
|
active === 1 &&
|
||||||
list1.map((i,k)=>{
|
<React.Fragment>
|
||||||
|
{
|
||||||
|
list1 && list1.length > 0 ? list1.map((i,k)=>{
|
||||||
return(
|
return(
|
||||||
<li>
|
<li>
|
||||||
<a href={i.src} target="_blank">{i.name}</a>
|
<a href={i.url} target="_blank">{i.title}</a>
|
||||||
<span><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.count}</span>
|
<span className="listboxcount"><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.visits}</span>
|
||||||
<span>{i.time}</span>
|
<span>{i.time}</span>
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
})
|
}):""
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
active === 2&&
|
list1 && list1.length === 0 && <Skeleton />
|
||||||
list2.map((i,k)=>{
|
}
|
||||||
|
</React.Fragment>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
active === 2 &&
|
||||||
|
<React.Fragment>
|
||||||
|
{
|
||||||
|
list2 && list2.length > 0? list2.map((i,k)=>{
|
||||||
return(
|
return(
|
||||||
<li>
|
<li>
|
||||||
<a href={i.src} target="_blank">{i.name}</a>
|
<a href={i.url} target="_blank">{i.title}</a>
|
||||||
<span><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.count}</span>
|
<span className="listboxcount" style={{marginRight:"40px"}}><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.visits}</span>
|
||||||
{/* {i.time} */}
|
{/* {i.time} */}
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
})
|
}):""
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
active === 3&&
|
list2 && list2.length === 0 && <Skeleton />
|
||||||
list3.map((i,k)=>{
|
}
|
||||||
|
</React.Fragment>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
active === 3 &&
|
||||||
|
<React.Fragment>
|
||||||
|
{
|
||||||
|
list3 && list3.length > 0 ? list3.map((i,k)=>{
|
||||||
return(
|
return(
|
||||||
<li>
|
<li>
|
||||||
<a href={i.src} target="_blank">{i.name}</a>
|
<a href={i.url} target="_blank">{i.title}</a>
|
||||||
<span><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.count}</span>
|
<span className="listboxcount"><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.visits}</span>
|
||||||
<span>{i.time}</span>
|
<span>{i.time}</span>
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
})
|
}):""
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
active === 4&&
|
list3 && list3.length === 0 && <Skeleton />
|
||||||
list4.map((i,k)=>{
|
}
|
||||||
|
</React.Fragment>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
active === 4 &&
|
||||||
|
<React.Fragment>
|
||||||
|
{
|
||||||
|
list4 && list4.length > 0 ? list4.map((i,k)=>{
|
||||||
return(
|
return(
|
||||||
<li>
|
<li>
|
||||||
<a href={i.src} target="_blank">{i.name}</a>
|
<a href={i.url} target="_blank">{i.title}</a>
|
||||||
<span><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.count}</span>
|
<span className="listboxcount"><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.visits}</span>
|
||||||
<span>{i.time}</span>
|
<span>{i.time}</span>
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
})
|
}):""
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
list4 && list4.length === 0 && <Skeleton />
|
||||||
|
}
|
||||||
|
</React.Fragment>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
import React from 'react';
|
import React , { useEffect , useState } from 'react';
|
||||||
import Slider from 'react-slick';
|
import Slider from 'react-slick';
|
||||||
|
import axios from 'axios';
|
||||||
|
import { getImageUrl } from 'educoder';
|
||||||
|
|
||||||
let setting={
|
let setting={
|
||||||
dots:true,
|
dots:true,
|
||||||
infinite: true,
|
infinite: true,
|
||||||
|
@ -14,16 +17,46 @@ let setting={
|
||||||
prevArrow:<button type='button' class='slick-prev slick-arrow'><i className="iconfont icon-xiangzuojiantou"></i></button>,
|
prevArrow:<button type='button' class='slick-prev slick-arrow'><i className="iconfont icon-xiangzuojiantou"></i></button>,
|
||||||
nextArrow:<button type='button' class='slick-prev slick-arrow'><i className="iconfont icon-xiangyoujiantou"></i></button>
|
nextArrow:<button type='button' class='slick-prev slick-arrow'><i className="iconfont icon-xiangyoujiantou"></i></button>
|
||||||
}
|
}
|
||||||
function TopEdition({register}) {
|
function TopEdition({register,current_user}) {
|
||||||
|
|
||||||
|
const [ bannerList , setBannerList ] = useState(undefined);
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
getBanner();
|
||||||
|
},[])
|
||||||
|
|
||||||
|
function getBanner() {
|
||||||
|
const url = `/topics.json?topic_type=banner`;
|
||||||
|
axios.get(url,{
|
||||||
|
params:{
|
||||||
|
limit:4
|
||||||
|
}
|
||||||
|
}).then(result=>{
|
||||||
|
if(result){
|
||||||
|
setBannerList(result.data.topics);
|
||||||
|
}
|
||||||
|
}).catch(error=>{})
|
||||||
|
}
|
||||||
return(
|
return(
|
||||||
<Slider {...setting}>
|
<Slider {...setting}>
|
||||||
<div className="regform1"></div>
|
{
|
||||||
<div className="regform2"></div>
|
bannerList && bannerList.length > 0 ?
|
||||||
<div className="regform3">
|
bannerList.map((i,k)=>{
|
||||||
</div>
|
return(
|
||||||
<div className="regform4">
|
<div className={`regform`}>
|
||||||
|
<div style={{backgroundImage:`url(${getImageUrl(i.image)})`}}>
|
||||||
|
{
|
||||||
|
k +1 === bannerList.length && (!(current_user && current_user.login)) ?
|
||||||
<p className="regPrg"><a href={register}>注册</a></p>
|
<p className="regPrg"><a href={register}>注册</a></p>
|
||||||
|
:""
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
:
|
||||||
|
""
|
||||||
|
}
|
||||||
</Slider>
|
</Slider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,9 +97,9 @@ class EducoderLogin extends Component {
|
||||||
<div style={{cursor:"pointer"}}>
|
<div style={{cursor:"pointer"}}>
|
||||||
{
|
{
|
||||||
mygetHelmetapi && mygetHelmetapi.login_logo_url ?
|
mygetHelmetapi && mygetHelmetapi.login_logo_url ?
|
||||||
<img style={{cursor:"pointer"}} alt="" onClick={()=>this.gohome()} width="80px" src={getImageUrl(mygetHelmetapi.login_logo_url)}/>
|
<img style={{cursor:"pointer"}} alt="" onClick={()=>this.gohome()} src={getImageUrl(mygetHelmetapi.login_logo_url)}/>
|
||||||
:
|
:
|
||||||
<img style={{cursor:"pointer"}} alt="" onClick={()=>this.gohome()} src={educodernet} width="80px"/>
|
<img style={{cursor:"pointer"}} alt="" onClick={()=>this.gohome()} src={educodernet}/>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,14 +25,17 @@ body>.-task-title {
|
||||||
.newHeaders{
|
.newHeaders{
|
||||||
max-width: unset;
|
max-width: unset;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height:70px;
|
height:58px;
|
||||||
min-width: 1200px;
|
min-width: 1200px;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
box-shadow: 0px 2px 4px 0px rgb(0 0 0 / 50%);
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background-image: linear-gradient(to right, #0F141F, #0C2A5B,#101417);
|
background: #1B2440;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
.newHeaders.publicNav{
|
||||||
|
position: absolute;
|
||||||
|
background: rgba(27, 36, 64,0.2);
|
||||||
|
}
|
||||||
.headerContent{
|
.headerContent{
|
||||||
margin:0px auto;
|
margin:0px auto;
|
||||||
padding:0px 30px;
|
padding:0px 30px;
|
||||||
|
|
|
@ -29,6 +29,7 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
email:undefined,
|
email:undefined,
|
||||||
completeProfile:false,
|
completeProfile:false,
|
||||||
showCP:false,
|
showCP:false,
|
||||||
|
showNotice:true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,11 +154,11 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
console.log(this.props.match)
|
console.log(this.props.match)
|
||||||
if (this.props.match.path === "/") {
|
if (this.props.match.path === "/") {
|
||||||
this.setState({
|
this.setState({
|
||||||
publicNav:false
|
publicNav:true
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
this.setState({
|
this.setState({
|
||||||
publicNav:true
|
publicNav:false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
let url = `/users/get_user_info.json`;
|
let url = `/users/get_user_info.json`;
|
||||||
|
@ -223,6 +224,11 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
}
|
}
|
||||||
}).catch(error=>{})
|
}).catch(error=>{})
|
||||||
}
|
}
|
||||||
|
hideSystemNotice=()=>{
|
||||||
|
this.setState({
|
||||||
|
showNotice:false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
showCompeleteDialog=()=>{
|
showCompeleteDialog=()=>{
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -231,7 +237,7 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let { isRender , current_user , giteaVisible , email , completeProfile , showCP , publicNav , mygetHelmetapi } = this.state;
|
let { isRender , current_user , giteaVisible , email , completeProfile , showCP , showNotice , publicNav , mygetHelmetapi } = this.state;
|
||||||
const common = {
|
const common = {
|
||||||
showLoginDialog: this.showLoginDialog,
|
showLoginDialog: this.showLoginDialog,
|
||||||
checkIfLogin: this.checkIfLogin,
|
checkIfLogin: this.checkIfLogin,
|
||||||
|
@ -241,9 +247,11 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
return (
|
return (
|
||||||
<div className="indexHOC">
|
<div className="indexHOC">
|
||||||
<SystemNotice
|
<SystemNotice
|
||||||
|
showNotice={showNotice}
|
||||||
system_notification={mygetHelmetapi && mygetHelmetapi.system_notification}
|
system_notification={mygetHelmetapi && mygetHelmetapi.system_notification}
|
||||||
history={this.props.history}
|
history={this.props.history}
|
||||||
login={current_user && current_user.login}
|
login={current_user && current_user.login}
|
||||||
|
hideSystemNotice={this.hideSystemNotice}
|
||||||
/>
|
/>
|
||||||
<EducoderAccount visible={giteaVisible} email={email} onOk={this.onOk}/>
|
<EducoderAccount visible={giteaVisible} email={email} onOk={this.onOk}/>
|
||||||
<ProfileModal
|
<ProfileModal
|
||||||
|
@ -256,12 +264,12 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
{...this.props}
|
{...this.props}
|
||||||
{...this.state}
|
{...this.state}
|
||||||
/> : ""}
|
/> : ""}
|
||||||
{ publicNav && <Header {...this.state} {...this.props} {...common}></Header>}
|
<Header {...this.state} {...this.props} {...common} publicNav={publicNav}></Header>
|
||||||
<Spin spinning={this.state.globalLoading} delay={0} className="globalSpin"
|
<Spin spinning={this.state.globalLoading} delay={0} className="globalSpin"
|
||||||
size="large" tip={this._gLoadingTip || "加载中..."}
|
size="large" tip={this._gLoadingTip || "加载中..."}
|
||||||
>
|
>
|
||||||
<div className="newContainer newContainers">
|
<div className="newContainer newContainers">
|
||||||
{ publicNav && <div style={{height:"70px"}}></div> }
|
{!publicNav && <div style={{height:"58px"}}></div> }
|
||||||
{
|
{
|
||||||
current_user &&
|
current_user &&
|
||||||
<WrappedComponent initCommonState={(user) => this.initCommonState(user)}
|
<WrappedComponent initCommonState={(user) => this.initCommonState(user)}
|
||||||
|
@ -270,7 +278,7 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</Spin>
|
</Spin>
|
||||||
{ publicNav && <NewFooter {...this.state} {...this.props} />}
|
<NewFooter {...this.state} {...this.props} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { Component } from 'react';
|
import React, {Component} from 'react';
|
||||||
import { setmiyah, broadcastChannelPostMessage } from 'educoder';
|
import {setmiyah,broadcastChannelPostMessage} from 'educoder';
|
||||||
import { Tabs, Input, Checkbox, Button, notification, Menu } from 'antd';
|
import {Tabs, Input, Checkbox, Button, notification,Menu} from 'antd';
|
||||||
import passopen from '../../../src/images/login/passopen.png';
|
import passopen from '../../../src/images/login/passopen.png';
|
||||||
import passoff from '../../../src/images/login/passoff.png';
|
import passoff from '../../../src/images/login/passoff.png';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
@ -12,7 +12,7 @@ import './common.css'
|
||||||
import './commontwo.css'
|
import './commontwo.css'
|
||||||
const { TabPane } = Tabs;
|
const { TabPane } = Tabs;
|
||||||
const loginInputsyl = {
|
const loginInputsyl = {
|
||||||
"width": "434px",
|
"width":"434px",
|
||||||
"height": "462px",
|
"height": "462px",
|
||||||
"-webkit-box-shadow": "3px 10px 21px 0px rgba(76,76,76,0.15)",
|
"-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)",
|
"box-shadow": "3px 10px 21px 0px rgba(76,76,76,0.15)",
|
||||||
|
@ -25,48 +25,15 @@ class LoginRegisterComponent extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
if (props.loginstatus === true) {
|
|
||||||
this.state = {
|
//
|
||||||
tab: ["0"],
|
// console.log("LoginRegisterComponent");
|
||||||
classpass: "text",
|
// console.log("29");
|
||||||
// 登录
|
// console.log(props.loginstatus);
|
||||||
passopens: passoff,
|
if(props.loginstatus === true){
|
||||||
seconds: 60,
|
|
||||||
discodeBtn: false,
|
|
||||||
clearInterval: false,
|
|
||||||
autoLogin: true,
|
|
||||||
classpassbool: false,
|
|
||||||
// 注册
|
|
||||||
readAgreement: false,
|
|
||||||
getverificationcodes: true,
|
|
||||||
dragOk: false,
|
|
||||||
Agreetotheterms: true,
|
|
||||||
login: "",
|
|
||||||
password: "",
|
|
||||||
logins: "",
|
|
||||||
passwords: "",
|
|
||||||
codes: "",
|
|
||||||
Phonenumberisnotco: undefined,
|
|
||||||
Phonenumberisnotcos: 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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (props.loginstatus === false) {
|
|
||||||
// console.log(props.loginstatus);
|
// console.log(props.loginstatus);
|
||||||
this.state = {
|
this.state = {
|
||||||
tab: ["1"],
|
tab:["0"],
|
||||||
classpass: "text",
|
classpass: "text",
|
||||||
// 登录
|
// 登录
|
||||||
passopens: passoff,
|
passopens: passoff,
|
||||||
|
@ -87,25 +54,64 @@ class LoginRegisterComponent extends Component {
|
||||||
codes: "",
|
codes: "",
|
||||||
Phonenumberisnotco: undefined,
|
Phonenumberisnotco: undefined,
|
||||||
Phonenumberisnotcos: undefined,
|
Phonenumberisnotcos: undefined,
|
||||||
Phonenumberisnotcosyzm: undefined,
|
Phonenumberisnotcosyzm:undefined,
|
||||||
Phonenumberisnotcosymmm: undefined,
|
Phonenumberisnotcosymmm:undefined,
|
||||||
Phonenumberisnotcosytdhk: undefined,
|
Phonenumberisnotcosytdhk:undefined,
|
||||||
Phonenumberisnotcosyfwtk: undefined,
|
Phonenumberisnotcosyfwtk:undefined,
|
||||||
|
Phonenumberisnotcodmm:undefined,
|
||||||
Phonenumberisnotcobool: false,
|
Phonenumberisnotcobool: false,
|
||||||
Phonenumberisnotcodmm: undefined,
|
Whethertoverify:false,
|
||||||
Whethertoverify: false,
|
pciphone:true,
|
||||||
pciphone: true,
|
MyEduCoderModals:false,
|
||||||
MyEduCoderModals: false,
|
registered:undefined,
|
||||||
registered: undefined,
|
Phonenumberisnotcodmms:undefined,
|
||||||
Phonenumberisnotcodmms: undefined,
|
weixinlogin:false,
|
||||||
weixinlogin: false,
|
qqlogin:false
|
||||||
qqlogin: false
|
}
|
||||||
|
}
|
||||||
|
if(props.loginstatus === false){
|
||||||
|
// console.log(props.loginstatus);
|
||||||
|
this.state = {
|
||||||
|
tab:["1"],
|
||||||
|
classpass: "text",
|
||||||
|
// 登录
|
||||||
|
passopens: passoff,
|
||||||
|
seconds: 60,
|
||||||
|
discodeBtn: false,
|
||||||
|
clearInterval: false,
|
||||||
|
autoLogin: true,
|
||||||
|
classpassbool: false,
|
||||||
|
// 注册
|
||||||
|
readAgreement: false,
|
||||||
|
getverificationcodes: true,
|
||||||
|
dragOk: false,
|
||||||
|
Agreetotheterms: true,
|
||||||
|
login: "",
|
||||||
|
password: "",
|
||||||
|
logins: "",
|
||||||
|
passwords: "",
|
||||||
|
codes: "",
|
||||||
|
Phonenumberisnotco: undefined,
|
||||||
|
Phonenumberisnotcos: 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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断是否是手机端
|
//判断是否是手机端
|
||||||
IsPC = () => {
|
IsPC=()=> {
|
||||||
var userAgentInfo = navigator.userAgent;
|
var userAgentInfo = navigator.userAgent;
|
||||||
var Agents = ["Android", "iPhone",
|
var Agents = ["Android", "iPhone",
|
||||||
"SymbianOS", "Windows Phone",
|
"SymbianOS", "Windows Phone",
|
||||||
|
@ -119,11 +125,11 @@ class LoginRegisterComponent extends Component {
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
// 点击表单后,改变type
|
// 点击表单后,改变type
|
||||||
changeType = () => {
|
changeType = () => {
|
||||||
this.setState({ classpass: 'password' });
|
this.setState({classpass: 'password'});
|
||||||
}
|
}
|
||||||
IsPC = () => {
|
IsPC=()=>{
|
||||||
var userAgentInfo = navigator.userAgent;
|
var userAgentInfo = navigator.userAgent;
|
||||||
var Agents = ["Android", "iPhone",
|
var Agents = ["Android", "iPhone",
|
||||||
"SymbianOS", "Windows Phone",
|
"SymbianOS", "Windows Phone",
|
||||||
|
@ -140,27 +146,37 @@ class LoginRegisterComponent extends Component {
|
||||||
componentDidMount = () => {
|
componentDidMount = () => {
|
||||||
let flag = this.IsPC(); //true为PC端,false为手机端
|
let flag = this.IsPC(); //true为PC端,false为手机端
|
||||||
this.setState({
|
this.setState({
|
||||||
isphone: flag
|
isphone:flag
|
||||||
})
|
})
|
||||||
let pcipns = this.IsPC();
|
// console.log("componentDidUpdate");
|
||||||
|
// console.log(this.props);
|
||||||
|
let pcipns=this.IsPC();
|
||||||
if (this.props.match.url === "/login") {
|
if (this.props.match.url === "/login") {
|
||||||
|
|
||||||
|
// this.state = {
|
||||||
|
// tab:["0"],
|
||||||
|
//
|
||||||
|
// }
|
||||||
this.setState({
|
this.setState({
|
||||||
tab: ["0"]
|
tab:["0"]
|
||||||
})
|
})
|
||||||
} else if (this.props.match.url === "/register") {
|
} else if (this.props.match.url === "/register") {
|
||||||
|
|
||||||
|
// this.state = {
|
||||||
|
// tab:["1"],
|
||||||
|
//
|
||||||
|
// }
|
||||||
this.setState({
|
this.setState({
|
||||||
tab: ["1"]
|
tab:["1"]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
pciphone: pcipns,
|
pciphone:pcipns,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
openNotification = (messge, type) => {
|
openNotification = (messge,type) => {
|
||||||
// type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色
|
// type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色
|
||||||
notification.open({
|
notification.open({
|
||||||
message: "提示",
|
message: "提示",
|
||||||
|
@ -183,6 +199,8 @@ class LoginRegisterComponent extends Component {
|
||||||
|
|
||||||
|
|
||||||
StudyMakeMoney = () => { // 调用父组件方法
|
StudyMakeMoney = () => { // 调用父组件方法
|
||||||
|
|
||||||
|
// this.props.Setlogins(3);
|
||||||
this.setState({
|
this.setState({
|
||||||
login: "",
|
login: "",
|
||||||
password: "",
|
password: "",
|
||||||
|
@ -192,7 +210,7 @@ class LoginRegisterComponent extends Component {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
this.props.Setshowbool(3);
|
this.props.Setshowbool(3);
|
||||||
} catch (e) {
|
}catch (e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,7 +220,7 @@ class LoginRegisterComponent extends Component {
|
||||||
// -------------------- LOGIN START
|
// -------------------- LOGIN START
|
||||||
//下次自动登入
|
//下次自动登入
|
||||||
onAutoLoginChange = (e) => {
|
onAutoLoginChange = (e) => {
|
||||||
this.setState({ autoLogin: e.target.checked })
|
this.setState({autoLogin: e.target.checked})
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------- LOGIN END
|
// -------------------- LOGIN END
|
||||||
|
@ -231,19 +249,19 @@ class LoginRegisterComponent extends Component {
|
||||||
}
|
}
|
||||||
// -------------------- REGISTER START
|
// -------------------- REGISTER START
|
||||||
onReadAgreementChange = (e) => {
|
onReadAgreementChange = (e) => {
|
||||||
this.setState({ readAgreement: e.target.checked })
|
this.setState({readAgreement: e.target.checked})
|
||||||
}
|
}
|
||||||
//是否验证通过
|
//是否验证通过
|
||||||
dragOkCallback = () => {
|
dragOkCallback = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcosytdhk: undefined,
|
Phonenumberisnotcosytdhk:undefined,
|
||||||
})
|
})
|
||||||
if (this.state.logins.length === 0) {
|
if (this.state.logins.length === 0) {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcos: "账号不能为空",
|
Phonenumberisnotcos:"账号不能为空",
|
||||||
Phonenumberisnotcobool: true,
|
Phonenumberisnotcobool: true,
|
||||||
dragOk: false,
|
dragOk:false,
|
||||||
Whethertoverify: this.state.Whethertoverify === true ? false : true,
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -261,14 +279,14 @@ class LoginRegisterComponent extends Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcos: undefined,
|
Phonenumberisnotcos: undefined,
|
||||||
Phonenumberisnotcobool: false,
|
Phonenumberisnotcobool: false,
|
||||||
dragOk: true,
|
dragOk:true,
|
||||||
})
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcos: undefined,
|
Phonenumberisnotcos: undefined,
|
||||||
Phonenumberisnotcobool: false,
|
Phonenumberisnotcobool: false,
|
||||||
dragOk: true,
|
dragOk:true,
|
||||||
});
|
});
|
||||||
this.Emailphonenumberverification(this.state.logins, 2);
|
this.Emailphonenumberverification(this.state.logins, 2);
|
||||||
return
|
return
|
||||||
|
@ -284,8 +302,8 @@ class LoginRegisterComponent extends Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcos: stringdata,
|
Phonenumberisnotcos: stringdata,
|
||||||
Phonenumberisnotcobool: true,
|
Phonenumberisnotcobool: true,
|
||||||
dragOk: false,
|
dragOk:false,
|
||||||
Whethertoverify: this.state.Whethertoverify === true ? false : true,
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -295,14 +313,14 @@ class LoginRegisterComponent extends Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcos: undefined,
|
Phonenumberisnotcos: undefined,
|
||||||
Phonenumberisnotcobool: false,
|
Phonenumberisnotcobool: false,
|
||||||
dragOk: true,
|
dragOk:true,
|
||||||
})
|
})
|
||||||
this.Emailphonenumberverification(this.state.logins, 2);
|
this.Emailphonenumberverification(this.state.logins, 2);
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcosytdhk: undefined,
|
Phonenumberisnotcosytdhk:undefined,
|
||||||
})
|
})
|
||||||
this.Emailphonenumberverification(this.state.logins, 2)
|
this.Emailphonenumberverification(this.state.logins, 2)
|
||||||
|
|
||||||
|
@ -321,12 +339,12 @@ class LoginRegisterComponent extends Component {
|
||||||
|
|
||||||
if (this.state.login === undefined || this.state.login == "") {
|
if (this.state.login === undefined || this.state.login == "") {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotco: "账号不能为空",
|
Phonenumberisnotco:"账号不能为空",
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
} else if (this.state.password === undefined || this.state.password == "") {
|
} else if (this.state.password === undefined || this.state.password == "") {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcodmm: "密码不能为空",
|
Phonenumberisnotcodmm:"密码不能为空",
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -340,22 +358,22 @@ class LoginRegisterComponent extends Component {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.data.status === -2) {
|
if(response.data.status === -2){
|
||||||
if (response.data.message === "该手机号尚未注册" || response.data.message === "该邮箱尚未注册") {
|
if(response.data.message==="该手机号尚未注册" || response.data.message==="该邮箱尚未注册"){
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotco: response.data.message,
|
Phonenumberisnotco:response.data.message,
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (response.data.message === "错误的账号或密码") {
|
else if(response.data.message==="错误的账号或密码"){
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcodmms: response.data.message,
|
Phonenumberisnotcodmms:response.data.message,
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (response.data.message === "违反平台使用规范,账号已被锁定") {
|
else if(response.data.message==="违反平台使用规范,账号已被锁定"){
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotco: response.data.message,
|
Phonenumberisnotco:response.data.message,
|
||||||
})
|
})
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -383,6 +401,11 @@ class LoginRegisterComponent extends Component {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if(response.data.profile_completed !== null || response.data.profile_completed === false){
|
||||||
|
// this.setMyEduCoderModals();
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
if (response.data.status === 402) {
|
if (response.data.status === 402) {
|
||||||
window.location.href = response.data.url;
|
window.location.href = response.data.url;
|
||||||
|
@ -392,14 +415,14 @@ class LoginRegisterComponent extends Component {
|
||||||
isRender: false
|
isRender: false
|
||||||
})
|
})
|
||||||
var weekArray = JSON.parse(window.sessionStorage.getItem('yslgeturls'));
|
var weekArray = JSON.parse(window.sessionStorage.getItem('yslgeturls'));
|
||||||
if (weekArray === undefined) {
|
if(weekArray===undefined){
|
||||||
weekArray = "/";
|
weekArray="/";
|
||||||
}
|
}
|
||||||
if (weekArray === null) {
|
if(weekArray===null){
|
||||||
weekArray = "/";
|
weekArray="/";
|
||||||
}
|
}
|
||||||
if (weekArray === "null") {
|
if(weekArray==="null"){
|
||||||
weekArray = "/";
|
weekArray="/";
|
||||||
}
|
}
|
||||||
window.location.href = weekArray;
|
window.location.href = weekArray;
|
||||||
}
|
}
|
||||||
|
@ -413,37 +436,74 @@ class LoginRegisterComponent extends Component {
|
||||||
}
|
}
|
||||||
//注册接口
|
//注册接口
|
||||||
postregistered = () => {
|
postregistered = () => {
|
||||||
if (this.state.logins === undefined || this.state.logins === "" || this.state.logins.length === 0) {
|
// 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) {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcos: "账号不能为空",
|
Phonenumberisnotcos:"账号不能为空",
|
||||||
Phonenumberisnotcobool: true,
|
Phonenumberisnotcobool: true,
|
||||||
dragOk: false,
|
dragOk:false,
|
||||||
Whethertoverify: this.state.Whethertoverify === true ? false : true,
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
||||||
})
|
})
|
||||||
return
|
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.passwords === undefined || this.state.passwords == "" || this.state.passwords.length === 0) {
|
if (this.state.codes === undefined || this.state.codes == ""||this.state.codes.length===0) {
|
||||||
|
// this.openNotification(`请输入验证码`,2);
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcosymmm: "密码不能为空",
|
Phonenumberisnotcosyzm:"验证码不能为空",
|
||||||
})
|
})
|
||||||
return
|
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 == "" ||this.state.passwords.length===0) {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcosymmm: "密码不能少于8位",
|
Phonenumberisnotcosymmm:"密码不能为空",
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
} else if (this.state.passwords !== undefined && this.state.passwords.length > 0 && this.state.passwords.length > 16) {
|
} else if (this.state.passwords !==undefined &&this.state.passwords.length>0&&this.state.passwords.length<8){
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcosymmm: "密码不能超过16位",
|
Phonenumberisnotcosymmm:"密码不能少于8位",
|
||||||
})
|
})
|
||||||
return
|
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;
|
let url;
|
||||||
if (this.props.weixinlogin) {
|
if(this.props.weixinlogin){
|
||||||
url = '/weapps/register.json';
|
url= '/weapps/register.json';
|
||||||
} else {
|
}else{
|
||||||
url = "/accounts/register.json";
|
url = "/accounts/register.json";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -452,9 +512,34 @@ class LoginRegisterComponent extends Component {
|
||||||
password: this.state.passwords,
|
password: this.state.passwords,
|
||||||
code: this.state.codes,
|
code: this.state.codes,
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result && result.data) {
|
if(result){
|
||||||
this.openNotification("注册成功!");
|
if(result.data.status===-2){
|
||||||
this.props.history.push('/');
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
|
|
||||||
|
@ -475,21 +560,21 @@ class LoginRegisterComponent extends Component {
|
||||||
// console.log(result);
|
// console.log(result);
|
||||||
// this.setState({dragOk: true})
|
// this.setState({dragOk: true})
|
||||||
|
|
||||||
if (result) {
|
if(result){
|
||||||
if (result.data.status === -2) {
|
if(result.data.status===-2){
|
||||||
if (id === 1) {
|
if (id === 1) {
|
||||||
if (result.data.message === "该手机号码或邮箱已被注册") {
|
if(result.data.message==="该手机号码或邮箱已被注册"){
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotco: undefined,
|
Phonenumberisnotco: undefined,
|
||||||
Phonenumberisnotcobool: false,
|
Phonenumberisnotcobool: false,
|
||||||
dragOk: true,
|
dragOk:true,
|
||||||
})
|
})
|
||||||
} else {
|
}else {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotco: result.data.message,
|
Phonenumberisnotco: result.data.message,
|
||||||
Phonenumberisnotcobool: true,
|
Phonenumberisnotcobool: true,
|
||||||
dragOk: false,
|
dragOk:false,
|
||||||
Whethertoverify: this.state.Whethertoverify === true ? false : true,
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -499,26 +584,26 @@ class LoginRegisterComponent extends Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcos: result.data.message,
|
Phonenumberisnotcos: result.data.message,
|
||||||
Phonenumberisnotcobool: true,
|
Phonenumberisnotcobool: true,
|
||||||
dragOk: false,
|
dragOk:false,
|
||||||
Whethertoverify: this.state.Whethertoverify === true ? false : true,
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
}else {
|
||||||
if (id === 1) {
|
if (id === 1) {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotco: undefined,
|
Phonenumberisnotco: undefined,
|
||||||
Phonenumberisnotcobool: false,
|
Phonenumberisnotcobool: false,
|
||||||
dragOk: true,
|
dragOk:true,
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
} else if (id === 2) {
|
} else if (id === 2) {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcos: undefined,
|
Phonenumberisnotcos: undefined,
|
||||||
Phonenumberisnotcobool: false,
|
Phonenumberisnotcobool: false,
|
||||||
dragOk: true,
|
dragOk:true,
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -531,20 +616,20 @@ class LoginRegisterComponent extends Component {
|
||||||
};
|
};
|
||||||
//短信验证
|
//短信验证
|
||||||
SMSverification = () => {
|
SMSverification = () => {
|
||||||
let logins = this.state.logins;
|
let logins=this.state.logins;
|
||||||
var url = `/accounts/get_verification_code.json`;
|
var url = `/accounts/get_verification_code.json`;
|
||||||
axios.get((url), {
|
axios.get((url), {
|
||||||
params: {
|
params: {
|
||||||
login: this.state.logins,
|
login: this.state.logins,
|
||||||
type: 1,
|
type: 1,
|
||||||
smscode: setmiyah(logins)
|
smscode:setmiyah(logins)
|
||||||
}
|
}
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
//验证有问题{"status":1,"message":"success"}
|
//验证有问题{"status":1,"message":"success"}
|
||||||
// console.log(result);
|
// console.log(result);
|
||||||
if (result.data.status === 1) {
|
if(result.data.status===1){
|
||||||
this.openNotification("验证码已发送,请注意查收");
|
this.openNotification("验证码已发送,请注意查收");
|
||||||
} else if (result.data.status === -2) {
|
}else if(result.data.status===-2){
|
||||||
this.openNotification(result.data.message);
|
this.openNotification(result.data.message);
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
|
@ -557,13 +642,13 @@ class LoginRegisterComponent extends Component {
|
||||||
|
|
||||||
if (this.state.classpassbool === true) {
|
if (this.state.classpassbool === true) {
|
||||||
this.setState({
|
this.setState({
|
||||||
passopens: passoff,
|
passopens:passoff ,
|
||||||
classpass: "text",
|
classpass: "text",
|
||||||
classpassbool: false,
|
classpassbool: false,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
passopens: passopen,
|
passopens: passopen ,
|
||||||
classpass: "password",
|
classpass: "password",
|
||||||
classpassbool: true,
|
classpassbool: true,
|
||||||
})
|
})
|
||||||
|
@ -575,19 +660,19 @@ class LoginRegisterComponent extends Component {
|
||||||
getverificationcode = () => {
|
getverificationcode = () => {
|
||||||
// console.log(this.state.Phonenumberisnotcobool);
|
// console.log(this.state.Phonenumberisnotcobool);
|
||||||
// console.log(this.state.dragOk);
|
// 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("请输入手机号或邮箱");
|
this.openNotification("请输入手机号或邮箱");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//这是判断是否手机正确
|
//这是判断是否手机正确
|
||||||
if (this.state.Phonenumberisnotcobool === true) {
|
if(this.state.Phonenumberisnotcobool === true){
|
||||||
this.openNotification(this.state.Phonenumberisnotcos);
|
this.openNotification(this.state.Phonenumberisnotcos);
|
||||||
this.setState({
|
this.setState({
|
||||||
Whethertoverify: this.state.Whethertoverify === true ? false : true,
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.state.pciphone === true) {
|
if(this.state.pciphone===true) {
|
||||||
if (this.state.dragOk === false) {
|
if (this.state.dragOk === false) {
|
||||||
this.openNotification("请拖动滑块验证");
|
this.openNotification("请拖动滑块验证");
|
||||||
return;
|
return;
|
||||||
|
@ -639,25 +724,25 @@ class LoginRegisterComponent extends Component {
|
||||||
loginInputonChange = (e) => {
|
loginInputonChange = (e) => {
|
||||||
// console.log(e.target.value);
|
// console.log(e.target.value);
|
||||||
var stirngt;
|
var stirngt;
|
||||||
if (e.target.value.length > 0) {
|
if(e.target.value.length>0){
|
||||||
var str = e.target.value.replace(/\s*/g, "")
|
var str= e.target.value.replace(/\s*/g,"")
|
||||||
stirngt = str;
|
stirngt=str;
|
||||||
} else {
|
}else{
|
||||||
stirngt = e.target.value;
|
stirngt= e.target.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.target.value.length === 0) {
|
if (e.target.value.length === 0) {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotco: undefined,
|
Phonenumberisnotco: undefined,
|
||||||
Phonenumberisnotcobool: false,
|
Phonenumberisnotcobool: false,
|
||||||
Phonenumberisnotcodmms: undefined,
|
Phonenumberisnotcodmms:undefined,
|
||||||
login: stirngt,
|
login: stirngt,
|
||||||
})
|
})
|
||||||
} else {
|
}else{
|
||||||
this.setState({
|
this.setState({
|
||||||
login: stirngt,
|
login: stirngt,
|
||||||
Phonenumberisnotco: undefined,
|
Phonenumberisnotco:undefined,
|
||||||
Phonenumberisnotcodmms: undefined,
|
Phonenumberisnotcodmms:undefined,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -674,17 +759,20 @@ class LoginRegisterComponent extends Component {
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// var telephone = $("#telephoneAdd.tianjia_phone").val();
|
||||||
var regph = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
|
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]+$/;
|
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;
|
var stringdata = undefined;
|
||||||
if (!regph.test(e.target.value)) {
|
if (!regph.test(e.target.value)) {
|
||||||
stringdata = "手机号格式不正确";
|
stringdata = "手机号格式不正确";
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcos: stringdata,
|
Phonenumberisnotcos: stringdata,
|
||||||
Phonenumberisnotcobool: true,
|
Phonenumberisnotcobool: true,
|
||||||
dragOk: false,
|
dragOk:false,
|
||||||
Whethertoverify: this.state.Whethertoverify === true ? false : true,
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -705,8 +793,8 @@ class LoginRegisterComponent extends Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcos: stringdata,
|
Phonenumberisnotcos: stringdata,
|
||||||
Phonenumberisnotcobool: true,
|
Phonenumberisnotcobool: true,
|
||||||
dragOk: false,
|
dragOk:false,
|
||||||
Whethertoverify: this.state.Whethertoverify === true ? false : true,
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
|
@ -722,43 +810,47 @@ class LoginRegisterComponent extends Component {
|
||||||
}
|
}
|
||||||
//获取登入密码
|
//获取登入密码
|
||||||
passwordonChange = (e) => {
|
passwordonChange = (e) => {
|
||||||
|
// console.log(e.target.value);
|
||||||
var stirngt;
|
var stirngt;
|
||||||
if (e.target.value.length > 0) {
|
if(e.target.value.length>0){
|
||||||
var str = e.target.value.replace(/\s*/g, "")
|
var str= e.target.value.replace(/\s*/g,"")
|
||||||
stirngt = str;
|
stirngt=str;
|
||||||
} else {
|
}else{
|
||||||
stirngt = e.target.value;
|
stirngt= e.target.value;
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
password: stirngt,
|
password: stirngt,
|
||||||
Phonenumberisnotcodmm: undefined,
|
Phonenumberisnotcodmm:undefined,
|
||||||
Phonenumberisnotcodmms: undefined,
|
Phonenumberisnotcodmms:undefined,
|
||||||
})
|
})
|
||||||
|
// this.setState({
|
||||||
|
// password: e.target.value
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
//获取注册登入
|
//获取注册登入
|
||||||
loginInputonChanges = (e) => {
|
loginInputonChanges = (e) => {
|
||||||
|
|
||||||
var stirngt;
|
var stirngt;
|
||||||
if (e.target.value.length > 0) {
|
if(e.target.value.length>0){
|
||||||
var str = e.target.value.replace(/\s*/g, "")
|
var str= e.target.value.replace(/\s*/g,"")
|
||||||
stirngt = str;
|
stirngt=str;
|
||||||
} else {
|
}else{
|
||||||
stirngt = e.target.value;
|
stirngt= e.target.value;
|
||||||
}
|
}
|
||||||
if (e.target.value.length === 0) {
|
if (e.target.value.length === 0) {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcos: undefined,
|
Phonenumberisnotcos: undefined,
|
||||||
Phonenumberisnotcobool: false,
|
Phonenumberisnotcobool: false,
|
||||||
logins: stirngt,
|
logins: stirngt,
|
||||||
dragOk: false,
|
dragOk:false,
|
||||||
Whethertoverify: this.state.Whethertoverify === true ? false : true,
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
||||||
})
|
})
|
||||||
} else {
|
}else{
|
||||||
this.setState({
|
this.setState({
|
||||||
logins: stirngt,
|
logins: stirngt,
|
||||||
Phonenumberisnotcos: undefined,
|
Phonenumberisnotcos: undefined,
|
||||||
dragOk: false,
|
dragOk:false,
|
||||||
Whethertoverify: this.state.Whethertoverify === true ? false : true,
|
Whethertoverify:this.state.Whethertoverify===true?false:true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -767,50 +859,129 @@ class LoginRegisterComponent extends Component {
|
||||||
passwordonChanges = (e) => {
|
passwordonChanges = (e) => {
|
||||||
// console.log(e.target.value);
|
// console.log(e.target.value);
|
||||||
var stirngt;
|
var stirngt;
|
||||||
if (e.target.value.length > 0) {
|
if(e.target.value.length>0){
|
||||||
var str = e.target.value.replace(/\s*/g, "")
|
var str= e.target.value.replace(/\s*/g,"")
|
||||||
stirngt = str;
|
stirngt=str;
|
||||||
} else {
|
}else{
|
||||||
stirngt = e.target.value;
|
stirngt= e.target.value;
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
passwords: stirngt,
|
passwords: stirngt,
|
||||||
Phonenumberisnotcosymmm: undefined,
|
Phonenumberisnotcosymmm:undefined,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//获取code
|
//获取code
|
||||||
codesonChange = (e) => {
|
codesonChange = (e) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
codes: e.target.value,
|
codes: e.target.value,
|
||||||
Phonenumberisnotcosyzm: undefined,
|
Phonenumberisnotcosyzm:undefined,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//切换tab
|
//切换tab
|
||||||
changeTab = (e) => {
|
changeTab=(e)=>{
|
||||||
this.setState({
|
this.setState({
|
||||||
tab: e.key
|
tab:e.key
|
||||||
})
|
})
|
||||||
if (e.key === 0) {
|
|
||||||
|
if(e.key === 0){
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcos: undefined
|
Phonenumberisnotcos:undefined
|
||||||
})
|
})
|
||||||
} else {
|
}else{
|
||||||
this.setState({
|
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)
|
||||||
|
|
||||||
}
|
}
|
||||||
setMyEduCoderModals = () => {
|
loginonkeyup =(e)=>{
|
||||||
|
if(e.keyCode==32){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
setNotcompleteds=()=>{
|
||||||
this.setState({
|
this.setState({
|
||||||
MyEduCoderModals: true,
|
Notcompleteds:true,
|
||||||
registered: "注册成功"
|
MyEduCoderModals:false,
|
||||||
|
registered:undefined,
|
||||||
|
|
||||||
|
})
|
||||||
|
};
|
||||||
|
setMyEduCoderModals=()=>{
|
||||||
|
this.setState({
|
||||||
|
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() {
|
render() {
|
||||||
const {passopens,Agreetotheterms,Phonenumberisnotcos,tab,classpassbool,Phonenumberisnotcosymmm} = this.state
|
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/';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={"login_register_content login_register_contents"}>
|
|
||||||
|
<div className={this.props.weixinlogin?"weixinregister":"login_register_content login_register_contents"}
|
||||||
|
// style={ parseInt(tab[0])==0?{height: "366px"} :{height: "510px"}}
|
||||||
|
>
|
||||||
<style>
|
<style>
|
||||||
{
|
{
|
||||||
`
|
`
|
||||||
|
@ -823,26 +994,52 @@ class LoginRegisterComponent extends Component {
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab} className="mt20">
|
{weixinlogin===false&&this.props.weixinlogin===undefined?<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab} className="mt20">
|
||||||
<Menu.Item key="1" className={"active font-18"} style={{ marginLeft: "10px" }} >注册</Menu.Item>
|
<Menu.Item key="0" className={tab===0?"active font-18":"font-18"} > 登录</Menu.Item>
|
||||||
</Menu>
|
<Menu.Item key="1" className={tab===1?"active font-18 ":"font-18 "} style={{marginLeft:"10px"}} >注册</Menu.Item>
|
||||||
|
</Menu>:""}
|
||||||
|
|
||||||
<div style={{ width: '340px' }}>
|
|
||||||
<Input placeholder="请输入邮箱账号进行注册"
|
|
||||||
className={Phonenumberisnotcos && Phonenumberisnotcos !== "" ? " color-grey-9 loginInputzhucheyslass bor-reds" : " color-grey-9 loginInputzhuche"}
|
|
||||||
value={this.state.logins}
|
|
||||||
type="text" autoComplete="off"
|
|
||||||
onChange={this.loginInputonChanges}
|
|
||||||
style={{ marginTop: '30px', height: '38px', color: '#999999', fontSize: "14px" }}></Input>
|
|
||||||
{
|
{
|
||||||
Phonenumberisnotcos && Phonenumberisnotcos !== "" ?
|
weixinlogin===false&&parseInt(tab[0])==0 &&
|
||||||
<p className="color-red mt5 mb5 " style={{ width: " 100%", height: "20px" }}>
|
<div style={{width: '340px'}}>
|
||||||
<span className="fl" style={{ textAlign: "left", width: " 100%" }}>{Phonenumberisnotcos}</span>
|
<style>
|
||||||
</p>
|
{
|
||||||
: <div style={{ height: "25px" }}></div>
|
`
|
||||||
|
.ant-input {
|
||||||
|
font-family: "Monospaced Number", "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px 11px;
|
||||||
|
width: 100%;
|
||||||
|
height: 38px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: rgba(0, 0, 0, 0.65);
|
||||||
|
background-color: #fff;
|
||||||
|
background-image: none;
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-transition: all .3s;
|
||||||
|
-o-transition: all .3s;
|
||||||
|
transition: all .3s;
|
||||||
|
}
|
||||||
|
.loginInputzhuche{
|
||||||
|
width: 100%;
|
||||||
|
background-color: #fff!important;
|
||||||
|
height: 45px !important;
|
||||||
|
padding: 5px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
`
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<Input placeholder="请输入邮箱账号" value={this.state.login}
|
<Input placeholder="请输入邮箱账号" value={this.state.login}
|
||||||
onChange={this.loginInputonChange}
|
onChange={this.loginInputonChange}
|
||||||
name="username"
|
name="username"
|
||||||
|
@ -898,6 +1095,7 @@ class LoginRegisterComponent extends Component {
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1021,8 +1219,8 @@ class LoginRegisterComponent extends Component {
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<Input placeholder="输入8~16位密码,区分大小写"
|
<Input placeholder="输入8~16位密码,区分大小写"
|
||||||
type={classpassbool === false ? "text" : "password"}
|
type={classpassbool===false?"text":"password"}
|
||||||
className={Phonenumberisnotcosymmm && Phonenumberisnotcosymmm !== "mymimasysl" ? " font-14 color-grey-9 loginInputzhucheysl mymimasysl" : " font-14 color-grey-9 loginInputzhuche mymimasysl"}
|
className={Phonenumberisnotcosymmm && Phonenumberisnotcosymmm !== "mymimasysl" ?" font-14 color-grey-9 loginInputzhucheysl mymimasysl":" font-14 color-grey-9 loginInputzhuche mymimasysl"}
|
||||||
autoComplete="new-password"
|
autoComplete="new-password"
|
||||||
onClick={this.changeType}
|
onClick={this.changeType}
|
||||||
value={this.state.passwords} onChange={this.passwordonChanges}
|
value={this.state.passwords} onChange={this.passwordonChanges}
|
||||||
|
@ -1032,8 +1230,8 @@ class LoginRegisterComponent extends Component {
|
||||||
}></Input>
|
}></Input>
|
||||||
{
|
{
|
||||||
Phonenumberisnotcosymmm && Phonenumberisnotcosymmm !== "" ?
|
Phonenumberisnotcosymmm && Phonenumberisnotcosymmm !== "" ?
|
||||||
<p className="color-red mt5 mb5 " style={{ width: " 100%", height: "20px" }}>
|
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
|
||||||
<span className="fl" style={{ textAlign: "left", width: " 100%" }}>{Phonenumberisnotcosymmm}</span>
|
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosymmm}</span>
|
||||||
</p>
|
</p>
|
||||||
: <div style={{height:"25px"}}></div>
|
: <div style={{height:"25px"}}></div>
|
||||||
|
|
||||||
|
@ -1080,3 +1278,4 @@ class LoginRegisterComponent extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default (LoginRegisterComponent);
|
export default (LoginRegisterComponent);
|
||||||
|
|
||||||
|
|