forked from Gitlink/forgeplus-react
Compare commits
83 Commits
master
...
standalone
Author | SHA1 | Date |
---|---|---|
|
7407545d1f | |
![]() |
f0ffc9a29c | |
|
987eb39681 | |
![]() |
848109afe8 | |
![]() |
d7bdb35bb7 | |
|
b16e95923a | |
![]() |
98a7f73c04 | |
![]() |
b6a450a482 | |
|
66c495d6b5 | |
![]() |
42139ef998 | |
|
925d5ea356 | |
![]() |
ad1f0e29e7 | |
|
cacb8c84ae | |
|
fb8ae3fcdf | |
|
a257d832cb | |
|
ff7d191011 | |
|
9a2c3f1754 | |
|
bcdf506e6c | |
|
ccc6cb5d26 | |
|
0661c6b932 | |
|
99947c0c87 | |
|
03cff6ec2e | |
|
f86acfebdf | |
|
9a62d7806e | |
|
a7df6da5f0 | |
|
eab68ac270 | |
|
a9e3513706 | |
|
6b20391c72 | |
|
3135300fe6 | |
|
ecc6387113 | |
|
990c4e22b0 | |
|
7eea9316dd | |
|
6a546c79e4 | |
|
4c48b6c77a | |
|
4d5430c3ed | |
|
d49af735f1 | |
|
03370e8a07 | |
|
0b43fa8952 | |
|
465c4cc8c7 | |
|
37668ddcd4 | |
|
7102594444 | |
|
b2f2df65bb | |
|
8a577fb263 | |
|
5c491071b6 | |
|
c554237076 | |
|
d22a741bf7 | |
|
383b3f5d74 | |
|
63da7adcf9 | |
|
3243aeebc6 | |
|
1a86a75345 | |
|
3b6cc99d49 | |
|
d872ffc606 | |
|
3b69c01ead | |
|
1e0608aa14 | |
|
9b6816e346 | |
|
6ee257231d | |
|
70edb73f6c | |
|
5c7553d4aa | |
|
278701f24b | |
|
97ab819bf9 | |
|
d870f17b85 | |
|
91ac6c2357 | |
|
3702d1c1a5 | |
|
93d48c359e | |
|
80dace18e9 | |
|
375cbb37df | |
|
10d933e037 | |
|
4fdd3f6f80 | |
|
458b56e33b | |
|
c256887132 | |
|
6a588db7f6 | |
|
6c4e1c6665 | |
|
c554d2c00d | |
|
b69bf5974a | |
|
ecb1691b4d | |
|
6a9f2b31a6 | |
|
4947cd8456 | |
|
8429effe16 | |
|
49ebe450be | |
|
e3c926da77 | |
|
af48da2eb3 | |
|
6630309466 | |
|
a7c3dee7e3 |
File diff suppressed because it is too large
Load Diff
|
@ -6705,10 +6705,13 @@ 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
|
||||||
}
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 2340181 */
|
font-family: "iconfont"; /* Project id 2340181 */
|
||||||
src: url('iconfont.woff2?t=1632964996877') format('woff2'),
|
src: url('iconfont.woff2?t=1634881729644') format('woff2'),
|
||||||
url('iconfont.woff?t=1632964996877') format('woff'),
|
url('iconfont.woff?t=1634881729644') format('woff'),
|
||||||
url('iconfont.ttf?t=1632964996877') format('truetype');
|
url('iconfont.ttf?t=1634881729644') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 8.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 27 KiB |
|
@ -10,7 +10,7 @@ import {
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import LoginDialog from './modules/login/LoginDialog';
|
import LoginDialog from './modules/login/LoginDialog';
|
||||||
import 'babel-polyfill';
|
import 'babel-polyfill';
|
||||||
import Loading from './Loading'
|
import Loading from './Loading';
|
||||||
|
|
||||||
import Loadable from 'react-loadable';
|
import Loadable from 'react-loadable';
|
||||||
import marked from './common/marked';
|
import marked from './common/marked';
|
||||||
|
|
|
@ -73,7 +73,6 @@ export default ((props)=>{
|
||||||
<Menu.Item key={'1'}><a href={tar_url}>TAR.GZ</a></Menu.Item>
|
<Menu.Item key={'1'}><a href={tar_url}>TAR.GZ</a></Menu.Item>
|
||||||
</Menu>
|
</Menu>
|
||||||
)
|
)
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<div className="main">
|
<div className="main">
|
||||||
|
|
|
@ -575,8 +575,8 @@ class Detail extends Component {
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</AlignCenter>
|
</AlignTop>
|
||||||
<div className="mt6" style={{minHeight:"20px"}}>
|
{/* <div className="mt6" style={{minHeight:"20px"}}>
|
||||||
{
|
{
|
||||||
projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ?
|
projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ?
|
||||||
this.textFunc(projectDetail.forked_from_project_id,projectDetail.fork_info)
|
this.textFunc(projectDetail.forked_from_project_id,projectDetail.fork_info)
|
||||||
|
@ -587,7 +587,7 @@ class Detail extends Component {
|
||||||
<span className="color-grey-9">镜像自 <a className="color-blue hoverLine" target="_blank" href={projectDetail.mirror_url}>{projectDetail.mirror_url}</a></span>
|
<span className="color-grey-9">镜像自 <a className="color-blue hoverLine" target="_blank" href={projectDetail.mirror_url}>{projectDetail.mirror_url}</a></span>
|
||||||
:""
|
:""
|
||||||
}
|
}
|
||||||
</div>
|
</div> */}
|
||||||
{
|
{
|
||||||
firstSync ? "" :
|
firstSync ? "" :
|
||||||
<DetailBanner
|
<DetailBanner
|
||||||
|
|
|
@ -157,6 +157,17 @@ export default Form.create()(
|
||||||
setAuth(params.target.value)
|
setAuth(params.target.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkname(rule, value, callback){
|
||||||
|
if(!value){
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
if(value && !value.match(/^[a-zA-Z][a-zA-Z\d]{3,14}$/)){
|
||||||
|
callback("只能使用英文字母和数字,以字母开头,长度为4到15个字符");
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function checkname(rule, value, callback){
|
function checkname(rule, value, callback){
|
||||||
if(!value){
|
if(!value){
|
||||||
callback();
|
callback();
|
||||||
|
|
|
@ -0,0 +1,122 @@
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
import { Spin } from 'antd';
|
||||||
|
import NoneData from '../Nodata';
|
||||||
|
import './version.css';
|
||||||
|
import axios from 'axios';
|
||||||
|
import RenderHtml from '../../components/render-html';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* issue_chosen:下拉的筛选列表,
|
||||||
|
* data:列表接口返回的所有数据,
|
||||||
|
* issues:列表数组,
|
||||||
|
* isSpin:加载中,
|
||||||
|
*/
|
||||||
|
class version extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
issue_chosen: undefined,
|
||||||
|
data: undefined,
|
||||||
|
releases:undefined,
|
||||||
|
issues: undefined,
|
||||||
|
isSpin: true,
|
||||||
|
search: undefined,
|
||||||
|
search_count: undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount = () => {
|
||||||
|
this.getIssueList();
|
||||||
|
}
|
||||||
|
// 获取列表数据
|
||||||
|
getIssueList = () => {
|
||||||
|
const { projectsId, owner } = this.props.match.params;
|
||||||
|
const url = `/${owner}/${projectsId}/releases.json`;
|
||||||
|
axios.get(url).then((result) => {
|
||||||
|
if (result) {
|
||||||
|
this.setState({
|
||||||
|
data: result.data,
|
||||||
|
releases:result.data.releases,
|
||||||
|
issues: result.data.issues,
|
||||||
|
isSpin: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
console.log(error);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 显示版本描述
|
||||||
|
showBody=(key,flag)=>{
|
||||||
|
let { releases } = this.state;
|
||||||
|
releases[key].bodyshow = !flag;
|
||||||
|
this.setState({
|
||||||
|
releases
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
renderList = (releases) => {
|
||||||
|
const { projectsId , owner } = this.props.match.params;
|
||||||
|
if (releases && releases.length > 0) {
|
||||||
|
return (
|
||||||
|
releases.map((item, key) => {
|
||||||
|
return (
|
||||||
|
<div className="versionInfo" key={key}>
|
||||||
|
<span className="versionInfo_left">
|
||||||
|
<span className={`${item.draft === "稳定" ?"versionTag green":"versionTag yellow"}`}>{item.draft}</span>
|
||||||
|
<span className="mt10">{item.created_at}</span>
|
||||||
|
<span className="color-grey-8">
|
||||||
|
<i className="iconfont icon-biaoqian3 mr3 font-14"></i>
|
||||||
|
{item.tag_name}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<div className="versionInfo_right">
|
||||||
|
<span className="versionName">
|
||||||
|
<span className="task-hide">{item.name}</span>
|
||||||
|
<Link to={`/projects/${owner}/${projectsId}/releases/${item.version_id}/update`} className="color-blue ml3 font-12">(编辑)</Link>
|
||||||
|
</span>
|
||||||
|
<span className="color-grey-3">
|
||||||
|
<i className={`${item.bodyshow ? "iconfont icon-sanjiaoxing-down color-grey-8 mr3 font-14":"iconfont icon-triangle color-grey-8 mr3 font-14"}`} onClick={()=>this.showBody(key,item.bodyshow)}></i>
|
||||||
|
{item.user_name}:<span className="color-grey-8">发布了这个版本,并在发布后提交给{item.target_commitish}</span>
|
||||||
|
</span>
|
||||||
|
{
|
||||||
|
item.bodyshow && <RenderHtml className="break_word_comments imageLayerParent" value={item.body} url={this.props.history.location}/>
|
||||||
|
}
|
||||||
|
<RenderHtml />
|
||||||
|
<p className="mt10 pl3">
|
||||||
|
<a href={item.tarball_url} style={{color:"#4CC1DA"}} className="mr30"><i className="iconfont icon-TAR font-18 mr5"></i>TAR</a>
|
||||||
|
<a href={item.zipball_url} style={{color:"#28BD6C"}}><i className="iconfont icon-ZIP font-18 mr5"></i>ZIP</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
)
|
||||||
|
} else if (releases && releases.length === 0) {
|
||||||
|
return ( <NoneData _html="暂时还没有相关数据!" /> )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { projectsId ,owner } = this.props.match.params;
|
||||||
|
const { data , releases , isSpin } = this.state
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="main" style={{padding:"0px"}}>
|
||||||
|
<div className="topWrapper" style={{padding:"15px 20px"}}>
|
||||||
|
<span className="font-18 color-grey-3">版本发布</span>
|
||||||
|
{
|
||||||
|
data && data.user_permission ?
|
||||||
|
<Link to={`/projects/${owner}/${projectsId}/releases/new`} className="topWrapper_btn_new">+ 发布新版</Link>
|
||||||
|
: ''
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
<div className="releasesVersion">
|
||||||
|
<Spin spinning={isSpin}><div>{this.renderList(releases)}</div></Spin>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default version;
|
|
@ -123,6 +123,8 @@ class Infos extends Component {
|
||||||
});
|
});
|
||||||
const { current_user } = this.props;
|
const { current_user } = this.props;
|
||||||
const { username } = this.props.match.params;
|
const { username } = this.props.match.params;
|
||||||
|
const { pathname } = this.props.location;
|
||||||
|
const { notice } = this.state;
|
||||||
|
|
||||||
let url = `/users/${username || (current_user && current_user.login)}.json`;
|
let url = `/users/${username || (current_user && current_user.login)}.json`;
|
||||||
axios.get(url).then((result) => {
|
axios.get(url).then((result) => {
|
||||||
|
|
|
@ -48,7 +48,6 @@ function Team(props){
|
||||||
</Menu>
|
</Menu>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div>
|
<div>
|
||||||
<div className="headerbox">
|
<div className="headerbox">
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
|
@ -5,7 +5,7 @@ import '../courses/css/members.css';
|
||||||
import "../courses/common/formCommon.css";
|
import "../courses/common/formCommon.css";
|
||||||
import '../courses/css/Courses.css';
|
import '../courses/css/Courses.css';
|
||||||
import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png';
|
import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png';
|
||||||
import educodernet from '../../../src/images/login/educodernet.png';
|
import educodernet from '../../../src/images/login/logo.png';
|
||||||
import LoginRegisterComponent from '../user/LoginRegisterComponent';
|
import LoginRegisterComponent from '../user/LoginRegisterComponent';
|
||||||
import FindPasswordComponent from '../user/FindPasswordComponent';
|
import FindPasswordComponent from '../user/FindPasswordComponent';
|
||||||
//educoder登入页面
|
//educoder登入页面
|
||||||
|
@ -47,7 +47,6 @@ class EducoderLogin extends Component {
|
||||||
|
|
||||||
}
|
}
|
||||||
}else if(props.match.url === "/register"){
|
}else if(props.match.url === "/register"){
|
||||||
// showbool: 1,
|
|
||||||
this.state = {
|
this.state = {
|
||||||
showbool: 1,
|
showbool: 1,
|
||||||
loginstatus:false,
|
loginstatus:false,
|
||||||
|
@ -64,18 +63,14 @@ class EducoderLogin extends Component {
|
||||||
loginstatus:true,
|
loginstatus:true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Setlogins=(i)=>{
|
Setlogins=(i)=>{
|
||||||
console.log("96ye");
|
|
||||||
console.log(i)
|
|
||||||
this.setState({
|
this.setState({
|
||||||
logini:i
|
logini:i
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
gohome=()=>{
|
gohome=()=>{
|
||||||
window.location.href="/"
|
window.location.href="/"
|
||||||
|
@ -94,29 +89,18 @@ class EducoderLogin extends Component {
|
||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let {showbool,loginstatus,logini} = this.state;
|
let { showbool } = this.state;
|
||||||
|
const { mygetHelmetapi } = this.props;
|
||||||
return (
|
return (
|
||||||
<div style={newContainer} className=" clearfix" >
|
<div style={newContainer} className=" clearfix" >
|
||||||
|
<div style={{"justify-content": "center","align-items": "center","width": "100%",textAlign:"center"}}>
|
||||||
<div >
|
|
||||||
<div style={{
|
|
||||||
"display": "flex",
|
|
||||||
"justify-content": "center",
|
|
||||||
"align-items": "center",
|
|
||||||
"width": "100%"
|
|
||||||
}}>
|
|
||||||
<div style={{cursor:"pointer"}}>
|
<div style={{cursor:"pointer"}}>
|
||||||
{this.props.mygetHelmetapi === null ? ""
|
{
|
||||||
|
mygetHelmetapi && mygetHelmetapi.login_logo_url ?
|
||||||
|
<img style={{cursor:"pointer"}} alt="" onClick={()=>this.gohome()} width="80px" src={getImageUrl(mygetHelmetapi.login_logo_url)}/>
|
||||||
:
|
:
|
||||||
this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.login_logo_url===null|| this.props.mygetHelmetapi.login_logo_url===undefined?
|
<img style={{cursor:"pointer"}} alt="" onClick={()=>this.gohome()} src={educodernet} width="80px"/>
|
||||||
<img style={{cursor:"pointer"}} onClick={()=>this.gohome()} src={educodernet}/>
|
|
||||||
:
|
|
||||||
<img style={{cursor:"pointer"}} onClick={()=>this.gohome()} src={getImageUrl(this.props.mygetHelmetapi.login_logo_url)}/>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
showbool === 1 ?
|
showbool === 1 ?
|
||||||
|
@ -127,51 +111,17 @@ class EducoderLogin extends Component {
|
||||||
marginTop: "25px",
|
marginTop: "25px",
|
||||||
}}>
|
}}>
|
||||||
<div>
|
<div>
|
||||||
|
<LoginRegisterComponent {...this.props} {...this.state} Setshowbool={(e)=>this.Setshowbool(e)} ></LoginRegisterComponent>
|
||||||
<LoginRegisterComponent {...this.props} {...this.state}
|
|
||||||
Setshowbool={(e)=>this.Setshowbool(e)} ></LoginRegisterComponent>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<div style={{
|
<div style={{display: "flex",justifyContent: "center",width: "100%",marginTop: "25px",}}>
|
||||||
display: "flex",
|
|
||||||
justifyContent: "center",
|
|
||||||
width: "100%",
|
|
||||||
marginTop: "25px",
|
|
||||||
}}>
|
|
||||||
<div>
|
<div>
|
||||||
<FindPasswordComponent {...this.props} {...this.state}
|
<FindPasswordComponent {...this.props} {...this.state} Setshowbool={(e)=>this.Setshowbool(e)}></FindPasswordComponent>
|
||||||
Setshowbool={(e)=>this.Setshowbool(e)}></FindPasswordComponent>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{this.props.mygetHelmetapi === null ? <div style={{
|
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span> {moment().year()} Trustie<span className="ml15 mr15">湘ICP备17009477号</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a> & IntelliDE inside.</div>
|
||||||
display: "flex",
|
|
||||||
justifyContent: "center",
|
|
||||||
width: "100%",
|
|
||||||
}}>
|
|
||||||
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span> {moment().year()} EduCoder<span className="ml15 mr15">湘ICP备17009477号</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a> & IntelliDE inside.</div>
|
|
||||||
</div>:
|
|
||||||
this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.main_site===null|| this.props.mygetHelmetapi.main_site===undefined? <div style={{
|
|
||||||
display: "flex",
|
|
||||||
justifyContent: "center",
|
|
||||||
width: "100%",
|
|
||||||
}}>
|
|
||||||
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span> {moment().year()} EduCoder<span className="ml15 mr15">湘ICP备17009477号</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a> & IntelliDE inside.</div>
|
|
||||||
</div>:this.props.mygetHelmetapi.main_site===true?
|
|
||||||
<div style={{
|
|
||||||
display: "flex",
|
|
||||||
justifyContent: "center",
|
|
||||||
width: "100%",
|
|
||||||
}}>
|
|
||||||
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span> {moment().year()} EduCoder<span className="ml15 mr15">湘ICP备17009477号</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a> & IntelliDE inside.</div>
|
|
||||||
</div>
|
|
||||||
:""
|
|
||||||
}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -169,6 +169,14 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(response.data && response.data.login){
|
||||||
|
if(response.data.need_edit_info){
|
||||||
|
this.setState({
|
||||||
|
giteaVisible:true,
|
||||||
|
email:response.data.email
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
|
|
@ -24,13 +24,7 @@ class LoginRegisterComponent extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// console.log("LoginRegisterComponent");
|
|
||||||
// console.log("29");
|
|
||||||
// console.log(props.loginstatus);
|
|
||||||
if (props.loginstatus === true) {
|
if (props.loginstatus === true) {
|
||||||
// console.log(props.loginstatus);
|
|
||||||
this.state = {
|
this.state = {
|
||||||
tab: ["0"],
|
tab: ["0"],
|
||||||
classpass: "text",
|
classpass: "text",
|
||||||
|
@ -147,24 +141,14 @@ class LoginRegisterComponent extends Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
isphone: flag
|
isphone: flag
|
||||||
})
|
})
|
||||||
// console.log("componentDidUpdate");
|
|
||||||
// console.log(this.props);
|
|
||||||
let pcipns = this.IsPC();
|
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"]
|
||||||
})
|
})
|
||||||
|
@ -198,8 +182,6 @@ class LoginRegisterComponent extends Component {
|
||||||
|
|
||||||
|
|
||||||
StudyMakeMoney = () => { // 调用父组件方法
|
StudyMakeMoney = () => { // 调用父组件方法
|
||||||
|
|
||||||
// this.props.Setlogins(3);
|
|
||||||
this.setState({
|
this.setState({
|
||||||
login: "",
|
login: "",
|
||||||
password: "",
|
password: "",
|
||||||
|
@ -400,11 +382,6 @@ class LoginRegisterComponent extends Component {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(response.data.profile_completed !== null || response.data.profile_completed === false){
|
|
||||||
// this.setMyEduCoderModals();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
if (response.data.status === 402) {
|
if (response.data.status === 402) {
|
||||||
window.location.href = response.data.url;
|
window.location.href = response.data.url;
|
||||||
|
@ -435,23 +412,6 @@ class LoginRegisterComponent extends Component {
|
||||||
}
|
}
|
||||||
//注册接口
|
//注册接口
|
||||||
postregistered = () => {
|
postregistered = () => {
|
||||||
// if (this.state.logins === undefined || this.state.logins === "") {
|
|
||||||
// this.openNotification(`请输入登录手机号码或邮箱`,2);
|
|
||||||
//
|
|
||||||
// return
|
|
||||||
// } else if (this.state.dragOk === false) {
|
|
||||||
// this.openNotification(`请拖动滑块验证`,2);
|
|
||||||
// return
|
|
||||||
// } else if (this.state.codes === undefined || this.state.codes == "") {
|
|
||||||
// this.openNotification(`请输入验证码`,2);
|
|
||||||
// return
|
|
||||||
// } else if (this.state.passwords === undefined || this.state.passwords == "") {
|
|
||||||
// this.openNotification(`请输入密码`,2);
|
|
||||||
// return
|
|
||||||
// } else if (this.state.Agreetotheterms === false) {
|
|
||||||
// this.openNotification(`请同意服务协议条款`,2);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
if (this.state.logins === undefined || this.state.logins === "" || this.state.logins.length === 0) {
|
if (this.state.logins === undefined || this.state.logins === "" || this.state.logins.length === 0) {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcos: "账号不能为空",
|
Phonenumberisnotcos: "账号不能为空",
|
||||||
|
@ -461,25 +421,8 @@ class LoginRegisterComponent extends Component {
|
||||||
})
|
})
|
||||||
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.codes === undefined || this.state.codes == ""||this.state.codes.length===0) {
|
if (this.state.passwords === undefined || this.state.passwords == "" || this.state.passwords.length === 0) {
|
||||||
// this.openNotification(`请输入验证码`,2);
|
|
||||||
this.setState({
|
|
||||||
Phonenumberisnotcosyzm:"验证码不能为空",
|
|
||||||
})
|
|
||||||
return
|
|
||||||
} else if (this.state.passwords === undefined || this.state.passwords == "" ||this.state.passwords.length===0) {
|
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcosymmm: "密码不能为空",
|
Phonenumberisnotcosymmm: "密码不能为空",
|
||||||
})
|
})
|
||||||
|
@ -494,9 +437,6 @@ class LoginRegisterComponent extends Component {
|
||||||
Phonenumberisnotcosymmm: "密码不能超过16位",
|
Phonenumberisnotcosymmm: "密码不能超过16位",
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
} else if (this.state.Agreetotheterms === false) {
|
|
||||||
this.openNotification(`请同意服务协议条款`,2);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let url;
|
let url;
|
||||||
|
@ -511,34 +451,9 @@ 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){
|
if (result && result.data) {
|
||||||
if(result.data.status===-2){
|
this.openNotification("注册成功!");
|
||||||
if(result.data.message==="验证码不正确"){
|
this.props.history.push('/');
|
||||||
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) => {
|
||||||
|
|
||||||
|
@ -758,12 +673,9 @@ 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 = "手机号格式不正确";
|
||||||
|
@ -809,7 +721,6 @@ 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, "")
|
||||||
|
@ -822,9 +733,6 @@ class LoginRegisterComponent extends Component {
|
||||||
Phonenumberisnotcodmm: undefined,
|
Phonenumberisnotcodmm: undefined,
|
||||||
Phonenumberisnotcodmms: undefined,
|
Phonenumberisnotcodmms: undefined,
|
||||||
})
|
})
|
||||||
// this.setState({
|
|
||||||
// password: e.target.value
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
//获取注册登入
|
//获取注册登入
|
||||||
loginInputonChanges = (e) => {
|
loginInputonChanges = (e) => {
|
||||||
|
@ -881,7 +789,6 @@ class LoginRegisterComponent extends Component {
|
||||||
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
|
||||||
|
@ -890,26 +797,8 @@ class LoginRegisterComponent extends Component {
|
||||||
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)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
loginonkeyup =(e)=>{
|
|
||||||
if(e.keyCode==32){
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
setNotcompleteds=()=>{
|
|
||||||
this.setState({
|
|
||||||
Notcompleteds:true,
|
|
||||||
MyEduCoderModals:false,
|
|
||||||
registered:undefined,
|
|
||||||
|
|
||||||
})
|
|
||||||
};
|
|
||||||
setMyEduCoderModals = () => {
|
setMyEduCoderModals = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
MyEduCoderModals: true,
|
MyEduCoderModals: true,
|
||||||
|
@ -917,70 +806,10 @@ class LoginRegisterComponent extends Component {
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
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 {
|
const {passopens,Agreetotheterms,Phonenumberisnotcos,tab,classpassbool,Phonenumberisnotcosymmm} = this.state
|
||||||
// 登录
|
|
||||||
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>
|
||||||
{
|
{
|
||||||
`
|
`
|
||||||
|
@ -993,134 +822,16 @@ class LoginRegisterComponent extends Component {
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
{weixinlogin===false&&this.props.weixinlogin===undefined?<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab} className="mt20">
|
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab} className="mt20">
|
||||||
<Menu.Item key="0" className={tab===0?"active font-18":"font-18"} > 登录</Menu.Item>
|
<Menu.Item key="1" className={"active font-18"} style={{ marginLeft: "10px" }} >注册</Menu.Item>
|
||||||
<Menu.Item key="1" className={tab===1?"active font-18 ":"font-18 "} style={{marginLeft:"10px"}} >注册</Menu.Item>
|
</Menu>
|
||||||
</Menu>:""}
|
|
||||||
|
|
||||||
{
|
|
||||||
weixinlogin===false&&parseInt(tab[0])==0 &&
|
|
||||||
<div style={{ width: '340px' }}>
|
<div style={{ width: '340px' }}>
|
||||||
<style>
|
<Input placeholder="请输入邮箱账号进行注册"
|
||||||
{
|
|
||||||
`
|
|
||||||
.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}
|
|
||||||
onChange={this.loginInputonChange}
|
|
||||||
name="username"
|
|
||||||
className={Phonenumberisnotco && Phonenumberisnotco !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
|
|
||||||
onBlur={(e) => this.inputOnBlur(e, 1)}
|
|
||||||
style={{marginTop: '30px', height: '38px'}}
|
|
||||||
onPressEnter={() => this.postLogin()}
|
|
||||||
></Input>
|
|
||||||
|
|
||||||
{
|
|
||||||
Phonenumberisnotco && Phonenumberisnotco != "" ?
|
|
||||||
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
|
|
||||||
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotco}</span>
|
|
||||||
</p>
|
|
||||||
: <div style={{height:"25px"}}></div>
|
|
||||||
}
|
|
||||||
|
|
||||||
<Input type="password" name="password" id="password" value={this.state.password}
|
|
||||||
onChange={this.passwordonChange}
|
|
||||||
onPressEnter={() => this.postLogin()}
|
|
||||||
className={Phonenumberisnotcodmm && Phonenumberisnotcodmm !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
|
|
||||||
placeholder="密码"></Input>
|
|
||||||
{
|
|
||||||
Phonenumberisnotcodmm && Phonenumberisnotcodmm != "" ?
|
|
||||||
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
|
|
||||||
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcodmm}</span>
|
|
||||||
</p>
|
|
||||||
: (Phonenumberisnotcodmms=== undefined?<div style={{height:"25px"}}></div>:"")
|
|
||||||
}
|
|
||||||
{
|
|
||||||
Phonenumberisnotcodmms && Phonenumberisnotcodmms != "" ?
|
|
||||||
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
|
|
||||||
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcodmms}</span>
|
|
||||||
</p>
|
|
||||||
: ""
|
|
||||||
}
|
|
||||||
|
|
||||||
<div className="left_right font-12 " style={{color: '#676767'}}>
|
|
||||||
<Checkbox onChange={this.onAutoLoginChange} checked={autoLogin}>下次自动登录</Checkbox>
|
|
||||||
|
|
||||||
<a onClick={()=>this.StudyMakeMoney()}
|
|
||||||
className="mr3 color-grey-9 mt3 font-12">找回密码</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Button className="login_btn font-16" type="primary" style={{height:"46px"}} onClick={() => this.postLogin()}
|
|
||||||
size={"large"}>登录</Button>
|
|
||||||
{this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?this.state.isphone===true?<p className="clearfix mb10 textcenter">
|
|
||||||
|
|
||||||
<span className={"startlogin"}>———————— 快速登录 ————————</span>
|
|
||||||
<div className={"mt10"}>
|
|
||||||
<a onClick={()=>this.openweixinlogin()}>
|
|
||||||
<img src={require('./img/WeChat.png')} alt="微信登录"/>
|
|
||||||
</a>
|
|
||||||
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
|
|
||||||
<img src={require('./img/qq.png')} alt="qq登录"/>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</p>:<p className="clearfix mb10 textcenter">
|
|
||||||
<span className={"startlogin"}>———————— 快速登录 ————————</span>
|
|
||||||
<div className={"mt10"}>
|
|
||||||
{/*<a onClick={()=>this.openweixinlogin()}>*/}
|
|
||||||
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
|
|
||||||
{/*</a>*/}
|
|
||||||
<a onClick={()=>this.openphoneqqlogin()}>
|
|
||||||
<img src={require('./img/qq.png')} alt="qq登录"/>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</p>:""}
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
weixinlogin===false&&parseInt(tab[0])==1 &&
|
|
||||||
<div style={{width: '340px'}}>
|
|
||||||
<Input placeholder="请使用手机号/邮箱账号进行注册"
|
|
||||||
className={Phonenumberisnotcos && Phonenumberisnotcos !== "" ? " color-grey-9 loginInputzhucheyslass bor-reds" : " color-grey-9 loginInputzhuche"}
|
className={Phonenumberisnotcos && Phonenumberisnotcos !== "" ? " color-grey-9 loginInputzhucheyslass bor-reds" : " color-grey-9 loginInputzhuche"}
|
||||||
value={this.state.logins}
|
value={this.state.logins}
|
||||||
type="text" autoComplete="off"
|
type="text" autoComplete="off"
|
||||||
onChange={this.loginInputonChanges}
|
onChange={this.loginInputonChanges}
|
||||||
// onBlur={(e) => this.inputOnBlurzhuche(e, 2)}
|
|
||||||
style={{ marginTop: '30px', height: '38px', color: '#999999', fontSize: "14px" }}></Input>
|
style={{ marginTop: '30px', height: '38px', color: '#999999', fontSize: "14px" }}></Input>
|
||||||
{
|
{
|
||||||
Phonenumberisnotcos && Phonenumberisnotcos !== "" ?
|
Phonenumberisnotcos && Phonenumberisnotcos !== "" ?
|
||||||
|
@ -1130,88 +841,6 @@ class LoginRegisterComponent extends Component {
|
||||||
: <div style={{ height: "25px" }}></div>
|
: <div style={{ height: "25px" }}></div>
|
||||||
|
|
||||||
}
|
}
|
||||||
{this.state.MyEduCoderModals===true? <Notcompletedysl
|
|
||||||
modalsType={this.state.MyEduCoderModals}
|
|
||||||
registered={this.state.registered}
|
|
||||||
setNotcompleteds={()=>{this.setNotcompleteds()}}
|
|
||||||
/>:""}
|
|
||||||
|
|
||||||
{
|
|
||||||
Whethertoverify===false&&pciphone===true?
|
|
||||||
<CheckInputysl1
|
|
||||||
dragOkCallback={this.dragOkCallback}
|
|
||||||
>
|
|
||||||
</CheckInputysl1>
|
|
||||||
:
|
|
||||||
""
|
|
||||||
|
|
||||||
}
|
|
||||||
{
|
|
||||||
Whethertoverify===true&&pciphone===true?
|
|
||||||
<CheckInputysl2
|
|
||||||
dragOkCallback={this.dragOkCallback}
|
|
||||||
>
|
|
||||||
</CheckInputysl2>
|
|
||||||
:
|
|
||||||
""
|
|
||||||
}
|
|
||||||
|
|
||||||
<div>
|
|
||||||
{
|
|
||||||
pciphone===true?
|
|
||||||
(
|
|
||||||
Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !== "" ?
|
|
||||||
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
|
|
||||||
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosytdhk}</span>
|
|
||||||
</p>
|
|
||||||
: <div style={{height:"25px"}}></div>
|
|
||||||
|
|
||||||
)
|
|
||||||
:""
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div className="yslbutondls">
|
|
||||||
|
|
||||||
<Input
|
|
||||||
className={Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?" mr5 font-14 color-grey-9 loginInputzhucheyslass bor-reds":" mr5 font-14 color-grey-9 loginInputzhuche"}
|
|
||||||
name="codes" type="text" autoComplete="off" readonly
|
|
||||||
onfocus="this.removeAttribute('readonly')" style={{
|
|
||||||
width:'210px',
|
|
||||||
height:'38px',
|
|
||||||
}} placeholder="请输入验证码"
|
|
||||||
onChange={this.codesonChange}
|
|
||||||
value={codes}
|
|
||||||
>
|
|
||||||
</Input>
|
|
||||||
{
|
|
||||||
getverificationcodes === undefined ?
|
|
||||||
<Button className=" ml5 font-14" disabled style={{"width": "120px","text-align":"center", "height": "45px",}}
|
|
||||||
size={"large"}>重新发送{seconds}s</Button>
|
|
||||||
: getverificationcodes === true ?
|
|
||||||
<Button className=" ml5 font-14" type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}}
|
|
||||||
onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>
|
|
||||||
:
|
|
||||||
<Button className=" ml5 font-14 " type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}}
|
|
||||||
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
|
|
||||||
}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
{
|
|
||||||
Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?
|
|
||||||
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
|
|
||||||
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosyzm}</span>
|
|
||||||
</p>
|
|
||||||
: <div style={{height:"25px"}}></div>
|
|
||||||
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
{
|
{
|
||||||
`
|
`
|
||||||
|
@ -1249,57 +878,10 @@ class LoginRegisterComponent extends Component {
|
||||||
: <div style={{ height: "25px" }}></div>
|
: <div style={{ height: "25px" }}></div>
|
||||||
|
|
||||||
}
|
}
|
||||||
{this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?<Checkbox onChange={this.onChange}
|
<Button className=" font-16 mb20" type="primary" style={this.props.settings && this.props.settings.main_site === true ? { height: "46px", width: "100%", marginTop: "26px" } : { height: "46px", width: "100%" }} onClick={() => this.postregistered()}
|
||||||
checked={Agreetotheterms}
|
|
||||||
><span className="font-14 " style={{
|
|
||||||
color: '#676767',
|
|
||||||
}}>我已阅读并同意
|
|
||||||
<span>
|
|
||||||
<a href={'https://forge.educoder.net/help?index=4'} target="_blank" className={"color-blue"}>《服务协议条款》</a>
|
|
||||||
</span></span></Checkbox>:""}
|
|
||||||
<Button className=" font-16 mb20" type="primary" style={this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?{height:"46px", width: "100%",marginTop:"26px"}:{height:"46px", width: "100%"}} onClick={() => this.postregistered()}
|
|
||||||
size={"large"}>{this.props.weixinlogin ? "注册并绑定" : "注册"}</Button>
|
size={"large"}>{this.props.weixinlogin ? "注册并绑定" : "注册"}</Button>
|
||||||
|
|
||||||
{this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?this.state.isphone===true?<p className="clearfix mb10 textcenter">
|
|
||||||
|
|
||||||
<span className={"startlogin"}>———————— 快速登录 ————————</span>
|
|
||||||
<div className={"mt10"}>
|
|
||||||
<a onClick={()=>this.openweixinlogin()}>
|
|
||||||
<img src={require('./img/WeChat.png')} alt="微信登录"/>
|
|
||||||
</a>
|
|
||||||
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
|
|
||||||
<img src={require('./img/qq.png')} alt="qq登录"/>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</p>:<p className="clearfix mb10 textcenter">
|
|
||||||
<span className={"startlogin"}>———————— 快速登录 ————————</span>
|
|
||||||
<div className={"mt10"}>
|
|
||||||
{/*<a onClick={()=>this.openweixinlogin()}>*/}
|
|
||||||
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
|
|
||||||
{/*</a>*/}
|
|
||||||
<a onClick={()=>this.openphoneqqlogin()}>
|
|
||||||
<img src={require('./img/qq.png')} alt="qq登录"/>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</p>:""
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{weixinlogin===true?<iframe
|
|
||||||
className={"weixinheight390 mt20"}
|
|
||||||
frameBorder="0"
|
|
||||||
sandbox="allow-scripts allow-same-origin allow-top-navigation"
|
|
||||||
scrolling="no"
|
|
||||||
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_login&state=null,${window.location.host}#wechat_redirect`}></iframe>:""}
|
|
||||||
{weixinlogin===true?<p className="clearfix mb20 textcenter">
|
|
||||||
<a className={"startlogin color-blue"} onClick={()=>this.hideweixinlogin()}>返回登录注册</a>
|
|
||||||
</p>:""}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue