杨树林 5 years ago
commit 5a2ee2c046

@ -148,16 +148,30 @@
<!-- 在tpi js里加载这3个脚本 -->
<script>
(function() { // Scoping function to avoid globals
var href = location.href;
if (href.indexOf('/tasks/') != -1) {
document.write('<script type="text/javascript" src="http://47.96.87.25:48080/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>');
} 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>');
}
var href = location.href;
if(window.location.port === "3007"){
if (href.indexOf('/tasks/') != -1) {
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="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>');
} else if (href.indexOf('/paths/') != -1) {
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>

@ -200,7 +200,7 @@ function generateNewIndexJsp() {
.replace('/css/css_min_all.css', `${cdnHost}/react/build/css/css_min_all.css?v=${newVersion}`)
.replace('/css/iconfont.css', `${cdnHost}/react/build/css/iconfont.css?v=${newVersion}`)
.replace('/js/create_kindeditor.js', `${cdnHost}/react/build/js/create_kindeditor.js?v=${newVersion}`)
.replace(/\/js\/create_kindeditor.js/g, `${cdnHost}/react/build/js/create_kindeditor.js?v=${newVersion}`)
// .replace('/react/build/./static/css/main', `${cdnHost}/react/build/./static/css/main`)
// .replace('/react/build/./static/js/main', `${cdnHost}/react/build/./static/js/main`)

@ -14,6 +14,8 @@ import '@icedesign/base/dist/ICEDesignBase.css';
import '@icedesign/base/index.scss';
import LoginDialog from './modules/login/LoginDialog'
import Notcompletedysl from './modules/user/Notcompletedysl'
import Trialapplicationysl from './modules/login/Trialapplicationysl'
import Trialapplication from './modules/login/Trialapplication'
import NotFoundPage from './NotFoundPage'
@ -264,6 +266,8 @@ class App extends Component {
<MuiThemeProvider theme={theme}>
<LoginDialog {...this.props} {...this.state}></LoginDialog>
<Notcompletedysl {...this.props} {...this.state}></Notcompletedysl>
<Trialapplicationysl {...this.props} {...this.state}></Trialapplicationysl>
{/*{*/}
{/* isRender === true?*/}
{/* <LoginDialog></LoginDialog> : ""*/}

@ -10,19 +10,11 @@ broadcastChannelOnmessage('refreshPage', () => {
})
function locationurl(list){
if (window.location.port === "3007") {
if (window.location.port === "3007") {
} else {
if(list===402){
SetAppModel(402)
}else if(list===407){
}else{
window.location.replace(list)
}
}
} else {
window.location.replace(list)
}
}
// TODO 开发期多个身份切换
@ -153,17 +145,16 @@ export function initAxiosInterceptors(props) {
locationurl('/500');
}
if (response.data.status === 402) {
debugger
console.log(response.data.status);
console.log(response.data);
locationurl(402);
}
// if (response.data.status === 402) {
// console.log(response.data.status);
// console.log(response.data);
// // locationurl(402);
// }
if (response.data.status === 401) {
return config;
}
if (response.data.status === 401) {
return config;
}
// if (response.data.status === 407) {
// 在app js 中解决 Trialapplication
// // </Trialapplication>

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import {getImageUrl} from 'public/react/src/common/educoder';
import { Modal} from 'antd';
import axios from 'axios';
import '../../modules/user/common.css';

@ -1,8 +1,6 @@
import React, { Component } from 'react';
import { Modal } from 'antd';
// import Notcompleted from './Notcompleted';
export function SetAppModel(options = {}) {
export function SetAppModel(options={}) {
return function wrap(WrappedComponent) {
return class Wrapper extends Component {
constructor(props) {
@ -12,19 +10,39 @@ export function SetAppModel(options = {}) {
}
}
modalCancel=()=>{
window.location.href = "/";
}
setDownload=()=>{
window.location.href ='/account/profile';
}
componentDidMount(){
console.log(this.props)
}
render() {
const { titlemessage, Modallisttype, Modallist, singleButton } = this.state;
return (
<div>
{/*<Notcompleted*/}
{/*modalsType={this.state.Notcompleteds}*/}
{/*/>*/}
<Modal
keyboard={false}
closable={false}
footer={null}
destroyOnClose={true}
title="提示"
centered={true}
visible={true}
width="530px"
>
<div className="educouddiv">
<div className={"tabeltext-alignleft mt10"}><p>您尚未完善个人资料</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>
</div>
</div>
</Modal>
)
}
}

@ -571,6 +571,9 @@ pop_box_new(htmlvalue, 480, 182);
}
closeTaskResultLayer() {
this.setState({
game: (this.state.game.status == 2 ? update(this.state.game, {
isPassThrough: { $set: true },
}) : this.state.game) ,
currentGamePassed: false
})
}
@ -581,7 +584,7 @@ pop_box_new(htmlvalue, 480, 182);
let currentGamePassed = false
if (challenge_chooses_count === choose_correct_num) {
game.status = 2;
game.isPassThrough = true
// game.isPassThrough = true
game.next_game = next_game;
currentGamePassed = true;
@ -734,7 +737,7 @@ pop_box_new(htmlvalue, 480, 182);
compileSuccess && this.language_display(response);
if (currentGamePassed) {
game.status = 2;
game.isPassThrough = true
// game.isPassThrough = true
game.next_game = next_game;
} else {
this.showDialog({

@ -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>

@ -40,7 +40,7 @@ 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={item.first_category_url} className="square-img">
{/*<a href={`/courses/${item.id}/students`} className="square-img" >*/}
{/*target="_blank"*/}
{

@ -146,12 +146,22 @@ class ShixunModal extends Component{
}
savecouseShixunModal=()=>{
this.setState({
hometypepvisible:true
})
let {coursesId,patheditarry,datas}=this.props;
let{category_id}=this.state;
if(patheditarry.length===0){
this.setState({
shixunmodelchke:true,
chekicmessage:"请先选择实训",
hometypepvisible:false
})
return
}
if (this.props.chooseShixun) {
this.props.chooseShixun(patheditarry)
this.setState({
@ -159,15 +169,7 @@ class ShixunModal extends Component{
})
return;
}
if(patheditarry.length===0){
this.setState({
shixunmodelchke:true,
chekicmessage:"请先选择实训",
hometypepvisible:false
})
return
}
let url="/courses/"+coursesId+"/homework_commons/create_shixun_homework.json";
axios.post(url, {
category_id:this.props.category_id===null||this.props.category_id===undefined?undefined:parseInt(this.props.category_id),
@ -378,7 +380,7 @@ class ShixunModal extends Component{
</div>
</div>
</Spin>
<span className={this.state.shixunmodelchke===true?"none":"color-red"}>{this.state.chekicmessage}</span>
<span className={this.state.shixunmodelchke===true?"color-red":"none"}>{this.state.chekicmessage}</span>
<div className="mt20 marginauto clearfix edu-txt-center">
<a className="pop_close task-btn mr30 margin-tp26" onClick={this.hidecouseShixunModal}>取消</a>
<a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.savecouseShixunModal}>确定</a>

@ -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>

@ -105,4 +105,4 @@ function CourseGroupChooserModal({ course_groups = [], isAdminOrCreator, item, i
</ModalWrapper>
)
}
export default useMemo(CourseGroupChooserModal)
export default (CourseGroupChooserModal)

@ -257,7 +257,13 @@ class CoursesNew extends Component {
}
goback = () => {
window.history.go(-1)
if(this.props.match.params.coursesId===undefined){
this.props.history.push("/courses");
}else{
this.props.history.push(`/courses/${this.props.match.params.coursesId}`);
}
// window.history.go(-1)
}
onCheckAllChange = (e) => {
@ -351,8 +357,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>

@ -1,24 +1,29 @@
.editormd-html-preview, .editormd-preview-container {
width: 95% !important;
}
.Finish_button{
height: 30px;
line-height: 30px;
margin-top: -8px;
}
.startbtnModal .ant-modal-content{
background: transparent;
box-shadow: 0 4px 12px transparent;
}
.startbtnModal .ant-modal-content .ant-modal-body .ant-spin-spinning{
margin-left: 45%;
}
.color05101a{
color:#05101a;
}
.mtf3{
margin-top: -3px;
.editormd-html-preview, .editormd-preview-container {
width: 95% !important;
}
.Finish_button{
height: 30px;
line-height: 30px;
margin-top: -8px;
}
.startbtnModal .ant-modal-content{
background: transparent;
box-shadow: 0 4px 12px transparent;
}
.startbtnModal .ant-modal-content .ant-modal-body .ant-spin-spinning{
margin-left: 45%;
}
.color05101a{
color:#05101a;
}
.mtf3{
margin-top: -3px;
}
.ysltable{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap
}

@ -24,6 +24,7 @@ import moment from 'moment';
import '../css/members.css'
import '../css/busyWork.css'
import '../poll/pollStyle.css'
import './Challenges.css'
import {getImageUrl} from 'educoder';
import TraineetraininginformationModal from "./TraineetraininginformationModal";
import DownloadMessageysl from '../../modals/DownloadMessageysl';
@ -182,7 +183,7 @@ class Listofworksstudentone extends Component {
className:'font-14',
render: (text, record) => (
<span>
<span style={{
<span className="ysltable" style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.classroom === undefined ? "--" : record.classroom === "" ? "--" : record.classroom === null ? "--" : record.classroom}</span>
@ -418,7 +419,7 @@ class Listofworksstudentone extends Component {
align: 'center',
className:'font-14',
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>
<span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>
)
},
{
@ -680,7 +681,7 @@ class Listofworksstudentone extends Component {
align: 'center',
className:'font-14',
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>
<span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>
)
},
{
@ -899,15 +900,32 @@ class Listofworksstudentone extends Component {
},
],
}
//
console.log("902");
console.log("902");
console.log(this.props);
}
componentDidCatch(error, info){
console.log("-----------------------------905错误信息");
console.log(error);
console.log(info);
}
componentWillReceiveProps(nextProps) {
console.log("+++++++++913");
console.log("+++++++++915");
console.log("+++++++++916");
console.log(nextProps);
}
componentDidMount() {
console.log("componentDidMount");
if(this.props.isAdmin() === true){
this.tearchar();
console.log("909");
}else{
this.student();
console.log("911");
}
}
student=()=>{
@ -951,7 +969,6 @@ class Listofworksstudentone extends Component {
// console.log("951");
// console.log(result);
// debugger
if (result.status === 200) {
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
@ -973,7 +990,6 @@ class Listofworksstudentone extends Component {
this.seacthdatas(result.data, result.data.student_works);
}
}
}).catch((error) => {
console.log(error);
})
@ -1005,7 +1021,7 @@ class Listofworksstudentone extends Component {
limit: limit,
}
axios.post(urll, data).then((result) => {
if (result.status === 200) {
if (result) {
// console.log("学生未截至未公开的作品列表")
// console.log(JSON.stringify(result))
this.setState({
@ -1265,7 +1281,7 @@ class Listofworksstudentone extends Component {
// console.log(JSON.stringify(this.props.user))
var url = `/student_works/${userids}/shixun_work.json`;
axios.get(url).then((result) => {
if (result.status === 200) {
if (result) {
// console.log("Listofworksstudentone.js")
// console.log(JSON.stringify(result))
let datalist = [];
@ -1481,8 +1497,7 @@ class Listofworksstudentone extends Component {
limit:20,
}
axios.post(urll, data).then((result) => {
debugger
if (result !== undefined) {
if (result) {
// console.log(url)
// console.log("作品列表6789077")
// console.log(JSON.stringify(result))
@ -1582,6 +1597,7 @@ class Listofworksstudentone extends Component {
let columns = this.state.columns;
var columns2=[];
if (teacherdata !== undefined) {
console.log("1588");
for (var i = 0; i < student_works.length; i++) {
var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm');
datalist.push({
@ -1605,6 +1621,8 @@ class Listofworksstudentone extends Component {
user_name: student_works[i].user_name,
user_login: student_works[i].user_login,
})
console.log(datalist);
console.log("1612");
}
@ -1701,6 +1719,9 @@ class Listofworksstudentone extends Component {
} else {
}
console.log(datalist);
console.log("1712");
this.setState({
data: datalist,
columns: columns2,
@ -1907,7 +1928,7 @@ class Listofworksstudentone extends Component {
// console.log(JSON.stringify(this.props.user))
var url = `/student_works/${userids}/shixun_work.json`;
axios.get(url).then((result) => {
if (result.status === 200) {
if (result) {
// console.log("TraineetraininginformationModal.js")
// console.log(JSON.stringify(result))
let datalist = [];
@ -2024,7 +2045,7 @@ class Listofworksstudentone extends Component {
group_ids: course_groupslist,
end_time:endtime,
}).then((result) => {
if (result.status === 200) {
if (result) {
if (result.data.status === 0) {
notification.open({
message: "提示",
@ -2323,17 +2344,15 @@ class Listofworksstudentone extends Component {
<ul className="clearfix" style={{padding: '20px 15px 10px 20px'}}>
<li className="clearfix ">
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
<span>
{teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true?
(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTimet}>
计算成绩
</div>:""):
teacherdata&&teacherdata.homework_status[0]=== "未发布"? "":
(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
计算成绩
</div>:"")
}
</span>
{teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "":
computeTimetype===true&&this.props.isNotMember()===false? <div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:<div className={"computeTimes font-13"}>
计算成绩
</div>}
</span>}
<div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>
<Search
@ -2447,7 +2466,7 @@ class Listofworksstudentone extends Component {
<div className="mh650 edu-back-white">
<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 mb30">没有数据可以显示</p>
<p className="edu-nodata-p mb30">没有数据可以显示.</p>
</div>
</div>
@ -2612,21 +2631,15 @@ class Listofworksstudentone extends Component {
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
{teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?
(this.props.isNotMember()===false?
<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>
:"")
:
(teacherdata&&teacherdata.homework_status[0]=== "未发布"? "":
this.props.isNotMember()===false?
<div className={"computeTimes font-13"}>
计算成绩
</div>
:"")
}
</span>}
{teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "":
computeTimetype===true&&this.props.isNotMember()===false? <div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:<div className={"computeTimes font-13"}>
计算成绩
</div>}
</span>}
</div>
@ -2779,17 +2792,16 @@ class Listofworksstudentone extends Component {
<div className="fr">
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
{teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?
(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:""):
teacherdata&&teacherdata.homework_status[0]=== "未发布"? "":
(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
计算成绩
</div>:"")
}
</span>}
{teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":
<span>
{teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status===0?"":
this.props.isNotMember()===false&&computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:<div className={"computeTimes font-13"}>
计算成绩
</div>}
</span>
}
</div>
{/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/}

@ -187,8 +187,8 @@ class ShixunHomeworkPage extends Component {
onClick={(e) => this.ChangeTab(2)}>
代码查重</a> : ""}
{parseInt(tab) === 3?
<style>{
`
<style>{
`
.poll_list a.active:after {
content: '';
width: 57px;
@ -199,7 +199,7 @@ class ShixunHomeworkPage extends Component {
position: absolute;
}
`
}</style>
}</style>
:""}
<a className={parseInt(tab) === 3 ? "active" : ""}
onClick={(e) => this.ChangeTab(3)}
@ -279,13 +279,10 @@ class ShixunHomeworkPage extends Component {
/>
{parseInt(tab) === 0 &&<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>}
{parseInt(tab) === 1 &&<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>}
{parseInt(tab) === 2 &&<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>}
{parseInt(tab) === 3 &&<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>}
{parseInt(tab) === 0 ?<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>
:parseInt(tab) === 1 ?<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>
:parseInt(tab) === 2 ?<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>
:parseInt(tab) === 3 ?<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>:""}
</div>
</div>

@ -76,9 +76,12 @@ class ShixunStudentWork extends Component {
console.log("ShixunStudentWork");
console.log("componentDidMount");
this.props.triggerRef(this);
this.getupdata();
this.getTrainingjobsetting();
this.getTrainingjobsettings();
}
getTrainingjobsettings=()=>{
this.getupdata();
this.getTrainingjobsetting();
}
// 获取数据地方
getTrainingjobsetting = () => {

@ -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>

@ -60,8 +60,9 @@ class OfficialAcademicTranscript extends Component {
className:"TaskForms",
render: (text, record) => (
<span>
<span className={"task-hide"} style={{color:"#676767"}}><a className="tasknameName font-14" onClick={()=>this.myjumptopic("id"+record.customs)} title={record.taskname.name} >{record.taskname.name}</a></span>
{record.taskname.complete_status===2?<span className={"tasknamebox ml10"}>延时</span>:record.taskname.complete_status===3?<span className={"tasknameboxs ml10"}></span>:""}
<span className={"task-hide"} style={{color:"#676767"}}><a className="tasknameName font-14" onClick={()=>this.myjumptopic("id"+record.customs)} title={record.taskname.name} >
{record.taskname.name}{record.taskname.complete_status===2?<span className={"tasknamebox ml10"}>延时</span>:record.taskname.complete_status===3?<span className={"tasknameboxs ml10"}></span>:""}
</a></span>
</span>
),
}, {
@ -145,8 +146,11 @@ class OfficialAcademicTranscript extends Component {
}
.tasknameboxs{
color: #666666 !important;
background:rgba(237,237,237,1) !important;
width: 50px;
height: 24px;
border: 1px solid rgba(221,23,23,1);
color: rgba(221,23,23,1);
border-radius: 12px;
}
.ant-table-tbody > tr > td{
@ -167,7 +171,7 @@ class OfficialAcademicTranscript extends Component {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 500px;
width: 450px;
text-align: left !important;
}
.TaskForms{

@ -361,7 +361,7 @@ class ShixunsHome extends Component {
<img src={getImageUrl("images/educoder/huangguan-two.png")} className="huangguan" />
<a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url} />
<span className="task-hide rankName">{item.name}</span>
<span className="task-hide rankName">{item.username}</span>
</a>
</li>
)
@ -375,7 +375,7 @@ class ShixunsHome extends Component {
<img src={getImageUrl("images/educoder/huangguan.png")} className="huangguan" />
<a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url} />
<span className="task-hide rankName">{item.name}</span>
<span className="task-hide rankName">{item.username}</span>
</a>
</li>
)
@ -389,7 +389,7 @@ class ShixunsHome extends Component {
<img src={getImageUrl("images/educoder/huangguan-three.png")} className="huangguan" />
<a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url} />
<span className="task-hide rankName">{item.name}</span>
<span className="task-hide rankName">{item.username}</span>
</a>
</li>
)
@ -405,7 +405,7 @@ class ShixunsHome extends Component {
<li key={key}>
<a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url}/>
<span className="task-hide rankName">{item.name}</span>
<span className="task-hide rankName">{item.username}</span>
</a>
</li>
)
@ -437,7 +437,7 @@ class ShixunsHome extends Component {
<img src={getImageUrl("images/educoder/huangguan-two.png")} className="huangguan" />
<a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url} />
<span className="task-hide rankName">{item.name}</span>
<span className="task-hide rankName">{item.username}</span>
</a>
</li>
)
@ -451,7 +451,7 @@ class ShixunsHome extends Component {
<img src={getImageUrl("images/educoder/huangguan.png")} className="huangguan" />
<a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url} />
<span className="task-hide rankName">{item.name}</span>
<span className="task-hide rankName">{item.username}</span>
</a>
</li>
)
@ -465,7 +465,7 @@ class ShixunsHome extends Component {
<img src={getImageUrl("images/educoder/huangguan-three.png")} className="huangguan" />
<a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url} />
<span className="task-hide rankName">{item.name}</span>
<span className="task-hide rankName">{item.username}</span>
</a>
</li>
)
@ -481,7 +481,7 @@ class ShixunsHome extends Component {
<li key={key}>
<a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url}/>
<span className="task-hide rankName">{item.name}</span>
<span className="task-hide rankName">{item.username}</span>
</a>
</li>
)

@ -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) {

@ -0,0 +1,738 @@
import React, {Component} from 'react';
import {Redirect} from 'react-router';
import Dialog, {
DialogActions,
DialogContent,
DialogContentText,
DialogTitle,
} from 'material-ui/Dialog';
import axios from 'axios';
import {broadcastChannelPostMessage} from 'educoder'
import {Tabs, Input, Checkbox, Button, notification, Menu} from 'antd';
//试用申请
class Trialapplicationysl extends Component {
// isRender控制弹出窗口显示
constructor(props) {
super(props)
this.state = {
props: props,
login: "",
Phonenumberisnotcocodes: undefined,
codes: "",
reason: "",
Phonenumberisnotcoreason: undefined,
isRenders: false,
seconds: 60,
getverificationcodes: true,
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
readonlyInput: true,
user_phone_binded: undefined,
showTrial: false,
user: undefined,
borredss:"bor-reds",
borredssz:"bor-reds fl mr5",
}
//user_phone_binded 判断是否手机号验证
// console.log("Trialapplication");
// console.log(props);
}
Cancel = () => {
// this.props.Cancel()
}
componentWillReceiveProps(nextProps) {
// console.log("46");
// console.log(nextProps);
// console.log(this.props);
// if (nextProps.user != this.props.user) {
// // console.log("50");
// // console.log(nextProps.user);
// if (nextProps.user !== undefined) {
// // console.log("53");
// // console.log(nextProps.user);
// this.setState({
// user_phone_binded: nextProps.user.user_phone_binded,
// })
// }
//
//
// }
}
getipthon=()=>{
// console.log("Trialapplicationysl");
// console.log("70");
let url = `/users/get_user_info.json`
axios.get(url).then((result)=> {
console.log(result);
if(result){
this.setState({
user_phone_binded:result.data.user_phone_binded,
})
}
}).catch((error)=>{
console.log(error)
})
}
//初始化数据
componentDidMount() {
// console.log("53");
//
// console.log(this.props.isRenders);
this.getipthon();
if (this.props.isRenders != undefined) {
this.setState({
isRenders: this.props.isRenders
})
}
if (this.props.showTrial != undefined) {
// 判断是否返回主页的参数
this.setState({
showTrial: this.props.showTrial
})
}
axios.interceptors.response.use((response) => {
if (response != undefined)
if (response && response.data.status === 407) {
this.getipthon();
this.setState({
isRenders: true
})
}
return response;
}, (error) => {
//TODO 这里如果样式变了会出现css不加载的情况
});
}
//获取登入
loginInputonChange = (e) => {
// console.log(e.target.value);
this.setState({
login: e.target.value,
})
}
//获取申请理由
loginInputonChanges = (e) => {
// console.log(e.target.value);
this.setState({
reason: e.target.value,
Phonenumberisnotcoreason: undefined,
})
}
//获取code
codesonChange = (e) => {
this.setState({
codes: e.target.value,
Phonenumberisnotcocodes: undefined,
})
}
openNotification = (messge) => {
notification.open({
message: "提示",
description:
messge,
onClick: () => {
console.log('Notification Clicked!');
},
});
};
//倒计时
getverificationcode = () => {
if (this.state.Phonenumberisnotcobool === false) {
if (this.state.login.length === 0) {
this.setState({
Phonenumberisnotco: "请输入正确的手机号或邮箱",
})
return
} else {
this.setState({
Phonenumberisnotco: "请输入正确的手机号或邮箱",
})
}
return;
}
if (this.state.getverificationcodes === true) {
this.setState({
getverificationcodes: undefined,
})
let timer = setInterval(() => {
this.setState((preState) => ({
seconds: preState.seconds - 1,
}), () => {
if (this.state.seconds == 0) {
clearInterval(timer);
this.setState({
getverificationcodes: false,
seconds: 60,
})
}
});
}, 1000)
this.SMSverification();
} else {
this.setState({
getverificationcodes: undefined,
})
let timer = setInterval(() => {
this.setState((preState) => ({
seconds: preState.seconds - 1,
}), () => {
if (this.state.seconds == 0) {
clearInterval(timer);
this.setState({
getverificationcodes: false,
seconds: 60,
})
}
});
}, 1000)
this.SMSverification();
}
}
//短信验证
SMSverification = () => {
var url = `/accounts/get_verification_code.json`;
axios.get((url), {
params: {
login: this.state.login,
type: 3,
}
}).then((result) => {
//验证有问题{"status":1,"message":"success"}
// console.log(result);
}).catch((error) => {
console.log(error);
})
}
handleDialogClose() {
if (this.state.showTrial === false) {
this.setState({
isRenders: false
})
this.Cancel();
window.location.href = "/";
} else {
this.setState({
isRenders: false
})
this.Cancel();
}
}
postregistered = () => {
//提交按钮
if (this.state.user_phone_binded === false) {
if (this.state.Phonenumberisnotcobool === false) {
var iphones = "";
if (this.state.Phonenumberisnotco === undefined || this.state.Phonenumberisnotco === null || this.state.Phonenumberisnotco === "") {
iphones = "请输入手机号";
} else {
iphones = this.state.Phonenumberisnotco;
}
this.setState({
Phonenumberisnotco: iphones,
})
return;
}
if (this.state.codes.length === 0) {
this.setState({
Phonenumberisnotcocodes: "请输入验证码",
})
return;
}
}
if (this.state.reason.length === 0) {
this.setState({
Phonenumberisnotcoreason: "请输入推荐人信息或申请理由",
})
return;
}
var thiss = this;
var url = "/users/trial_apply.json";
axios.post(url, {
phone: this.state.login,
code: this.state.codes,
reason: this.state.reason,
}).then((result) => {
// console.log(result);
// this.onTabChange("1");
if(result !== undefined){
this.props.showNotification(`试用申请已提交,我们将尽快完成审核`);
// if (this.state.showTrial === false) {
window.location.href = "/";
this.setState({
isRenders: false
})
this.Cancel();
// } else {
// this.setState({
// isRenders: false
// })
// this.Cancel();
//
// }
}
}).catch((error) => {
})
}
inputOnBlur = (e) => {
this.isCorrectname(e.target.value);
// this.Emailphonenumberverification(e.target.value, id);
}
isCorrectname = (value) => {
console.log(value.length);
if (value.length === 0) {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
})
return;
}
// var telephone = $("#telephoneAdd.tianjia_phone").val();
var regph = /^[1][3,4,5,6,7,8][0-9]{9}$/;
// var email = $("#add_email.tianjia_email").val();
var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
// [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。
var stringdata = undefined;
if (!regph.test(value)) {
stringdata = "手机号格式不正确";
this.setState({
Phonenumberisnotco: stringdata,
Phonenumberisnotcobool: false,
})
} else {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: true,
})
return
}
if (!regemail.test(value)) {
if ((value.indexOf("@") != -1) === true) {
stringdata = "邮箱格式不正确";
} else {
stringdata = "手机号格式不正确";
}
this.setState({
Phonenumberisnotco: stringdata,
Phonenumberisnotcobool: false,
})
// this.Emailphonenumberverification(value)
return
} else {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: true,
})
return
}
}
//邮箱手机号验证
Emailphonenumberverification = (value) => {
var url = `/accounts/valid_email_and_phone.json`;
axios.get((url), {
params: {
login: value,
type: 2,
}
}).then((result) => {
//验证有问题{"status":1,"message":"success"}
// console.log(result);
}).catch((error) => {
console.log(error);
// this.setState({
// login:"",
// logins:"",
// })
})
}
//执行view
render() {
let {login, codes, reason, isRenders, user_phone_binded,borredss,borredssz, Phonenumberisnotco, getverificationcodes, Phonenumberisnotcocodes, Phonenumberisnotcoreason, seconds} = this.state;
// console.log("Trialapplication22222222");
// console.log(this.props);
return (
<div>
{
isRenders === false ? "" :
<div style={{"border-radius": "10px"}}>
<style>
{
`
.dialogBox2{
height: 420px;
}
#DialogIDysl{
/*z-index: 20000; 影响notification*/
}
#DialogIDysl .dialogBox {
width: 560px;
}
.MuiPaper-elevation24-45{
box-shadow:none !important;
}
.MuiPaper-root-19{
/* background:none !important; */
}
.MuiDialog-paper-9{
overflow-y:hidden !important;
}
#log_reg_content{
top: 0px !important;
}
#log_reg_content{
width:400px !important;
border-radius:40px !important;
box-shadow:4px 8px 12px rgba(76,76,76,0.3);
}
.log_nav li{
height:17px;
font-size:18px;
font-family:NotoSansHans-Regular;
color:rgba(25,0,0,1);
line-height: 0px;
}
.vertical-line{
margin-left:10px;
margin-right:10px;
}
#DialogIDysl div {
overflow-y:visible !important;
box-shadow:none !important;
border-radius:10px !important;
}
#wrapper{
position: relative;
top: 3px;
left: 0px;
margin-bottom: 17px;
}
.slidetounlock{
font-size: 12px;
background:-webkit-gradient(linear,left top,right top,color-stop(0,#4d4d4d),color-stop(.4,#4d4d4d),color-stop(.5,#fff),color-stop(.6,#4d4d4d),color-stop(1,#4d4d4d));
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
-webkit-animation:slidetounlock 3s infinite;
-webkit-text-size-adjust:none
}
@-webkit-keyframes slidetounlock{0%{background-position:-200px 0} 100%{background-position:200px 0}}
.handler_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTEyNTVEMURGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NTEyNTVEMUNGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2MTc5NzNmZS02OTQxLTQyOTYtYTIwNi02NDI2YTNkOWU5YmUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+YiRG4AAAALFJREFUeNpi/P//PwMlgImBQkA9A+bOnfsIiBOxKcInh+yCaCDuByoswaIOpxwjciACFegBqZ1AvBSIS5OTk/8TkmNEjwWgQiUgtQuIjwAxUF3yX3xyGIEIFLwHpKyAWB+I1xGSwxULIGf9A7mQkBwTlhBXAFLHgPgqEAcTkmNCU6AL9d8WII4HOvk3ITkWJAXWUMlOoGQHmsE45ViQ2KuBuASoYC4Wf+OUYxz6mQkgwAAN9mIrUReCXgAAAABJRU5ErkJggg==") no-repeat center;}
.handler_ok_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDlBRDI3NjVGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDlBRDI3NjRGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDphNWEzMWNhMC1hYmViLTQxNWEtYTEwZS04Y2U5NzRlN2Q4YTEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+k+sHwwAAASZJREFUeNpi/P//PwMyKD8uZw+kUoDYEYgloMIvgHg/EM/ptHx0EFk9I8wAoEZ+IDUPiIMY8IN1QJwENOgj3ACo5gNAbMBAHLgAxA4gQ5igAnNJ0MwAVTsX7IKyY7L2UNuJAf+AmAmJ78AEDTBiwGYg5gbifCSxFCZoaBMCy4A4GOjnH0D6DpK4IxNSVIHAfSDOAeLraJrjgJp/AwPbHMhejiQnwYRmUzNQ4VQgDQqXK0ia/0I17wJiPmQNTNBEAgMlQIWiQA2vgWw7QppBekGxsAjIiEUSBNnsBDWEAY9mEFgMMgBk00E0iZtA7AHEctDQ58MRuA6wlLgGFMoMpIG1QFeGwAIxGZo8GUhIysmwQGSAZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;}
#drag{
position: relative;
background-color: #e8e8e8;
width: 340px;
height: 34px;
line-height: 34px;
text-align: center;
}
#drag .handler{
position: absolute;
top: 0px;
left: 0px;
width: 40px;
height: 32px;
/*border: 1px solid #ccc;*/
cursor: move;
}
#drag .drag_bg{
background-color: #7ac23c;
height: 34px;
width: 0px;
}
#drag .drag_text{
position: absolute;
top: 0px;
width: 340px;
color:#9c9c9c;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
-o-user-select:none;
-ms-user-select:none;
font-size: 12px;
}
#drag{
overflow: hidden !important;
}
#closeIcon{
position: absolute;
top: -30px;
right: -27px;
z-index: 100000;
}
.bluebutton{
width: 100%;
text-align: center;
color: #FFFFff!important;
display: block;
background: #cbcbcb;
height: 45px;
line-height: 45px;
border-radius: 4px;
letter-spacing: 2px;
cursor: pointer;
}
.ant-input {
font-family: "Monospaced Number", "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
list-style: none;
position: relative;
display: inline-block;
padding: 4px 11px;
width: 100%;
height: 38px;
font-size: 14px;
line-height: 1.5;
color: rgba(0, 0, 0, 0.65);
background-color: #fff;
background-image: none;
border: 1px solid #d9d9d9;
border-radius: 4px;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
`
}
</style>
<Input type="text" name="username" value={"namename"}
style={{height: '0', width: '0', border: 'none', display: "none"}}/>
<Input type="password" name="password" id="password" value={"123123123"}
style={{height: '0', width: '0', border: 'none', display: "none"}}/>
<Dialog open={true} id="DialogIDysl"
disableEscapeKeyDown={true}
style={{display: isRenders == false ? 'none' : '', "border-radius": "10px"}}
>
<div id="closeIcon" onClick={() => {
this.handleDialogClose()
}}>
<i className="iconfont icon-shanchudiao"></i>
</div>
<div className={"login_register_content"} style={{"border-radius": "10px", "width": "560px"}}>
<div className={"login_register_content"} style={
user_phone_binded === true ?
{
"width": "560px", "height": "295px",
"border-radius": "15px",
"background": " #FFFFff",
"text-align": "center",
// "position": "absolute",
"left": " 0px",
"box-sizing": "border-box",
"padding": "10px",
}
:
{
"width": "560px", "height": "410px",
"border-radius": "10px",
"background": " #FFFFff",
"text-align": "center",
// "position": "absolute",
"left": " 0px",
"box-sizing": "border-box",
"padding": "10px",
}
}
>
<ul style={{"margin-top": "10px","margin-bottom": "10px"}}>
<span style={{
"text-align": "center!important",
"color": "#05101A",
"font-weight": "bold",
"font-size": "17px",
}}>试用申请</span>
</ul>
<div className="log_nav" style={{"width": "100%", "margin-top": "10px"}}></div>
<div style={{"margin-top": "20px"}}>
<span style={{"color": "#4D4D4D"}}> 您尚未获得访问权限请如实填写下述信息</span>
</div>
<div>
<span style={{"color": "#4D4D4D"}}>管理员审核批准后即可继续访问网站</span>
</div>
{
user_phone_binded === true ? "" :
<div style={{
"margin-top": "20px", "padding-left": "50px",
"padding-right": "50px"
}}>
<Input placeholder="请输入手机号码" value={login}
onChange={this.loginInputonChange}
onBlur={(e) => this.inputOnBlur(e)}
style={{"height": "38px",}}
className={Phonenumberisnotco && Phonenumberisnotco !== ""?borredss:""}
name="myiphone"
></Input>
{
Phonenumberisnotco && Phonenumberisnotco != "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span >{Phonenumberisnotco}</span>
</p>
: <div style={{height: "20px"}}></div>
}
</div>
}
{
user_phone_binded === true ? "" :
<div style={{"display": "flex", "justify-content": "center"}}>
<Input
className={Phonenumberisnotcocodes && Phonenumberisnotcocodes !== ""?borredssz:"fl mr5"}
name="codes" type="text" autoComplete="off"
readonly
onfocus="this.removeAttribute('readonly')" style={{
"width": "316px",
"height": "38px",
}} placeholder="请输入验证码"
onChange={this.codesonChange}
value={codes}>
</Input>
{
getverificationcodes === undefined ?
<Button className="fl ml5 " disabled style={{
"background": "#4cacff!important",
"width": "120px",
"text-align": "center",
"height": "38px",
}}
size={"large"}>重新发送{seconds}s</Button>
: getverificationcodes === true ?
<Button className="fl ml5 " style={{
"background": "#4cacff!important",
"width": "120px",
"text-align": "center",
"height": "38px",
}} type="primary"
onClick={() => this.getverificationcode()}
size={"large"}>获取验证码</Button>
:
<Button className="fl ml5 " style={{
"background": "#4cacff!important",
"width": "120px",
"text-align": "center",
"height": "38px",
}} type="primary"
onClick={() => this.getverificationcode()}
size={"large"}>重新发送</Button>
}
</div>
}
{
Phonenumberisnotcocodes && Phonenumberisnotcocodes != "" ?
<p className="color-red " style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span >{Phonenumberisnotcocodes}</span>
</p>
: <div style={{height: "20px"}}></div>
}
<div style={{
"padding-left": "50px",
"padding-right": "50px"
}}>
<Input placeholder="请在此输入推荐人信息或申请理由" value={reason}
onChange={this.loginInputonChanges}
className={Phonenumberisnotcoreason && Phonenumberisnotcoreason !== ""?borredss:""}
style={{"height": "38px",}}
name="mynames"></Input>
{
Phonenumberisnotcoreason && Phonenumberisnotcoreason !== "" ?
<p className="color-red" style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span >{Phonenumberisnotcoreason}</span>
</p>
: <div style={{height: "20px"}}></div>
}
</div>
<Button type="primary" onClick={() => this.postregistered()}
style={{
"background": "#4cacff!important",
"width": "120px",
"text-align": "center",
"height": "38px",
marginTop: "10px",
}}
size={"large"}>提交申请</Button>
</div>
</div>
</Dialog>
</div>
}
</div>
)
}
}
export default Trialapplicationysl;

@ -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>

@ -675,7 +675,7 @@ class MainContentContainer extends Component {
const timeOut = time_limit;
// http://localhost:3000/myshixuns/so5w6iap97/stages/zl6kx8f7vfpo/game_build?first=1&resubmit=GDBEX741_1993
// const game_build_url = `${locationPath}/game_build?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}`
const game_build_url = `/tasks/${game.identifier}/game_build.json?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}&sec_key=${sec_key}`
const game_build_url = `/tasks/${game.identifier}/game_build.json?first=${first}&resubmit=${resubmit}&content_modified=${!!content_modified ? 1 : 0}&sec_key=${sec_key}`
// var timeOut = parseInt(<%= @myshixun.main_mirror.try(:time_limit) %>); // 超时参数

@ -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">

@ -64,7 +64,7 @@ class ActionView extends Component {
<div className="-flex -layout-h" id="game_operate_action">
<span className="mt10 -flex c_grey ml15" id="time-consuming">
{!gameBuilding && record ?
<Tooltip title={ "本次评测耗时" }>
<Tooltip title={ "本次评测耗时(编译、运行总时间)" }>
<span>{ record } </span>
</Tooltip>
: ""}

@ -184,9 +184,9 @@ class CodeEvaluateView extends Component {
{ headIconClass && <i className={`fa ${ headIconClass } fr mt2 ml5 font-16`}></i> }
{ _headLockIconClass && <i className={`fa ${ _headLockIconClass } fr mt2 ml5 font-16`}></i> }
{ item.ts_mem && <span className="fr description">消耗内存{item.ts_mem}MB</span> }
{ item.ts_mem && item.ts_time && <span className="split"></span> }
{ item.ts_time && <span className="fr description">代码执行时长{item.ts_time}</span> }
{ !!item.ts_mem && <span className="fr description">消耗内存{item.ts_mem}MB</span> }
{ !!item.ts_mem && !!item.ts_time && <span className="split"></span> }
{ !!item.ts_time && <span className="fr description">代码执行时长{item.ts_time}</span> }
</p>
</div>

@ -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 = '';
_url_origin = '/';
}
const $ = window.$;
// 未加载过

@ -26,7 +26,7 @@
height: 22px;
width: 0px;
position: absolute;
top: 13px;
top: 8px;
}
#all_task_index .grades {

@ -1,207 +1,207 @@
import React,{ Component } from "react";
import { Modal,Radio,Input,Tooltip,Checkbox,Select, Row,Col } from "antd";
import axios from 'axios';
import { SnackbarHOC } from 'educoder';
import Modals from '../../modals/Modals';
const Option = Select.Option;
const CheckboxGroup = Checkbox.Group;
class sendPanel extends Component{
constructor(props){
super(props);
this.state={
sentShixunPath:false,
sendToCourseList:undefined,
openSearch:false,
sendToCourseId:undefined,
sendToShixunArray:[],
shixunNum:0,
Modalstype:false,
cardsModalcancel:this.cardsModalcancel,
cardsModalsave:this.cardsModalsave,
modalsTopval:'',
Modalsbottomval:'',
courseurl:''
}
}
//发送至
SentToLesson =() =>{
this.setState({
sentShixunPath:true
})
}
//隐藏发送至弹框
hideSenttothevalue =()=>{
this.setState({
sentShixunPath:false
})
}
//打开课堂列表下拉框
openList=()=>{
this.setState({
openSearch:true
})
}
//关闭课堂列表下拉框
closeList=()=>{
this.setState({
openSearch:false
})
}
// 选择课堂获取选中的Id
selectCloseList=(e)=>{
this.setState({
openSearch:false,
sendToCourseId:e
})
}
//选择checkbox
changeCheckBoxs=(list)=>{
this.setState({
sendToShixunArray:list,
shixunNum:list.length
})
}
//确认提交
submitInfo=()=>{
let {sendToCourseId,sendToShixunArray}=this.state;
if(sendToCourseId===undefined){
this.props.showSnackbar("您还未选择发送的课堂");
}else if(parseInt(sendToShixunArray.length)==0){
this.props.showSnackbar("您还未选择实训");
}else{
let id=this.props.detailInfoList.id;
let url="/paths/"+id+"/send_to_course.json";
axios.post(url,{
shixun_ids:sendToShixunArray,
course_id:sendToCourseId
}).then((result)=>{
if(result.data.status===1){
this.setState({
Modalstype:true,
sentShixunPath:false,
Modalstopval:result.data.message,
courseurl:result.data.url
})
}
}).catch((error)=>{
console.log(error);
})
}
}
componentDidMount(){
let id=this.props.detailInfoList.id;
let url="/paths/"+id+"/choose_course.json";
axios.get(url).then((result)=>{
if(result.status==200){
this.setState({
sendToCourseList:result.data
})
}
}).catch((error)=>{
console.log(error);
})
}
cardsModalcancel=()=>{
this.setState({
Modalstype:false,
})
}
cardsModalsave=()=>{
let {courseurl}=this.state;
window.location.href = "https://www.educoder.net/"+courseurl;
}
render(){
let{sentShixunPath,sendToCourseList,openSearch,shixunNum,Modalstype,Modalstopval,Modalsbottomval,cardsModalcancel,cardsModalsave}= this.state;
return(
<div>
<Modals
modalsType={Modalstype}
modalsTopval={Modalstopval}
modalsBottomval={Modalsbottomval}
modalCancel={cardsModalcancel}
modalSave={cardsModalsave}
>
</Modals>
{
this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_statistics===true?
<Tooltip placement="bottom" title="以实训作业的形式发送到我的课堂">
<a onClick = {this.SentToLesson} className="user_default_btn edu-greenline-btn fr font-18 mr20">
发送至
</a>
</Tooltip>:''
}
<Modal
keyboard={false}
title="发送至课堂"
visible={sentShixunPath}
closable={false}
footer={null}
destroyOnClose={true}
>
<div className="newupload_conbox">
<div className="mb20" onMouseLeave={this.closeList}>
<Select
placeholder="请选择您要发送的课堂"
style={{"width":"100%"}}
onSelect={this.selectCloseList}
onMouseEnter={this.openList}
defaultOpen={false}
open={openSearch}
optionLabelProp="name"
>
{
sendToCourseList === undefined ? "": sendToCourseList.courses.map((item,key)=>{
return(
<Option key={item.course_id} id={key} name={item.course_name}>
<Row>
<Col className="fl with70 task-hide">{item.course_name}</Col>
<Col className="fl color-grey-9 with30 edu-txt-center">{item.created_at}</Col>
</Row>
</Option>
)
})
}
</Select>
</div>
<div className="edu-back-skyblue pl15 pr15 clearfix over280 pt5">
<CheckboxGroup onChange={this.changeCheckBoxs}>
{
sendToCourseList && sendToCourseList.stages.map((item,key)=>{
return(
item.shixuns.map((items,keys)=>{
return(
<div className="mt5" key={keys}>
<Checkbox name={key} value={items.shixun_id}>{items.shixun_name}</Checkbox>
</div>
)
})
)
})
}
</CheckboxGroup>
</div>
<p className="color-grey-9 pl15 font-12 mt10">已选择 {shixunNum} 个实训</p>
<div className="mt20 clearfix edu-txt-center">
<a onClick={this.hideSenttothevalue} className="pop_close task-btn mr30">取消</a>
<a className="task-btn task-btn-orange" onClick={this.submitInfo}>确定</a>
</div>
</div>
</Modal>
</div>
)
}
}
import React,{ Component } from "react";
import { Modal,Radio,Input,Tooltip,Checkbox,Select, Row,Col } from "antd";
import axios from 'axios';
import { SnackbarHOC } from 'educoder';
import Modals from '../../modals/Modals';
const Option = Select.Option;
const CheckboxGroup = Checkbox.Group;
class sendPanel extends Component{
constructor(props){
super(props);
this.state={
sentShixunPath:false,
sendToCourseList:undefined,
openSearch:false,
sendToCourseId:undefined,
sendToShixunArray:[],
shixunNum:0,
Modalstype:false,
cardsModalcancel:this.cardsModalcancel,
cardsModalsave:this.cardsModalsave,
modalsTopval:'',
Modalsbottomval:'',
courseurl:''
}
}
//发送至
SentToLesson =() =>{
this.setState({
sentShixunPath:true
})
}
//隐藏发送至弹框
hideSenttothevalue =()=>{
this.setState({
sentShixunPath:false
})
}
//打开课堂列表下拉框
openList=()=>{
this.setState({
openSearch:true
})
}
//关闭课堂列表下拉框
closeList=()=>{
this.setState({
openSearch:false
})
}
// 选择课堂获取选中的Id
selectCloseList=(e)=>{
this.setState({
openSearch:false,
sendToCourseId:e
})
}
//选择checkbox
changeCheckBoxs=(list)=>{
this.setState({
sendToShixunArray:list,
shixunNum:list.length
})
}
//确认提交
submitInfo=()=>{
let {sendToCourseId,sendToShixunArray}=this.state;
if(sendToCourseId===undefined){
this.props.showSnackbar("您还未选择发送的课堂");
}else if(parseInt(sendToShixunArray.length)==0){
this.props.showSnackbar("您还未选择实训");
}else{
let id=this.props.detailInfoList.id;
let url="/paths/"+id+"/send_to_course.json";
axios.post(url,{
shixun_ids:sendToShixunArray,
course_id:sendToCourseId
}).then((result)=>{
if(result.data.status===1){
this.setState({
Modalstype:true,
sentShixunPath:false,
Modalstopval:result.data.message,
courseurl:result.data.url
})
}
}).catch((error)=>{
console.log(error);
})
}
}
componentDidMount(){
let id=this.props.detailInfoList.id;
let url="/paths/"+id+"/choose_course.json";
axios.get(url).then((result)=>{
if(result.status==200){
this.setState({
sendToCourseList:result.data
})
}
}).catch((error)=>{
console.log(error);
})
}
cardsModalcancel=()=>{
this.setState({
Modalstype:false,
})
}
cardsModalsave=()=>{
let {courseurl}=this.state;
window.location.href =courseurl;
}
render(){
let{sentShixunPath,sendToCourseList,openSearch,shixunNum,Modalstype,Modalstopval,Modalsbottomval,cardsModalcancel,cardsModalsave}= this.state;
return(
<div>
<Modals
modalsType={Modalstype}
modalsTopval={Modalstopval}
modalsBottomval={Modalsbottomval}
modalCancel={cardsModalcancel}
modalSave={cardsModalsave}
>
</Modals>
{
this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_statistics===true?
<Tooltip placement="bottom" title="以实训作业的形式发送到我的课堂">
<a onClick = {this.SentToLesson} className="user_default_btn edu-greenline-btn fr font-18 mr20">
发送至
</a>
</Tooltip>:''
}
<Modal
keyboard={false}
title="发送至课堂"
visible={sentShixunPath}
closable={false}
footer={null}
destroyOnClose={true}
>
<div className="newupload_conbox">
<div className="mb20" onMouseLeave={this.closeList}>
<Select
placeholder="请选择您要发送的课堂"
style={{"width":"100%"}}
onSelect={this.selectCloseList}
onMouseEnter={this.openList}
defaultOpen={false}
open={openSearch}
optionLabelProp="name"
>
{
sendToCourseList === undefined ? "": sendToCourseList.courses.map((item,key)=>{
return(
<Option key={item.course_id} id={key} name={item.course_name}>
<Row>
<Col className="fl with70 task-hide">{item.course_name}</Col>
<Col className="fl color-grey-9 with30 edu-txt-center">{item.created_at}</Col>
</Row>
</Option>
)
})
}
</Select>
</div>
<div className="edu-back-skyblue pl15 pr15 clearfix over280 pt5">
<CheckboxGroup onChange={this.changeCheckBoxs}>
{
sendToCourseList && sendToCourseList.stages.map((item,key)=>{
return(
item.shixuns.map((items,keys)=>{
return(
<div className="mt5" key={keys}>
<Checkbox name={key} value={items.shixun_id}>{items.shixun_name}</Checkbox>
</div>
)
})
)
})
}
</CheckboxGroup>
</div>
<p className="color-grey-9 pl15 font-12 mt10">已选择 {shixunNum} 个实训</p>
<div className="mt20 clearfix edu-txt-center">
<a onClick={this.hideSenttothevalue} className="pop_close task-btn mr30">取消</a>
<a className="task-btn task-btn-orange" onClick={this.submitInfo}>确定</a>
</div>
</div>
</Modal>
</div>
)
}
}
export default SnackbarHOC()(sendPanel);

@ -18,7 +18,7 @@ import Addcourses from '../courses/coursesPublic/Addcourses';
import LoginDialog from '../login/LoginDialog';
import Trialapplication from '../login/Trialapplication'
import Trialapplicationysl from '../login/Trialapplicationysl'
import 'antd/lib/modal/style/index.css';
@ -171,7 +171,7 @@ class NewHeader extends Component {
submitapplications:false,
isRender:false,
// isRenders:false,
// showTrial:false,
showTrial:false,
}
// console.log("176")
// console.log(props);
@ -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);
@ -562,7 +562,13 @@ submittojoinclass=(value)=>{
cancelModulationModels = () => {
this.setState({isRenders: false})
}
inputjoinclassvalue=(e)=>{
this.setState({
tojoinclasstitle:e.target.value
})
}
render() {
const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。
const {match ,} = this.props;
@ -609,6 +615,7 @@ submittojoinclass=(value)=>{
// rolearr:["",""],
// console.log("618");
// console.log(user_phone_binded);
return (
<div className="newHeader" id="nHeader">
@ -629,7 +636,7 @@ submittojoinclass=(value)=>{
{/* />*/}
{/* :""*/}
{/*}*/}
<Trialapplication {...this.state} Cancel={() => this.cancelModulationModels()} ></Trialapplication>
{/*<Trialapplicationysl {...this.state} {...this.props} Cancel={() => this.cancelModulationModels()} ></Trialapplicationysl>*/}
<div className="educontent clearfix">
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
<a href="/">
@ -676,9 +683,14 @@ submittojoinclass=(value)=>{
</li>
{/*<li className=""><a href={"/libraries"}>教学案例</a></li>*/}
<li className=""><a href={this.props.Headertop===undefined?"":this.props.Headertop.competitions_url}>在线竞赛</a></li>
<li className="">
<a href={this.props.Headertop===undefined?"":this.props.Headertop.competitions_url}>在线竞赛</a>
<img className="roundedRectangles"
src={require('./roundedRectangle.png')}
/>
</li>
<li className=""><a href={this.props.Headertop===undefined?"":this.props.Headertop.moop_cases_url}>教学案例</a></li>
<li className=""><a href={this.props.Headertop===undefined?"":this.props.Headertop.crowdsourcing_url}>众包社区</a></li>
<li className=""><a href={this.props.Headertop===undefined?"":this.props.Headertop.crowdsourcing_url}>众包创新</a></li>
<li className={`${activeForums === true ? 'active' : ''}`}><a href={this.props.Headertop===undefined?"":this.props.Headertop.topic_url}>交流问答</a></li>
<li
style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth===null? 'none' : 'block'}}
@ -702,16 +714,15 @@ submittojoinclass=(value)=>{
{/*<input type="text" className="search-input fl" id="search-input" */}
{/*onKeyDown={this.onKeywordSearchKeyDown} name="search_keyword" placeholder="搜索实训项目"/>*/}
<div
className={"HeaderSearch"}
style={{display: 'none'}}
>
<div className={"HeaderSearch"}
style={{display: 'none'}}
>
<Search
placeholder="实践课程/翻转课堂/开发社区/交流问答"
// onSearch={value => console.log(value)}
onPressEnter={this.onKeywordSearchKeyDown}
style={{ width: 295 }}
style={{ width: 300 }}
/>
</div>
@ -737,11 +748,11 @@ submittojoinclass=(value)=>{
<%= link_to '注册', user_join_path, :className => "ml5" %>
</span>*/}
{ user===undefined?
<span className="font-15 fr mt17">
<span className="font-15 fr mt17 ml20">
<a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a>
<em className="vertical-line"></em>
<a href={"/register"} className="mr5 color-white">注册</a>
</span> :user.login===""?<span className="font-15 fr mt17">
</span> :user.login===""?<span className="font-15 fr mt17 ml20">
<a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a>
<em className="vertical-line"></em>
<a href={"/register"} className="mr5 color-white">注册</a>
@ -774,7 +785,7 @@ submittojoinclass=(value)=>{
</div>
}
{/*href="https://www.educoder.net/login"*/}
{ user===undefined?"":user.login===""?"":<div className="fr head-right">
<div className="fr head-right ">
{ loadHeader()}
<a id="search-open" className="fl mr30 headIcon">
{/*"/images/educoder/icon/search.svg"
@ -795,7 +806,7 @@ submittojoinclass=(value)=>{
{this.props.current_user&&this.props.current_user.user_identity==="学生"?"":<li><Link to={"/courses/new"}>新建课堂</Link></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?"":this.props.Headertop.new_project_url} target="_blank">新建项目</a></li>
<li><a href={"/projects/new"} target="_blank">新建项目</a></li>
</ul>
<ul className="fl with50 edu-txt-center">
@ -862,7 +873,7 @@ submittojoinclass=(value)=>{
</div>
</div>
<div className="fl mr30 edu-menu-panel headIcon">
<div className="fl mr30 edu-menu-panel headIcon">
{ user===undefined?"":user.login===""?"": <a
href={this.props.Headertop===undefined?"":this.props.Headertop.message_url}
style={{position:'relative'}}
@ -905,7 +916,7 @@ submittojoinclass=(value)=>{
</div>
</Modal>
</div>}
</div>
</div>
</div>

@ -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,

@ -39,7 +39,7 @@ class TPMBanner extends Component {
this.state={
Forkvisible: false,
Senttothetype:false,
Senttothevcalue:1,
Senttothevcalue:undefined,
courses_count:1,
course_list:[],
pagenum:1,
@ -62,6 +62,7 @@ class TPMBanner extends Component {
isIE:false,
Forkvisibletype: false,
isSpin:false,
Senttothevcaluetype:false
}
}
@ -233,12 +234,21 @@ class TPMBanner extends Component {
});
}
sendeSenttothevcalue=()=>{
let {Senttothevcalue}=this.state;
if(Senttothevcalue===undefined){
this.setState({
Senttothevcaluetype:true
})
return
}
let id = this.props.match.params.shixunId;
let url="/shixuns/" + id +"/send_to_course.json";
axios.post(url,{
course_id:Senttothevcalue
}).then((response) => {
this.props.showSnackbar(response.data.message);
this.setState({
Senttothetype:false,
@ -339,6 +349,7 @@ class TPMBanner extends Component {
// });
// }
// reset_my_game
hidestartshixunsreplace=(url)=>{
this.setState({
isSpin:true,
@ -348,7 +359,7 @@ class TPMBanner extends Component {
// let path="/shixuns/"+response.data.shixun_identifier+"/challenges";
// this.props.history.push(path);
message.success('重置成功,正在进入实训!');
this.startshixunCombat(response.data.shixun_identifier);
this.startshixunCombat(response.data.shixun_identifier, 1);
this.setState({
shixunsreplace:false,
isSpin:false,
@ -369,7 +380,7 @@ class TPMBanner extends Component {
//开始实战按钮
startshixunCombat=(id)=>{
startshixunCombat=(id, reset)=>{
let {shixunsDetails} = this.props
if( shixunsDetails.shixun_status>1){
this.setState({
@ -383,7 +394,10 @@ class TPMBanner extends Component {
}
let url="/shixuns/"+id+"/shixun_exec.json";
let url="/shixuns/"+id+"/shixun_exec.json" ;
if (reset) {
url += '?reset=' + reset
}
axios.get(url).then((response) => {
if(response.status===200){
if(response.data.status===-2){
@ -466,6 +480,7 @@ class TPMBanner extends Component {
shixunsreplace,
hidestartshixunsreplacevalue,
Forkvisibletype,
Senttothevcaluetype,
isIE} = this.state;
let {shixunsDetails, shixunId, star_info, star_infos} = this.props;
let challengeBtnTipText = '';
@ -839,7 +854,7 @@ class TPMBanner extends Component {
/>
</div>
<div id="search_course_list" className={courses_count > 12?"cdefault mb20":"cdefault mb50"}>
<div id="search_course_list" className={courses_count > 12?"cdefault ":"cdefault "}>
<div className="clearfix mb5 edu-bg-light-blue edu-h315">
<ul>
<RadioGroup onChange={this.onChangeSenttothevcalue} value={Senttothevcalue}>
@ -855,8 +870,8 @@ class TPMBanner extends Component {
</ul>
</div>
</div>
<div className="mt40 marginauto">
{this.state.Senttothevcaluetype===true?<div className={"color-red"}>请选择你要发送的课堂</div>:""}
<div className="mt10 marginauto">
<Pagination size="small" style={{display: courses_count > 12 ? "block" : "none"}}
showQuickJumper defaultCurrent={1} current={pages} pageSize={12}
total={courses_count} onChange={this.onChangesendeSenttothe}/>

@ -191,4 +191,10 @@ body>.-task-title {
.HeaderSearch .ant-input-search .ant-input-suffix{
background: transparent !important;
}
.roundedRectangles{
position: absolute;
top: 10px;
right: -22px;
}

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

@ -200,7 +200,8 @@ class Newshixuns extends Component {
languagewritetype:false,
systemenvironmenttype:false,
testcoderunmodetype:false,
attachmentidstype:false
attachmentidstype:false,
datalisttype:false
}
}
@ -369,20 +370,32 @@ class Newshixuns extends Component {
}
shixunScopeInput = (e, id) => {
let types=false
let {scope_partment} = this.state;
let datalist = scope_partment;
if (datalist === undefined) {
datalist = []
}
datalist.push(e)
// else{
// datalist[id]=e
// }
this.setState({
scope_partment: datalist,
onSearchvalue: ""
});
datalist.map((item,key)=>{
if(e===item){
types=true
this.setState({
datalisttype:true
})
return
}
})
if(types===false){
datalist.push(e)
this.setState({
scope_partment: datalist,
onSearchvalue: ""
});
}
}
deleteScopeInput = (key) => {
@ -495,7 +508,9 @@ class Newshixuns extends Component {
}
shixunHandleSearch = (value) => {
this.shixunsfetch(value, departmentslist => this.setState({departmentslist}));
this.setState({
onSearchvalue: ""
})
@ -787,7 +802,7 @@ class Newshixuns extends Component {
render() {
const { getFieldDecorator } = this.props.form;
const thiss=this;
let {testcoderunmode ,systemenvironment,languagewrite,deleteisnot, fileList,TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, operss, onSearchvalue} = this.state;
let {testcoderunmode ,systemenvironment,languagewrite,deleteisnot, fileList,TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, datalisttype, onSearchvalue} = this.state;
let options
if (departmentslist != undefined) {
options = this.state.departmentslist.map((d, k) => {
@ -865,7 +880,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>
@ -1142,6 +1157,7 @@ class Newshixuns extends Component {
</Select>
</div>
<span className="color-grey-9">(搜索选中添加单位名称)</span>
{this.state.datalisttype===true?<span className="color-red ml10">请勿选择重复单位</span>:""}
{/*<a className="white-btn orange-btn fl mt1 use_scope-btn" onClick={this.adduse_scopeinput}>+ 添加</a>*/}
</div>
</div>
@ -1153,7 +1169,7 @@ class Newshixuns extends Component {
return (
<li className="task_tag_span" key={key}><span>{item}</span>
<a style={{color: 'rgba(0,0,0,.25)'}}
onClick={(key) => this.deleteScopeInput(key)}>×</a>
onClick={() => this.deleteScopeInput(key)}>×</a>
</li>
)
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

@ -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">

@ -409,6 +409,7 @@ class LoginRegisterComponent extends Component {
}
inputOnBlurzhuche = (e)=>{
if(this.state.pciphone===false) {
if(this.state.login===""||this.state.login.length===0){
this.setState({
Phonenumberisnotco: "账号不能为空",
@ -423,10 +424,12 @@ class LoginRegisterComponent extends Component {
})
this.Emailphonenumberverification(e.target.value)
}
}
//是否验证通过
dragOkCallback = () => {
console.log(this.state.login);
if(this.state.pciphone===false) {
if (this.state.login === "" || this.state.login.length === 0) {
this.setState({
@ -442,7 +445,6 @@ class LoginRegisterComponent extends Component {
})
this.Emailphonenumberverification(this.state.login)
}
}
//邮箱手机号验证
@ -507,7 +509,7 @@ class LoginRegisterComponent extends Component {
// height: 346px;
return (
<div className="login_register_content" style={{height: "520px"}}>
<div className="login_register_content" style={{height: "470px"}}>
<ReadPassword
modalsType={this.state.modalsType}
StudyMakeMoney={()=>this.StudyMakeMoney()}
@ -539,8 +541,8 @@ class LoginRegisterComponent extends Component {
`}</style>
<div className="login_section">
<div className="section_header font-18" style={{color:"#05101A"}}>
<div className="login_sectionysl">
<div className="section_header font-18" style={{color:"#05101A",marginTop:"10px"}}>
找回密码
</div>
<div style={{width: '340px'}}>
@ -608,13 +610,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}

@ -242,7 +242,7 @@ 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}
@ -280,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>

@ -128,14 +128,17 @@ class LoginRegisterComponent extends Component {
console.log("11111111111111111111111111");
this.state = {
tab:["0"],
pciphone:pcipns,
}
} else if (this.props.match.url === "/register") {
this.state = {
tab:["1"],
pciphone:pcipns,
}
}
this.setState({
pciphone:pcipns,
})
}
@ -202,6 +205,9 @@ class LoginRegisterComponent extends Component {
//是否验证通过
dragOkCallback = () => {
console.log(this.state.logins);
this.setState({
Phonenumberisnotcosytdhk:undefined,
})
this.Emailphonenumberverification(this.state.logins, 2)
}
@ -841,14 +847,21 @@ 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>
<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">

@ -0,0 +1,70 @@
import React, { Component } from 'react';
import { Modal} from 'antd';
import axios from 'axios';
import '../../modules/user/common.css';
//完善个人资料
class Notcompletedysl extends Component {
constructor(props) {
super(props)
this.state ={
modalsType:false,
}
}
componentDidMount() {
// console.log("Notcompletedysl");
// console.log("开发了402了");
axios.interceptors.response.use((response) => {
// console.log(response);
if (response != undefined)
if (response && response.data.status === 402) {
this.setState({
modalsType: true
})
}
return response;
}, (error) => {
//TODO 这里如果样式变了会出现css不加载的情况
});
}
modalCancel=()=>{
window.location.href = "/";
}
setDownload=()=>{
window.location.href ='/account/profile';
}
render() {
console.log(this.props)
return(
<Modal
keyboard={false}
closable={false}
footer={null}
destroyOnClose={true}
title="提示"
centered={true}
visible={this.state.modalsType}
width="530px"
>
<div className="educouddiv">
<div className={"tabeltext-alignleft mt10"}><p>您尚未完善个人资料</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>
</div>
</div>
</Modal>
)
}
}
export default Notcompletedysl;

@ -14,7 +14,7 @@ class ReadPassword extends Component {
setDownload=()=>{
//立即联系
this.props.StudyMakeMoney()
window.location.href = "/login"
}

@ -32,6 +32,12 @@
align-items: center;
flex-direction: column;
}
.login_sectionysl{
width: 100%;
display:flex;
align-items: center;
flex-direction: column;
}
.loginInput {
width: 100%;
margin-bottom: 16px;
@ -71,7 +77,7 @@
}
.ysldivhomediv{
width: 101px;
height: 147px;
height: 130px;
}
.ysldivhomediv1{
@ -83,7 +89,7 @@
display: flex;
flex-direction:column;
margin-left: 73px;
margin-top: 8px;
margin-top: 5px;
}
.ysldivhomediv2{
width: 110px;
@ -94,7 +100,7 @@
display: flex;
flex-direction:column;
margin-left: 73px;
margin-top: 20px;
margin-top: 15px;
}
.ysldivhomedivtxt{
width:101px;
@ -159,7 +165,7 @@
display: flex;
justify-content:center;
width: 60px;
margin-left: 27px;
margin-left: 26px;
}
.yslgouxuanimg{

@ -225,24 +225,32 @@ class Infos extends Component{
<div className="inline">
<div className="fl headtab">
<span>{is_current ? "我":"TA"}的经验值</span>
<a href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_experience`}>{data && data.experience}</a>
<a
// href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_experience`}
>{data && data.experience}</a>
</div>
<em className="v-h-line fl"></em>
<div className="fl headtab">
<span>{is_current ? "我":"TA"}的金币</span>
<a href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_grade`} id="user_code">{data && data.grade}</a>
<a
// href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_grade`}
id="user_code">{data && data.grade}</a>
</div>
<div className="headphoto mt14">
<img alt="头像" id="user_avatar_show" nhname="avatar_image" src={data && `${getImageUrl('images/'+data.avatar_url)}`}/>
</div>
<div className="fl headtab">
<span>{is_current ? "我":"TA"}的粉丝</span>
<a href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_fanslist`} id="user_h_fan_count">{data && data.fan_count}</a>
<a
// href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_fanslist`}
id="user_h_fan_count">{data && data.fan_count}</a>
</div>
<em className="v-h-line fl"></em>
<div className="fl headtab">
<span>{is_current ? "我":"TA"}的关注</span>
<a href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_watchlist`}>{data && data.follow_count}</a>
<a
// href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_watchlist`}
>{data && data.follow_count}</a>
</div>
<span className="clearfix"></span>
<span className="myName">{data && data.name}</span>
@ -253,22 +261,34 @@ class Infos extends Component{
{
data && is_current == false && data.identity =="学生" ? "" : <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 ?"已实名认证":"未实名认证"}>
<i className={ data && data.authentication ? "iconfont icon-shenfenrenzheng font-13 color-blue":"iconfont icon-shenfenrenzheng font-13 color-grey-9"}></i>
</Tooltip>
</a>
<a href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/professional_certification` :"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/professional_certification` :"javascript:void(0)"}
// target="_blank"
className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title={ data && data.professional_certification ?"已职业认证":"未职业认证"}>
<i className={ data && data.professional_certification ? "iconfont icon-zhiyerenzheng font-13 color-blue":"iconfont icon-zhiyerenzheng font-13 color-grey-9"}></i>
</Tooltip>
</a>
<a href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/change_or_bind?type=phone` :"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/change_or_bind?type=phone` :"javascript:void(0)"}
// target="_blank"
className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title={ data && data.phone_binded ?"已手机认证":"未手机认证"}>
<i className={ data && data.phone_binded ? "iconfont icon-shoujirenzheng font-13 color-blue":"iconfont icon-shoujirenzheng font-13 color-grey-9"}></i>
</Tooltip>
</a>
<a href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/my/account` :"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}/my/account` :"javascript:void(0)"}
// target="_blank"
className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title={ data && data.email_binded ?"已邮箱认证":"未邮箱认证"}>
<i className={ data && data.email_binded ? "iconfont icon-youxiangrenzheng font-13 color-blue":"iconfont icon-youxiangrenzheng font-13 color-grey-9"}></i>
</Tooltip>
@ -276,7 +296,9 @@ class Infos extends Component{
{/* <!--学院管理员身份--> */}
{
data && data.college_identifier &&
<a href={`${this.props.Headertop && this.props.Headertop.old_url}/colleges/${data.college_identifier}/statistics`} target="_blank" className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<a
// href={`${this.props.Headertop && this.props.Headertop.old_url}/colleges/${data.college_identifier}/statistics`} target="_blank"
className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title="学院管理员">
<i className="iconfont icon-chengyuanguanli font-12 color-blue" data-tip-down="学院管理员"></i>
</Tooltip>
@ -342,7 +364,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>

@ -1,192 +1,192 @@
import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import {Tooltip,Pagination,Spin} from 'antd';
import axios from 'axios';
import NoneData from '../../courses/coursesPublic/NoneData'
import {getImageUrl} from 'educoder';
import "./usersInfo.css"
import Create from './publicCreatNew'
class InfosProject extends Component{
constructor(props){
super(props);
this.state={
category:undefined,
status:undefined,
page:1,
per_page:16,
totalCount:undefined,
data:undefined,
isSpin:false
}
}
componentDidMount=()=>{
this.setState({
isSpin:true
})
let{category,status,page}=this.state;
this.getCourses(category,status,page);
}
getCourses=(category,status,page)=>{
let url=`/users/${this.props.match.params.username}/projects.json`;
axios.get((url),{params:{
category,
status,
page,
per_page:this.props.is_current && category && page ==1?17:16
}}).then((result)=>{
if(result){
this.setState({
totalCount:result.data.count,
data:result.data,
isSpin:false
})
}
}).catch((error)=>{
console.log(error);
})
}
//切换种类
changeCategory=(cate)=>{
this.setState({
category:cate,
page:1,
isSpin:true
})
let{status}=this.state;
this.getCourses(cate,status,1);
}
//切换状态
changeStatus=(status)=>{
this.setState({
status:status,
page:1,
isSpin:true
})
let{category}=this.state;
this.getCourses(category,status,1);
}
//切换页数
changePage=(page)=>{
this.setState({
page,
isSpin:true
})
let{category,status}=this.state;
this.getCourses(category,status,page);
}
// 进入项目
turnToCourses=(url,flag)=>{
if(flag){
this.props.history.push(url);
}
}
render(){
let{
category,
status,
page,
data,
totalCount,
isSpin
} = this.state;
let isStudent = this.props.isStudent();
let is_current=this.props.is_current;
return(
<div className="educontent">
<Spin size="large" spinning={isSpin}>
<div className="white-panel edu-back-white pt25 pb25 clearfix ">
<li className={category ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeCategory()}>全部</a></li>
<li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li>
<li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li>
</div>
{
is_current &&
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
<li className={status=="publicly" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("publicly")}>公开</a></li>
<li className={status=="personal" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("personal")}>私有</a></li>
</div>
}
<p className="pl25 pr25 clearfix font-12 mb20 mt20">
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"项目"}</span>
<span className="fr color-grey-9">时间最新</span>
</p>
<div className="square-list clearfix">
{
!isStudent && page == 1 && !category && is_current &&
<Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建项目"} index="4"></Create>
}
{
(!data || data.projects.length==0) && (isStudent || category) && <NoneData></NoneData>
}
{
data && data.projects && data.projects.map((item,key)=>{
return(
<div className="square-Item" onClick={()=>this.turnToCourses(`${this.props.Headertop && this.props.Headertop.old_url}/projects/${item.id}`,item.can_visited)} style={{"cursor": "pointer"}}>
{
item.is_public==1 &&
<React.Fragment>
<div className="publicpart"></div>
<span className="smalltrangle"></span>
<span className="publicword">公开</span>
</React.Fragment>
}
{
item.can_visited ==false?
<div className="closeSquare">
<img src={getImageUrl("/images/educoder/icon/lockclose.svg")} className="mt80 mb25"/>
<p className="font-14 color-white">非成员不能访问</p>
</div>:""
}
<div className="substance">
<p className="subName font-16">
<span>{item.name}</span>
</p>
<span><img alt="用户" className="radius mt15" height="60" src={getImageUrl(`images/${item.owner.avatar_url}`)} width="60"/></span>
<p className="font-14 mt10"><span>{item.owner.real_name}</span></p>
<p className="font-16 mb15 mt10 task-hide"><span className="color-grey-9">{item.owner.school_name}</span></p>
</div>
<div className="edu-txt-center course-bottom">
<div className="inline color-grey-6">
{
item.members_count> 0 &&
<span className="mr10 ml10 fl squareIconSpan">
<i className="iconfont icon-chengyuan fl mr3" data-tip-down="成员"></i>{item.members_count}</span>
}
{
item.issues_count> 0 &&
<span className="mr10 ml10 fl squareIconSpan">
<i className="iconfont icon-issue fl mr3" data-tip-down="issues数"></i>{item.issues_count}</span>
}
{
item.changesets_count> 0 &&
<span className="mr10 ml10 fl squareIconSpan">
<i className="iconfont icon-banbenku fl mr3" data-tip-down="版本库"></i>{item.changesets_count}</span>
}
</div>
</div>
</div>
)
})
}
</div>
{
totalCount > 15 &&
<div className="mt30 mb50 edu-txt-center">
<Pagination showQuickJumper total={totalCount} onChange={this.changePage} pageSize={16} current={page}/>
</div>
}
</Spin>
</div>
)
}
}
import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import {Tooltip,Pagination,Spin} from 'antd';
import axios from 'axios';
import NoneData from '../../courses/coursesPublic/NoneData'
import {getImageUrl} from 'educoder';
import "./usersInfo.css"
import Create from './publicCreatNew'
class InfosProject extends Component{
constructor(props){
super(props);
this.state={
category:undefined,
status:undefined,
page:1,
per_page:16,
totalCount:undefined,
data:undefined,
isSpin:false
}
}
componentDidMount=()=>{
this.setState({
isSpin:true
})
let{category,status,page}=this.state;
this.getCourses(category,status,page);
}
getCourses=(category,status,page)=>{
let url=`/users/${this.props.match.params.username}/projects.json`;
axios.get((url),{params:{
category,
status,
page,
per_page:this.props.is_current && category && page ==1?17:16
}}).then((result)=>{
if(result){
this.setState({
totalCount:result.data.count,
data:result.data,
isSpin:false
})
}
}).catch((error)=>{
console.log(error);
})
}
//切换种类
changeCategory=(cate)=>{
this.setState({
category:cate,
page:1,
isSpin:true
})
let{status}=this.state;
this.getCourses(cate,status,1);
}
//切换状态
changeStatus=(status)=>{
this.setState({
status:status,
page:1,
isSpin:true
})
let{category}=this.state;
this.getCourses(category,status,1);
}
//切换页数
changePage=(page)=>{
this.setState({
page,
isSpin:true
})
let{category,status}=this.state;
this.getCourses(category,status,page);
}
// 进入项目
turnToCourses=(url,flag)=>{
if(flag){
window.location.href=url;
}
}
render(){
let{
category,
status,
page,
data,
totalCount,
isSpin
} = this.state;
let isStudent = this.props.isStudent();
let is_current=this.props.is_current;
return(
<div className="educontent">
<Spin size="large" spinning={isSpin}>
<div className="white-panel edu-back-white pt25 pb25 clearfix ">
<li className={category ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeCategory()}>全部</a></li>
<li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li>
<li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li>
</div>
{
is_current &&
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
<li className={status=="publicly" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("publicly")}>公开</a></li>
<li className={status=="personal" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("personal")}>私有</a></li>
</div>
}
<p className="pl25 pr25 clearfix font-12 mb20 mt20">
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"项目"}</span>
<span className="fr color-grey-9">时间最新</span>
</p>
<div className="square-list clearfix">
{
!isStudent && page == 1 && !category && is_current &&
<Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建项目"} index="4"></Create>
}
{
(!data || data.projects.length==0) && (isStudent || category) && <NoneData></NoneData>
}
{
data && data.projects && data.projects.map((item,key)=>{
return(
<div className="square-Item" onClick={()=>this.turnToCourses(`/projects/${item.id}`,item.can_visited)} style={{"cursor": "pointer"}}>
{
item.is_public==1 &&
<React.Fragment>
<div className="publicpart"></div>
<span className="smalltrangle"></span>
<span className="publicword">公开</span>
</React.Fragment>
}
{
item.can_visited ==false?
<div className="closeSquare">
<img src={getImageUrl("/images/educoder/icon/lockclose.svg")} className="mt80 mb25"/>
<p className="font-14 color-white">非成员不能访问</p>
</div>:""
}
<div className="substance">
<p className="subName font-16">
<span>{item.name}</span>
</p>
<span><img alt="用户" className="radius mt15" height="60" src={getImageUrl(`images/${item.owner.avatar_url}`)} width="60"/></span>
<p className="font-14 mt10"><span>{item.owner.real_name}</span></p>
<p className="font-16 mb15 mt10 task-hide"><span className="color-grey-9">{item.owner.school_name}</span></p>
</div>
<div className="edu-txt-center course-bottom">
<div className="inline color-grey-6">
{
item.members_count> 0 &&
<span className="mr10 ml10 fl squareIconSpan">
<i className="iconfont icon-chengyuan fl mr3" data-tip-down="成员"></i>{item.members_count}</span>
}
{
item.issues_count> 0 &&
<span className="mr10 ml10 fl squareIconSpan">
<i className="iconfont icon-issue fl mr3" data-tip-down="issues数"></i>{item.issues_count}</span>
}
{
item.changesets_count> 0 &&
<span className="mr10 ml10 fl squareIconSpan">
<i className="iconfont icon-banbenku fl mr3" data-tip-down="版本库"></i>{item.changesets_count}</span>
}
</div>
</div>
</div>
)
})
}
</div>
{
totalCount > 15 &&
<div className="mt30 mb50 edu-txt-center">
<Pagination showQuickJumper total={totalCount} onChange={this.changePage} pageSize={16} current={page}/>
</div>
}
</Spin>
</div>
)
}
}
export default InfosProject;

@ -94,6 +94,7 @@ class SearchPage extends Component{
//获取数据
getdata=(pages,type,keywords)=>{
let url = "/search.json";
this.setState({ loading: true })
axios.get(url,{params:{
keyword:keywords,
type:type,
@ -101,6 +102,8 @@ class SearchPage extends Component{
per_page:this.state.perpages,
}
}).then((response) => {
this.setState({ loading: false })
if(response === undefined){
return
@ -118,11 +121,19 @@ class SearchPage extends Component{
}
render(){
let {tab,count,data,page,perpages}=this.state;
let {tab,count,data,page,perpages, type }=this.state;
return(
<div className="newMain clearfix">
<style>{`
.ziticor.iconfont {
margin-bottom: 2px;
display: inline-block;
margin-right: 4px;
font-size: 16px !important;
}
`}</style>
<div className="headersear" >
<div style={{height:"53px"}}></div>
<Search
@ -145,7 +156,7 @@ class SearchPage extends Component{
</div>
</div>
{
JSON.stringify(data) === "[]" ?
JSON.stringify(data) === "[]" && this.state.loading != true ?
<div id="forum_list" className="forum_table">
<div className="mh650 bjyss">
@ -227,11 +238,75 @@ class SearchPage extends Component{
}
</div>
<div className="mt20">
<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>
{/* <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> */}
<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>
{!!item.challenges_count && <span className="ml20 ziticor">
<i className="iconfont icon-shixunguanqia ziticor"></i>
<span>任务:
<span className="ml10 ziticor">{item.challenges_count}</span>
</span>
</span> }
{!!item.study_count && <span className="ml20 ziticor">
<i className="iconfont icon-chengyuan ziticor"></i>
<span>学习人数:
<span className="ml10 ziticor">{item.study_count}</span>
</span>
</span>}
{!!item.stage_shixuns_count && <span className="ml20 ziticor">
<i className="iconfont icon-shixunguanqia ziticor"></i>
<span>实训数:
<span className="ml10 ziticor">{item.stage_shixuns_count}</span>
</span>
</span>}
{type == 'subject' && !!item.visits_count && <span className="ml20 ziticor">
<i className="iconfont icon-chengyuan ziticor" style={{ 'margin-bottom': '1px' }}></i>
<span>访问数:
<span className="ml10 ziticor">{item.visits_count}</span>
</span>
</span>}
{!!item.members_count && <span className="ml20 ziticor">
<i className="iconfont icon-chengyuan ziticor"></i>
<span>成员数:
<span className="ml10 ziticor">{item.members_count}</span>
</span>
</span>}
{!!item.all_replies_count && <span className="ml20 ziticor">
<i className="iconfont icon-huifu1 ziticor"></i>
<span>回复数:<span className="ml10 ziticor">{item.all_replies_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>

@ -126,4 +126,9 @@
.ziticor{
color: #777777;
font-size: 13px;
}
.foohter{
margin-top: 20px;
display: flex;
flex-direction:row;
}
Loading…
Cancel
Save