From cbfb9c3ffe4a5c0524854ee36c26cea73c333fe5 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Wed, 18 Nov 2020 11:31:52 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E7=89=88=E6=9C=AC-?=
=?UTF-8?q?=E6=B3=A8=E5=86=8C=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/css/merge.css | 111 ++
src/App.js | 14 +-
src/forge/Order/order.js | 2 +-
src/modules/login/EducoderLogin.js | 213 ++-
src/modules/login/LoginDialog.js | 14 +-
src/modules/tpm/NewHeader.js | 4 +-
src/modules/user/LoginRegisterComponent.js | 1364 ++------------------
src/modules/user/register.css | 22 +
8 files changed, 325 insertions(+), 1419 deletions(-)
create mode 100755 public/css/merge.css
create mode 100644 src/modules/user/register.css
diff --git a/public/css/merge.css b/public/css/merge.css
new file mode 100755
index 00000000..b6d923ce
--- /dev/null
+++ b/public/css/merge.css
@@ -0,0 +1,111 @@
+
+.CodeMirror-merge {
+ position: relative;
+ white-space: pre;
+}
+
+.CodeMirror-merge, .CodeMirror-merge .CodeMirror {
+ min-height:50px;
+}
+
+.CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 48%; }
+.CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 4%; }
+.CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; }
+.CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; }
+
+.CodeMirror-merge-pane {
+ display: inline-block;
+ white-space: normal;
+ vertical-align: top;
+}
+.CodeMirror-merge-pane-rightmost {
+ position: absolute;
+ right: 0px;
+ z-index: 1;
+}
+
+.CodeMirror-merge-gap {
+ z-index: 2;
+ display: inline-block;
+ height: 100%;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ overflow: hidden;
+ position: relative;
+ background: #515151;
+}
+
+.CodeMirror-merge-scrolllock-wrap {
+ position: absolute;
+ bottom: 0; left: 50%;
+}
+.CodeMirror-merge-scrolllock {
+ position: relative;
+ left: -50%;
+ cursor: pointer;
+ color: #d8d8d8;
+ line-height: 1;
+}
+
+.CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right {
+ position: absolute;
+ left: 0; top: 0;
+ right: 0; bottom: 0;
+ line-height: 1;
+}
+
+.CodeMirror-merge-copy {
+ position: absolute;
+ cursor: pointer;
+ color: #ce374b;
+ z-index: 3;
+}
+
+.CodeMirror-merge-copy-reverse {
+ position: absolute;
+ cursor: pointer;
+ color: #44c;
+}
+
+.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }
+.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }
+
+.CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted {
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);
+ background-position: bottom left;
+ background-repeat: repeat-x;
+}
+
+.CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted {
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);
+ background-position: bottom left;
+ background-repeat: repeat-x;
+}
+
+.CodeMirror-merge-r-chunk { background: #9a6868; }
+.CodeMirror-merge-r-chunk-start { /*border-top: 1px solid #ee8; */}
+.CodeMirror-merge-r-chunk-end {/* border-bottom: 1px solid #ee8; */}
+.CodeMirror-merge-r-connect { fill:#9a6868;}
+
+.CodeMirror-merge-l-chunk { background: #eef; }
+.CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; }
+.CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; }
+.CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; }
+
+.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }
+.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }
+.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }
+
+.CodeMirror-merge-collapsed-widget:before {
+ content: "(...)";
+}
+.CodeMirror-merge-collapsed-widget {
+ cursor: pointer;
+ color: #88b;
+ background: #eef;
+ border: 1px solid #ddf;
+ font-size: 90%;
+ padding: 0 3px;
+ border-radius: 4px;
+}
+.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; }
diff --git a/src/App.js b/src/App.js
index 8d734bc5..041ab5e1 100644
--- a/src/App.js
+++ b/src/App.js
@@ -76,6 +76,10 @@ const OrganizeIndex = Loadable({
loader: () => import('./forge/Team/Index'),
loading: Loading,
})
+const EducoderLogin = Loadable({
+ loader: () => import('./modules/login/EducoderLogin'),
+ loading: Loading,
+})
class App extends Component {
constructor(props) {
@@ -240,7 +244,15 @@ class App extends Component {
}
}>
-
+ {
+
+ return ()
+ }
+ }
+ />
{/*403*/}
diff --git a/src/forge/Order/order.js b/src/forge/Order/order.js
index dc9cfe19..10e25951 100644
--- a/src/forge/Order/order.js
+++ b/src/forge/Order/order.js
@@ -341,7 +341,7 @@ class order extends Component {
});
};
- islogin() {
+ islogin=()=>{
this.props.showLoginDialog();
}
renderNew =()=>{
diff --git a/src/modules/login/EducoderLogin.js b/src/modules/login/EducoderLogin.js
index 5663c69c..65c7d361 100644
--- a/src/modules/login/EducoderLogin.js
+++ b/src/modules/login/EducoderLogin.js
@@ -1,6 +1,6 @@
-import React, {Component} from "react";
+import React, { Component } from "react";
import moment from 'moment';
-import { SnackbarHOC,getImageUrl } from 'educoder';
+import { getImageUrl } from 'educoder';
import '../courses/css/members.css';
import "../courses/common/formCommon.css"
import '../courses/css/Courses.css';
@@ -8,121 +8,90 @@ import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png';
import educodernet from '../../../src/images/login/educodernet.png';
import LoginRegisterComponent from '../user/LoginRegisterComponent';
import FindPasswordComponent from '../user/FindPasswordComponent';
-import passopen from "../../images/login/passopen.png";
//educoder登入页面
-var sectionStyle = {
- "height": "100%",
- "width": "100%",
- "min-width": "1000px",
-// makesure here is String确保这里是一个字符串,以下是es6写法
-
-
-};
-var imgback = {
- " background-size":"cover",
-"background-repeat":"no-repeat",
- backgroundImage: `url(${beijintulogontwo})`,
-}
-var imgmian ={
- width: "100%",
- background: `url(${beijintulogontwo})`,
- position: "relative",
-
-}
-
-var newContainer={
+var newContainer = {
background: `url(${beijintulogontwo})`,
- backgroundPosition: "center" ,
+ backgroundPosition: "center",
backgroundRepeat: "no-repeat",
backgroundAttachment: "fixed",
backgroundSize: "100% 100%",
- height:" 100%",
- width:" 100%",
+ height: " 100%",
+ width: " 100%",
position: "absolute",
top: "0px",
bottom: "0px",
- minHeight: "100%",
+ minHeight: "100%",
paddingTop: "40px",
-
+ display:"flex",
+ alignItems:"center",
+ justifyContent:"center"
}
class EducoderLogin extends Component {
constructor(props) {
super(props);
- if( props.match.url === "/changepassword" ){
+ if (props.match.url === "/changepassword") {
this.state = {
showbool: 3,
- logini:3,
- namezh:"",
- passmm:"",
- loginstatus:true,
+ logini: 3,
+ namezh: "",
+ passmm: "",
+ loginstatus: true,
}
- }else {
- if(props.match.url === "/login"){
+ } else {
+ if (props.match.url === "/login") {
this.state = {
showbool: 1,
- loginstatus:true,
- logini:1,
- namezh:"",
- passmm:""
+ loginstatus: true,
+ logini: 1,
+ namezh: "",
+ passmm: ""
}
- }else if(props.match.url === "/register"){
- // showbool: 1,
- this.state = {
- showbool: 1,
- loginstatus:false,
- logini:2,
- namezh:"",
- passmm:""
- }
- }else{
+ } else if (props.match.url === "/register") {
this.state = {
showbool: 1,
- logini:1,
- namezh:"",
- passmm:"",
- loginstatus:true,
+ loginstatus: false,
+ logini: 2,
+ namezh: "",
+ passmm: ""
+ }
+ } else {
+ this.state = {
+ showbool: 1,
+ logini: 1,
+ namezh: "",
+ passmm: "",
+ loginstatus: true,
}
}
-
}
-
}
- componentDidMount() {
- // console.log("EducoderLogin");
- // console.log(this.props);
- }
-
- Setlogins=(i)=>{
+ Setlogins = (i) => {
console.log("96ye");
console.log(i)
this.setState({
- logini:i
+ logini: i
})
}
- gohome=()=>{
- window.location.href="/"
+ gohome = () => {
+ window.location.href = "/"
}
- Setshowbool = (e,name,pass) => {
- if (e===1) {
+ Setshowbool = (e, name, pass) => {
+ if (e === 1) {
this.setState({
showbool: 1
})
- } else if(e===3){
+ } else if (e === 3) {
this.setState({
showbool: 3
})
}
}
-
render() {
- let {showbool,loginstatus,logini} = this.state;
- // console.log("EducoderLogingetHelmetapi");
- // console.log(this.props);
- // console.log(this.props.mygetHelmetapi);
+ let { showbool } = this.state;
return (
@@ -133,13 +102,13 @@ class EducoderLogin extends Component {
"align-items": "center",
"width": "100%"
}}>
-
+
{this.props.mygetHelmetapi === null ? ""
- :
- this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.login_logo_url===null|| this.props.mygetHelmetapi.login_logo_url===undefined?
-
![]()
this.gohome()} src={educodernet}/>
- :
-
![]()
this.gohome()} src={getImageUrl(this.props.mygetHelmetapi.login_logo_url)}/>
+ :
+ this.props.mygetHelmetapi === undefined || this.props.mygetHelmetapi.login_logo_url === null || this.props.mygetHelmetapi.login_logo_url === undefined ?
+
![]()
this.gohome()} src={educodernet} />
+ :
+
![]()
this.gohome()} src={getImageUrl(this.props.mygetHelmetapi.login_logo_url)} />
}
@@ -157,48 +126,48 @@ class EducoderLogin extends Component {
this.Setshowbool(e)} >
+ Setshowbool={(e) => this.Setshowbool(e)} >
- :
-
-
-
this.Setshowbool(e)}>
+ :
+
+
+ this.Setshowbool(e)}>
-
-
+
+
+ }
+ {this.props.mygetHelmetapi === null ?
+
© {moment().year()} EduCoder
湘ICP备17009477号Trustie & IntelliDE inside.
+
:
+ this.props.mygetHelmetapi === undefined || this.props.mygetHelmetapi.main_site === null || this.props.mygetHelmetapi.main_site === undefined ?
+
© {moment().year()} EduCoder
湘ICP备17009477号Trustie & IntelliDE inside.
+
: this.props.mygetHelmetapi.main_site === true ?
+
+
© {moment().year()} EduCoder
湘ICP备17009477号Trustie & IntelliDE inside.
+
+ : ""
}
- {this.props.mygetHelmetapi === null ?
-
© {moment().year()} EduCoder
湘ICP备17009477号Trustie & IntelliDE inside.
-
:
- this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.main_site===null|| this.props.mygetHelmetapi.main_site===undefined?
-
© {moment().year()} EduCoder
湘ICP备17009477号Trustie & IntelliDE inside.
-
:this.props.mygetHelmetapi.main_site===true?
-
-
© {moment().year()} EduCoder
湘ICP备17009477号Trustie & IntelliDE inside.
-
- :""
- }
@@ -206,16 +175,4 @@ class EducoderLogin extends Component {
}
}
-export default EducoderLogin ;
-// showbool === 2 ?
-//
-//
-//
-//
-// :
+export default EducoderLogin;
diff --git a/src/modules/login/LoginDialog.js b/src/modules/login/LoginDialog.js
index 44197524..61815d82 100644
--- a/src/modules/login/LoginDialog.js
+++ b/src/modules/login/LoginDialog.js
@@ -1,13 +1,7 @@
import React, { Component } from 'react';
-import { Redirect } from 'react-router';
-
-import Dialog, {
- DialogActions,
- DialogContent,
- DialogContentText,
- DialogTitle,
-} from 'material-ui/Dialog';
-import { notification, Modal } from 'antd';
+import { Link } from 'react-router-dom';
+import Dialog from 'material-ui/Dialog';
+import { notification } from 'antd';
import axios from 'axios';
@@ -582,7 +576,7 @@ class LoginDialog extends Component {
this.getloginurl("https://www.trustie.net/account/lost_password")}
className="mr3 color-grey-9">找回密码
- this.getloginurl("https://www.trustie.net/login?login=false")} className="color-grey-9">注册
+ 注册
diff --git a/src/modules/tpm/NewHeader.js b/src/modules/tpm/NewHeader.js
index d2f77f3e..aea00792 100644
--- a/src/modules/tpm/NewHeader.js
+++ b/src/modules/tpm/NewHeader.js
@@ -815,7 +815,7 @@ class NewHeader extends Component {
this.educoderlogin()} className="mr5 color-grey-6">登录
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.register_url &&
- 注册
+ 注册
}
: user.login === "" ?
@@ -823,7 +823,7 @@ class NewHeader extends Component {
this.educoderlogin()} className="mr5 color-grey-6">登录
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.register_url &&
- 注册
+ 注册
}
:
diff --git a/src/modules/user/LoginRegisterComponent.js b/src/modules/user/LoginRegisterComponent.js
index db369458..a19dcc3b 100644
--- a/src/modules/user/LoginRegisterComponent.js
+++ b/src/modules/user/LoginRegisterComponent.js
@@ -1,1308 +1,118 @@
-import React, {Component} from 'react';
-import {setmiyah,broadcastChannelPostMessage} from 'educoder';
-import {Tabs, Input, Checkbox, Button, notification,Menu} from 'antd';
-import passopen from '../../../src/images/login/passopen.png';
-import passoff from '../../../src/images/login/passoff.png';
+import React, { Component } from 'react';
+import { Input, Form, Button, notification, Menu } from 'antd';
import axios from 'axios';
-import CheckInputysl1 from './CheckInputysl';
-import CheckInputysl2 from './CheckInputysl';
-import Notcompletedysl from './Notcompletedysl';
-import './common.css'
-import './commontwo.css'
-const { TabPane } = Tabs;
-const loginInputsyl = {
- "width":"434px",
- "height": "462px",
- "-webkit-box-shadow": "3px 10px 21px 0px rgba(76,76,76,0.15)",
- "box-shadow": "3px 10px 21px 0px rgba(76,76,76,0.15)",
- "border-radius": "6px",
- "background": "#fff"
-}
-
-//父组件EducoderLogin.js
+import './register.css';
class LoginRegisterComponent extends Component {
constructor(props) {
- super(props)
-
-
- //
- // console.log("LoginRegisterComponent");
- // console.log("29");
- // console.log(props.loginstatus);
- if(props.loginstatus === true){
- // console.log(props.loginstatus);
- this.state = {
- tab:["0"],
- 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,
- 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);
- 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
- }
+ super(props);
+ this.state = {
+ password:undefined,
+ Rpassword:undefined
}
}
- //判断是否是手机端
- IsPC=()=> {
- var userAgentInfo = navigator.userAgent;
- var Agents = ["Android", "iPhone",
- "SymbianOS", "Windows Phone",
- "iPad", "iPod"];
- var flag = true;//这个意思是说自己的是pc 端
- for (var v = 0; v < Agents.length; v++) {
- if (userAgentInfo.indexOf(Agents[v]) > 0) {
- flag = false;
- break;
- }
- }
- return flag;
- }
-// 点击表单后,改变type
- changeType = () => {
- this.setState({classpass: 'password'});
- }
- IsPC=()=>{
- var userAgentInfo = navigator.userAgent;
- var Agents = ["Android", "iPhone",
- "SymbianOS", "Windows Phone",
- "iPad", "iPod"];
- var flag = true;
- for (var v = 0; v < Agents.length; v++) {
- if (userAgentInfo.indexOf(Agents[v]) > 0) {
- flag = false;
- break;
- }
- }
- return flag;
- }
- componentDidMount = () => {
- let flag = this.IsPC(); //true为PC端,false为手机端
- this.setState({
- isphone:flag
- })
- // console.log("componentDidUpdate");
- // console.log(this.props);
- let pcipns=this.IsPC();
- if (this.props.match.url === "/login") {
-
- // this.state = {
- // tab:["0"],
- //
- // }
- this.setState({
- tab:["0"]
- })
- } else if (this.props.match.url === "/register") {
-
- // this.state = {
- // tab:["1"],
- //
- // }
- this.setState({
- tab:["1"]
- })
- }
- this.setState({
- pciphone:pcipns,
- })
-
-
- }
- openNotification = (messge,type) => {
- // type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色
+ openNotification = (messge) => {
notification.open({
- message: "提示",
- description: messge,
- onClick: () => {
-
- },
- });
- }
- openNotifications = (btn) => {
- // type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色
- notification.open({
- message: "提示",
- description: btn,
- onClick: () => {
-
- },
+ message: '提示',
+ description:messge,
});
}
-
- StudyMakeMoney = () => { // 调用父组件方法
-
- // this.props.Setlogins(3);
- this.setState({
- login: "",
- password: "",
- logins: "",
- passwords: "",
- codes: "",
- });
- try {
- this.props.Setshowbool(3);
- }catch (e) {
-
- }
- }
- onTabChange = (activeKey) => {
-
- }
- // -------------------- LOGIN START
- //下次自动登入
- onAutoLoginChange = (e) => {
- this.setState({autoLogin: e.target.checked})
- }
-
- // -------------------- LOGIN END
-
- isCorrectname = (value, id) => {
- if (id === 1) {
-
- if (value.length === 0) {
- this.setState({
- Phonenumberisnotco: undefined,
- Phonenumberisnotcobool: false,
- })
- return;
- }
- } else if (id === 2) {
- if (value.length === 0) {
- this.setState({
- Phonenumberisnotcos: undefined,
- Phonenumberisnotcobool: false,
- })
- return;
- }
- }
- this.Emailphonenumberverification(value, id)
-
- }
- // -------------------- REGISTER START
- onReadAgreementChange = (e) => {
- this.setState({readAgreement: e.target.checked})
- }
- //是否验证通过
- dragOkCallback = () => {
- this.setState({
- Phonenumberisnotcosytdhk:undefined,
- })
- if (this.state.logins.length === 0) {
- this.setState({
- Phonenumberisnotcos:"账号不能为空",
- Phonenumberisnotcobool: true,
- dragOk:false,
- Whethertoverify:this.state.Whethertoverify===true?false:true,
- })
-
-
- return;
- }
- // var telephone = $("#telephoneAdd.tianjia_phone").val();
- var regph = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
- // var email = $("#add_email.tianjia_email").val();
- var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
-
- // [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。
- var stringdata = undefined;
- if (!regph.test(this.state.logins)) {
- stringdata = "手机号格式不正确";
- this.setState({
- Phonenumberisnotcos: undefined,
- Phonenumberisnotcobool: false,
- dragOk:true,
- })
-
- } else {
- this.setState({
- Phonenumberisnotcos: undefined,
- Phonenumberisnotcobool: false,
- dragOk:true,
- });
- this.Emailphonenumberverification(this.state.logins, 2);
- return
- }
-
- if (!regemail.test(this.state.logins)) {
- if ((this.state.logins.indexOf("@") != -1) === true) {
- stringdata = "邮箱格式不正确";
- } else {
- stringdata = "手机号格式不正确";
-
- }
- this.setState({
- Phonenumberisnotcos: stringdata,
- Phonenumberisnotcobool: true,
- dragOk:false,
- Whethertoverify:this.state.Whethertoverify===true?false:true,
- });
-
-
- return
- } else {
-
- this.setState({
- Phonenumberisnotcos: undefined,
- Phonenumberisnotcobool: false,
- dragOk:true,
- })
- this.Emailphonenumberverification(this.state.logins, 2);
- return
- }
-
- this.setState({
- Phonenumberisnotcosytdhk:undefined,
- })
- this.Emailphonenumberverification(this.state.logins, 2)
-
- }
- // -------------------- REGISTER END
-
- //是否同意
- onChange = (e) => {
- this.setState({
- Agreetotheterms: e.target.checked,
- })
- }
-
- //登入接口
- postLogin = () => {
-
- if (this.state.login === undefined || this.state.login == "") {
- this.setState({
- Phonenumberisnotco:"账号不能为空",
- })
- return
- } else if (this.state.password === undefined || this.state.password == "") {
- this.setState({
- Phonenumberisnotcodmm:"密码不能为空",
- })
- return
- }
- var url = "/accounts/login.json";
- axios.post(url, {
- login: this.state.login,
- password: this.state.password,
- }).then((response) => {
-
- if (response === undefined) {
- return
- }
-
- if(response.data.status === -2){
- if(response.data.message==="该手机号尚未注册" || response.data.message==="该邮箱尚未注册"){
- this.setState({
- Phonenumberisnotco:response.data.message,
- })
- return;
- }
- else if(response.data.message==="错误的账号或密码"){
- this.setState({
- Phonenumberisnotcodmms:response.data.message,
- })
- return;
- }
- else if(response.data.message==="违反平台使用规范,账号已被锁定"){
- this.setState({
- Phonenumberisnotco:response.data.message,
- })
-
- return;
- } else if (response.data.message === "登录密码出错已达上限,账号已被锁定, 请10分钟后重新登录或找回密码") {
- const messge = (
-
-
- 登录密码出错已达上限,账号已被锁定;
-
-
- 请10分钟后重新登录或找回密码
-
-
- )
- this.openNotifications(messge);
- return;
- } else {
- this.openNotification(response.data.message);
- return;
- }
-
-
- }
-
- // if(response.data.profile_completed !== null || response.data.profile_completed === false){
- // this.setMyEduCoderModals();
- // return;
- // }
-
- if (response.status === 200) {
- if (response.data.status === 402) {
- window.location.href = response.data.url;
- } else {
- broadcastChannelPostMessage('refreshPage')
- this.setState({
- isRender: false
- })
- var weekArray = JSON.parse(window.sessionStorage.getItem('yslgeturls'));
- if(weekArray===undefined){
- weekArray="/";
- }
- if(weekArray===null){
- weekArray="/";
- }
- if(weekArray==="null"){
- weekArray="/";
- }
- window.location.href = weekArray;
- }
- }
-
-
- }).catch((error) => {
-
- })
-
- }
//注册接口
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) {
- this.setState({
- Phonenumberisnotcos:"账号不能为空",
- Phonenumberisnotcobool: true,
- dragOk:false,
- Whethertoverify:this.state.Whethertoverify===true?false:true,
- })
- return
- }
- if(this.state.pciphone===true){
- if (this.state.dragOk === false) {
- // this.openNotification(`请拖动滑块完成验证`,2);
- this.setState({
- Phonenumberisnotcosytdhk:"请拖动滑块完成验证",
- dragOk:false,
- Whethertoverify:this.state.Whethertoverify===true?false:true,
- })
- return
- }
- }
-
- if (this.state.codes === undefined || this.state.codes == ""||this.state.codes.length===0) {
- // this.openNotification(`请输入验证码`,2);
- this.setState({
- Phonenumberisnotcosyzm:"验证码不能为空",
- })
- return
- } else if (this.state.passwords === undefined || this.state.passwords == "" ||this.state.passwords.length===0) {
- this.setState({
- Phonenumberisnotcosymmm:"密码不能为空",
- })
- return
- } else if (this.state.passwords !==undefined &&this.state.passwords.length>0&&this.state.passwords.length<8){
- this.setState({
- Phonenumberisnotcosymmm:"密码不能少于8位",
- })
- return
- } else if (this.state.passwords !==undefined &&this.state.passwords.length>0&&this.state.passwords.length>16){
- this.setState({
- Phonenumberisnotcosymmm:"密码不能超过16位",
- })
- return
- } else if (this.state.Agreetotheterms === false) {
- this.openNotification(`请同意服务协议条款`,2);
- return;
- }
-
- let url;
- if(this.props.weixinlogin){
- url= '/weapps/register.json';
- }else{
- url = "/accounts/register.json";
- }
-
- axios.post(url, {
- login: this.state.logins,
- password: this.state.passwords,
- code: this.state.codes,
- }).then((result) => {
- if(result){
- if(result.data.status===-2){
- if(result.data.message==="验证码不正确"){
- this.setState({
- Phonenumberisnotcosyzm:"验证码不正确",
- })
-
- return;
- }else if(result.data.message==="验证码已失效"){
- this.setState({
- Phonenumberisnotcosyzm:"验证码不正确",
- })
-
- return;
- }else {
- this.openNotification(result.data.message);
- return;
+ this.props.form.validateFieldsAndScroll((err, values) => {
+ if(!err){
+ const url = `/accounts/register.json`;
+ axios.post(url,{
+ ...values
+ }).then(result=>{
+ if(result){
+ this.openNotification("注册成功,现在可以登录啦!");
+ this.props.history.push('/')
}
- }else {
- // this.setState({
- // logins: "",
- // dragOk: false,
- // codes: "",
- // passwords: "",
- // Agreetotheterms: "",
- // })
- this.setMyEduCoderModals();
- }
+ }).catch(error=>{this.openNotification("注册失败,请稍后再试!")})
}
- }).catch((error) => {
-
})
}
- //邮箱手机号验证
- Emailphonenumberverification = (value, id) => {
- var url = `/accounts/valid_email_and_phone.json`;
- axios.get((url), {
- params: {
- login: value,
- type: 1,
- }
- }).then((result) => {
-
- //验证有问题{"status":1,"message":"success"}
- // console.log(result);
- // this.setState({dragOk: true})
-
- if(result){
- if(result.data.status===-2){
- if (id === 1) {
- if(result.data.message==="该手机号码或邮箱已被注册"){
- this.setState({
- Phonenumberisnotco: undefined,
- Phonenumberisnotcobool: false,
- dragOk:true,
- })
- }else {
- this.setState({
- Phonenumberisnotco: result.data.message,
- Phonenumberisnotcobool: true,
- dragOk:false,
- Whethertoverify:this.state.Whethertoverify===true?false:true,
- })
-
-
- }
- return;
- } else if (id === 2) {
- this.setState({
- Phonenumberisnotcos: result.data.message,
- Phonenumberisnotcobool: true,
- dragOk:false,
- Whethertoverify:this.state.Whethertoverify===true?false:true,
- })
-
-
- return;
- }
- }else {
- if (id === 1) {
- this.setState({
- Phonenumberisnotco: undefined,
- Phonenumberisnotcobool: false,
- dragOk:true,
- })
- return;
- } else if (id === 2) {
- this.setState({
- Phonenumberisnotcos: undefined,
- Phonenumberisnotcobool: false,
- dragOk:true,
- })
- return;
- }
- }
- }
-
- }).catch((error) => {
-
- })
- };
- //短信验证
- SMSverification = () => {
- let logins=this.state.logins;
- var url = `/accounts/get_verification_code.json`;
- axios.get((url), {
- params: {
- login: this.state.logins,
- type: 1,
- smscode:setmiyah(logins)
- }
- }).then((result) => {
- //验证有问题{"status":1,"message":"success"}
- // console.log(result);
- if(result.data.status===1){
- this.openNotification("验证码已发送,请注意查收");
- }else if(result.data.status===-2){
- this.openNotification(result.data.message);
- }
- }).catch((error) => {
-
-
- })
- }
- //显示和不显示密码
- Showandhide = (e) => {
-
- if (this.state.classpassbool === true) {
- this.setState({
- passopens:passoff ,
- classpass: "text",
- classpassbool: false,
- })
- } else {
- this.setState({
- passopens: passopen ,
- classpass: "password",
- classpassbool: true,
- })
- }
-
- }
-
- //倒计时
- getverificationcode = () => {
- // console.log(this.state.Phonenumberisnotcobool);
- // console.log(this.state.dragOk);
- if(this.state.logins === undefined || this.state.logins.length===0){
- this.openNotification("请输入手机号或邮箱");
- return;
- }
- //这是判断是否手机正确
- if(this.state.Phonenumberisnotcobool === true){
- this.openNotification(this.state.Phonenumberisnotcos);
- this.setState({
- Whethertoverify:this.state.Whethertoverify===true?false:true,
- })
- return;
- }
- if(this.state.pciphone===true) {
- if (this.state.dragOk === false) {
- this.openNotification("请拖动滑块验证");
- return;
- }
- }
-
- if (this.state.getverificationcodes === true) {
- this.setState({
- getverificationcodes: undefined,
- })
- let timer = setInterval(() => {
- this.setState((preState) => ({
- seconds: preState.seconds - 1,
- }), () => {
- if (this.state.seconds == 0) {
- clearInterval(timer);
- this.setState({
- getverificationcodes: false,
- seconds: 60,
- })
- }
- });
- }, 1000)
- this.SMSverification();
- } else {
- this.setState({
- getverificationcodes: undefined,
- })
- let timer = setInterval(() => {
- this.setState((preState) => ({
- seconds: preState.seconds - 1,
- }), () => {
- if (this.state.seconds == 0) {
- clearInterval(timer);
- this.setState({
- getverificationcodes: false,
- seconds: 60,
-
- })
- }
- });
- }, 1000)
- this.SMSverification();
- }
- }
- //滑动验证手机号
-
- //获取登入
- loginInputonChange = (e) => {
- // console.log(e.target.value);
- var stirngt;
- if(e.target.value.length>0){
- var str= e.target.value.replace(/\s*/g,"")
- stirngt=str;
- }else{
- stirngt= e.target.value;
- }
-
- if (e.target.value.length === 0) {
- this.setState({
- Phonenumberisnotco: undefined,
- Phonenumberisnotcobool: false,
- Phonenumberisnotcodmms:undefined,
- login: stirngt,
- })
- }else{
- this.setState({
- login: stirngt,
- Phonenumberisnotco:undefined,
- Phonenumberisnotcodmms:undefined,
- })
- }
-
- }
- //失去焦点判断
- inputOnBlur = (e, id) => {
- this.Emailphonenumberverification(e.target.value, 1);
- }
- inputOnBlurzhuche = (e, id) => {
- if (e.target.value.length === 0) {
- this.setState({
- Phonenumberisnotcos: undefined,
- Phonenumberisnotcobool: false,
- })
- return;
- }
- // var telephone = $("#telephoneAdd.tianjia_phone").val();
- var regph = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
- // var email = $("#add_email.tianjia_email").val();
- var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
-
- // [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。
- var stringdata = undefined;
- if (!regph.test(e.target.value)) {
- stringdata = "手机号格式不正确";
- this.setState({
- Phonenumberisnotcos: stringdata,
- Phonenumberisnotcobool: true,
- dragOk:false,
- Whethertoverify:this.state.Whethertoverify===true?false:true,
- })
- } else {
- this.setState({
- Phonenumberisnotcos: undefined,
- Phonenumberisnotcobool: false,
-
- })
- return
- }
-
- if (!regemail.test(e.target.value)) {
- if ((e.target.value.indexOf("@") != -1) === true) {
- stringdata = "邮箱格式不正确";
- } else {
- stringdata = "手机号格式不正确";
-
- }
- this.setState({
- Phonenumberisnotcos: stringdata,
- Phonenumberisnotcobool: true,
- dragOk:false,
- Whethertoverify:this.state.Whethertoverify===true?false:true,
- })
- return
- } else {
- this.setState({
- Phonenumberisnotcos: undefined,
- Phonenumberisnotcobool: false,
-
- })
- this.Emailphonenumberverification(e.target.value, id);
- return
- }
- this.Emailphonenumberverification(e.target.value, id);
- }
- //获取登入密码
- passwordonChange = (e) => {
- // console.log(e.target.value);
- var stirngt;
- if(e.target.value.length>0){
- var str= e.target.value.replace(/\s*/g,"")
- stirngt=str;
- }else{
- stirngt= e.target.value;
- }
+ changeFirst=(e)=>{
this.setState({
- password: stirngt,
- Phonenumberisnotcodmm:undefined,
- Phonenumberisnotcodmms:undefined,
+ password:e.target.value
})
- // this.setState({
- // password: e.target.value
- // })
}
- //获取注册登入
- loginInputonChanges = (e) => {
-
- var stirngt;
- if(e.target.value.length>0){
- var str= e.target.value.replace(/\s*/g,"")
- stirngt=str;
+ changeSecond=(e)=>{
+ this.setState({
+ Rpassword:e.target.value
+ })
+ }
+ checkPass=(rule, value, callback)=>{
+ const { Rpassword } = this.state;
+ if(!value){
+ callback("请输入密码!");
+ }
+ else if(value.length < 8 || value.length>16){
+ callback("请输入8至16位的密码!");
+ }
+ else if(Rpassword && value !== Rpassword){
+ callback("两次输入的密码不一致!");
}else{
- stirngt= e.target.value;
+ callback();
}
- if (e.target.value.length === 0) {
- this.setState({
- Phonenumberisnotcos: undefined,
- Phonenumberisnotcobool: false,
- logins: stirngt,
- dragOk:false,
- Whethertoverify:this.state.Whethertoverify===true?false:true,
- })
+ }
+ checkreplyPass=(rule, value, callback)=>{
+ const { password } = this.state;
+ if(!value){
+ callback("请再一次输入密码!");
+ }
+ else if(value.length<8 || value.length>16){
+ callback("请输入8至16位的密码!");
+ }
+ else if(value !== password){
+ callback("两次输入的密码不一致!");
}else{
- this.setState({
- logins: stirngt,
- Phonenumberisnotcos: undefined,
- dragOk:false,
- Whethertoverify:this.state.Whethertoverify===true?false:true,
- })
+ callback();
}
-
}
- //获取注册密码
- passwordonChanges = (e) => {
- // console.log(e.target.value);
- var stirngt;
- if(e.target.value.length>0){
- var str= e.target.value.replace(/\s*/g,"")
- stirngt=str;
- }else{
- stirngt= e.target.value;
- }
- this.setState({
- passwords: stirngt,
- Phonenumberisnotcosymmm:undefined,
- })
- }
- //获取code
- codesonChange = (e) => {
- this.setState({
- codes: e.target.value,
- Phonenumberisnotcosyzm:undefined,
- })
- }
- //切换tab
- changeTab=(e)=>{
- this.setState({
- tab:e.key
- })
-
- if(e.key === 0){
- this.setState({
- Phonenumberisnotcos:undefined
- })
- }else{
- this.setState({
- 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=()=>{
- 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() {
- const {
- // 登录
- autoLogin,
- classpass,
- passopens,
- seconds,
- getverificationcodes,
- Agreetotheterms,
- Phonenumberisnotco,
- Phonenumberisnotcos,
- codes,
- tab,
- dragOk,
- Whethertoverify,
- classpassbool,
- Phonenumberisnotcosytdhk,
- Phonenumberisnotcosyzm,
- Phonenumberisnotcosymmm,
- Phonenumberisnotcodmm,
- // 注册
- readAgreement,
- pciphone,
- Phonenumberisnotcodmms,
- weixinlogin
- } = this.state
- // height: 346px;
- if (this.state.seconds === 0) {
- // window.location.href='http://www.cnblogs.com/a-cat/';
- }
-
-
+ const { getFieldDecorator } = this.props.form;
return (
+
-
-
-
-
- {weixinlogin===false&&this.props.weixinlogin===undefined?
:""}
-
- {
- weixinlogin===false&&parseInt(tab[0])==0 &&
-
-
-
-
this.inputOnBlur(e, 1)}
- style={{marginTop: '30px', height: '38px'}}
- onPressEnter={() => this.postLogin()}
- >
-
- {
- Phonenumberisnotco && Phonenumberisnotco != "" ?
-
- {Phonenumberisnotco}
-
- :
- }
-
-
this.postLogin()}
- className={Phonenumberisnotcodmm && Phonenumberisnotcodmm !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
- placeholder="密码">
- {
- Phonenumberisnotcodmm && Phonenumberisnotcodmm != "" ?
-
- {Phonenumberisnotcodmm}
-
- : (Phonenumberisnotcodmms=== undefined?
:"")
- }
- {
- Phonenumberisnotcodmms && Phonenumberisnotcodmms != "" ?
-
- {Phonenumberisnotcodmms}
-
- : ""
- }
-
-
-
-
- {this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?this.state.isphone===true?
-
- ———————— 快速登录 ————————
-
- :
- ———————— 快速登录 ————————
-
- :""}
-
- }
-
-
-
- {
- weixinlogin===false&&parseInt(tab[0])==1 &&
-
-
this.inputOnBlurzhuche(e, 2)}
- style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}>
- {
- Phonenumberisnotcos && Phonenumberisnotcos !== "" ?
-
- {Phonenumberisnotcos}
-
- :
-
- }
- {this.state.MyEduCoderModals===true?
{this.setNotcompleteds()}}
- />:""}
-
- {
- Whethertoverify===false&&pciphone===true?
-
-
- :
- ""
-
- }
- {
- Whethertoverify===true&&pciphone===true?
-
-
- :
- ""
- }
-
-
- {
- pciphone===true?
- (
- Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !== "" ?
-
- {Phonenumberisnotcosytdhk}
-
- :
-
- )
- :""
- }
-
-
-
-
-
-
-
-
- {
- getverificationcodes === undefined ?
-
- : getverificationcodes === true ?
-
- :
-
- }
-
-
-
- {
- Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?
-
- {Phonenumberisnotcosyzm}
-
- :
-
- }
-
-
-
-
-
- this.Showandhide(key)}>
-
- }>
- {
- Phonenumberisnotcosymmm && Phonenumberisnotcosymmm !== "" ?
-
- {Phonenumberisnotcosymmm}
-
- :
-
- }
- {this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?我已阅读并同意
-
- 《服务协议条款》
- :""}
-
-
- {this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?this.state.isphone===true?
-
- ———————— 快速登录 ————————
-
- :
- ———————— 快速登录 ————————
-
- :""
- }
-
- }
-
-
-
-
- {weixinlogin===true?
:""}
- {weixinlogin===true?
- this.hideweixinlogin()}>返回登录注册
-
:""}
-
-
-
+
+
+
+ {getFieldDecorator("login", {
+ rules: [{
+ required: true,
+ message: "请输入邮箱地址",
+ }],
+ })()}
+
+
+ {getFieldDecorator("password", {
+ rules: [{
+ validator:this.checkPass
+ }],
+ })()}
+
+
+ {getFieldDecorator("passagain", {
+ rules: [{
+ validator:this.checkreplyPass
+ }],
+ })()}
+
+
+
+
+
);
}
}
-
-export default (LoginRegisterComponent);
+const WrappedNewMerge = Form.create({ name: "NewMergeForm" })(LoginRegisterComponent);
+export default WrappedNewMerge;
diff --git a/src/modules/user/register.css b/src/modules/user/register.css
new file mode 100644
index 00000000..54ae7644
--- /dev/null
+++ b/src/modules/user/register.css
@@ -0,0 +1,22 @@
+.registerPanel{
+ padding:20px 40px 25px 40px;
+}
+.registerPanel input{
+ height: 40px;
+}
+.registerPanel .ant-row.ant-form-item{
+ margin-bottom: 25px;
+}
+.registerPanel .ant-form.ant-form-horizontal{
+ margin-top: 20px;
+}
+.registerPanel .ant-menu-item{
+ margin-left: 0px!important;
+ padding: 0px;
+}
+.ant-form-explain{
+ position: absolute;
+}
+form .has-feedback .ant-input-affix-wrapper .ant-input-suffix{
+ padding-right: 0px!important;
+}
\ No newline at end of file
From b27f0e796d1a91b2c1162168b26f159c69426c6c Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Wed, 25 Nov 2020 12:39:59 +0800
Subject: [PATCH 2/3] ===
---
src/modules/tpm/challengesnew/TPMevaluation.js | 2 +-
src/modules/user/LCCountDownButton.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules/tpm/challengesnew/TPMevaluation.js b/src/modules/tpm/challengesnew/TPMevaluation.js
index 901d3997..499cedd2 100644
--- a/src/modules/tpm/challengesnew/TPMevaluation.js
+++ b/src/modules/tpm/challengesnew/TPMevaluation.js
@@ -580,7 +580,7 @@ export default class TPMevaluation extends Component {
}else{
let sum=parseInt(100/newevaluationlist.length);
for(var i=0; i
Date: Wed, 25 Nov 2020 17:25:59 +0800
Subject: [PATCH 3/3] babel
---
.babelrc | 8 ++
package-lock.json | 228 ++++++++++++++++++++++++++++++++++++++++++++--
package.json | 6 +-
src/App.js | 8 +-
src/AppConfig.js | 2 +-
5 files changed, 237 insertions(+), 15 deletions(-)
create mode 100644 .babelrc
diff --git a/.babelrc b/.babelrc
new file mode 100644
index 00000000..15663e45
--- /dev/null
+++ b/.babelrc
@@ -0,0 +1,8 @@
+{
+ "presets": [
+ "es2015",
+ "react",
+ "stage-2"
+ ],
+ "plugins": []
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 2c5f2c41..5f8e7844 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1254,6 +1254,55 @@
"ast-types-flow": "0.0.7"
}
},
+ "babel-cli": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npm.taobao.org/babel-cli/download/babel-cli-6.26.0.tgz",
+ "integrity": "sha1-UCq1SHTX24itALiHoGODzgPQAvE=",
+ "dev": true,
+ "requires": {
+ "babel-core": "^6.26.0",
+ "babel-polyfill": "^6.26.0",
+ "babel-register": "^6.26.0",
+ "babel-runtime": "^6.26.0",
+ "chokidar": "^1.6.1",
+ "commander": "^2.11.0",
+ "convert-source-map": "^1.5.0",
+ "fs-readdir-recursive": "^1.0.0",
+ "glob": "^7.1.2",
+ "lodash": "^4.17.4",
+ "output-file-sync": "^1.1.2",
+ "path-is-absolute": "^1.0.1",
+ "slash": "^1.0.0",
+ "source-map": "^0.5.6",
+ "v8flags": "^2.1.1"
+ },
+ "dependencies": {
+ "chokidar": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-1.7.0.tgz?cache=0&sync_timestamp=1602585438968&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-1.7.0.tgz",
+ "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "anymatch": "^1.3.0",
+ "async-each": "^1.0.0",
+ "fsevents": "^1.0.0",
+ "glob-parent": "^2.0.0",
+ "inherits": "^2.0.1",
+ "is-binary-path": "^1.0.0",
+ "is-glob": "^2.0.0",
+ "path-is-absolute": "^1.0.0",
+ "readdirp": "^2.0.0"
+ }
+ },
+ "source-map": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz",
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
+ "dev": true
+ }
+ }
+ },
"babel-code-frame": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
@@ -1273,7 +1322,7 @@
},
"babel-core": {
"version": "6.26.0",
- "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/babel-core/download/babel-core-6.26.0.tgz",
"integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=",
"requires": {
"babel-code-frame": "^6.26.0",
@@ -1299,8 +1348,8 @@
"dependencies": {
"debug": {
"version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1605791507452&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz",
+ "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=",
"requires": {
"ms": "2.0.0"
}
@@ -1345,6 +1394,17 @@
}
}
},
+ "babel-helper-bindify-decorators": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npm.taobao.org/babel-helper-bindify-decorators/download/babel-helper-bindify-decorators-6.24.1.tgz",
+ "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0",
+ "babel-traverse": "^6.24.1",
+ "babel-types": "^6.24.1"
+ }
+ },
"babel-helper-builder-binary-assignment-operator-visitor": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz",
@@ -1397,6 +1457,18 @@
"babel-types": "^6.24.1"
}
},
+ "babel-helper-explode-class": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npm.taobao.org/babel-helper-explode-class/download/babel-helper-explode-class-6.24.1.tgz",
+ "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=",
+ "dev": true,
+ "requires": {
+ "babel-helper-bindify-decorators": "^6.24.1",
+ "babel-runtime": "^6.22.0",
+ "babel-traverse": "^6.24.1",
+ "babel-types": "^6.24.1"
+ }
+ },
"babel-helper-function-name": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz",
@@ -1585,11 +1657,23 @@
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz",
"integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU="
},
+ "babel-plugin-syntax-async-generators": {
+ "version": "6.13.0",
+ "resolved": "https://registry.npm.taobao.org/babel-plugin-syntax-async-generators/download/babel-plugin-syntax-async-generators-6.13.0.tgz",
+ "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=",
+ "dev": true
+ },
"babel-plugin-syntax-class-properties": {
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz",
"integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94="
},
+ "babel-plugin-syntax-decorators": {
+ "version": "6.13.0",
+ "resolved": "https://registry.npm.taobao.org/babel-plugin-syntax-decorators/download/babel-plugin-syntax-decorators-6.13.0.tgz",
+ "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=",
+ "dev": true
+ },
"babel-plugin-syntax-dynamic-import": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz",
@@ -1620,6 +1704,17 @@
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz",
"integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM="
},
+ "babel-plugin-transform-async-generator-functions": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npm.taobao.org/babel-plugin-transform-async-generator-functions/download/babel-plugin-transform-async-generator-functions-6.24.1.tgz",
+ "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=",
+ "dev": true,
+ "requires": {
+ "babel-helper-remap-async-to-generator": "^6.24.1",
+ "babel-plugin-syntax-async-generators": "^6.5.0",
+ "babel-runtime": "^6.22.0"
+ }
+ },
"babel-plugin-transform-async-to-generator": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz",
@@ -1641,6 +1736,19 @@
"babel-template": "^6.24.1"
}
},
+ "babel-plugin-transform-decorators": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npm.taobao.org/babel-plugin-transform-decorators/download/babel-plugin-transform-decorators-6.24.1.tgz",
+ "integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=",
+ "dev": true,
+ "requires": {
+ "babel-helper-explode-class": "^6.24.1",
+ "babel-plugin-syntax-decorators": "^6.13.0",
+ "babel-runtime": "^6.22.0",
+ "babel-template": "^6.24.1",
+ "babel-types": "^6.24.1"
+ }
+ },
"babel-plugin-transform-es2015-arrow-functions": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz",
@@ -1950,6 +2058,25 @@
"babel-types": "^6.24.1"
}
},
+ "babel-polyfill": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npm.taobao.org/babel-polyfill/download/babel-polyfill-6.26.0.tgz",
+ "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.26.0",
+ "core-js": "^2.5.0",
+ "regenerator-runtime": "^0.10.5"
+ },
+ "dependencies": {
+ "regenerator-runtime": {
+ "version": "0.10.5",
+ "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.10.5.tgz?cache=0&sync_timestamp=1595456367497&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.10.5.tgz",
+ "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=",
+ "dev": true
+ }
+ }
+ },
"babel-preset-env": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.1.tgz",
@@ -1987,6 +2114,38 @@
"semver": "^5.3.0"
}
},
+ "babel-preset-es2015": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npm.taobao.org/babel-preset-es2015/download/babel-preset-es2015-6.24.1.tgz",
+ "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=",
+ "dev": true,
+ "requires": {
+ "babel-plugin-check-es2015-constants": "^6.22.0",
+ "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
+ "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0",
+ "babel-plugin-transform-es2015-block-scoping": "^6.24.1",
+ "babel-plugin-transform-es2015-classes": "^6.24.1",
+ "babel-plugin-transform-es2015-computed-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-destructuring": "^6.22.0",
+ "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1",
+ "babel-plugin-transform-es2015-for-of": "^6.22.0",
+ "babel-plugin-transform-es2015-function-name": "^6.24.1",
+ "babel-plugin-transform-es2015-literals": "^6.22.0",
+ "babel-plugin-transform-es2015-modules-amd": "^6.24.1",
+ "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",
+ "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1",
+ "babel-plugin-transform-es2015-modules-umd": "^6.24.1",
+ "babel-plugin-transform-es2015-object-super": "^6.24.1",
+ "babel-plugin-transform-es2015-parameters": "^6.24.1",
+ "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-spread": "^6.22.0",
+ "babel-plugin-transform-es2015-sticky-regex": "^6.24.1",
+ "babel-plugin-transform-es2015-template-literals": "^6.22.0",
+ "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0",
+ "babel-plugin-transform-es2015-unicode-regex": "^6.24.1",
+ "babel-plugin-transform-regenerator": "^6.24.1"
+ }
+ },
"babel-preset-flow": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz",
@@ -2005,7 +2164,7 @@
},
"babel-preset-react": {
"version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.24.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/babel-preset-react/download/babel-preset-react-6.24.1.tgz",
"integrity": "sha1-umnfrqRfw+xjm2pOzqbhdwLJE4A=",
"requires": {
"babel-plugin-syntax-jsx": "^6.3.13",
@@ -2036,6 +2195,31 @@
"babel-preset-react": "6.24.1"
}
},
+ "babel-preset-stage-2": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npm.taobao.org/babel-preset-stage-2/download/babel-preset-stage-2-6.24.1.tgz",
+ "integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=",
+ "dev": true,
+ "requires": {
+ "babel-plugin-syntax-dynamic-import": "^6.18.0",
+ "babel-plugin-transform-class-properties": "^6.24.1",
+ "babel-plugin-transform-decorators": "^6.24.1",
+ "babel-preset-stage-3": "^6.24.1"
+ }
+ },
+ "babel-preset-stage-3": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npm.taobao.org/babel-preset-stage-3/download/babel-preset-stage-3-6.24.1.tgz",
+ "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=",
+ "dev": true,
+ "requires": {
+ "babel-plugin-syntax-trailing-function-commas": "^6.22.0",
+ "babel-plugin-transform-async-generator-functions": "^6.24.1",
+ "babel-plugin-transform-async-to-generator": "^6.24.1",
+ "babel-plugin-transform-exponentiation-operator": "^6.24.1",
+ "babel-plugin-transform-object-rest-spread": "^6.22.0"
+ }
+ },
"babel-register": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz",
@@ -6888,6 +7072,12 @@
"minipass": "^3.0.0"
}
},
+ "fs-readdir-recursive": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npm.taobao.org/fs-readdir-recursive/download/fs-readdir-recursive-1.1.0.tgz",
+ "integrity": "sha1-4y/AMKLM7kSmtTcTCNpUvgs5fSc=",
+ "dev": true
+ },
"fs-write-stream-atomic": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz",
@@ -11339,6 +11529,17 @@
"os-tmpdir": "^1.0.0"
}
},
+ "output-file-sync": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npm.taobao.org/output-file-sync/download/output-file-sync-1.1.2.tgz",
+ "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.4",
+ "mkdirp": "^0.5.1",
+ "object-assign": "^4.1.0"
+ }
+ },
"p-defer": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
@@ -17010,8 +17211,8 @@
},
"source-map-support": {
"version": "0.4.18",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
- "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
+ "resolved": "https://registry.npm.taobao.org/source-map-support/download/source-map-support-0.4.18.tgz?cache=0&sync_timestamp=1587719517036&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.4.18.tgz",
+ "integrity": "sha1-Aoam3ovkJkEzhZTpfM6nXwosWF8=",
"requires": {
"source-map": "^0.5.6"
},
@@ -18666,6 +18867,12 @@
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
"integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
},
+ "user-home": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npm.taobao.org/user-home/download/user-home-1.1.1.tgz",
+ "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=",
+ "dev": true
+ },
"util": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz",
@@ -18717,6 +18924,15 @@
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz",
"integrity": "sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w=="
},
+ "v8flags": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npm.taobao.org/v8flags/download/v8flags-2.1.1.tgz?cache=0&sync_timestamp=1590964281452&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fv8flags%2Fdownload%2Fv8flags-2.1.1.tgz",
+ "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=",
+ "dev": true,
+ "requires": {
+ "user-home": "^1.1.1"
+ }
+ },
"validate-npm-package-license": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
diff --git a/package.json b/package.json
index 0b17601d..8ac88a09 100644
--- a/package.json
+++ b/package.json
@@ -10,7 +10,6 @@
"array-flatten": "^2.1.2",
"autoprefixer": "7.1.6",
"axios": "^0.18.1",
- "babel-core": "6.26.0",
"babel-eslint": "7.2.3",
"babel-jest": "20.0.3",
"babel-loader": "7.1.2",
@@ -182,7 +181,12 @@
"port": "3007",
"devDependencies": {
"@babel/runtime": "7.0.0-beta.51",
+ "babel-cli": "^6.26.0",
+ "babel-core": "^6.26.0",
"babel-plugin-import": "^1.13.0",
+ "babel-preset-es2015": "^6.24.1",
+ "babel-preset-react": "^6.24.1",
+ "babel-preset-stage-2": "^6.24.1",
"compression-webpack-plugin": "^1.1.12",
"concat": "^1.0.3",
"happypack": "^5.0.1",
diff --git a/src/App.js b/src/App.js
index 041ab5e1..9d24d286 100644
--- a/src/App.js
+++ b/src/App.js
@@ -9,13 +9,7 @@ import {
} from 'react-router-dom';
import axios from 'axios';
import LoginDialog from './modules/login/LoginDialog';
-import Notcompletedysl from './modules/user/Notcompletedysl';
-import Trialapplicationysl from './modules/login/Trialapplicationysl';
-import Trialapplicationreview from './modules/user/Trialapplicationreview';
-import AccountProfile from "./modules/user/AccountProfile";
-import Accountnewprofile from './modules/user/Accountnewprofile';
-import Certifiedprofessional from './modules/modals/Certifiedprofessional';
-
+import 'babel-polyfill';
import Loading from './Loading'
import Loadable from 'react-loadable';
diff --git a/src/AppConfig.js b/src/AppConfig.js
index d387eb1d..20da89ad 100644
--- a/src/AppConfig.js
+++ b/src/AppConfig.js
@@ -27,7 +27,7 @@ if (isDev) {
}
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
- window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
+ window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || ''
}
function clearAllCookie() {
cookie.remove('_educoder_session', { path: '/' });