caishi 6 years ago
commit 93f0feb7da

@ -40,8 +40,8 @@ class coursesHomeCard extends Component{
className="mt80 mb25"/> className="mt80 mb25"/>
<p className="font-14 color-white">非成员不能访问</p> <p className="font-14 color-white">非成员不能访问</p>
</div> </div>
{/*<a href={item.first_category_url} className="square-img" >*/} <a href={item.first_category_url} className="square-img" >
<a href={`/courses/${item.id}/students`} className="square-img" > {/*<a href={`/courses/${item.id}/students`} className="square-img" >*/}
{/*target="_blank"*/} {/*target="_blank"*/}
{ {
item.is_public===1&&item.id===1309? item.is_public===1&&item.id===1309?

@ -119,7 +119,7 @@ class AccessoryModal2 extends Component{
} }
} }
Saves=()=>{ Saves=()=>{
debugger // debugger
let {fileList,description} =this.state; let {fileList,description} =this.state;
let newfileList=[]; let newfileList=[];
for(var list of fileList){ for(var list of fileList){

@ -59,7 +59,7 @@ class Associationmodel extends Component{
goback=()=>{ goback=()=>{
debugger // debugger
this.setState({ this.setState({
Modalstype:false, Modalstype:false,
}) })
@ -70,7 +70,7 @@ class Associationmodel extends Component{
setSaves=()=>{ setSaves=()=>{
debugger // debugger
let {projectvalue}=this.state; let {projectvalue}=this.state;
let taskid=this.props.taskid; let taskid=this.props.taskid;
let url="/graduation_tasks/"+taskid+"/graduation_works/relate_project.json"; let url="/graduation_tasks/"+taskid+"/graduation_works/relate_project.json";

@ -86,7 +86,7 @@ class Exercisestatisticalresult extends Component {
page:pageNumber page:pageNumber
}) })
debugger // debugger
$('html').animate({ $('html').animate({
scrollTop: 10 scrollTop: 10
}, 1000); }, 1000);

@ -122,6 +122,11 @@ class GraduationTasksSubmitedit extends Component{
let fileList = info.fileList; let fileList = info.fileList;
this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) }); this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) });
} }
if (info.file.status === 'done') {
let fileList = info.fileList;
this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) });
}
} }
//onAttachmentRemove = (file) => { //onAttachmentRemove = (file) => {
@ -393,7 +398,7 @@ class GraduationTasksSubmitedit extends Component{
// console.log(fileList); // console.log(fileList);
if(values.description===undefined||values.description===""){ if(values.description===undefined||values.description===""){
this.scrollToAnchor("valuestypes"); this.scrollToAnchor("valuestypes");
debugger // debugger
return return
} }
if(workslist.task_type===2){ if(workslist.task_type===2){

@ -117,10 +117,17 @@ class GraduationTasksSubmitnew extends Component{
} }
// 附件相关 START // 附件相关 START
handleChange = (info) => { handleChange = (info) => {
debugger
if (info.file.status === 'uploading') { if (info.file.status === 'uploading') {
let fileList = info.fileList; let fileList = info.fileList;
this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) }); this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) });
} }
if (info.file.status === 'done') {
let fileList = info.fileList;
this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) });
}
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
@ -358,7 +365,7 @@ class GraduationTasksSubmitnew extends Component{
//公用数据 //公用数据
Commoninterface = (fileList,selectmemberslist,workslist)=>{ Commoninterface = (fileList,selectmemberslist,workslist)=>{
debugger // debugger
let userids=[]; let userids=[];
for(var list of selectmemberslist){ for(var list of selectmemberslist){
@ -384,7 +391,7 @@ class GraduationTasksSubmitnew extends Component{
// console.log(fileList); // console.log(fileList);
if(values.description===undefined||values.description===""){ if(values.description===undefined||values.description===""){
this.scrollToAnchor("valuestypes"); this.scrollToAnchor("valuestypes");
debugger // debugger
return return
} }
if(workslist&&workslist.task_type===2){ if(workslist&&workslist.task_type===2){
@ -460,7 +467,7 @@ class GraduationTasksSubmitnew extends Component{
//确认 //确认
hidestartshixunsreplace=()=>{ hidestartshixunsreplace=()=>{
debugger // debugger
let {fileList,selectmemberslist,workslist}=this.state; let {fileList,selectmemberslist,workslist}=this.state;
this.Commoninterface(fileList,selectmemberslist,workslist); this.Commoninterface(fileList,selectmemberslist,workslist);

@ -145,7 +145,7 @@ class GraduationTasksedit extends Component{
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
debugger // debugger
this.cancelAttachment(); this.cancelAttachment();
const url = `/attachments/${file.response ? file.response.id : file.uid}.json` const url = `/attachments/${file.response ? file.response.id : file.uid}.json`
// const url = `/attachments/${file}.json` // const url = `/attachments/${file}.json`

@ -37,7 +37,7 @@ class GraduationTasks extends Component{
} }
} }
fetchAll = (search,page,order,count) => { fetchAll = (search,page,order,count) => {
debugger // debugger
const cid = this.props.match.params.coursesId const cid = this.props.match.params.coursesId
@ -554,7 +554,7 @@ debugger
} }
// 题库选用成功后刷新页面 // 题库选用成功后刷新页面
useBankSuccess=(checkBoxValues,object_ids)=>{ useBankSuccess=(checkBoxValues,object_ids)=>{
debugger // debugger
let {search,page,order,all_count} = this.state; let {search,page,order,all_count} = this.state;
this.fetchAll(search,page,order,all_count) this.fetchAll(search,page,order,all_count)
} }

@ -40,6 +40,8 @@ class CoursesNew extends Component {
} }
componentDidMount() { componentDidMount() {
let coursesId = this.props.match.params.coursesId; let coursesId = this.props.match.params.coursesId;
let user_school=this.props.current_user&&this.props.current_user.user_school; let user_school=this.props.current_user&&this.props.current_user.user_school;
@ -85,7 +87,13 @@ class CoursesNew extends Component {
this.Searchvalue("") this.Searchvalue("")
} }
componentDidUpdate(prevProps){
if(prevProps.current_user!=this.props.current_user){
if(this.props.current_user.user_identity==="学生"){
window.location.href ="/403"
}
}
}
onChangeTimepublishs = (date, dateString) => { onChangeTimepublishs = (date, dateString) => {
if(dateString===""){ if(dateString===""){
this.setState({ this.setState({

@ -115,7 +115,7 @@ class PollDetailTabForthRules extends Component{
} }
//修改发布规则里面的发布时间 //修改发布规则里面的发布时间
changeRulePublishTime=(e,date,index)=>{ changeRulePublishTime=(e,date,index)=>{
debugger // debugger
let arr=Object.assign({}, this.state.rules[parseInt(index)]); let arr=Object.assign({}, this.state.rules[parseInt(index)]);
arr.publish_time=date=== ""?"":moment(handleDateString(date)).format("YYYY-MM-DD HH:mm"); arr.publish_time=date=== ""?"":moment(handleDateString(date)).format("YYYY-MM-DD HH:mm");
if(!arr.end_time){ if(!arr.end_time){

@ -72,7 +72,8 @@ class EducoderLogin extends Component {
showbool: 3, showbool: 3,
logini:3, logini:3,
namezh:"", namezh:"",
passmm:"" passmm:"",
loginstatus:true,
} }
}else { }else {
if(props.match.url === "/login"){ if(props.match.url === "/login"){
@ -98,8 +99,8 @@ class EducoderLogin extends Component {
showbool: 1, showbool: 1,
logini:1, logini:1,
namezh:"", namezh:"",
passmm:"" passmm:"",
loginstatus:true,
} }
} }
@ -162,7 +163,7 @@ class EducoderLogin extends Component {
<div> <div>
<LoginRegisterComponent {...this.props} {...this.state} <LoginRegisterComponent {...this.props} {...this.state}
Setshowbool={(e,name,pass)=>this.Setshowbool(e,name,pass)} ></LoginRegisterComponent> Setshowbool={(e)=>this.Setshowbool(e)} ></LoginRegisterComponent>
</div> </div>

@ -7,7 +7,7 @@ import Dialog, {
DialogContentText, DialogContentText,
DialogTitle, DialogTitle,
} from 'material-ui/Dialog'; } from 'material-ui/Dialog';
import {notification } from 'antd';
import axios from 'axios'; import axios from 'axios';
@ -346,10 +346,19 @@ class LoginDialog extends Component {
if(response===undefined){ if(response===undefined){
return return
} }
if(response.data.identity === null || response.data.identity === undefined){
this.props.history.push("/interesse");
return;
}
if(response.status===200){ if(response.status===200){
if (response.data.status === 402) { if (response.data.status === 402) {
window.location.href = response.data.url; window.location.href = response.data.url;
}else{ }else if (response.data.status === -2) {
notification.open({
message: '提示',
description:response.data.message,
});
}else{
broadcastChannelPostMessage('refreshPage') broadcastChannelPostMessage('refreshPage')
this.setState({ this.setState({
isRender:false isRender:false

@ -228,7 +228,7 @@ class DetailCards extends Component{
isSpin:true, isSpin:true,
}) })
axios.get(url).then((response) => { axios.get(url).then((response) => {
debugger // debugger
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);

@ -635,7 +635,7 @@ submittojoinclass=(value)=>{
<a href="/"> <a href="/">
<img alt="高校智能化教学与实训平台" className="logoimg" src={getImageUrl("images/educoder/headNavLogo.png?1526520218")}></img> <img alt="高校智能化教学与实训平台" className="logoimg" src={getImageUrl("images/educoder/headNavLogo.png?1526520218")}></img>
</a> </a>
<div className="head-nav pr" style={{width:'716px'}}> <div className="head-nav pr">
<ul id="header-nav"> <ul id="header-nav">
{/*<li className={`${activeIndex === true ? 'active' : ''}`}><a href="/">首页</a></li>*/} {/*<li className={`${activeIndex === true ? 'active' : ''}`}><a href="/">首页</a></li>*/}
@ -707,11 +707,11 @@ submittojoinclass=(value)=>{
style={{display: 'none'}} style={{display: 'none'}}
> >
<Search <Search
placeholder="搜索" placeholder="实践课程/翻转课堂/开发社区/交流问答"
// onSearch={value => console.log(value)} // onSearch={value => console.log(value)}
onPressEnter={this.onKeywordSearchKeyDown} onPressEnter={this.onKeywordSearchKeyDown}
style={{ width: 258 }} style={{ width: 295 }}
/> />
</div> </div>
@ -792,9 +792,7 @@ submittojoinclass=(value)=>{
<div className="edu-menu-list" style={{top: '60px',width:"240px"}}> <div className="edu-menu-list" style={{top: '60px',width:"240px"}}>
<div className="overPart"></div> <div className="overPart"></div>
<ul className="fl with50 edu-txt-center pr ul-leftline"> <ul className="fl with50 edu-txt-center pr ul-leftline">
{console.log(this.props)} {this.props.current_user&&this.props.current_user.user_identity==="学生"?"":<li><Link to={"/courses/new"}>新建课堂</Link></li>}
{console.log(this.state)}
<li><Link to={"/courses/new"}>新建课堂</Link></li>
<li><a href="/shixuns/new">新建实训</a></li> <li><a href="/shixuns/new">新建实训</a></li>
<li><a href={this.props.Headertop===undefined?"":"/paths/new"}>新建实践课程</a></li> <li><a href={this.props.Headertop===undefined?"":"/paths/new"}>新建实践课程</a></li>
<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.new_project_url} target="_blank">新建项目</a></li> <li><a href={this.props.Headertop===undefined?"":this.props.Headertop.new_project_url} target="_blank">新建项目</a></li>

@ -339,7 +339,7 @@ export default class TPMchallengesnew extends Component {
} }
if(exec_time===null||exec_time===undefined||exec_time===""){ if(exec_time===null||exec_time===undefined||exec_time===""){
debugger
this.setState({ this.setState({
shixunExec_timeType:false shixunExec_timeType:false
}) })

@ -160,6 +160,8 @@ function disabledDateTime() {
// disabledSeconds: () => [0, 60], // disabledSeconds: () => [0, 60],
}; };
} }
class Newshixuns extends Component { class Newshixuns extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
@ -195,6 +197,10 @@ class Newshixuns extends Component {
testcoderunmode:undefined, testcoderunmode:undefined,
file:undefined, file:undefined,
deleteisnot:true, deleteisnot:true,
languagewritetype:false,
systemenvironmenttype:false,
testcoderunmodetype:false,
attachmentidstype:false
} }
} }
@ -502,8 +508,6 @@ class Newshixuns extends Component {
} }
sendsure_apply = () => { sendsure_apply = () => {
let {languagewrite,systemenvironment,testcoderunmode} = this.state; let {languagewrite,systemenvironment,testcoderunmode} = this.state;
debugger
// console.log("点击确定") // console.log("点击确定")
// console.log("languagewrite"+languagewrite); // console.log("languagewrite"+languagewrite);
// console.log("systemenvironment"+systemenvironment); // console.log("systemenvironment"+systemenvironment);
@ -516,21 +520,26 @@ class Newshixuns extends Component {
// }) // })
// } // }
if(languagewrite === undefined || languagewrite === "" ){ if(languagewrite === undefined || languagewrite === "" ){
this.props.showNotification(`请填写该镜像是基于什么语言`); // this.props.showNotification(`请填写该镜像是基于什么语言`);
this.setState({
languagewritetype:true
})
return return
} }
if(systemenvironment === undefined || systemenvironment === ""){ if(systemenvironment === undefined || systemenvironment === ""){
this.props.showNotification(`请填写该镜像是基于什么语言系统环境`); // this.props.showNotification(`请填写该镜像是基于什么语言系统环境`);
this.setState({
systemenvironmenttype:true
})
return; return;
} }
if(testcoderunmode === undefined || testcoderunmode === "") { if(testcoderunmode === undefined || testcoderunmode === "") {
this.props.showNotification(`请填写该镜像中测试代码运行方式`); // this.props.showNotification(`请填写该镜像中测试代码运行方式`);
this.setState({
testcoderunmodetype:true
})
return; return;
} }
var attachment_ids=undefined; var attachment_ids=undefined;
if (this.state.fileList) { if (this.state.fileList) {
@ -538,17 +547,20 @@ class Newshixuns extends Component {
return item.response ? item.response.id : item.id return item.response ? item.response.id : item.id
}) })
} }
debugger
if( attachment_ids === undefined || attachment_ids.length===0){
notification.open( if( attachment_ids === undefined || attachment_ids.length===0){
{
message: '提示',
description:
'请上传附件!',
} // notification.open(
) // {
// message: '提示',
// description:
// '请上传附件!',
//
// }
// )
this.setState({
attachmentidstype:true
})
return; return;
} }
// console.log("attachment_ids"+attachment_ids); // console.log("attachment_ids"+attachment_ids);
@ -941,7 +953,7 @@ class Newshixuns extends Component {
> >
{/*<Form onSubmit={this.handleSubmit}>*/} {/*<Form onSubmit={this.handleSubmit}>*/}
<div> <div>
<li className="clearfix mb15 ml85" > <li className="clearfix ml85" >
<label className="fl mt10 "><span <label className="fl mt10 "><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150" <textarea className="fl task-form-80 task-height-150"
@ -951,7 +963,8 @@ class Newshixuns extends Component {
placeholder="请填写该镜像是基于什么语言示例Python" placeholder="请填写该镜像是基于什么语言示例Python"
id="demand_info"></textarea> id="demand_info"></textarea>
</li> </li>
<li className="clearfix mb15"> <div className={"color-red shixunspanred"}>{this.state.languagewritetype===true?"请填写该镜像语言":""}</div>
<li className="clearfix">
<label className="panel-form-label fl ml50"><span <label className="panel-form-label fl ml50"><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150 " <textarea className="fl task-form-80 task-height-150 "
@ -961,8 +974,8 @@ class Newshixuns extends Component {
placeholder="请填写该镜像是基于什么linux系统环境,代码运行环境" placeholder="请填写该镜像是基于什么linux系统环境,代码运行环境"
id="demand_info"></textarea> id="demand_info"></textarea>
</li> </li>
<div className={"color-red shixunspanred"}>{this.state.systemenvironmenttype===true?"请填写该镜像语言系统环境":""}</div>
<li className="clearfix mb15"> <li className="clearfix">
<label className="fl mt10" ><span <label className="fl mt10" ><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
@ -973,8 +986,8 @@ class Newshixuns extends Component {
placeholder="请填写该镜像中测试代码运行方式" placeholder="请填写该镜像中测试代码运行方式"
id="demand_info"></textarea> id="demand_info"></textarea>
</li> </li>
<div className={"color-red shixunspanred"}>{this.state.testcoderunmodetype===true?"请填写该镜像测试代码运行方式":""}</div>
<li className="clearfix mb15 ml50"> <li className="clearfix ml50">
<label className="panel-form-label fl mt-5"><span <label className="panel-form-label fl mt-5"><span
className="color-red fl">*</span>&nbsp;&nbsp;</label> className="color-red fl">*</span>&nbsp;&nbsp;</label>
<div className="mt10" style={{ <div className="mt10" style={{
@ -1009,6 +1022,9 @@ class Newshixuns extends Component {
</div> </div>
</li> </li>
<div className={"color-red shixunspanred"}>
{this.state.attachmentidstype===true?"请上传附件":""}
</div>
<li className="edu-txt-center clearfix "> <li className="edu-txt-center clearfix ">
<a className="pop_close task-btn mr30" <a className="pop_close task-btn mr30"
onClick={() => this.sendhideModaly()} onClick={() => this.sendhideModaly()}

@ -376,4 +376,9 @@ a.white-btn.use_scope-btn:hover{
color:#FFF !important; color:#FFF !important;
} }
.shixunspanred{
margin-left: 142px;
margin-top: 5px;
margin-bottom: 5px;
}

@ -3,9 +3,13 @@ import React, {Component} from 'react';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
import {getImageUrl, DragValidator} from 'educoder'; import {getImageUrl, DragValidator} from 'educoder';
import DragValidatortwo from '../../../src/common/components/DragValidatortwo'
import {Tabs, Input, Checkbox, Button, notification} from 'antd'; import {Tabs, Input, Checkbox, Button, notification} from 'antd';
import DragValidatortwo from '../../../src/common/components/DragValidatortwo'
import ReadPassword from './ReadPassword';
import axios from 'axios'; import axios from 'axios';
import './common.css' import './common.css'
@ -26,13 +30,19 @@ class LoginRegisterComponent extends Component {
seconds: 35, seconds: 35,
codes: "", codes: "",
getverificationcodes: true, getverificationcodes: true,
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false, Phonenumberisnotcobool: false,
Phonenumberisnotco: undefined,
Phonenumberisnotcosytdhk:undefined,
Phonenumberisnotcosmmm: undefined,
Phonenumberisnotcosymmmm:undefined,
Phonenumberisnotcosyzm:undefined,
s: 'text', s: 'text',
classpass: "text", classpass: "text",
readonlyInput: true, readonlyInput: true,
dragOk: false, dragOk: false,
Whethertoverify:false, Whethertoverify:false,
modalsType:false,
} }
} }
@ -148,29 +158,67 @@ class LoginRegisterComponent extends Component {
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.setState({
Phonenumberisnotco:"请输入正确的邮箱或手机号",
})
return return
} }
} }
if (this.state.login === undefined|| this.state.login.length ===0 || this.state.login === "") {
if (this.state.login === undefined || this.state.login === "") { this.setState({
this.openNotification(`请输入登录手机号码或邮箱`); Phonenumberisnotco:"账号不能为空",
})
return
}
if (this.state.dragOk === false) {
// this.openNotification(`请拖动滑块完成验证`,2);
this.setState({
Phonenumberisnotcosytdhk:"请拖动滑块完成验证",
})
return
}
if (this.state.password === undefined || this.state.password.length ===0 || this.state.password === "") {
this.setState({
Phonenumberisnotcosmmm:"密码不能为空",
})
return return
} }
if (this.state.password === undefined || this.state.password === "") { if (this.state.passwords === undefined || this.state.passwords.length ===0 || this.state.passwords === "") {
this.openNotification(`请输入密码`); this.setState({
Phonenumberisnotcosymmmm:"二次密码不能为空"
})
return return
} }
if (this.state.passwords === undefined || this.state.passwords === "") { if (this.state.password !== this.state.passwords==="") {
this.openNotification(`请输入密码`); this.openNotification(`两次输入的密码不一致`);
return return
} }
if (this.state.password !== this.state.passwords) { else if (this.state.password !==undefined&&this.state.password.length>0&&this.state.password.length<8){
this.openNotification(`两次密码不相同`); this.setState({
Phonenumberisnotcosmmm:"密码不能少于8位",
})
return
} else if (this.state.password !==undefined&&this.state.password.length>0&&this.state.password.length>16){
this.setState({
Phonenumberisnotcosmmm:"密码不能超过16位",
})
return return
} }
if (this.state.codes === undefined || this.state.codes === "") { else if (this.state.passwords !==undefined&&this.state.passwords.length>0&&this.state.passwords.length<8){
this.openNotification(`请输入验证码`); this.setState({
Phonenumberisnotcosymmmm:"二次密码不能少于8位",
})
return
} else if (this.state.passwords !==undefined&&this.state.passwords.length>0&&this.state.passwords.length>16){
this.setState({
Phonenumberisnotcosymmmm:"二次密码不能超过16位",
})
return
}
if (this.state.codes === undefined|| this.state.codes.length ===0 || this.state.codes === "") {
this.setState({
Phonenumberisnotcosyzm:"验证码不能为空"
})
return return
} }
var url = "/accounts/reset_password.json"; var url = "/accounts/reset_password.json";
@ -182,8 +230,30 @@ class LoginRegisterComponent extends Component {
}).then((result) => { }).then((result) => {
// console.log(result); // console.log(result);
//登录成功会生成session //登录成功会生成session
this.openNotification("找回密码成功,请重新登入。"); if(result){
window.location.href = "/login" if(result.data.status===-2){
if(result.data.message==="验证码不正确"){
this.setState({
Phonenumberisnotcosyzm:"验证码不正确",
})
return;
}else if(result.data.message==="验证码已失效"){
this.setState({
Phonenumberisnotcosyzm:"验证码不正确",
})
return;
}else {
this.openNotification(result.data.message);
return;
}
}else {
this.setState({
modalsType:true
})
}
}
}).catch((error) => { }).catch((error) => {
}) })
@ -227,6 +297,7 @@ class LoginRegisterComponent extends Component {
} }
this.setState({ this.setState({
password: stirngt, password: stirngt,
Phonenumberisnotcosmmm:undefined,
}) })
} }
@ -241,13 +312,15 @@ class LoginRegisterComponent extends Component {
} }
this.setState({ this.setState({
passwords: stirngt, passwords: stirngt,
Phonenumberisnotcosymmmm:undefined,
}) })
} }
//获取code //获取code
codesonChange = (e) => { codesonChange = (e) => {
this.setState({ this.setState({
codes: e.target.value codes: e.target.value,
Phonenumberisnotcosyzm:undefined,
}) })
} }
inputOnBlur = (e) => { inputOnBlur = (e) => {
@ -318,6 +391,9 @@ class LoginRegisterComponent extends Component {
}) })
return return
} }
this.setState({
Phonenumberisnotcosytdhk:undefined,
})
this.Emailphonenumberverification(this.state.login) this.Emailphonenumberverification(this.state.login)
} }
@ -360,7 +436,6 @@ class LoginRegisterComponent extends Component {
render() { render() {
const { const {
activeKey,
// 登录 // 登录
autoLogin, autoLogin,
// 注册 // 注册
@ -372,6 +447,10 @@ class LoginRegisterComponent extends Component {
seconds, seconds,
getverificationcodes, getverificationcodes,
Phonenumberisnotco, Phonenumberisnotco,
Phonenumberisnotcosytdhk,
Phonenumberisnotcosmmm,
Phonenumberisnotcosymmmm,
Phonenumberisnotcosyzm,
readonlyInput, readonlyInput,
codes, codes,
Whethertoverify, Whethertoverify,
@ -380,6 +459,11 @@ class LoginRegisterComponent extends Component {
return ( return (
<div className="login_register_content" style={{height: "520px"}}> <div className="login_register_content" style={{height: "520px"}}>
<ReadPassword
modalsType={this.state.modalsType}
StudyMakeMoney={()=>this.StudyMakeMoney()}
/>
<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"}
@ -442,11 +526,11 @@ class LoginRegisterComponent extends Component {
</style> </style>
{/*onBlur={(e) => this.inputOnBlur(e)}*/} {/*onBlur={(e) => this.inputOnBlur(e)}*/}
<Input style={loginInputsyl} type="text" autoComplete="off" onClick={this.changeTypey} <Input style={loginInputsyl} type="text" autoComplete="off" onClick={this.changeTypey}
className={"loginInputzhuche"} className={Phonenumberisnotco && Phonenumberisnotco !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
placeholder="输入注册手机号或邮箱" value={this.state.login} placeholder="输入注册手机号或邮箱" value={this.state.login}
onChange={this.loginInputonChange} style={{marginTop: '10px', height: "38px"}}></Input> onChange={this.loginInputonChange} style={{marginTop: '10px', height: "38px"}}></Input>
{ {
Phonenumberisnotco && Phonenumberisnotco != "" ? Phonenumberisnotco && Phonenumberisnotco !== "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}> <p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotco}</span> <span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotco}</span>
</p> </p>
@ -474,21 +558,43 @@ class LoginRegisterComponent extends Component {
: :
"" ""
} }
{
Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !=="" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotcosytdhk}</span>
</p>
: <div style={{height: "25px"}}></div>
}
<Input type={classpass} <Input type={classpass}
className={"loginInputzhuche"} className={Phonenumberisnotcosmmm && Phonenumberisnotcosmmm !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
onClick={this.changeType} autoComplete="new-password" onChange={this.loginInputonChanges} onClick={this.changeType} autoComplete="new-password" onChange={this.loginInputonChanges}
value={this.state.password} style={{width: "100%", height: "38px", marginTop: '25px'}} value={this.state.password} style={{width: "100%", height: "38px"}}
placeholder="输入8~16位密码区分大小写"></Input> placeholder="输入8~16位密码区分大小写"></Input>
{
Phonenumberisnotcosmmm && Phonenumberisnotcosmmm !== "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotcosmmm}</span>
</p>
: <div style={{height: "25px"}}></div>
}
<Input type={classpass} <Input type={classpass}
className={"loginInputzhuche"} className={Phonenumberisnotcosymmmm && Phonenumberisnotcosymmmm !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
onClick={this.changeType} autoComplete="new-password" onClick={this.changeType} autoComplete="new-password"
onChange={this.loginInputonChangess} value={this.state.passwords} onChange={this.loginInputonChangess} value={this.state.passwords}
style={{height: "38px", marginTop: '25px', width: "100%"}} style={{height: "38px", width: "100%"}}
placeholder="再次输入新密码"></Input> placeholder="再次输入新密码"></Input>
{
Phonenumberisnotcosymmmm && Phonenumberisnotcosymmmm !== "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotcosymmmm}</span>
</p>
: <div style={{height: "25px"}}></div>
}
<div className="yslbutondls">
<div className={"mt25"}> <Input className={Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?" mr5 font-14 color-grey-9 loginInputzhucheyslass bor-reds":" mr5 font-14 color-grey-9 loginInputzhuche"}
<Input className="fl mr5 loginInputzhuche" type="text" autoComplete="off" style={{ type="text" autoComplete="off" style={{
width: "210px", width: "210px",
height: "38px", height: "38px",
}} placeholder="请输入验证码" }} placeholder="请输入验证码"
@ -498,16 +604,16 @@ class LoginRegisterComponent extends Component {
</Input> </Input>
{ {
getverificationcodes === undefined ? getverificationcodes === undefined ?
<Button className="fl ml5 " disabled <Button className=" ml5 " disabled
style={{"width": "120px", "text-align": "center", "height": "45px",}} 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 " <Button className=" ml5 "
style={{"width": "120px", "text-align": "center", "height": "45px"}} style={{"width": "120px", "text-align": "center", "height": "45px"}}
type="primary" type="primary"
onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button> onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>
: :
<Button className="fl ml5 " <Button className=" ml5 "
style={{"width": "120px", "text-align": "center", "height": "45px"}} style={{"width": "120px", "text-align": "center", "height": "45px"}}
type="primary" type="primary"
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button> onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
@ -516,9 +622,17 @@ class LoginRegisterComponent extends Component {
</div> </div>
<Button className="login_btn" size={"large"} type="primary" {
style={{height: "46px"}} Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?
onClick={this.Retrievepassword}>完成</Button> <p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotcosyzm}</span>
</p>
: <div style={{height: "25px"}}></div>
}
<Button size={"large"} type="primary"
style={{height:"46px", width: "100%",marginBottom:"26px"}}
onClick={this.Retrievepassword}>完成</Button>
</div> </div>
</div> </div>

@ -1,8 +1,10 @@
import React, {Component} from 'react'; import React, {Component} from 'react';
import {Button,notification} from 'antd'; import {Button,notification} from 'antd';
import {broadcastChannelPostMessage} from 'educoder'; import {broadcastChannelPostMessage} from 'educoder';
import MyEduCoderModal from './MyEduCoderModal';
import Notcompleted from './Notcompleted';
import axios from 'axios'; import axios from 'axios';
import './common.css' import './common.css';
import mytc from './img/mytc.png'; import mytc from './img/mytc.png';
import skzbdx from './img/skzbdx.png'; import skzbdx from './img/skzbdx.png';
import zyrs1 from './img/zyrs1.png'; import zyrs1 from './img/zyrs1.png';
@ -155,6 +157,12 @@ class InterestpageComponent extends Component {
} }
setMyEduCoderModals=()=>{
this.setState({
MyEduCoderModals:true
})
}
//兴趣页面点击 //兴趣页面点击
Interestcompletionpage(){ Interestcompletionpage(){
if(this.state.gouxuans.length === 0){ if(this.state.gouxuans.length === 0){
@ -179,7 +187,8 @@ class InterestpageComponent extends Component {
}).then((response) => { }).then((response) => {
if (response !== undefined) { if (response !== undefined) {
// this.Jumptotheinterestpage(); // this.Jumptotheinterestpage();
window.location.href = "/" // window.location.href = "/"
this.setMyEduCoderModals()
} }
@ -218,6 +227,13 @@ class InterestpageComponent extends Component {
// console.log(error); // console.log(error);
// }) // })
// } // }
setNotcompleteds=()=>{
this.setState({
Notcompleteds:true,
MyEduCoderModals:false
})
}
render() { render() {
const { const {
gouxuans, gouxuans,
@ -228,6 +244,14 @@ class InterestpageComponent extends Component {
<div className="ysllogin_register_contents" style={{width:"800px",height: "600px"}}> <div className="ysllogin_register_contents" style={{width:"800px",height: "600px"}}>
<MyEduCoderModal
modalsType={this.state.MyEduCoderModals}
setNotcompleteds={()=>{this.setNotcompleteds()}}
/>
<Notcompleted
modalsType={this.state.Notcompleteds}
/>
<div className="ysllogin_section"> <div className="ysllogin_section">
<div className="mt15"><span className="yslspans1">请选择你的职业</span></div> <div className="mt15"><span className="yslspans1">请选择你的职业</span></div>
<div className="ysldivhome1" > <div className="ysldivhome1" >

@ -23,6 +23,9 @@ const loginInputsyl = {
class LoginRegisterComponent extends Component { class LoginRegisterComponent extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
//
// console.log("LoginRegisterComponent"); // console.log("LoginRegisterComponent");
// console.log("29"); // console.log("29");
// console.log(props.loginstatus); // console.log(props.loginstatus);
@ -30,7 +33,6 @@ class LoginRegisterComponent extends Component {
// console.log(props.loginstatus); // console.log(props.loginstatus);
this.state = { this.state = {
tab:["0"], tab:["0"],
activeKey: 0,
classpass: "text", classpass: "text",
// 登录 // 登录
passopens: passoff, passopens: passoff,
@ -55,6 +57,7 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcosymmm:undefined, Phonenumberisnotcosymmm:undefined,
Phonenumberisnotcosytdhk:undefined, Phonenumberisnotcosytdhk:undefined,
Phonenumberisnotcosyfwtk:undefined, Phonenumberisnotcosyfwtk:undefined,
Phonenumberisnotcodmm:undefined,
Phonenumberisnotcobool: false, Phonenumberisnotcobool: false,
Whethertoverify:false, Whethertoverify:false,
@ -64,7 +67,6 @@ class LoginRegisterComponent extends Component {
// console.log(props.loginstatus); // console.log(props.loginstatus);
this.state = { this.state = {
tab:["1"], tab:["1"],
activeKey: '1',
classpass: "text", classpass: "text",
// 登录 // 登录
passopens: passoff, passopens: passoff,
@ -90,6 +92,7 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcosytdhk:undefined, Phonenumberisnotcosytdhk:undefined,
Phonenumberisnotcosyfwtk:undefined, Phonenumberisnotcosyfwtk:undefined,
Phonenumberisnotcobool: false, Phonenumberisnotcobool: false,
Phonenumberisnotcodmm:undefined,
Whethertoverify:false, Whethertoverify:false,
} }
@ -108,12 +111,10 @@ class LoginRegisterComponent extends Component {
this.state = { this.state = {
tab:["0"], tab:["0"],
} }
this.onTabChange('0');
} else if (this.props.match.url === "/register") { } else if (this.props.match.url === "/register") {
this.state = { this.state = {
tab:["1"], tab:["1"],
} }
this.onTabChange('1');
} }
} }
@ -129,7 +130,6 @@ class LoginRegisterComponent extends Component {
} }
;
StudyMakeMoney = () => { // 调用父组件方法 StudyMakeMoney = () => { // 调用父组件方法
this.props.Setshowbool(3); this.props.Setshowbool(3);
// this.props.Setlogins(3); // this.props.Setlogins(3);
@ -143,8 +143,6 @@ class LoginRegisterComponent extends Component {
} }
onTabChange = (activeKey) => { onTabChange = (activeKey) => {
console.log("onTabChange"); console.log("onTabChange");
// console.log(activeKey);
// this.setState({activeKey})
} }
// -------------------- LOGIN START // -------------------- LOGIN START
//下次自动登入 //下次自动登入
@ -183,15 +181,6 @@ class LoginRegisterComponent extends Component {
//是否验证通过 //是否验证通过
dragOkCallback = () => { dragOkCallback = () => {
console.log(this.state.logins); console.log(this.state.logins);
if(this.state.logins===""||this.state.logins.length===0){
this.setState({
Phonenumberisnotco:"账号不能为空",
Phonenumberisnotcobool: true,
dragOk:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
return
}
this.Emailphonenumberverification(this.state.logins, 2) this.Emailphonenumberverification(this.state.logins, 2)
} }
@ -199,20 +188,22 @@ class LoginRegisterComponent extends Component {
//是否同意 //是否同意
onChange = (e) => { onChange = (e) => {
this.setState({ this.setState({
Agreetotheterms: e.target.checked, Agreetotheterms: e.target.checked,
Phonenumberisnotcosyfwtk:undefined,
}) })
} }
//登入接口 //登入接口
postLogin = () => { postLogin = () => {
if (this.state.login === undefined || this.state.login == "") { if (this.state.login === undefined || this.state.login == "") {
this.openNotification(`请输入登录手机号码或邮箱`,2); this.setState({
Phonenumberisnotco:"账号不能为空",
})
return return
} else if (this.state.password === undefined || this.state.password == "") { } else if (this.state.password === undefined || this.state.password == "") {
this.openNotification(`请输入密码`,2); this.setState({
Phonenumberisnotcodmm:"密码不能为空",
})
return return
} }
var url = "/accounts/login.json"; var url = "/accounts/login.json";
@ -223,6 +214,38 @@ class LoginRegisterComponent extends Component {
if (response === undefined) { if (response === undefined) {
return return
} }
if(response.data.identity === null || response.data.identity === undefined){
this.props.history.push("/interesse");
return;
}
if(response.data.status === -2){
if("该手机号尚未注册" || "该邮箱尚未注册"){
this.setState({
Phonenumberisnotco:response.data.message,
})
return;
}
else if("错误的账号或密码"){
this.setState({
Phonenumberisnotco:response.data.message,
})
return;
}
else if("违反平台使用规范,账号已被锁定"){
this.setState({
Phonenumberisnotco:response.data.message,
})
return;
}
else {
this.openNotification(response.data.message);
return;
}
}
if (response.status === 200) { if (response.status === 200) {
if (response.data.status === 402) { if (response.data.status === 402) {
window.location.href = response.data.url; window.location.href = response.data.url;
@ -244,12 +267,30 @@ class LoginRegisterComponent extends Component {
} }
//注册接口 //注册接口
postregistered = () => { postregistered = () => {
// if (this.state.logins === undefined || this.state.logins === "") {
// this.openNotification(`请输入登录手机号码或邮箱`,2);
//
// return
// } else if (this.state.dragOk === false) {
// this.openNotification(`请拖动滑块验证`,2);
// return
// } else if (this.state.codes === undefined || this.state.codes == "") {
// this.openNotification(`请输入验证码`,2);
// return
// } else if (this.state.passwords === undefined || this.state.passwords == "") {
// this.openNotification(`请输入密码`,2);
// return
// } else if (this.state.Agreetotheterms === false) {
// this.openNotification(`请同意服务协议条款`,2);
// return;
// }
if (this.state.logins === undefined || this.state.logins === ""||this.state.logins.length===0) { if (this.state.logins === undefined || this.state.logins === ""||this.state.logins.length===0) {
this.setState({ this.setState({
Phonenumberisnotcos:"账号不能为空", Phonenumberisnotcos:"账号不能为空",
}) })
return return
} else if (this.state.dragOk === false) { } else if (this.state.dragOk === false) {
// this.openNotification(`请拖动滑块完成验证`,2);
this.setState({ this.setState({
Phonenumberisnotcosytdhk:"请拖动滑块完成验证", Phonenumberisnotcosytdhk:"请拖动滑块完成验证",
}) })
@ -265,10 +306,18 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcosymmm:"密码不能为空", Phonenumberisnotcosymmm:"密码不能为空",
}) })
return return
} else if (this.state.Agreetotheterms === false) { } else if (this.state.passwords !==undefined &&this.state.passwords.length>0&&this.state.passwords.length<8){
this.setState({ this.setState({
Phonenumberisnotcosyfwtk:"请同意服务协议条款", Phonenumberisnotcosymmm:"密码不能少于8位",
}) })
return
} else if (this.state.passwords !==undefined &&this.state.passwords.length>0&&this.state.passwords.length>16){
this.setState({
Phonenumberisnotcosymmm:"密码不能超过16位",
})
return
} else if (this.state.Agreetotheterms === false) {
this.openNotification(`请同意服务协议条款`,2);
return; return;
} }
var url = "/accounts/register.json"; var url = "/accounts/register.json";
@ -284,13 +333,16 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcosyzm:"验证码不正确", Phonenumberisnotcosyzm:"验证码不正确",
}) })
return; return;
}else if(result.data.message==="验证码已失效"){ }else if(result.data.message==="验证码已失效"){
this.setState({ this.setState({
Phonenumberisnotcosyzm:"验证码不正确", Phonenumberisnotcosyzm:"验证码不正确",
}) })
return; return;
}else {
this.openNotification(result.data.message);
return;
} }
}else { }else {
this.setState({ this.setState({
@ -493,6 +545,7 @@ class LoginRegisterComponent extends Component {
}else{ }else{
this.setState({ this.setState({
login: stirngt, login: stirngt,
Phonenumberisnotco:undefined,
}) })
} }
@ -514,6 +567,7 @@ class LoginRegisterComponent extends Component {
} }
this.setState({ this.setState({
password: stirngt, password: stirngt,
Phonenumberisnotcodmm:undefined,
}) })
// this.setState({ // this.setState({
// password: e.target.value // password: e.target.value
@ -597,7 +651,6 @@ class LoginRegisterComponent extends Component {
} }
render() { render() {
const { const {
activeKey,
// 登录 // 登录
autoLogin, autoLogin,
classpass, classpass,
@ -612,11 +665,10 @@ class LoginRegisterComponent extends Component {
dragOk, dragOk,
Whethertoverify, Whethertoverify,
classpassbool, classpassbool,
Phonenumberisnotcosytdhk,
Phonenumberisnotcosyzm, Phonenumberisnotcosyzm,
Phonenumberisnotcosymmm, Phonenumberisnotcosymmm,
Phonenumberisnotcosytdhk, Phonenumberisnotcodmm,
Phonenumberisnotcosyfwtk,
Phonenumberisnotcobool,
// 注册 // 注册
readAgreement, readAgreement,
} = this.state } = this.state
@ -681,7 +733,7 @@ class LoginRegisterComponent extends Component {
<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 loginInputzhuche" className={Phonenumberisnotco && Phonenumberisnotco !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" 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>
@ -695,11 +747,17 @@ 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 loginInputzhuche" className={Phonenumberisnotcodmm && Phonenumberisnotcodmm !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
placeholder="密码"></Input> placeholder="密码"></Input>
{
Phonenumberisnotcodmm && Phonenumberisnotcodmm != "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcodmm}</span>
</p>
: <div style={{height:"25px"}}></div>
}
<div className="left_right mt25 font-12 " style={{color: '#676767'}}> <div className="left_right font-12 " style={{color: '#676767'}}>
<Checkbox onChange={this.onAutoLoginChange} checked={autoLogin}>下次自动登录</Checkbox> <Checkbox onChange={this.onAutoLoginChange} checked={autoLogin}>下次自动登录</Checkbox>
<a onClick={()=>this.StudyMakeMoney()} <a onClick={()=>this.StudyMakeMoney()}
@ -710,40 +768,19 @@ 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 loginInputzhuche" placeholder="请使用手机号/邮箱账号进行注册" <Input placeholder="请使用手机号/邮箱账号进行注册"
className={Phonenumberisnotcos && Phonenumberisnotcos !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
value={this.state.logins} value={this.state.logins}
type="text" autoComplete="off" type="text" autoComplete="off"
onChange={this.loginInputonChanges} onChange={this.loginInputonChanges}
style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}></Input> style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}></Input>
{ {
Phonenumberisnotcos && Phonenumberisnotcos != "" ? Phonenumberisnotcos && Phonenumberisnotcos !== "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}> <p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcos}</span> <span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcos}</span>
</p> </p>
@ -753,7 +790,7 @@ class LoginRegisterComponent extends Component {
{ {
Whethertoverify===false? Whethertoverify===false?
<DragValidator <DragValidator
height={38} className="loginInput" successGreenColor="#29bd8b" height={38} successGreenColor="#29bd8b"
style={{ height: '38px'}} style={{ height: '38px'}}
dragOkCallback={this.dragOkCallback} dragOkCallback={this.dragOkCallback}
></DragValidator> ></DragValidator>
@ -764,7 +801,7 @@ class LoginRegisterComponent extends Component {
{ {
Whethertoverify===true? Whethertoverify===true?
<DragValidatortwo <DragValidatortwo
height={38} className="loginInput" successGreenColor="#29bd8b" height={38} successGreenColor="#29bd8b"
style={{ height: '38px'}} style={{ height: '38px'}}
dragOkCallback={this.dragOkCallback} dragOkCallback={this.dragOkCallback}
></DragValidatortwo> ></DragValidatortwo>
@ -772,8 +809,8 @@ class LoginRegisterComponent extends Component {
"" ""
} }
{ {
Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk != "" ? Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !== "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px",textAlign:"left"}}> <p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosytdhk}</span> <span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosytdhk}</span>
</p> </p>
: <div style={{height:"25px"}}></div> : <div style={{height:"25px"}}></div>
@ -781,38 +818,44 @@ class LoginRegisterComponent extends Component {
} }
<div className=""> <div className="yslbutondls">
<Input className="fl mr5 font-14 color-grey-9 loginInputzhuche" name="codes" type="text" autoComplete="off" readonly
onfocus="this.removeAttribute('readonly')" style={{ <Input
width:'210px', className={Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?" mr5 font-14 color-grey-9 loginInputzhucheyslass bor-reds":" mr5 font-14 color-grey-9 loginInputzhuche"}
height:'38px', name="codes" type="text" autoComplete="off" readonly
}} placeholder="请输入验证码" onfocus="this.removeAttribute('readonly')" style={{
onChange={this.codesonChange} width:'210px',
value={codes} height:'38px',
> }} placeholder="请输入验证码"
</Input> onChange={this.codesonChange}
{ value={codes}
getverificationcodes === undefined ? >
<Button className="fl ml5 font-14" disabled style={{"width": "120px","text-align":"center", "height": "45px",}} </Input>
size={"large"}>重新发送{seconds}s</Button> {
: getverificationcodes === true ? getverificationcodes === undefined ?
<Button className="fl ml5 font-14" type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}} <Button className=" ml5 font-14" disabled style={{"width": "120px","text-align":"center", "height": "45px",}}
onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button> size={"large"}>重新发送{seconds}s</Button>
: : getverificationcodes === true ?
<Button className="fl ml5 font-14 " type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}} <Button className=" 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=" ml5 font-14 " type="primary" style={{"width": "120px","text-align":"center", "height": "45px",}}
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
}
</div>
<div>
{
Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosyzm}</span>
</p>
: <div style={{height:"25px"}}></div>
}
</div> </div>
{
Phonenumberisnotcosyzm && Phonenumberisnotcosyzm != "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosyzm}</span>
</p>
: <div style={{height:"25px"}}></div>
}
<style> <style>
{ {
@ -824,8 +867,9 @@ class LoginRegisterComponent extends Component {
` `
} }
</style> </style>
<Input className="loginInput font-14 color-grey-9 loginInputzhuche" placeholder="输入8~16位密码区分大小写" <Input placeholder="输入8~16位密码区分大小写"
type={classpassbool===false?"text":"password"} type={classpassbool===false?"text":"password"}
className={Phonenumberisnotcosymmm && Phonenumberisnotcosymmm !== "" ?" font-14 color-grey-9 loginInputzhucheysl ":" font-14 color-grey-9 loginInputzhuche"}
autoComplete="new-password" autoComplete="new-password"
onClick={this.changeType} onClick={this.changeType}
value={this.state.passwords} onChange={this.passwordonChanges} value={this.state.passwords} onChange={this.passwordonChanges}
@ -834,11 +878,11 @@ class LoginRegisterComponent extends Component {
</img> </img>
}></Input> }></Input>
{ {
Phonenumberisnotcosymmm && Phonenumberisnotcosymmm!== "" ? Phonenumberisnotcosymmm && Phonenumberisnotcosymmm !== "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px",textAlign:"left"}}> <p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosymmm}</span> <span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosymmm}</span>
</p> </p>
: "" : <div style={{height:"25px"}}></div>
} }
<Checkbox onChange={this.onChange} <Checkbox onChange={this.onChange}
@ -846,15 +890,7 @@ class LoginRegisterComponent extends Component {
><span className="font-14 " style={{ ><span className="font-14 " style={{
color: '#676767', color: '#676767',
}}>我已阅读并同意服务协议条款</span></Checkbox> }}>我已阅读并同意服务协议条款</span></Checkbox>
{ <Button className=" font-16" type="primary" style={{height:"46px", width: "100%",marginTop:"26px"}} onClick={() => this.postregistered()}
Phonenumberisnotcosyfwtk && Phonenumberisnotcosyfwtk!== "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosyfwtk}</span>
</p>
: ""
}
<Button className="login_btn font-16" type="primary" style={{height:"46px"}} onClick={() => this.postregistered()}
size={"large"}>注册</Button> size={"large"}>注册</Button>

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import {getImageUrl} from 'educoder'; import {getImageUrl} from 'educoder';
import { Modal} from 'antd'; import { Modal} from 'antd';
import axios from 'axios'; import axios from 'axios';
import 'common.css' import './common.css'
//立即申请试用 //立即申请试用
class MyEduCoderModal extends Component { class MyEduCoderModal extends Component {
@ -14,11 +14,12 @@ class MyEduCoderModal extends Component {
} }
modalCancel=()=>{ modalCancel=()=>{
//取消 window.location.href = "/"
} }
setDownload=()=>{ setDownload=()=>{
//立即联系 //立即联系
this.props.setNotcompleteds()
} }
@ -36,11 +37,11 @@ class MyEduCoderModal extends Component {
width="530px" width="530px"
> >
<div className="educouddiv"> <div className="educouddiv">
<div><p>欢迎使用EduCoder您可以试用1天</p></div> <div className={"tabeltext-alignleft mt10"}><p>欢迎使用EduCoder您可以试用1天</p></div>
<div><p>超过期限需要经过管理员的授权审核</p></div> <div className={"tabeltext-alignleft mt10"}><p>超过期限需要经过管理员的授权审核</p></div>
<div className="clearfix mt30 edu-txt-center"> <div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={this.modalCancel()}>先试试看</a> <a className="task-btn mr30" onClick={()=>this.modalCancel()}>先试试看</a>
<a className="task-btn task-btn-orange" onClick={this.setDownload()}>立即申请授权</a> <a className="task-btn task-btn-orange" onClick={()=>this.setDownload()}>立即申请授权</a>
</div> </div>
</div> </div>
</Modal> </Modal>

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import {getImageUrl} from 'educoder'; import {getImageUrl} from 'educoder';
import { Modal} from 'antd'; import { Modal} from 'antd';
import axios from 'axios'; import axios from 'axios';
import 'common.css' import './common.css';
//完善个人资料 //完善个人资料
class Notcompleted extends Component { class Notcompleted extends Component {
@ -12,11 +12,11 @@ class Notcompleted extends Component {
} }
modalCancel=()=>{ modalCancel=()=>{
//取消 window.location.href = "/";
} }
setDownload=()=>{ setDownload=()=>{
//立即联系 window.location.href ='/account/profile';
} }
@ -34,11 +34,11 @@ class Notcompleted extends Component {
width="530px" width="530px"
> >
<div className="educouddiv"> <div className="educouddiv">
<div><p>您尚未完善个人资料</p></div> <div className={"tabeltext-alignleft mt10"}><p>您尚未完善个人资料</p></div>
<div><p>请在完成资料后提交试用申请</p></div> <div className={"tabeltext-alignleft mt10"}><p>请在完成资料后提交试用申请</p></div>
<div className="clearfix mt30 edu-txt-center"> <div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={this.modalCancel()}>取消</a> <a className="task-btn mr30" onClick={()=>this.modalCancel()}>取消</a>
<a className="task-btn task-btn-orange" onClick={this.setDownload()}>立即完善资料</a> <a className="task-btn task-btn-orange" onClick={()=>this.setDownload()}>立即完善资料</a>
</div> </div>
</div> </div>
</Modal> </Modal>

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import {getImageUrl} from 'educoder'; import {getImageUrl} from 'educoder';
import { Modal} from 'antd'; import { Modal} from 'antd';
import axios from 'axios'; import axios from 'axios';
import 'common.css' import './common.css'
//密码已重置,请重新登录 //密码已重置,请重新登录
class ReadPassword extends Component { class ReadPassword extends Component {
@ -14,6 +14,7 @@ class ReadPassword extends Component {
setDownload=()=>{ setDownload=()=>{
//立即联系 //立即联系
this.props.StudyMakeMoney()
} }
@ -30,9 +31,9 @@ class ReadPassword extends Component {
visible={this.props.modalsType===undefined?false:this.props.modalsType} visible={this.props.modalsType===undefined?false:this.props.modalsType}
width="530px" width="530px"
> >
<div className="educouddiv"> <div className="educouddiv tabeltext-alignleft">
<div><p>密码已重置请重新登录</p></div> <div className={"tabeltext-alignleft mb20"}><p>密码已重置请重新登录</p></div>
<a className="task-btn task-btn-orange" onClick={this.setDownload()}>知道啦</a> <a className="task-btn task-btn-orange bth100" onClick={()=>this.setDownload()}>知道啦</a>
</div> </div>
</Modal> </Modal>
) )

@ -5,6 +5,12 @@
.login_register_content .ant-input { .login_register_content .ant-input {
background:rgb(244,244,244); background:rgb(244,244,244);
} }
.login_register_content .loginInputzhucheyslass{
border:1px solid red !important;
}
.login_register_content .loginInputzhucheyslass:hover{
border:1px solid red !important;
}
.login_register_content { .login_register_content {
width: 434px; width: 434px;
box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15); box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15);
@ -34,7 +40,7 @@
.educouddiv { .educouddiv {
display: flex; display: flex;
justify-content: center; flex-direction: column;
} }
@ -164,4 +170,90 @@
} }
.yslgouxuanimg2{ .yslgouxuanimg2{
height: 20px; height: 20px;
}
.yslbutondls{
display: flex;
flex-direction:row;
}
yslinpulsy input{
}
.loginInputzhuche{
width: 100%;
background-color: #fff!important;
height: 45px !important;
padding: 5px;
}
.loginInputzhucheyslass {
width: 100%;
background-color: #fff!important;
height: 45px !important;
padding: 5px;
}
.loginInputzhucheyslass .ant-input{
width: 100%;
background-color: #fff!important;
height: 45px !important;
padding: 5px;
position: relative;
right: 5px;
width: 103%;
border: 1px solid #FF0000!important;
border-radius: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.loginInputzhucheyslass .ant-input:hover{
border: 1px solid #FF0000!important;
}
.loginInputzhuche .ant-input{
width: 100%;
background-color: #fff!important;
height: 45px !important;
padding: 5px;
position: relative;
right: 5px;
width: 103%;
}
.loginInputzhucheysl{
width: 100%;
background-color: #fff!important;
height: 45px !important;
padding: 5px;
border-radius: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.loginInputzhucheysl .ant-input{
width: 100%;
background-color: #fff!important;
height: 45px !important;
padding: 5px;
position: relative;
right: 5px;
width: 103%;
border: 1px solid #FF0000!important;
border-radius: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.loginInputzhucheysl .ant-input:hover{
border: 1px solid #FF0000!important;
}
.bth100{
width: 100px;
margin: 0 auto;
} }

@ -169,7 +169,7 @@ class SearchPage extends Component{
return ( return (
<a key={key} <a key={key}
href={ href={
item.type==="shixun"?`/shixuns/${item.identifier}/challenges`:item.type==="course"?`/courses/${item.id}/students`:item.type==="subject"?`/courses/${item.id}/students`:item.type==="memo"?`/forums/${item.id}`:"" item.type==="shixun"?`/shixuns/${item.identifier}/challenges`:item.type==="course"?`/courses/${item.id}/students`:item.type==="subject"?`/paths/${item.id}`:item.type==="memo"?`/forums/${item.id}`:""
} }
target="_blank" target="_blank"
> >
@ -227,7 +227,9 @@ class SearchPage extends Component{
</div> </div>
<div className="mt20">
<span className="ziticor"><i className="fa fa-user ziticor"></i><span>{item.author_name}</span></span><span className="ml10 ziticor "><span>{item.author_school_name}</span></span> <span className="ml20 ziticor"><i className="iconfont icon-shixunguanqia ziticor"></i><span>:<span className="ml10 ziticor">{item.challenges_count===undefined?0:item.challenges_count}</span></span></span> <span className="ml20 ziticor"><i className="iconfont icon-chengyuan ziticor"></i><span>:<span className="ml10 ziticor">{item.study_count===undefined?0:item.study_count}</span></span></span>
</div>
</div> </div>
</div> </div>
@ -244,9 +246,7 @@ class SearchPage extends Component{
</div> </div>
<div className="mt20">
<span></span> <span></span> <span></span>
</div>
</div> </div>
} }

@ -117,4 +117,12 @@
} }
.bjyss{ .bjyss{
background: #F8F8F8; background: #F8F8F8;
}
.zj{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap
}
.ziticor{
color: #777777;
} }
Loading…
Cancel
Save