hjm 6 years ago
commit bac2d56ff1

@ -4,6 +4,7 @@ import axios from 'axios';
import { requestProxy } from "./indexEduplus2RequestProxy";
import { broadcastChannelOnmessage } from 'educoder'
import { notification } from 'antd';
import './index.css'
broadcastChannelOnmessage('refreshPage', () => {
window.location.reload()
})
@ -30,7 +31,7 @@ export function initAxiosInterceptors(props) {
// proxy = "http://testbdweb.trustie.net"
// proxy = "http://testbdweb.educoder.net"
proxy = "https://testeduplus2.educoder.net"
// proxy="http://47.96.87.25:48080"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制
@ -114,6 +115,9 @@ export function initAxiosInterceptors(props) {
notification.open({
message:"提示",
description: response.data.message || '服务器异常,请联系管理员。',
style: {
zIndex: 99999999
},
});
// notification['error']({
// message:"提示",

@ -820,7 +820,7 @@ pop_box_new(htmlvalue, 480, 182);
{this.state.gDialogContentText}
</DialogContentText>
</DialogContent>
<DialogActions id="dialog-actions">
<DialogActions className={"mb20"} id="dialog-actions">
{ this.isSingleButton ? <div className="task-popup-submit clearfix"
style={{ textAlign: 'center' }}>
<a className="task-btn task-btn-orange"

@ -34,3 +34,6 @@ body {
.anticon anticon-paper-clip{
color: #29bd8b !important;
}
.notificationmystyle{
z-index: 99999999;
}

@ -48,16 +48,25 @@ class CoursesBanner extends Component {
isRenders:false,
showTrial:false,
}
console.log("CoursesBanner");
console.log("48");
console.log(props);
}
componentDidMount() {
this.updatabanner()
this.setState({
user_phone_binded :this.props.user_phone_binded,
})
this.onloadupdatabanner()
try {
if(this.props.current_user!==undefined){
this.setState({
user_phone_binded :this.props.current_user.user_phone_binded,
})
}
}catch (e) {
console.log("CoursesBanner 60")
console.log(e)
}
}
onloadupdatabanner=()=>{
this.updatabanner()
}
updatabanner=()=>{
let courseId = this.props.match.params.coursesId;
let url = "/courses/" + courseId + "/top_banner.json"
@ -77,6 +86,8 @@ class CoursesBanner extends Component {
})
}
}else{
this.onloadupdatabanner()
}
})
}
@ -333,7 +344,16 @@ class CoursesBanner extends Component {
render() {
let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state;
try {
if(this.props.current_user!==undefined){
this.setState({
user_phone_binded :this.props.current_user.user_phone_binded,
})
}
}catch (e) {
console.log("CoursesBanner 354")
console.log(e)
}
return (
<div>
<Trialapplication {...this.state} user_phone_binded={user_phone_binded} ></Trialapplication>

@ -1,17 +1,17 @@
import React,{ Component } from "react";
import { WordsBtn } from 'educoder';
import {Tooltip,message,Modal} from 'antd';
import {Tooltip,message,Modal,Spin} from 'antd';
import {Link} from 'react-router-dom';
import axios from 'axios';
import Modals from '../../modals/Modals';
class Startshixuntask extends Component{
constructor(props){
super(props);
this.state = {
startbtn:false
startbtn:false,
isSpin:false,
}
}
@ -60,11 +60,15 @@ class Startshixuntask extends Component{
}
hidestartshixunsreplace=(url)=>{
this.setState({
isSpin:true
})
axios.get(url).then((response) => {
if(response.status===200){
this.setState({
shixunsreplace:false
shixunsreplace:false,
isSpin:false,
})
message.success('重置成功,正在进入实训!');
let path="/shixuns/"+response.data.shixun_identifier+"/challenges";
@ -74,7 +78,8 @@ class Startshixuntask extends Component{
).catch((error) => {
this.setState({
startbtn:false,
shixunsreplace:false
shixunsreplace:false,
isSpin:false,
})
});
@ -120,13 +125,15 @@ class Startshixuntask extends Component{
footer={null}
keyboard={false}
>
<Spin size="large" spinning={isSpin}>
<div className="task-popup-content">
<p className="task-popup-text-center font-16 pb20">实训已经更新了正在为您重置!</p>
</div>
<div className="task-popup-submit clearfix">
<a className="task-btn task-btn-orange fr mr51"
onClick={() => this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了</a>
onClick={() => this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了</a>
</div>
</Spin>
</Modal>
<Modal
title="提示"

@ -2030,7 +2030,7 @@ class Studentshavecompletedthelist extends Component {
//===0 不包括主观题
if (indexi === exercise_users.length) {
//都没评论 不显示评论
if (response.data.poll_types.groups_count > 0) {
if (response.data.exercise_types.groups_count > 0) {
// console.log("77771111111");
//分班大于0显示分班
//7ge
@ -2273,7 +2273,7 @@ class Studentshavecompletedthelist extends Component {
} else {
//已经评论
// response.data.course_groups.length
if (response.data.poll_types.groups_count > 0) {
if (response.data.exercise_types.groups_count > 0) {
//显示分班
//8ge
this.setState({
@ -2546,7 +2546,7 @@ class Studentshavecompletedthelist extends Component {
//包括主观题
if (indexi === exercise_users.length) {
console.log("2548包含主观题不包含分班");
if (response.data.poll_types.groups_count> 0){
if (response.data.exercise_types.groups_count> 0){
this.setState({
data: datalist,
teacherlist: teacherlist,
@ -2837,7 +2837,7 @@ class Studentshavecompletedthelist extends Component {
}
} else {
console.log("2699包含主观题包含分班");
if (response.data.poll_types.groups_count> 0) {
if (response.data.exercise_types.groups_count> 0) {
this.setState({
data: datalist,
teacherlist: teacherlist,

@ -1,5 +1,5 @@
import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Spin} from "antd";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Spin,Tooltip} from "antd";
import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import { WordsBtn,getUrl } from 'educoder';
@ -571,7 +571,7 @@ class GraduationTasksSubmitedit extends Component{
<div className={"fl ml20"}>成员要求25</div>
<Search
className={"fl mt5 ml20"}
style={{width:"20%"}}
style={{width:"270px"}}
placeholder="请输入姓名或学号搜索"
id="subject_search_input"
value={search}
@ -581,26 +581,54 @@ class GraduationTasksSubmitedit extends Component{
></Search>
</div>
<style>{`
.fonthidden{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap
}
.width87{
width: 87px;
height: 24px;
}
img.edu-nodata-img {
width: 200px;
margin: 50px 90px 20px;
display: block;
}
`}</style>
</Form.Item>
<div className={"ml20"} style={{width:"100%"}}>
<div className={"ml20 mt10"} style={{width:"100%"}}>
<div className={"members fl"}
onScroll={this.contentViewScroll}>
<CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}>
{memberslist&&memberslist.members.map((item,key)=>{
{memberslist===undefined?"":memberslist.members.length===0? <div className="square-list clearfix">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">未找到包含{search}的学生</p>
</div>
</div>:memberslist&&memberslist.members.map((item,key)=>{
return(
<div key={key} style={{
width: '375px',
height: '30px'
}}>
<Checkbox value={item.user_id} checked={parseInt(task_status[key])===item.user_id?true:false} disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<div className={"fl ml5"} style={{width: '70px'}}>{item.user_name}</div>
<div className={"fl ml40 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml40 color-grey-9"}>{item.student_id}</div>
<div className={"fl ml40"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div>
<Checkbox value={item.user_id}
checked={
task_status.map((item,key)=>{
return parseInt(task_status[key])===item.user_id?true:false
})
}
disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<Tooltip placement="bottom" title={item.user_name}>
<div className={"fl ml5 fonthidden width87"} style={{width: '70px'}}>{item.user_name}</div>
</Tooltip>
<div className={"fl ml5 fonthidden width87 color-grey-9"} style={{width: '70px'}}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"} style={{width: '70px'}}>{item.student_id}</div>
<div className={"fl ml20"}>{item.commit_status===false?<span className={"color-orange"}>已提交</span> :""}</div>
</div>
)
})}
@ -622,10 +650,12 @@ class GraduationTasksSubmitedit extends Component{
height: '30px',
display:item.user_name===undefined?"none":""
}}>
<div className={"fl ml5"} style={{width: '50px'}}>{item.user_name}</div>
<div className={"fl ml40 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml40 color-grey-9"}>{item.student_id}</div>
{key>0?<div className={"fr"}><i className={"iconfont icon-shanchudiao fl "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""}
<Tooltip placement="bottom" title={item.user_name}>
<div className={"fl ml5 fonthidden width87"} style={{width: '50px'}}>{item.user_name}</div>
</Tooltip>
<div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"}>{item.student_id}</div>
{key>0?<div className={"fl ml20"}><i className={"iconfont icon-shanchudiao fl "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""}
</div>
)
})}

@ -2,7 +2,7 @@ import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Tooltip,Spin} from "antd";
import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import { WordsBtn,getUrl } from 'educoder';
import { WordsBtn,getUrl,getImageUrl} from 'educoder';
import axios from 'axios';
import Modals from '../../../modals/Modals';
const Search = Input.Search;
@ -367,7 +367,6 @@ class GraduationTasksSubmitnew extends Component{
let newlist =memberslist.members;
let newcheckedValues=checkedValues;
let selects=[];
selects.push(selectobjct)
for(var i=0; i<newlist.length; i++){
for(var z=0; z<newcheckedValues.length; z++){
@ -392,6 +391,7 @@ class GraduationTasksSubmitnew extends Component{
let selects=selectmemberslist;
for(var i=0; i<newlist.length; i++){
if(newlist[i]===id){
newlist.splice(i,1)
}
@ -402,6 +402,7 @@ class GraduationTasksSubmitnew extends Component{
selects.splice(z,1)
}
}
this.setState({
task_status:newlist,
selectmemberslist:selects
@ -537,7 +538,7 @@ render(){
<div className={"fl ml20"}>成员要求25</div>
<Search
className={"fl mt5 ml20"}
style={{width:"20%"}}
style={{width:"270px"}}
placeholder="请输入姓名或学号搜索"
id="subject_search_input"
value={search}
@ -556,6 +557,15 @@ render(){
text-overflow:ellipsis;
white-space:nowrap
}
.width87{
width: 87px;
height: 24px;
}
img.edu-nodata-img {
width: 200px;
margin: 50px 90px 20px;
display: block;
}
`}</style>
<div className={"ml20"} style={{width:"100%"}}>
@ -563,17 +573,31 @@ render(){
<div className={"members fl"}
onScroll={this.contentViewScroll}>
<CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}>
{memberslist&&memberslist.members.map((item,key)=>{
{memberslist===undefined?"":memberslist.members.length===0?
<div className="square-list clearfix">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">未找到包含{search}的学生</p>
</div>
</div>:memberslist&&memberslist.members.map((item,key)=>{
return(
<div key={key} style={{
width: '375px',
height: '30px'
}}>
<Checkbox value={item.user_id} checked={parseInt(task_status[key])===item.user_id?true:false} disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<Tooltip placement="bottom" title={item.user_nam}><div className={"fl ml5 fonthidden"} style={{width: '70px'}}>{item.user_name}</div></Tooltip>
<div className={"fl ml40 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml40 color-grey-9"}>{item.student_id}</div>
<div className={"fl ml40"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div>
<Checkbox value={item.user_id} checked={
task_status.map((item,key)=>{
return parseInt(task_status[key])===item.user_id?true:false
})
}
disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<Tooltip placement="bottom" title={item.user_name}>
<div className={"fl ml5 fonthidden width87"}>{item.user_name}</div>
</Tooltip>
<div className={"fl ml5 fonthidden width87 color-grey-9"} title={item.group_name}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"} title={item.student_id}>{item.student_id}</div>
<div className={"fl ml20"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div>
</div>
)
})}
@ -599,12 +623,13 @@ render(){
height: '30px',
display:item.user_name===undefined?"none":""
}}>
<Tooltip placement="bottom" title={item.user_nam}>
<div className={"fl ml5 fonthidden"} style={{width: '50px'}}>{item.user_name}</div>
<Tooltip placement="bottom" title={item.user_name}>
<div className={"fl ml5 fonthidden width87"}>{item.user_name}</div>
</Tooltip>
<div className={"fl ml40 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml40 color-grey-9"}>{item.student_id}</div>
{key>0?<div className={"fr"}><i className={"iconfont icon-shanchudiao fl "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""}
<div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"}>{item.student_id}</div>
{key>0?<div className={"fl ml20"}><i className={"iconfont icon-shanchudiao fl "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""}
</div>
)
})}
@ -627,7 +652,7 @@ render(){
<Form.Item>
<div className="clearfix mt30 mb30">
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">提交</Button>
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">提交</Button>
<a onClick={this.gocannel} className="defalutCancelbtn fl">取消</a>
</div>
</Form.Item>

@ -94,7 +94,7 @@ class GraduationTaskssettinglist extends Component{
for (var i = 0; i < worklists.length; i++) {
datalist.push({
name: worklists[i].name,
number: (parseInt(page)-1)*parseInt(limit)+(i+1),
number: (parseInt(pages)-1)*parseInt(limit)+(i+1),
stduynumber: worklists[i].student_id,
classroom: worklists[i].class_grouping_name,
grouping: result.data.have_grouping === true ? worklists[i].grouping_name : null,
@ -1545,8 +1545,10 @@ class GraduationTaskssettinglist extends Component{
<div id="graduation_work_list" style={{padding:'0px 40px 10px 40px'}}>
<div className="clearfix">
{this.props.isAdmin()?<span className="fl color-grey-6 font-12"><span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span>{taskslistdata&&taskslistdata.work_count} </span>:""}
{this.props.isAdmin()?<div className="fr color-grey-6 edu-menu-panel">
{this.props.isAdmin()===true?<span className="fl color-grey-6 font-12">
<span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span>
个检索结果{taskslistdata&&taskslistdata.work_count} 学生 </span>:""}
{this.props.isAdmin()===true?<div className="fr color-grey-6 edu-menu-panel">
<p>
<a data-remote="true">
{order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序</a>
@ -1562,6 +1564,24 @@ class GraduationTaskssettinglist extends Component{
</div>:""}
</div>
{this.props.isStudent()===true?
<div className="clearfix">
<span className="mr15 color-grey9">
<span className={"color-orange"}>{taskslistdata&&taskslistdata.commit_count}
</span> </span>
<span className="mr15 color-grey9">
<span className={"color-orange"}>{taskslistdata&&taskslistdata.uncommit_count}
</span> </span>
<Tooltip title={taskslistdata&&taskslistdata.left_time.status} placement="bottom">
<span className="mr15 color-grey9">
{taskslistdata&&taskslistdata.left_time.status} :
<span className={"ml10 color-orange"}>
{taskslistdata&&taskslistdata.left_time.time}</span>
</span>
</Tooltip>
</div>
:""}
</div>
{
@ -1781,24 +1801,49 @@ class GraduationTaskssettinglist extends Component{
<div id="graduation_work_list" style={{ padding: '18px 40px 10px',height: '56px'}}>
<div className="clearfix">
<span className="fl color-grey-6 font-12"><span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span>{taskslistdata&&taskslistdata.work_count} </span>
<div className="fr color-grey-6 edu-menu-panel">
<p><a data-remote="true">
{order==="updated_at"?"时间":order==="work_score"?"成绩":order==="student_id"?"学号":""}排序</a><i
className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p>
<ul className="edu-menu-list">
<li onClick={(e)=>this.funorder("updated_at")} className={order==="updated_at"?"none":""}><a data-remote="true">时间</a>
</li>
<li onClick={(e)=>this.funorder("work_score" )} className={order==="work_score"?"none":""}><a data-remote="true">成绩</a>
</li>
<li onClick={(e)=>this.funorder("student_id" )} className={order==="student_id"?"none":""}><a data-remote="true">学号</a>
</li>
</ul>
</div>
</div>
{this.props.isAdmin()===true?
<div className="clearfix">
<span className="fl color-grey-6 font-12">
<span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span>
个检索结果{taskslistdata&&taskslistdata.work_count} 学生
</span>
<div className="fr color-grey-6 edu-menu-panel">
<p><a data-remote="true">
{order==="updated_at"?"时间":order==="work_score"?"成绩":order==="student_id"?"学号":""}排序</a><i
className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p>
<ul className="edu-menu-list">
<li onClick={(e)=>this.funorder("updated_at")} className={order==="updated_at"?"none":""}><a data-remote="true">时间</a>
</li>
<li onClick={(e)=>this.funorder("work_score" )} className={order==="work_score"?"none":""}><a data-remote="true">成绩</a>
</li>
<li onClick={(e)=>this.funorder("student_id" )} className={order==="student_id"?"none":""}><a data-remote="true">学号</a>
</li>
</ul>
</div>
</div>
:""}
{this.props.isStudent()===true?
<div className="clearfix">
<span className="mr15 color-grey9">
<span className={"color-orange"}>{taskslistdata&&taskslistdata.commit_count}
</span> </span>
<span className="mr15 color-grey9">
<span className={"color-orange"}>{taskslistdata&&taskslistdata.uncommit_count}
</span> </span>
<Tooltip title={taskslistdata&&taskslistdata.left_time.status} placement="bottom">
<span className="mr15 color-grey9">
{taskslistdata&&taskslistdata.left_time.status} :
<span className={"ml10 color-orange"}>
{taskslistdata&&taskslistdata.left_time.time}</span>
</span>
</Tooltip>
</div>
:""}
</div>

@ -210,7 +210,7 @@ class ShixunhomeWorkItem extends Component{
</div>
<div className="task-popup-submit clearfix">
<a className="task-btn task-btn-orange fr mr51"
onClick={() => this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了</a>
onClick={() => this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了</a>
</div>
</Modal>
<Modal

@ -149,7 +149,7 @@ class EducoderLogin extends Component {
"align-items": "center",
"width": "100%",
}}>
<div style={{"margin-top": "40px","height":"500px"}}>
<div style={{"margin-top": "40px","height":"530px"}}>
<LoginRegisterComponent {...this.props} {...this.state}
Setshowbool={this.Setshowbool} ></LoginRegisterComponent>
@ -163,7 +163,7 @@ class EducoderLogin extends Component {
"align-items": "center",
"width": "100%",
}}>
<div style={{"margin-top": "40px","height":"500px"}}>
<div style={{"margin-top": "40px","height":"530px"}}>
<FindPasswordComponent {...this.props} {...this.state}
Setshowbool={this.Setshowbool}></FindPasswordComponent>
@ -171,13 +171,14 @@ class EducoderLogin extends Component {
</div>
}
<div style={{"height":"250px",
<div style={{"height":"180px",
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%",
}}>
<div className="font-14 color-grey-9 " style={{marginTop:"15px"}}>© 2019 EduCoder湘ICP备17009477号Trustie & IntelliDE inside.</div>
<div className="font-14 color-grey-9 " style={{marginTop:"15px"}}>© 2019 EduCoder 湘ICP备17009477号 Trustie & IntelliDE inside</div>
</div>
</div>

@ -353,6 +353,7 @@ class LoginDialog extends Component {
}
}).catch((error) => {
console.log("356");
console.log(error)
})
}

@ -12,7 +12,7 @@ import {broadcastChannelPostMessage} from 'educoder'
import {Tabs, Input, Checkbox, Button, notification, Menu} from 'antd';
//试用申请页面
//试用申请
class Trialapplication extends Component {
// isRender控制弹出窗口显示
constructor(props) {

@ -212,6 +212,7 @@ button.buttonHoverColor:hover a {
margin: 0 auto;
}
/* Dialog */
#alert-dialog-title>h2 {
text-align: center;

@ -330,20 +330,41 @@ class NewHeader extends Component {
})
}
educoderlogin=()=>{
//登出账号
//退出账号
this.setState({
isRender:true
})
// var url = `/accounts/logout.json`;
//
// axios.get((url)).then((result) => {
// if(result!==undefined){
// // this.setState({
// // isRender:true
// // })
// window.location.href = "/";
// }
// }).catch((error) => {
// console.log(error);
// })
}
educoderloginysl=()=>{
//退出账号
// this.setState({
// isRender:true
// })
var url = `/accounts/logout.json`;
axios.get((url)).then((result) => {
if(result!==undefined){
this.setState({
isRender:true
})
}
if(result!==undefined){
// this.setState({
// isRender:true
// })
window.location.href = "/";
}
}).catch((error) => {
console.log(error);
console.log(error);
})
}
onKeywordSearch = () => {
header_search(this)
}
@ -725,7 +746,7 @@ submittojoinclass=(value)=>{
<li className="bor-top-greyE">
{/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.logout_url}>退出</a>*/}
{/*<a onClick={()=>this.educoderlogin()}>退出</a>*/}
<a onClick={()=>this.educoderlogin()}>退出</a>
<a onClick={()=>this.educoderloginysl()}>退出</a>
</li>
</ul>

@ -59,6 +59,7 @@ class TPMBanner extends Component {
hidestartshixunsreplacevalue:"",
isIE:false,
Forkvisibletype: false,
isSpin:false,
}
}
@ -322,26 +323,36 @@ class TPMBanner extends Component {
// }
hidestartshixunsreplace=(url)=>{
this.setState({
isSpin:true,
})
axios.get(url).then((response) => {
if(response.status===200){
let path="/shixuns/"+response.data.shixun_identifier+"/challenges";
this.props.history.push(path);
this.setState({
shixunsreplace:false
})
message.success('重置成功,正在进入实训!');
this.startshixunCombat();
// let path="/shixuns/"+response.data.shixun_identifier+"/challenges";
// this.props.history.push(path);
message.success('重置成功,正在进入实训!');
this.startshixunCombat(response.data.shixun_identifier);
this.setState({
shixunsreplace:false,
isSpin:false,
})
// message.success('重置成功,正在进入实训!');
// this.startshixunCombat();
}}
).catch((error) => {
this.setState({
startbtn:false,
shixunsreplace:false
shixunsreplace:false,
isSpin:false
})
});
}
//开始实战按钮
startshixunCombat=()=>{
startshixunCombat=(id)=>{
let {shixunsDetails} = this.props
if( shixunsDetails.status>1){
this.setState({
@ -355,7 +366,6 @@ class TPMBanner extends Component {
}
let id = this.props.match.params.shixunId;
let url="/shixuns/"+id+"/shixun_exec.json";
axios.get(url).then((response) => {
if(response.status===200){
@ -366,6 +376,7 @@ class TPMBanner extends Component {
shixunsreplace:true,
hidestartshixunsreplacevalue:response.data.message+".json"
})
// this.shixunexec(response.data.message+".json")
}else if(response.data.status===-1){
console.log(response)
}else if(response.data.status===-3){
@ -505,7 +516,7 @@ class TPMBanner extends Component {
lineHeight: '30px',
};
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
return (
shixunsDetails===undefined?"":
@ -625,7 +636,7 @@ class TPMBanner extends Component {
shixunsDetails.task_operation[0] === "查看实战" ? "查看我的实战光辉历史" :
shixunsDetails.task_operation[0] === "模拟实战" ? "模拟完成实战任务" : shixunsDetails.task_operation[0] === "开启挑战" ? "开始学习并完成实战任务" : ""
}>
<a onClick={this.startshixunCombat}
<a onClick={()=>this.startshixunCombat(this.props.match.params.shixunId)}
className="fr user_default_btn task-btn-orange font-18"
id="shixun_operation" data-remote="true"
>
@ -662,13 +673,15 @@ class TPMBanner extends Component {
closable={false}
footer={null}
>
<Spin indicator={antIcon} spinning={this.state.isSpin}>
<div className="task-popup-content">
<p className="task-popup-text-center font-16 pb20">实训已经更新了正在为您重置!</p>
</div>
<div className="task-popup-submit clearfix">
<a className="task-btn task-btn-orange fr mr51"
onClick={() => this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了</a>
onClick={() => this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了</a>
</div>
</Spin>
</Modal>
<Modal

@ -529,7 +529,7 @@ class Challenges extends Component {
<p className="task-popup-text-center font-16 pb20">实训已经更新了正在为您重置!</p>
</div>
<div className="task-popup-submit clearfix">
<a className="task-btn task-btn-orange fr mr51" onClick={()=>this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了</a>
<a className="task-btn task-btn-orange fr mr51" onClick={()=>this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了</a>
</div>
</Modal>
</div>

@ -9,315 +9,315 @@ import './common.css'
const TabPane = Tabs.TabPane
const loginInputsyl = {
"width": " 100%",
"height": "40px",
"width": " 100%",
"height": "40px",
}
//父组件 EducoderLogin.js
class LoginRegisterComponent extends Component {
constructor(props) {
super(props)
this.state = {
login: "",
password: "",
passwords: "",
seconds: 60,
codes: "",
getverificationcodes: true,
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
s: 'text',
classpass: "text",
readonlyInput: true,
}
}
openNotification = (messge) => {
notification.open({
message: "提示",
description:
messge,
onClick: () => {
console.log('Notification Clicked!');
},
});
};
StudyMakeMoney = () => { // 调用父组件方法
this.props.Setshowbool();
}
// 点击表单后改变type
changeType = () => {
this.setState({classpass: 'password'});
}
changeTypey = () => {
}
//倒计时
getverificationcode = () => {
if (this.state.Phonenumberisnotcobool === false ||this.state.Phonenumberisnotcobool === undefined) {
if (this.state.login&&this.state.login.length === 0) {
this.openNotification("请输入手机号或邮箱");
return
} else {
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();
}
}
//短信验证
SMSverification = () => {
var url = `/accounts/get_verification_code.json`;
axios.get((url), {
params: {
login: this.state.login,
type: 2,
}
}).then((result) => {
//验证有问题{"status":1,"message":"success"}
console.log(result);
}).catch((error) => {
console.log(error);
})
}
cancelReadOnly = () => {
this.setState({
readonlyInput: false,
})
}
//找回密码
Retrievepassword = () => {
if (this.state.Phonenumberisnotcobool === false) {
if (this.state.login.length === 0) {
this.openNotification("请输入手机号或邮箱");
return
}
this.openNotification("请输入正确的手机号或邮箱");
return;
}
if (this.state.login === undefined || this.state.login == "") {
this.openNotification(`请输入登录手机号码或邮箱`);
return
} else if (this.state.password === undefined || this.state.password == "") {
this.openNotification(`请输入密码`);
return
} else if (this.state.passwords === undefined || this.state.passwords == "") {
this.openNotification(`请输入密码`);
return
} else if (this.state.password !== this.state.passwords) {
this.openNotification(`两次密码不相同`);
return
} else if (this.state.codes === undefined || this.state.codes == "") {
this.openNotification(`请输入验证码`);
return
}
var url = "/accounts/reset_password.json";
axios.post(url, {
login: this.state.login,
code: this.state.codes,
new_password: this.state.password,
new_password_confirmation: this.state.passwords,
}).then((result) => {
// console.log(result);
//登录成功会生成session
this.openNotification("找回密码成功,请重新登入。");
window.location.href = "/login"
}).catch((error) => {
})
}
openNotification = (messge) => {
notification.open({
message: "提示",
description:
messge,
onClick: () => {
console.log('Notification Clicked!');
},
});
};
loginInputonChange = (e) => {
// console.log(e.target.value);
this.setState({
login: e.target.value,
})
}
loginInputonChanges = (e) => {
// console.log(e.target.value);
this.setState({
password: e.target.value,
})
}
loginInputonChangess = (e) => {
// console.log(e.target.value);
this.setState({
passwords: e.target.value,
})
}
//获取code
codesonChange = (e) => {
this.setState({
codes: e.target.value
})
}
inputOnBlur = (e) => {
this.isCorrectname(e.target.value);
// this.Emailphonenumberverification(e.target.value, id);
}
isCorrectname = (value) => {
console.log(value.length);
if (value.length === 0) {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
})
return;
}
// var telephone = $("#telephoneAdd.tianjia_phone").val();
var regph = /^[1][3,4,5,6,7,8][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(value)) {
stringdata = "手机号格式不正确";
this.setState({
Phonenumberisnotco: stringdata,
Phonenumberisnotcobool: false,
})
} else {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: true,
})
return
}
if (!regemail.test(value)) {
if ((value.indexOf("@") != -1) === true) {
stringdata = "邮箱格式不正确";
} else {
stringdata = "手机号格式不正确";
}
this.setState({
Phonenumberisnotco: stringdata,
Phonenumberisnotcobool: false,
})
this.Emailphonenumberverification(value)
return
} else {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: true,
})
return
}
}
//邮箱手机号验证
Emailphonenumberverification = (value) => {
var url = `/accounts/valid_email_and_phone.json`;
axios.get((url), {
params: {
login: value,
type: 2,
}
}).then((result) => {
//验证有问题{"status":1,"message":"success"}
// console.log(result);
this.openNotification("验证码已发送,请注意查收!",2);
}).catch((error) => {
console.log(error);
// this.setState({
// login:"",
// logins:"",
// })
})
}
render() {
const {
activeKey,
// 登录
autoLogin,
// 注册
readAgreement, dragOk,
login,
password,
passwords,
classpass,
seconds,
getverificationcodes,
Phonenumberisnotco,
readonlyInput,
codes,
} = this.state
// height: 346px;
return (
<div className="login_register_content" style={{height: "482px"}}>
<Input type="text" name="username" value={"namename"}
style={{height: '0', width: '0', border: 'none', display: "none"}}/>
<Input type="password" name="password" id="password" value={"123123123"}
style={{height: '0', width: '0', border: 'none', display: "none"}}/>
<style>{`
constructor(props) {
super(props)
this.state = {
login: "",
password: "",
passwords: "",
seconds: 60,
codes: "",
getverificationcodes: true,
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
s: 'text',
classpass: "text",
readonlyInput: true,
}
}
openNotification = (messge) => {
notification.open({
message: "提示",
description:
messge,
onClick: () => {
console.log('Notification Clicked!');
},
});
};
StudyMakeMoney = () => { // 调用父组件方法
this.props.Setshowbool();
}
// 点击表单后改变type
changeType = () => {
this.setState({classpass: 'password'});
}
changeTypey = () => {
}
//倒计时
getverificationcode = () => {
if (this.state.Phonenumberisnotcobool === false || this.state.Phonenumberisnotcobool === undefined) {
if (this.state.login && this.state.login.length === 0) {
this.openNotification("请输入手机号或邮箱");
return
} else {
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();
}
}
//短信验证
SMSverification = () => {
var url = `/accounts/get_verification_code.json`;
axios.get((url), {
params: {
login: this.state.login,
type: 2,
}
}).then((result) => {
//验证有问题{"status":1,"message":"success"}
console.log(result);
}).catch((error) => {
console.log(error);
})
}
cancelReadOnly = () => {
this.setState({
readonlyInput: false,
})
}
//找回密码
Retrievepassword = () => {
if (this.state.Phonenumberisnotcobool === false) {
if (this.state.login.length === 0) {
this.openNotification("请输入手机号或邮箱");
return
}
this.openNotification("请输入正确的手机号或邮箱");
return;
}
if (this.state.login === undefined || this.state.login == "") {
this.openNotification(`请输入登录手机号码或邮箱`);
return
} else if (this.state.password === undefined || this.state.password == "") {
this.openNotification(`请输入密码`);
return
} else if (this.state.passwords === undefined || this.state.passwords == "") {
this.openNotification(`请输入密码`);
return
} else if (this.state.password !== this.state.passwords) {
this.openNotification(`两次密码不相同`);
return
} else if (this.state.codes === undefined || this.state.codes == "") {
this.openNotification(`请输入验证码`);
return
}
var url = "/accounts/reset_password.json";
axios.post(url, {
login: this.state.login,
code: this.state.codes,
new_password: this.state.password,
new_password_confirmation: this.state.passwords,
}).then((result) => {
// console.log(result);
//登录成功会生成session
this.openNotification("找回密码成功,请重新登入。");
window.location.href = "/login"
}).catch((error) => {
})
}
openNotification = (messge) => {
notification.open({
message: "提示",
description:
messge,
onClick: () => {
console.log('Notification Clicked!');
},
});
};
loginInputonChange = (e) => {
// console.log(e.target.value);
this.setState({
login: e.target.value,
})
}
loginInputonChanges = (e) => {
// console.log(e.target.value);
this.setState({
password: e.target.value,
})
}
loginInputonChangess = (e) => {
// console.log(e.target.value);
this.setState({
passwords: e.target.value,
})
}
//获取code
codesonChange = (e) => {
this.setState({
codes: e.target.value
})
}
inputOnBlur = (e) => {
this.isCorrectname(e.target.value);
// this.Emailphonenumberverification(e.target.value, id);
}
isCorrectname = (value) => {
console.log(value.length);
if (value.length === 0) {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
})
return;
}
// var telephone = $("#telephoneAdd.tianjia_phone").val();
var regph = /^[1][3,4,5,6,7,8][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(value)) {
stringdata = "手机号格式不正确";
this.setState({
Phonenumberisnotco: stringdata,
Phonenumberisnotcobool: false,
})
} else {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: true,
})
return
}
if (!regemail.test(value)) {
if ((value.indexOf("@") != -1) === true) {
stringdata = "邮箱格式不正确";
} else {
stringdata = "手机号格式不正确";
}
this.setState({
Phonenumberisnotco: stringdata,
Phonenumberisnotcobool: false,
})
this.Emailphonenumberverification(value)
return
} else {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: true,
})
return
}
}
//邮箱手机号验证
Emailphonenumberverification = (value) => {
var url = `/accounts/valid_email_and_phone.json`;
axios.get((url), {
params: {
login: value,
type: 2,
}
}).then((result) => {
//验证有问题{"status":1,"message":"success"}
// console.log(result);
this.openNotification("验证码已发送,请注意查收!", 2);
}).catch((error) => {
console.log(error);
// this.setState({
// login:"",
// logins:"",
// })
})
}
render() {
const {
activeKey,
// 登录
autoLogin,
// 注册
readAgreement, dragOk,
login,
password,
passwords,
classpass,
seconds,
getverificationcodes,
Phonenumberisnotco,
readonlyInput,
codes,
} = this.state
// height: 346px;
return (
<div className="login_register_content" style={{height: "520px"}}>
<Input type="text" name="username" value={"namename"}
style={{height: '0', width: '0', border: 'none', display: "none"}}/>
<Input type="password" name="password" id="password" value={"123123123"}
style={{height: '0', width: '0', border: 'none', display: "none"}}/>
<style>{`
.login_section .section_header {
margin-bottom: 16px;
@ -329,104 +329,116 @@ class LoginRegisterComponent extends Component {
color: #05101A;
line-height: 69px;
}
.loginInputzhuche{
width: 100%;
background-color: #fff!important;
height: 45px !important;
padding: 5px;
}
`}</style>
<div className="login_section">
<div className="section_header">
找回密码
</div>
<div style={{width: '340px'}}>
<style>
{
`
<div className="login_section">
<div className="section_header font-18" style={{color:"#05101A"}}>
找回密码
</div>
<div style={{width: '340px'}}>
<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;
}
`
}
</style>
<Input style={loginInputsyl} type="text" autoComplete="off" onClick={this.changeTypey}
placeholder="输入注册手机号或邮箱" value={this.state.login} onBlur={(e) => this.inputOnBlur(e)}
onChange={this.loginInputonChange} style={{marginTop: '10px',height: "38px"}}></Input>
{
Phonenumberisnotco && Phonenumberisnotco != "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"center",width: " 100%"}}>{Phonenumberisnotco}</span>
</p>
: <div style={{height: "25px"}}></div>
}
<DragValidator
height={38} successGreenColor="#45E15F"
style={{height:"38px",width:"100%"}}
dragOkCallback={this.dragOkCallback}
></DragValidator>
<Input type={classpass}
onClick={this.changeType} autoComplete="new-password" onChange={this.loginInputonChanges}
value={this.state.password} style={{width:"100%",height:"38px",marginTop:'25px'}} placeholder="输入8~16位密码区分大小写"></Input>
<Input type={classpass}
onClick={this.changeType} autoComplete="new-password"
onChange={this.loginInputonChangess} value={this.state.passwords}
style={{height:"38px",marginTop:'25px',width:"100%"}}
placeholder="再次输入新密码"></Input>
<div className={"mt25"}>
<Input className="fl mr5" type="text" autoComplete="off" style={{
width: "210px",
height: "38px",
}} placeholder="请输入验证码"
onChange={this.codesonChange}
value={codes}
>
</Input>
{
getverificationcodes === undefined ?
<Button className="fl ml5 " disabled
style={{"width": "120px", "text-align": "center", "height": "38px",}}
size={"large"}>重新发送{seconds}s</Button>
: getverificationcodes === true ?
<Button className="fl ml5 "
style={{"width": "120px", "text-align": "center", "height": "38px"}}
type="primary"
onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>
:
<Button className="fl ml5 "
style={{"width": "120px", "text-align": "center", "height": "38px"}}
type="primary"
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
}
</div>
<Button className="login_btn" size={"large"} type="primary"
style={{height:"46px"}}
onClick={this.Retrievepassword}>完成</Button>
</div>
</div>
</div>
);
}
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;
}
`
}
</style>
<Input style={loginInputsyl} type="text" autoComplete="off" onClick={this.changeTypey}
className={"loginInputzhuche"}
placeholder="输入注册手机号或邮箱" value={this.state.login} onBlur={(e) => this.inputOnBlur(e)}
onChange={this.loginInputonChange} style={{marginTop: '10px', height: "38px"}}></Input>
{
Phonenumberisnotco && Phonenumberisnotco != "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "center", width: " 100%"}}>{Phonenumberisnotco}</span>
</p>
: <div style={{height: "25px"}}></div>
}
<DragValidator
height={38} successGreenColor="#45E15F"
style={{height: "38px", width: "100%"}}
dragOkCallback={this.dragOkCallback}
></DragValidator>
<Input type={classpass}
className={"loginInputzhuche"}
onClick={this.changeType} autoComplete="new-password" onChange={this.loginInputonChanges}
value={this.state.password} style={{width: "100%", height: "38px", marginTop: '25px'}}
placeholder="输入8~16位密码区分大小写"></Input>
<Input type={classpass}
className={"loginInputzhuche"}
onClick={this.changeType} autoComplete="new-password"
onChange={this.loginInputonChangess} value={this.state.passwords}
style={{height: "38px", marginTop: '25px', width: "100%"}}
placeholder="再次输入新密码"></Input>
<div className={"mt25"}>
<Input className="fl mr5 loginInputzhuche" type="text" autoComplete="off" style={{
width: "210px",
height: "38px",
}} placeholder="请输入验证码"
onChange={this.codesonChange}
value={codes}
>
</Input>
{
getverificationcodes === undefined ?
<Button className="fl ml5 " disabled
style={{"width": "120px", "text-align": "center", "height": "45px",}}
size={"large"}>重新发送{seconds}s</Button>
: getverificationcodes === true ?
<Button className="fl ml5 "
style={{"width": "120px", "text-align": "center", "height": "45px"}}
type="primary"
onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>
:
<Button className="fl ml5 "
style={{"width": "120px", "text-align": "center", "height": "45px"}}
type="primary"
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
}
</div>
<Button className="login_btn" size={"large"} type="primary"
style={{height: "46px"}}
onClick={this.Retrievepassword}>完成</Button>
</div>
</div>
</div>
);
}
}
export default (LoginRegisterComponent);

@ -212,8 +212,8 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: true,
})
this.Emailphonenumberverification(value, id)
}
this.Emailphonenumberverification(value, id)
return
}
@ -222,8 +222,11 @@ class LoginRegisterComponent extends Component {
stringdata = "邮箱格式不正确";
} else {
stringdata = "手机号格式不正确";
}
// if (!regph.test(value)) {
// // 这里先判断是不是手机号然后在判断是不是邮箱然后又判断是不是手机号,如果不是手机号就是账号
// stringdata=undefined;
// }
}
if (id === 1) {
this.setState({
Phonenumberisnotco: stringdata,
@ -234,8 +237,8 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcos: stringdata,
Phonenumberisnotcobool: false,
})
this.Emailphonenumberverification(value, id)
}
this.Emailphonenumberverification(value, id)
return
} else {
if (id === 1) {
@ -248,8 +251,8 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: true,
})
this.Emailphonenumberverification(value, id)
}
this.Emailphonenumberverification(value, id)
return
}
}
@ -548,13 +551,13 @@ class LoginRegisterComponent extends Component {
// console.log(activeKey);
return (
<div className="login_register_content" style={ parseInt(tab[0])==0?{height: "346px"} :{height: "462px"}}>
<div className="login_register_content" style={ parseInt(tab[0])==0?{height: "346px"} :{height: "490px"}}>
<div>
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}>
<Menu.Item key="0">登录</Menu.Item>
<Menu.Item key="1">注册</Menu.Item>
<Menu.Item key="0" className="font-18" style={{color:"#05101A"}}> 登录</Menu.Item>
<Menu.Item key="1" className="font-18" style={{color:"#05101A"}}>注册</Menu.Item>
</Menu>
{
@ -563,36 +566,45 @@ class LoginRegisterComponent extends Component {
<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;
}
.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="font-14 color-grey-9"
className="font-14 color-grey-9 loginInputzhuche"
onBlur={(e) => this.inputOnBlur(e, 1)}
style={{marginTop: '30px', height: '38px'}}></Input>
@ -606,7 +618,7 @@ class LoginRegisterComponent extends Component {
<Input type="password" name="password" id="password" value={this.state.password}
onChange={this.passwordonChange}
className="font-14 color-grey-9 loginInput"
className="font-14 color-grey-9 loginInputzhuche"
placeholder="密码"></Input>
@ -621,10 +633,33 @@ class LoginRegisterComponent extends Component {
size={"large"}>登录</Button>
</div>
}
<style>
{
`
.loginInputzhuche{
width: 100%;
background-color: #fff!important;
height: 45px !important;
padding: 5px;
}
.loginInputzhuche .ant-input{
width: 100%;
background-color: #fff!important;
height: 45px !important;
padding: 5px;
position: relative;
right: 5px;
width: 103%;
}
`
}
</style>
{
parseInt(tab[0])==1 &&
<div style={{width: '340px'}}>
<Input className="loginInputsyl color-grey-9" placeholder="请使用手机号/邮箱账号进行注册"
<Input className="loginInputsyl color-grey-9 loginInputzhuche" placeholder="请使用手机号/邮箱账号进行注册"
value={this.state.logins}
type="text" autoComplete="off"
onChange={this.loginInputonChanges}
@ -646,7 +681,7 @@ class LoginRegisterComponent extends Component {
></DragValidator>
<div className="mt25">
<Input className="fl mr5 font-14 color-grey-9" name="codes" type="text" autoComplete="off" readonly
<Input className="fl mr5 font-14 color-grey-9 loginInputzhuche" name="codes" type="text" autoComplete="off" readonly
onfocus="this.removeAttribute('readonly')" style={{
width:'210px',
height:'38px',
@ -657,13 +692,13 @@ class LoginRegisterComponent extends Component {
</Input>
{
getverificationcodes === undefined ?
<Button className="fl ml5 font-14" disabled style={{"width": "120px","text-align":"center", "height": "38px",}}
<Button className="fl ml5 font-14" disabled style={{"width": "120px","text-align":"center", "height": "45px",}}
size={"large"}>重新发送{seconds}s</Button>
: getverificationcodes === true ?
<Button className="fl ml5 font-14" type="primary" style={{"width": "120px","text-align":"center", "height": "38px",}}
<Button className="fl ml5 font-14" type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}}
onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>
:
<Button className="fl ml5 font-14 " type="primary" style={{"width": "120px","text-align":"center", "height": "38px",}}
<Button className="fl ml5 font-14 " type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}}
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
}
@ -673,13 +708,13 @@ class LoginRegisterComponent extends Component {
{/* style={{height: '0', width: '0', border: 'none', display: "none"}}/>*/}
{/*<Input type="password" name="password" id="password" autoComplete="new-password"*/}
{/* style={{height: '0', width: '0', border: 'none', display: "none"}}/>*/}
<Input className="loginInput font-14 mt25 color-grey-9" placeholder="输入8~16位密码区分大小写"
<Input className="loginInput font-14 mt25 color-grey-9 loginInputzhuche" placeholder="输入8~16位密码区分大小写"
type={classpass}
autoComplete="new-password"
onClick={this.changeType}
value={this.state.passwords} onChange={this.passwordonChanges} suffix={
<img src={passopens} onClick={(key) => this.Showandhide(key)}>
<img className={"mt5"} src={passopens} onClick={(key) => this.Showandhide(key)}>
</img>
}></Input>
<Checkbox onChange={this.onChange}

@ -29,9 +29,11 @@
.loginInput {
width: 100%;
margin-bottom: 16px;
height: 38px;
height: 45px;
}
.left_right {
width: 100%;
display: flex;

@ -247,9 +247,8 @@ class Infos extends Component{
<div className="educontent mt10 clearfix edu-txt-center">
<div className="inline">
{
data && is_current == false && data.identity =="学生" ?"" : <span className="mypost fl mr10">{data && data.identity}</span>
data && is_current == false && data.identity =="学生" ? "" : <span className="mypost fl mr10">{data && data.identity}</span>
}
<span className="mypost fl mr10">{data && data.identity}</span>
<a href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/authentication` :"javascript:void(0)"} target="_blank" className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title={ data && data.authentication ?"已实名认证":"未实名认证"}>
<i className={ data && data.authentication ? "iconfont icon-shenfenrenzheng font-13 color-blue":"iconfont icon-shenfenrenzheng font-13 color-grey-9"}></i>
@ -300,8 +299,8 @@ class Infos extends Component{
data && data.can_apply_trial == false ?
data.attendance_signed ?
<React.Fragment>
<span className="user_default_btn user_grey_btn mb5 fl">已签到</span>
<span id="attendance_notice" className="none font-12 color-grey-6" style={{"display":"block"}}>明日签到&nbsp;<font className="color-orange">+{next_gold}</font>&nbsp;</span>
<span className="user_default_btn user_grey_btn mb5">已签到</span>
<p id="attendance_notice" className="none font-12 color-grey-6" style={{"display":"block"}}>明日签到&nbsp;<font className="color-orange">+{next_gold}</font>&nbsp;</p>
</React.Fragment>
:
<a herf="javascript:void(0);" onClick={this.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a>

@ -171,7 +171,7 @@ class InfosShixun extends Component{
item.tag && <div className="tag-green"><span className="tag-name">{item.tag}</span><img src={getImageUrl("/images/educoder/tag2.png")}/></div>
}
<a href="javascript:void(0)" className="square-img">
<img alt="Shixun6" src={getImageUrl(`${item.image_url}`)}/>
<img alt="Shixun6" src={`${item.image_url}`}/>
</a>
<div className="square-main">
<p className="task-hide">

Loading…
Cancel
Save