caishi 5 years ago
commit 049daac232

@ -149,15 +149,29 @@
<script>
(function() { // Scoping function to avoid globals
var href = location.href;
if(window.location.port === "3007"){
if (href.indexOf('/tasks/') != -1) {
document.write('<script type="text/javascript" src="http://47.96.87.25:48080/assets/kindeditor/kindeditor.js"><\/script>');
document.write('<script type="text/javascript" src="https://newweb.educoder.net/assets/kindeditor/kindeditor.js"><\/script>');
// build.js中会将这个url附加一个前缀 react/build
document.write('<script type="text/javascript" src="/js/create_kindeditor.js"><\/script>');
document.write('<script type="text/javascript" src="http://47.96.87.25:48080/javascripts/educoder/edu_application.js"><\/script>');
document.write('<script type="text/javascript" src="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>');
} else if (href.indexOf('/paths/') != -1) {
document.write('<script type="text/javascript" src="http://47.96.87.25:48080/javascripts/educoder/edu_application.js"><\/script>');
document.write('<script type="text/javascript" src="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>');
}
}else{
if (href.indexOf('/tasks/') != -1) {
document.write('<script type="text/javascript" src="/assets/kindeditor/kindeditor.js"><\/script>');
// build.js中会将这个url附加一个前缀 react/build
document.write('<script type="text/javascript" src="/js/create_kindeditor.js"><\/script>');
document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>');
} else if (href.indexOf('/paths/') != -1) {
document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>');
}
}
})();
</script>
<!-- <script type="text/javascript" src="https://testeduplus2.educoder.net/assets/kindeditor/kindeditor.js"></script>

