hjm 6 years ago
commit bac2d56ff1

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

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

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

@ -48,16 +48,25 @@ class CoursesBanner extends Component {
isRenders:false, isRenders:false,
showTrial:false, showTrial:false,
} }
console.log("CoursesBanner");
console.log("48");
console.log(props);
} }
componentDidMount() { componentDidMount() {
this.updatabanner()
this.setState({ this.onloadupdatabanner()
user_phone_binded :this.props.user_phone_binded, 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=()=>{ updatabanner=()=>{
let courseId = this.props.match.params.coursesId; let courseId = this.props.match.params.coursesId;
let url = "/courses/" + courseId + "/top_banner.json" 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() { render() {
let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state; 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 ( return (
<div> <div>
<Trialapplication {...this.state} user_phone_binded={user_phone_binded} ></Trialapplication> <Trialapplication {...this.state} user_phone_binded={user_phone_binded} ></Trialapplication>

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

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

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

@ -94,7 +94,7 @@ class GraduationTaskssettinglist extends Component{
for (var i = 0; i < worklists.length; i++) { for (var i = 0; i < worklists.length; i++) {
datalist.push({ datalist.push({
name: worklists[i].name, 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, stduynumber: worklists[i].student_id,
classroom: worklists[i].class_grouping_name, classroom: worklists[i].class_grouping_name,
grouping: result.data.have_grouping === true ? worklists[i].grouping_name : null, 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 id="graduation_work_list" style={{padding:'0px 40px 10px 40px'}}>
<div className="clearfix"> <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()===true?<span className="fl color-grey-6 font-12">
{this.props.isAdmin()?<div className="fr color-grey-6 edu-menu-panel"> <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> <p>
<a data-remote="true"> <a data-remote="true">
{order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序</a> {order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序</a>
@ -1562,6 +1564,24 @@ class GraduationTaskssettinglist extends Component{
</div>:""} </div>:""}
</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> </div>
{ {
@ -1781,24 +1801,49 @@ class GraduationTaskssettinglist extends Component{
<div id="graduation_work_list" style={{ padding: '18px 40px 10px',height: '56px'}}> <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> </div>

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

@ -149,7 +149,7 @@ class EducoderLogin extends Component {
"align-items": "center", "align-items": "center",
"width": "100%", "width": "100%",
}}> }}>
<div style={{"margin-top": "40px","height":"500px"}}> <div style={{"margin-top": "40px","height":"530px"}}>
<LoginRegisterComponent {...this.props} {...this.state} <LoginRegisterComponent {...this.props} {...this.state}
Setshowbool={this.Setshowbool} ></LoginRegisterComponent> Setshowbool={this.Setshowbool} ></LoginRegisterComponent>
@ -163,7 +163,7 @@ class EducoderLogin extends Component {
"align-items": "center", "align-items": "center",
"width": "100%", "width": "100%",
}}> }}>
<div style={{"margin-top": "40px","height":"500px"}}> <div style={{"margin-top": "40px","height":"530px"}}>
<FindPasswordComponent {...this.props} {...this.state} <FindPasswordComponent {...this.props} {...this.state}
Setshowbool={this.Setshowbool}></FindPasswordComponent> Setshowbool={this.Setshowbool}></FindPasswordComponent>
@ -171,13 +171,14 @@ class EducoderLogin extends Component {
</div> </div>
} }
<div style={{"height":"250px", <div style={{"height":"180px",
"display": "flex", "display": "flex",
"justify-content": "center", "justify-content": "center",
"align-items": "center", "align-items": "center",
"width": "100%", "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>
</div> </div>

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

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

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

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

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

@ -529,7 +529,7 @@ class Challenges extends Component {
<p className="task-popup-text-center font-16 pb20">实训已经更新了正在为您重置!</p> <p className="task-popup-text-center font-16 pb20">实训已经更新了正在为您重置!</p>
</div> </div>
<div className="task-popup-submit clearfix"> <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> </div>
</Modal> </Modal>
</div> </div>

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

@ -212,8 +212,8 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcos: undefined, Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: true, Phonenumberisnotcobool: true,
}) })
this.Emailphonenumberverification(value, id)
} }
this.Emailphonenumberverification(value, id)
return return
} }
@ -222,8 +222,11 @@ class LoginRegisterComponent extends Component {
stringdata = "邮箱格式不正确"; stringdata = "邮箱格式不正确";
} else { } else {
stringdata = "手机号格式不正确"; stringdata = "手机号格式不正确";
// if (!regph.test(value)) {
} // // 这里先判断是不是手机号然后在判断是不是邮箱然后又判断是不是手机号,如果不是手机号就是账号
// stringdata=undefined;
// }
}
if (id === 1) { if (id === 1) {
this.setState({ this.setState({
Phonenumberisnotco: stringdata, Phonenumberisnotco: stringdata,
@ -234,8 +237,8 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcos: stringdata, Phonenumberisnotcos: stringdata,
Phonenumberisnotcobool: false, Phonenumberisnotcobool: false,
}) })
this.Emailphonenumberverification(value, id)
} }
this.Emailphonenumberverification(value, id)
return return
} else { } else {
if (id === 1) { if (id === 1) {
@ -248,8 +251,8 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcos: undefined, Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: true, Phonenumberisnotcobool: true,
}) })
this.Emailphonenumberverification(value, id)
} }
this.Emailphonenumberverification(value, id)
return return
} }
} }
@ -548,13 +551,13 @@ class LoginRegisterComponent extends Component {
// console.log(activeKey); // console.log(activeKey);
return ( 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> <div>
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}> <Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}>
<Menu.Item key="0">登录</Menu.Item> <Menu.Item key="0" className="font-18" style={{color:"#05101A"}}> 登录</Menu.Item>
<Menu.Item key="1">注册</Menu.Item> <Menu.Item key="1" className="font-18" style={{color:"#05101A"}}>注册</Menu.Item>
</Menu> </Menu>
{ {
@ -563,36 +566,45 @@ class LoginRegisterComponent extends Component {
<style> <style>
{ {
` `
.ant-input { .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; 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; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
margin: 0; margin: 0;
padding: 0; padding: 0;
list-style: none; list-style: none;
position: relative; position: relative;
display: inline-block; display: inline-block;
padding: 4px 11px; padding: 4px 11px;
width: 100%; width: 100%;
height: 38px; height: 38px;
font-size: 14px; font-size: 14px;
line-height: 1.5; line-height: 1.5;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
background-color: #fff; background-color: #fff;
background-image: none; background-image: none;
border: 1px solid #d9d9d9; border: 1px solid #d9d9d9;
border-radius: 4px; border-radius: 4px;
-webkit-transition: all .3s; -webkit-transition: all .3s;
-o-transition: all .3s; -o-transition: all .3s;
transition: all .3s; transition: all .3s;
} }
.loginInputzhuche{
width: 100%;
background-color: #fff!important;
height: 45px !important;
padding: 5px;
}
` `
} }
</style> </style>
<Input placeholder="请输入登录手机号码或邮箱" value={this.state.login} <Input placeholder="请输入登录手机号码或邮箱" value={this.state.login}
onChange={this.loginInputonChange} onChange={this.loginInputonChange}
name="username" name="username"
className="font-14 color-grey-9" className="font-14 color-grey-9 loginInputzhuche"
onBlur={(e) => this.inputOnBlur(e, 1)} onBlur={(e) => this.inputOnBlur(e, 1)}
style={{marginTop: '30px', height: '38px'}}></Input> 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} <Input type="password" name="password" id="password" value={this.state.password}
onChange={this.passwordonChange} onChange={this.passwordonChange}
className="font-14 color-grey-9 loginInput" className="font-14 color-grey-9 loginInputzhuche"
placeholder="密码"></Input> placeholder="密码"></Input>
@ -621,10 +633,33 @@ class LoginRegisterComponent extends Component {
size={"large"}>登录</Button> size={"large"}>登录</Button>
</div> </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 && parseInt(tab[0])==1 &&
<div style={{width: '340px'}}> <div style={{width: '340px'}}>
<Input className="loginInputsyl color-grey-9" placeholder="请使用手机号/邮箱账号进行注册" <Input className="loginInputsyl color-grey-9 loginInputzhuche" placeholder="请使用手机号/邮箱账号进行注册"
value={this.state.logins} value={this.state.logins}
type="text" autoComplete="off" type="text" autoComplete="off"
onChange={this.loginInputonChanges} onChange={this.loginInputonChanges}
@ -646,7 +681,7 @@ class LoginRegisterComponent extends Component {
></DragValidator> ></DragValidator>
<div className="mt25"> <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={{ onfocus="this.removeAttribute('readonly')" style={{
width:'210px', width:'210px',
height:'38px', height:'38px',
@ -657,13 +692,13 @@ class LoginRegisterComponent extends Component {
</Input> </Input>
{ {
getverificationcodes === undefined ? 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> size={"large"}>重新发送{seconds}s</Button>
: getverificationcodes === true ? : 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> 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> onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
} }
@ -673,13 +708,13 @@ class LoginRegisterComponent extends Component {
{/* style={{height: '0', width: '0', border: 'none', display: "none"}}/>*/} {/* style={{height: '0', width: '0', border: 'none', display: "none"}}/>*/}
{/*<Input type="password" name="password" id="password" autoComplete="new-password"*/} {/*<Input type="password" name="password" id="password" autoComplete="new-password"*/}
{/* style={{height: '0', width: '0', border: 'none', display: "none"}}/>*/} {/* 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} type={classpass}
autoComplete="new-password" autoComplete="new-password"
onClick={this.changeType} onClick={this.changeType}
value={this.state.passwords} onChange={this.passwordonChanges} suffix={ 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> </img>
}></Input> }></Input>
<Checkbox onChange={this.onChange} <Checkbox onChange={this.onChange}

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

@ -247,9 +247,8 @@ class Infos extends Component{
<div className="educontent mt10 clearfix edu-txt-center"> <div className="educontent mt10 clearfix edu-txt-center">
<div className="inline"> <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"}> <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 ?"已实名认证":"未实名认证"}> <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> <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 && data.can_apply_trial == false ?
data.attendance_signed ? data.attendance_signed ?
<React.Fragment> <React.Fragment>
<span className="user_default_btn user_grey_btn mb5 fl">已签到</span> <span className="user_default_btn user_grey_btn mb5">已签到</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> <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> </React.Fragment>
: :
<a herf="javascript:void(0);" onClick={this.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a> <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> 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"> <a href="javascript:void(0)" className="square-img">
<img alt="Shixun6" src={getImageUrl(`${item.image_url}`)}/> <img alt="Shixun6" src={`${item.image_url}`}/>
</a> </a>
<div className="square-main"> <div className="square-main">
<p className="task-hide"> <p className="task-hide">

Loading…
Cancel
Save