forked from Gitlink/forgeplus-react
Compare commits
5 Commits
standalone
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
3bf9de2d4c | |
|
|
6be0d12e8c | |
|
|
b000fc11f3 | |
|
|
a0fa4eccf0 | |
|
|
9f4069fc6a |
1179
.idea/workspace.xml
1179
.idea/workspace.xml
File diff suppressed because it is too large
Load Diff
|
|
@ -6705,13 +6705,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
|
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 8.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 10 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,6 +73,7 @@ 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">
|
||||||
|
|
|
||||||
|
|
@ -157,17 +157,6 @@ 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();
|
||||||
|
|
|
||||||
|
|
@ -1,122 +0,0 @@
|
||||||
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,8 +123,6 @@ 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,6 +48,7 @@ function Team(props){
|
||||||
</Menu>
|
</Menu>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div>
|
<div>
|
||||||
<div className="headerbox">
|
<div className="headerbox">
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before 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/logo.png';
|
import educodernet from '../../../src/images/login/educodernet.png';
|
||||||
import LoginRegisterComponent from '../user/LoginRegisterComponent';
|
import LoginRegisterComponent from '../user/LoginRegisterComponent';
|
||||||
import FindPasswordComponent from '../user/FindPasswordComponent';
|
import FindPasswordComponent from '../user/FindPasswordComponent';
|
||||||
//educoder登入页面
|
//educoder登入页面
|
||||||
|
|
@ -47,6 +47,7 @@ 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,
|
||||||
|
|
@ -63,14 +64,18 @@ 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="/"
|
||||||
|
|
@ -89,18 +94,29 @@ class EducoderLogin extends Component {
|
||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let { showbool } = this.state;
|
let {showbool,loginstatus,logini} = 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)}/>
|
|
||||||
:
|
:
|
||||||
<img style={{cursor:"pointer"}} alt="" onClick={()=>this.gohome()} src={educodernet} width="80px"/>
|
this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.login_logo_url===null|| this.props.mygetHelmetapi.login_logo_url===undefined?
|
||||||
|
<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 ?
|
||||||
|
|
@ -111,17 +127,51 @@ 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={{display: "flex",justifyContent: "center",width: "100%",marginTop: "25px",}}>
|
<div style={{
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "center",
|
||||||
|
width: "100%",
|
||||||
|
marginTop: "25px",
|
||||||
|
}}>
|
||||||
<div >
|
<div >
|
||||||
<FindPasswordComponent {...this.props} {...this.state} Setshowbool={(e)=>this.Setshowbool(e)}></FindPasswordComponent>
|
<FindPasswordComponent {...this.props} {...this.state}
|
||||||
|
Setshowbool={(e)=>this.Setshowbool(e)}></FindPasswordComponent>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<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>
|
{this.props.mygetHelmetapi === null ? <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===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,14 +169,6 @@ 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,7 +24,13 @@ 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",
|
||||||
|
|
@ -141,14 +147,24 @@ 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"]
|
||||||
})
|
})
|
||||||
|
|
@ -182,6 +198,8 @@ class LoginRegisterComponent extends Component {
|
||||||
|
|
||||||
|
|
||||||
StudyMakeMoney = () => { // 调用父组件方法
|
StudyMakeMoney = () => { // 调用父组件方法
|
||||||
|
|
||||||
|
// this.props.Setlogins(3);
|
||||||
this.setState({
|
this.setState({
|
||||||
login: "",
|
login: "",
|
||||||
password: "",
|
password: "",
|
||||||
|
|
@ -382,6 +400,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;
|
||||||
|
|
@ -412,6 +435,23 @@ 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:"账号不能为空",
|
||||||
|
|
@ -421,8 +461,25 @@ 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.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({
|
||||||
|
Phonenumberisnotcosyzm:"验证码不能为空",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
} else if (this.state.passwords === undefined || this.state.passwords == "" ||this.state.passwords.length===0) {
|
||||||
this.setState({
|
this.setState({
|
||||||
Phonenumberisnotcosymmm:"密码不能为空",
|
Phonenumberisnotcosymmm:"密码不能为空",
|
||||||
})
|
})
|
||||||
|
|
@ -437,6 +494,9 @@ class LoginRegisterComponent extends Component {
|
||||||
Phonenumberisnotcosymmm:"密码不能超过16位",
|
Phonenumberisnotcosymmm:"密码不能超过16位",
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
} else if (this.state.Agreetotheterms === false) {
|
||||||
|
this.openNotification(`请同意服务协议条款`,2);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let url;
|
let url;
|
||||||
|
|
@ -451,9 +511,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) => {
|
||||||
|
|
||||||
|
|
@ -673,9 +758,12 @@ 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 = "手机号格式不正确";
|
||||||
|
|
@ -721,6 +809,7 @@ 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,"")
|
||||||
|
|
@ -733,6 +822,9 @@ class LoginRegisterComponent extends Component {
|
||||||
Phonenumberisnotcodmm:undefined,
|
Phonenumberisnotcodmm:undefined,
|
||||||
Phonenumberisnotcodmms:undefined,
|
Phonenumberisnotcodmms:undefined,
|
||||||
})
|
})
|
||||||
|
// this.setState({
|
||||||
|
// password: e.target.value
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
//获取注册登入
|
//获取注册登入
|
||||||
loginInputonChanges = (e) => {
|
loginInputonChanges = (e) => {
|
||||||
|
|
@ -789,6 +881,7 @@ 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
|
||||||
|
|
@ -797,8 +890,26 @@ 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,
|
||||||
|
|
@ -806,10 +917,70 @@ 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 {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>
|
||||||
{
|
{
|
||||||
`
|
`
|
||||||
|
|
@ -822,16 +993,134 @@ 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>:""}
|
||||||
|
|
||||||
|
{
|
||||||
|
weixinlogin===false&&parseInt(tab[0])==0 &&
|
||||||
<div style={{width: '340px'}}>
|
<div style={{width: '340px'}}>
|
||||||
<Input placeholder="请输入邮箱账号进行注册"
|
<style>
|
||||||
|
{
|
||||||
|
`
|
||||||
|
.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 !== "" ?
|
||||||
|
|
@ -841,6 +1130,88 @@ 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>
|
||||||
{
|
{
|
||||||
`
|
`
|
||||||
|
|
@ -878,10 +1249,57 @@ class LoginRegisterComponent extends Component {
|
||||||
: <div style={{height:"25px"}}></div>
|
: <div style={{height:"25px"}}></div>
|
||||||
|
|
||||||
}
|
}
|
||||||
<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()}
|
{this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?<Checkbox onChange={this.onChange}
|
||||||
|
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