@ -2,7 +2,7 @@ import React from "react";
import axios from 'axios';
import { requestProxy } from "./indexEduplus2RequestProxy";
import { broadcastChannelOnmessage } from 'educoder'
import { broadcastChannelOnmessage ,SetAppModel} from 'educoder';
import { notification } from 'antd';
import './index.css'
broadcastChannelOnmessage('refreshPage', () => {
@ -13,8 +13,16 @@ function locationurl(list){
if (window.location.port === "3007") {
} else {
if(list===402){
SetAppModel(402)
}else if(list===407){
}else{
window.location.replace(list)
}
}
}
// TODO 开发期多个身份切换
@ -149,7 +157,7 @@ export function initAxiosInterceptors(props) {
debugger
console.log(response.data.status);
console.log(response.data);
locationurl(response.data.message);
locationurl(402);
}

@ -1,8 +1,8 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import {getImageUrl} from 'public/react/src/common/educoder';
import { Modal} from 'antd';
import axios from 'axios';
import './common.css';
import '../../modules/user/common.css';
//完善个人资料
class Notcompleted extends Component {
@ -21,7 +21,7 @@ class Notcompleted extends Component {
render() {
console.log(this.props)
return(
<Modal
keyboard={false}

@ -0,0 +1,33 @@
import React, { Component } from 'react';
import { Modal } from 'antd';
// import Notcompleted from './Notcompleted';
export function SetAppModel(options = {}) {
return function wrap(WrappedComponent) {
return class Wrapper extends Component {
constructor(props) {
super(props);
this.state = {
}
}
componentDidMount(){
console.log(this.props)
}
render() {
const { titlemessage, Modallisttype, Modallist, singleButton } = this.state;
return (
<div>
{/*<Notcompleted*/}
{/*modalsType={this.state.Notcompleteds}*/}
{/*/>*/}
</div>
)
}
}
}
}

@ -30,6 +30,9 @@ export { EDU_ADMIN, EDU_BUSINESS, EDU_SHIXUN_MANAGER, EDU_SHIXUN_MEMBER, EDU_CER
export { themes, ThemeContext } from './context/ThemeContext'
export { ModalHOC } from './components/ModalHOC'
export { SetAppModel } from './components/SetAppModel'
export { default as Cropper } from './components/Cropper'
export { default as ConditionToolTip } from './components/ConditionToolTip'
export { default as DragValidator } from './components/DragValidator'

@ -955,7 +955,7 @@ class Fileslists extends Component{
}
>
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="https://www.educoder.net/images/educoder/nodata.png" />
<img className="edu-nodata-img mb20" src="/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂无数据哦~</p></div>
</div>

@ -252,7 +252,7 @@ class UseBank extends Component{
<div style={{"height":"230px"}} className="d_middle edu-txt-center">
<div>
<p className="font-16 mb20 color-grey-3">通过职业认证的教师才能访问公共题库</p>
<a className="white-btn edu-orangeback-btn" target="_blank" href="/account/professional_certification">立即认证</a>
<a className="white-btn edu-orangeback-btn" target="_blank" href="/account/certification">立即认证</a>
</div>
</div>
:

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

@ -949,6 +949,11 @@ kbd,
samp {
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;
}
/* 表格间距太大 */
.ant-table-tbody>tr>td, .ant-table-thead>tr>th {
padding: 16px 0px;
}
/* FORM START */
.ant-form label{
/* 为了覆盖antd的样式这里使用了importantTODO */

@ -72,7 +72,7 @@ class GraduationTasksappraiseMainEditor extends Component{
}
clearInputs = () => {
this.setState({
score: 0,
score: undefined,
same_score: false,
fileList: []
})

@ -772,7 +772,7 @@ class GraduationTasks extends Component{
}
>
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="https://www.educoder.net/images/educoder/nodata.png" />
<img className="edu-nodata-img mb20" src="/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂无数据哦~</p></div>
</div>

@ -351,8 +351,8 @@ class CoursesNew extends Component {
render() {
let {datatime} = this.state;
const {getFieldDecorator} = this.props.form;
const options = this.state.searchlist.map(d => <Option key={d.name}>{d.name}</Option>);
const optionschool = this.state.searchlistscholl.map(z => <Option key={z}>{z}</Option>);
const options = this.state.searchlist.map(d => <Option key={d.name} value={d.name}>{d.name}</Option>);
const optionschool = this.state.searchlistscholl.map(z => <Option key={z} value={z}>{z}</Option>);
// console.log(this.props.current_user.user_school)
return (
<React.Fragment>

@ -1067,7 +1067,6 @@ class Listofworksstudentone extends Component {
}
}
let columns2= arr;
var teacherlist = undefined;
var teacherlists = undefined;
if (teacherdata !== undefined) {
// console.log("seacthdata设置数据")
@ -1075,7 +1074,6 @@ class Listofworksstudentone extends Component {
if (teacherdata.id === undefined) {
this.setState({
data: [],
teacherlist: undefined,
loadingstate: false,
styletable: styletable,
})
@ -1115,10 +1113,6 @@ class Listofworksstudentone extends Component {
// current: this.state.page,
// }
styletable = {"display": "block",}
} else {
// console.log("seacthdata设置数据2")
teacherlist = undefined;
}
}
@ -1162,7 +1156,6 @@ class Listofworksstudentone extends Component {
this.setState({
data: datalist,
datas: datalists,
teacherlist: teacherlist,
teacherlists: teacherlists,
loadingstate: false,
styletable: styletable,
@ -1488,7 +1481,7 @@ class Listofworksstudentone extends Component {
limit:20,
}
axios.post(urll, data).then((result) => {
// debugger
debugger
if (result !== undefined) {
// console.log(url)
// console.log("作品列表6789077")
@ -1583,7 +1576,7 @@ class Listofworksstudentone extends Component {
// 设置数据
seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => {
// debugger
debugger
let {page, limit} = this.state;
let datalist = [];
let columns = this.state.columns;
@ -1707,11 +1700,9 @@ class Listofworksstudentone extends Component {
}
} else {
var teacherlist = undefined;
}
this.setState({
data: datalist,
teacherlist: teacherlist,
columns: columns2,
loadingstate: false,
})
@ -2197,10 +2188,10 @@ class Listofworksstudentone extends Component {
// console.log(this.state.data);
// console.log("841");
// console.log(this.state.columns);
// console.log(data);
// console.log("2202");
// console.log(this.props.isAdmin());
console.log(this.state.columns);
console.log(data);
console.log("2202");
console.log(this.props.isAdmin());
return (
this.props.isAdmin() === true ?
@ -2337,7 +2328,7 @@ class Listofworksstudentone extends Component {
(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTimet}>
计算成绩
</div>:""):
teacherdata&&teacherdata.homework_status[0]=== "未发布"? "":
teacherdata&&teacherdata.homework_status[0]!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
计算成绩
</div>:"")
@ -2628,7 +2619,7 @@ class Listofworksstudentone extends Component {
</div>
:"")
:
(teacherdata&&teacherdata.homework_status[0]=== "未发布"? "":
(teacherdata&&teacherdata.homework_status[0]!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
this.props.isNotMember()===false?
<div className={"computeTimes font-13"}>
计算成绩
@ -2793,7 +2784,7 @@ class Listofworksstudentone extends Component {
(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:""):
teacherdata&&teacherdata.homework_status[0]=== "未发布"? "":
teacherdata&&teacherdata.homework_status[0]!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
计算成绩
</div>:"")

@ -229,7 +229,7 @@ class TraineetraininginformationModal extends Component {
<div style={{"clear": "both"}}>
<div className="fl edu-back-white ml10 ">
<img alt="头像" className="radius mt10" height="70" id="nh_user_logo" name="avatar_image"
src={this.props.viewtrainingdata === undefined ? "" : "https://www.educoder.net/images/" + `${this.props.viewtrainingdata.image_url}`}
src={this.props.viewtrainingdata === undefined ? "" : "/images/" + `${this.props.viewtrainingdata.image_url}`}
width="70"/>
</div>
<div className="fl edu-back-white ml20 mt15">

@ -1202,7 +1202,7 @@ class ShixunHomework extends Component{
}
>
<div className="edu-tab-con-box clearfix edu-txt-center"><img className="edu-nodata-img mb20"
src="https://www.educoder.net/images/educoder/nodata.png" />
src="/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂无数据哦~</p></div>
</div>
</Spin>

@ -69,11 +69,8 @@ class EducoderInteresse extends Component {
display: "flex",
justifyContent: "center",
width: "100%",
bottom:"0",
position: "fixed"
}}>
<div className="font-14 color-grey-9 " style={{ bottom:"0",position: "absolute",marginBottom: "20px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div>
</div>
</div>

@ -157,8 +157,7 @@ class EducoderLogin extends Component {
display: "flex",
justifyContent: "center",
width: "100%",
height: "550px",
marginTop: "44px",
marginTop: "25px",
}}>
<div>
@ -173,8 +172,7 @@ class EducoderLogin extends Component {
display: "flex",
justifyContent: "center",
width: "100%",
height: "550px",
marginTop: "44px",
marginTop: "25px",
}}>
<div >
<FindPasswordComponent {...this.props} {...this.state}
@ -187,11 +185,8 @@ class EducoderLogin extends Component {
display: "flex",
justifyContent: "center",
width: "100%",
bottom:"0",
position: "fixed"
}}>
<div className="font-14 color-grey-9 " style={{ bottom:"0",position: "absolute",marginBottom: "20px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div>
</div>
</div>

@ -49,7 +49,7 @@ function get_login_verification_code(btn) {
type = 7;
}
$.get(
'https://www.educoder.net/account/get_verification_code',
'/account/get_verification_code',
{ value: $('#pass_name_input').val().trim(),
type: type},
function (data) {
@ -346,10 +346,7 @@ class LoginDialog extends Component {
if(response===undefined){
return
}
if(response.data.identity === null || response.data.identity === undefined){
this.props.history.push("/interesse");
return;
}
if(response.status===200){
if (response.data.status === 402) {
window.location.href = response.data.url;
@ -359,6 +356,10 @@ class LoginDialog extends Component {
description:response.data.message,
});
}else{
if(response.data.identity === null || response.data.identity === undefined){
this.props.history.push("/interesse");
return;
}
broadcastChannelPostMessage('refreshPage')
this.setState({
isRender:false

@ -38,7 +38,7 @@ class LeftNav extends Component {
<div className="user-info">
<a href="/users/p69243850" alt="用户头像" className="user-info-img">
<img alt="0?1442652658" height="50" src="https://www.educoder.net/images/avatars/User/0?1442652658" width="50"/>
<img alt="0?1442652658" height="50" src="/images/avatars/User/0?1442652658" width="50"/>
</a>
<a href="/users/p69243850" className="user-info-name">Jimmy</a>
</div>

@ -82,7 +82,7 @@
margin-left: -154px;
text-align: center;
}
.inline{
.inlines{
display: inline-block;
width: auto;
line-height: 26px;

@ -168,7 +168,7 @@ class TaskResultLayer extends Component {
<i className="far fa-times-circle closeIcon" onClick={closeTaskResultLayer} title="关闭"></i>
<img src={isLastGame? passallImg : passpartImg} width="652px" className="passTaskImg"/>
<div className="winpPerson expGold">
<p className="inline"><span className=" goldring"/>
<p className="inline inlines"><span className=" goldring"/>
{currentPassedGameGainGold >= 0 ? `+${currentPassedGameGainGold}` : '+0'}
</p>
<p className="inline exp">

@ -135,7 +135,7 @@ class CodeEvaluateView extends Component {
})
}
goToCertification() {
window.open('/account/professional_certification', '_blank');
window.open('/account/certification', '_blank');
}
renderTestSets() {
const { output_sets, testSetsExpandedArray, power, allowed_unlock, testSetUnlock, showDialog, challenge, game, user } = this.props;

@ -68,7 +68,7 @@ const styles = MUIDialogStyleUtil.getTwoButtonStyle(
class LeftView extends Component {
goToCertification() {
window.open('/account/professional_certification', '_blank');
window.open('/account/certification', '_blank');
}
// /shixuns/mnf6b7z3/shixun_discuss?challenge_id=88
render() {

@ -5,9 +5,10 @@ export function loadSshScript(callback) {
let prefix = 'react/build'
if (window.location.port == 3007) {
prefix = ''
_url_origin = 'https://newweb.educoder.net/';
} else {
// _url_origin = `https://testeduplus2.educoder.net/`;
_url_origin = 'http://47.96.87.25:48080/';
_url_origin = '/';
}
const $ = window.$;
// 未加载过

@ -115,7 +115,7 @@ class sendPanel extends Component{
}
cardsModalsave=()=>{
let {courseurl}=this.state;
window.location.href = "https://www.educoder.net/"+courseurl;
window.location.href =courseurl;
}
render(){
let{sentShixunPath,sendToCourseList,openSearch,shixunNum,Modalstype,Modalstopval,Modalsbottomval,cardsModalcancel,cardsModalsave}= this.state;

@ -317,11 +317,11 @@ class NewHeader extends Component {
})
if(submitapplicationssum===0){
if(submitapplicationsvaluedata!=undefined){
window.location.href = "https://www.educoder.net/courses/"+submitapplicationsvaluedata;
window.location.href = "/courses/"+submitapplicationsvaluedata;
}
}else if(submitapplicationssum===1){
if(submitapplicationsvaluedata!=undefined){
window.location.href = "https://www.educoder.net/projects/"+submitapplicationsvaluedata;
window.location.href = "/projects/"+submitapplicationsvaluedata;
}
}
}
@ -480,7 +480,7 @@ submittojoinclass=(value)=>{
}
if(value===0){
let url="https://www.educoder.net/courses/join_course_multi_role.json"
let url="/courses/join_course_multi_role.json"
const form = new FormData();
form.append('invite_code', tojoinclasstitle);
form.append('role', pamst);
@ -526,7 +526,7 @@ submittojoinclass=(value)=>{
}
if(value===1){
let url="https://www.educoder.net/applied_project/applied_project_info.json"
let url="/applied_project/applied_project_info.json"
const form = new FormData();
form.append('invite_code', tojoinclasstitle);
form.append('member', RadioGroupvalue);

@ -45,7 +45,7 @@ function _initSider() {
return;
}
var $tool = $(this).attr("tooltips");
$descSide.html($tool+"<div><img src='https://www.educoder.net/images/edu_user/jt.png'></div>");
$descSide.html($tool+"<div><img src='/images/edu_user/jt.png'></div>");
$descSide.data('_dom', this)
$descSide.show().css({
left:$(this).offset().left - $descSide.width()-30,

@ -18,7 +18,11 @@ import Trialapplication from "../login/Trialapplication";
const $ = window.$;
const versionNum = '0001';
// let _url_origin = getUrl()
let _url_origin=`http://47.96.87.25:48080`;
let _url_origin='';
if(window.location.port === "3007"){
_url_origin="https://newweb.educoder.net";
}
// let _url_origin=`https://www.educoder.net`;
if (!window['indexHOCLoaded']) {

@ -865,7 +865,7 @@ class Newshixuns extends Component {
<div className="mb10 edu-back-white">
<p className="padding10-20 bor-bottom-greyE color-grey-3 clearfix">
<span className="fl font-18 lineh-35">创建实训</span>
<a className="fr font-16 mt3 color-blue" href="https://www.educoder.net/forums/2943"
<a className="fr font-16 mt3 color-blue" href="/forums/2943"
target="_blank">实训制作指南</a>
</p>

@ -80,7 +80,7 @@ class Repository extends Component {
<input id="rev" name="rev" size="8" type="hidden" value=""></input>
</form> */}
<a href="https://www.educoder.net/forums/2784" target="_blank"
<a href="/forums/2784" target="_blank"
className=" guideBtn" >Git使用指南</a>
<div className="fr font-12 color-grey-9 pr">

@ -42,11 +42,32 @@ class LoginRegisterComponent extends Component {
dragOk: false,
Whethertoverify:false,
modalsType:false,
pciphone:true,
}
}
//判断是否是手机端
IsPC=()=> {
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone",
"SymbianOS", "Windows Phone",
"iPad", "iPod"];
var flag = true;//这个意思是说自己的是pc 端
for (var v = 0; v < Agents.length; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
}
return flag;
}
componentDidMount = () => {
let pcipns=this.IsPC();
this.setState({
pciphone:pcipns,
})
}
openNotification = (messge) => {
notification.open({
message: "提示",
@ -170,6 +191,7 @@ class LoginRegisterComponent extends Component {
})
return
}
if(this.state.pciphone===true){
if (this.state.dragOk === false) {
// this.openNotification(`请拖动滑块完成验证`,2);
this.setState({
@ -177,6 +199,8 @@ class LoginRegisterComponent extends Component {
})
return
}
}
if (this.state.password === undefined || this.state.password.length ===0 || this.state.password === "") {
this.setState({
Phonenumberisnotcosmmm:"密码不能为空",
@ -379,9 +403,9 @@ class LoginRegisterComponent extends Component {
return
}
}
//是否验证通过
dragOkCallback = () => {
console.log(this.state.login);
inputOnBlurzhuche = (e)=>{
if(this.state.pciphone===false) {
if(this.state.login===""||this.state.login.length===0){
this.setState({
Phonenumberisnotco: "账号不能为空",
@ -394,8 +418,30 @@ class LoginRegisterComponent extends Component {
this.setState({
Phonenumberisnotcosytdhk:undefined,
})
this.Emailphonenumberverification(e.target.value)
}
}
//是否验证通过
dragOkCallback = () => {
console.log(this.state.login);
if (this.state.login === "" || this.state.login.length === 0) {
this.setState({
Phonenumberisnotco: "账号不能为空",
Phonenumberisnotcobool: true,
dragOk: false,
Whethertoverify: this.state.Whethertoverify === true ? false : true,
})
return
}
this.setState({
Phonenumberisnotcosytdhk: undefined,
})
this.Emailphonenumberverification(this.state.login)
}
//邮箱手机号验证
Emailphonenumberverification = (value) => {
@ -454,6 +500,7 @@ class LoginRegisterComponent extends Component {
readonlyInput,
codes,
Whethertoverify,
pciphone,
} = this.state
// height: 346px;
return (
@ -528,6 +575,7 @@ class LoginRegisterComponent extends Component {
<Input style={loginInputsyl} type="text" autoComplete="off" onClick={this.changeTypey}
className={Phonenumberisnotco && Phonenumberisnotco !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
placeholder="输入注册手机号或邮箱" value={this.state.login}
onBlur={(e) => this.inputOnBlurzhuche(e)}
onChange={this.loginInputonChange} style={{marginTop: '10px', height: "38px"}}></Input>
{
Phonenumberisnotco && Phonenumberisnotco !== "" ?
@ -538,7 +586,7 @@ class LoginRegisterComponent extends Component {
}
{
Whethertoverify===false?
Whethertoverify===false&&pciphone===true?
<DragValidator
height={38} successGreenColor="#29bd8b"
style={{height: "38px", width: "100%"}}
@ -549,7 +597,7 @@ class LoginRegisterComponent extends Component {
}
{
Whethertoverify===true?
Whethertoverify===true&&pciphone===true?
<DragValidatortwo
height={38} successGreenColor="#29bd8b"
style={{height: "38px", width: "100%"}}
@ -558,13 +606,17 @@ class LoginRegisterComponent extends Component {
:
""
}
{
<div>
{pciphone===true?
(
Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !=="" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotcosytdhk}</span>
</p>
: <div style={{height: "25px"}}></div>
}
)
:""}
</div>
<Input type={classpass}
className={Phonenumberisnotcosmmm && Phonenumberisnotcosmmm !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
onClick={this.changeType} autoComplete="new-password" onChange={this.loginInputonChanges}

@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {Button,notification} from 'antd';
import {broadcastChannelPostMessage} from 'educoder';
import MyEduCoderModal from './MyEduCoderModal';
import Notcompleted from './Notcompleted';
// import Notcompleted from '../../common/Notcompleted';
import axios from 'axios';
import './common.css';
import mytc from './img/mytc.png';
@ -31,7 +31,7 @@ class InterestpageComponent extends Component {
passmm:this.props.passmm,
homedatalist:undefined,
hometypepvisible: undefined,
MyEduCoderModals:false
}
}
openNotification = (messge) => {
@ -242,16 +242,13 @@ class InterestpageComponent extends Component {
// height: 346px;
return (
<div className="ysllogin_register_contents" style={{width:"800px",height: "600px"}}>
<div className="ysllogin_register_contents" style={{width:"800px",height: "550px"}}>
<MyEduCoderModal
modalsType={this.state.MyEduCoderModals}
setNotcompleteds={()=>{this.setNotcompleteds()}}
/>
<Notcompleted
modalsType={this.state.Notcompleteds}
/>
<div className="ysllogin_section">
<div className="mt15"><span className="yslspans1">请选择你的职业</span></div>
<div className="ysldivhome1" >
@ -283,7 +280,7 @@ class InterestpageComponent extends Component {
)
})}
</div>
<Button className="yslbutton" size={"large"} type="primary"onClick={()=>this.Interestcompletionpage()} style={{width:"255px",height: "36px",background: "#4CACFF",marginTop: "30px"} }>完成</Button>
<Button className="yslbutton" size={"large"} type="primary"onClick={()=>this.Interestcompletionpage()} style={{width:"255px",height: "35px",background: "#4CACFF",marginTop: "17px"} }>完成</Button>
</div>
</div>

@ -60,6 +60,7 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcodmm:undefined,
Phonenumberisnotcobool: false,
Whethertoverify:false,
pciphone:true,
}
}
@ -94,11 +95,27 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcobool: false,
Phonenumberisnotcodmm:undefined,
Whethertoverify:false,
pciphone:true,
}
}
}
//判断是否是手机端
IsPC=()=> {
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone",
"SymbianOS", "Windows Phone",
"iPad", "iPod"];
var flag = true;//这个意思是说自己的是pc 端
for (var v = 0; v < Agents.length; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
}
return flag;
}
// 点击表单后改变type
changeType = () => {
this.setState({classpass: 'password'});
@ -106,17 +123,21 @@ class LoginRegisterComponent extends Component {
componentDidMount = () => {
// console.log("componentDidUpdate");
// console.log(this.props);
let pcipns=this.IsPC();
if (this.props.match.url === "/login") {
console.log("11111111111111111111111111");
this.state = {
tab:["0"],
pciphone:pcipns,
}
} else if (this.props.match.url === "/register") {
this.state = {
tab:["1"],
pciphone:pcipns,
}
}
}
openNotification = (messge,type) => {
// type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色
@ -214,10 +235,7 @@ class LoginRegisterComponent extends Component {
if (response === undefined) {
return
}
if(response.data.identity === null || response.data.identity === undefined){
this.props.history.push("/interesse");
return;
}
if(response.data.status === -2){
if("该手机号尚未注册" || "该邮箱尚未注册"){
this.setState({
@ -246,6 +264,11 @@ class LoginRegisterComponent extends Component {
}
if(response.data.identity === null || response.data.identity === undefined){
this.props.history.push("/interesse");
return;
}
if (response.status === 200) {
if (response.data.status === 402) {
window.location.href = response.data.url;
@ -284,15 +307,18 @@ class LoginRegisterComponent extends Component {
// this.openNotification(`请同意服务协议条款`,2);
// return;
// }
if (this.state.logins === undefined || this.state.logins === ""||this.state.logins.length===0) {
if(this.state.pciphone===true){
if (this.state.dragOk === false) {
// this.openNotification(`请拖动滑块完成验证`,2);
this.setState({
Phonenumberisnotcos:"账号不能为空",
Phonenumberisnotcosytdhk:"请拖动滑块完成验证",
})
return
} else if (this.state.dragOk === false) {
// this.openNotification(`请拖动滑块完成验证`,2);
}
}
if (this.state.logins === undefined || this.state.logins === ""||this.state.logins.length===0) {
this.setState({
Phonenumberisnotcosytdhk:"请拖动滑块完成验证",
Phonenumberisnotcos:"账号不能为空",
})
return
} else if (this.state.codes === undefined || this.state.codes == ""||this.state.codes.length===0) {
@ -555,6 +581,11 @@ class LoginRegisterComponent extends Component {
this.isCorrectname(e.target.value, id);
// this.Emailphonenumberverification(e.target.value, id);
}
inputOnBlurzhuche = (e, id) => {
if(this.state.pciphone===false) {
this.Emailphonenumberverification(e.target.value, id);
}
}
//获取登入密码
passwordonChange = (e) => {
// console.log(e.target.value);
@ -671,6 +702,7 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcodmm,
// 注册
readAgreement,
pciphone,
} = this.state
// height: 346px;
if (this.state.seconds === 0) {
@ -778,6 +810,7 @@ class LoginRegisterComponent extends Component {
value={this.state.logins}
type="text" autoComplete="off"
onChange={this.loginInputonChanges}
onBlur={(e) => this.inputOnBlurzhuche(e, 2)}
style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}></Input>
{
Phonenumberisnotcos && Phonenumberisnotcos !== "" ?
@ -788,7 +821,7 @@ class LoginRegisterComponent extends Component {
}
{
Whethertoverify===false?
Whethertoverify===false&&pciphone===true?
<DragValidator
height={38} successGreenColor="#29bd8b"
style={{ height: '38px'}}
@ -799,7 +832,7 @@ class LoginRegisterComponent extends Component {
}
{
Whethertoverify===true?
Whethertoverify===true&&pciphone===true?
<DragValidatortwo
height={38} successGreenColor="#29bd8b"
style={{ height: '38px'}}
@ -808,14 +841,21 @@ class LoginRegisterComponent extends Component {
:
""
}
<div>
{
pciphone===true?
(
Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !== "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosytdhk}</span>
</p>
: <div style={{height:"25px"}}></div>
)
:""
}
</div>
<div className="yslbutondls">

@ -40,8 +40,9 @@ class MyEduCoderModal extends Component {
<div className={"tabeltext-alignleft mt10"}><p>欢迎使用EduCoder您可以试用1天</p></div>
<div className={"tabeltext-alignleft mt10"}><p>超过期限需要经过管理员的授权审核</p></div>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={()=>this.modalCancel()}>先试试看</a>
<a className="task-btn task-btn-orange" onClick={()=>this.setDownload()}>立即申请授权</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 bth100" onClick={()=>this.modalCancel()}>知道啦</a>
</div>
</div>
</Modal>

@ -424,8 +424,8 @@ class AccountBasic extends Component {
}],
})(
<RadioGroup>
<Radio value="0"></Radio>
<Radio value="1"></Radio>
<Radio value="0" disabled={basicInfo.authentication != 'uncertified'}></Radio>
<Radio value="1" disabled={basicInfo.authentication != 'uncertified'}></Radio>
</RadioGroup>
)}
</Form.Item>

@ -71,7 +71,7 @@
}
.ysldivhomediv{
width: 101px;
height: 147px;
height: 130px;
}
.ysldivhomediv1{
@ -83,7 +83,7 @@
display: flex;
flex-direction:column;
margin-left: 73px;
margin-top: 8px;
margin-top: 5px;
}
.ysldivhomediv2{
width: 110px;
@ -94,7 +94,7 @@
display: flex;
flex-direction:column;
margin-left: 73px;
margin-top: 20px;
margin-top: 15px;
}
.ysldivhomedivtxt{
width:101px;
@ -159,7 +159,7 @@
display: flex;
justify-content:center;
width: 60px;
margin-left: 27px;
margin-left: 21px;
}
.yslgouxuanimg{

@ -63,6 +63,10 @@ class Infos extends Component{
login:this.props.current_user.login
})
}
} else {
if (prevProps.match.params.username != this.props.match.params.username) {
this.getInfo(this.props.match.params.username);
}
}
}
@ -338,7 +342,7 @@ class Infos extends Component{
to={`/users/${username}/projects`}>项目</Link>
</li>
{ data && data.identity!="学生" && <li> <a href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}?type=m_bank`}>题库</a></li>}
{/*{ data && data.identity!="学生" && <li> <a href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}?type=m_bank`}>题库</a></li>}*/}
</div>
</div>

@ -45,7 +45,8 @@ class SearchPage extends Component{
}
this.setState({
tab:e.key,
type:types
type:types,
page:1,
})
this.getdata(1,types,this.state.keywords);
}
@ -228,7 +229,7 @@ class SearchPage extends Component{
<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>
<span className="ziticor"><i className="fa fa-user ziticor"></i><span className="ml10">{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>

@ -125,4 +125,5 @@
}
.ziticor{
color: #777777;
font-size: 13px;
}
Loading…
Cancel
Save