diff --git a/public/images/educoder/roundedRectangle.png b/public/images/educoder/roundedRectangle.png new file mode 100755 index 000000000..0d2d0b0dc Binary files /dev/null and b/public/images/educoder/roundedRectangle.png differ diff --git a/public/react/scripts/build.js b/public/react/scripts/build.js index 29035ffed..211b360d9 100644 --- a/public/react/scripts/build.js +++ b/public/react/scripts/build.js @@ -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`) diff --git a/public/react/src/App.js b/public/react/src/App.js index b7658450a..28a7e977e 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -14,6 +14,7 @@ import '@icedesign/base/dist/ICEDesignBase.css'; import '@icedesign/base/index.scss'; import LoginDialog from './modules/login/LoginDialog' +import Notcompletedysl from './modules/user/Notcompletedysl' import Trialapplication from './modules/login/Trialapplication' import NotFoundPage from './NotFoundPage' @@ -264,6 +265,7 @@ class App extends Component { + {/*{*/} {/* isRender === true?*/} {/* : ""*/} diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index d5d002e52..528ec6b94 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -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 // // diff --git a/public/react/src/common/components/Notcompleted.js b/public/react/src/common/components/Notcompleted.js index e974003de..d7998ca27 100644 --- a/public/react/src/common/components/Notcompleted.js +++ b/public/react/src/common/components/Notcompleted.js @@ -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'; diff --git a/public/react/src/common/components/SetAppModel.js b/public/react/src/common/components/SetAppModel.js index b243bd0c2..b71a408c6 100644 --- a/public/react/src/common/components/SetAppModel.js +++ b/public/react/src/common/components/SetAppModel.js @@ -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 ( -
- {/**/} + +
+

您尚未完善个人资料

+

请在完成资料后,提交试用申请

+ +
+
) } } diff --git a/public/react/src/modules/courses/coursesHome/coursesHomeCard.js b/public/react/src/modules/courses/coursesHome/coursesHomeCard.js index 6869b6b71..2f65c622f 100644 --- a/public/react/src/modules/courses/coursesHome/coursesHomeCard.js +++ b/public/react/src/modules/courses/coursesHome/coursesHomeCard.js @@ -40,8 +40,8 @@ class coursesHomeCard extends Component{ className="mt80 mb25"/>

非成员不能访问

- {/**/} - + + {/**/} {/*target="_blank"*/} { item.is_public===1&&item.id===1309? diff --git a/public/react/src/modules/courses/coursesPublic/ShixunModal.js b/public/react/src/modules/courses/coursesPublic/ShixunModal.js index f0caef87b..1fc218908 100644 --- a/public/react/src/modules/courses/coursesPublic/ShixunModal.js +++ b/public/react/src/modules/courses/coursesPublic/ShixunModal.js @@ -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{ - {this.state.chekicmessage} + {this.state.chekicmessage}
取消 确定 diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index e052ed1e3..eb1627e83 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -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) => { diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 5a2c89154..bdd3a7de2 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -899,15 +899,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=()=>{ @@ -1482,7 +1499,7 @@ class Listofworksstudentone extends Component { } 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 +1599,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 +1623,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 +1721,9 @@ class Listofworksstudentone extends Component { } else { } + + console.log(datalist); + console.log("1712"); this.setState({ data: datalist, columns: columns2, @@ -2328,7 +2351,7 @@ class Listofworksstudentone extends Component { (this.props.isNotMember()===false?
计算成绩
:""): - teacherdata&&teacherdata.homework_status[0]!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": + teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": (this.props.isNotMember()===false?
计算成绩
:"") @@ -2619,7 +2642,7 @@ class Listofworksstudentone extends Component {
:"") : - (teacherdata&&teacherdata.homework_status[0]!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": + (teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": this.props.isNotMember()===false?
计算成绩 @@ -2784,7 +2807,7 @@ class Listofworksstudentone extends Component { (this.props.isNotMember()===false?
计算成绩
:""): - teacherdata&&teacherdata.homework_status[0]!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": + teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": (this.props.isNotMember()===false?
计算成绩
:"") diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 5282b86a0..aa2e32c49 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -24,7 +24,7 @@ class ShixunHomeworkPage extends Component { super(props); // this.answerMdRef = React.createRef(); this.state = { - tab: ["0"], + tab: 0, jobsettingsdata: undefined, teacherdata: undefined, code_review: false, @@ -141,8 +141,9 @@ class ShixunHomeworkPage extends Component { render() { let {tab, teacherdata, jobsettingsdata} = this.state; - const isAdmin = this.props.isAdmin(); + console.log(tab); + console.log("147147147147147147147"); return (
@@ -279,13 +280,13 @@ class ShixunHomeworkPage extends Component { /> - {parseInt(tab) === 0 && this.Getdataback(jobsettingsdata, teacherdata)}>} + {parseInt(tab) === 0 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} - {parseInt(tab) === 1 && this.Getdataback(jobsettingsdata, teacherdata)}>} + {parseInt(tab) === 1 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} - {parseInt(tab) === 2 && this.Getdataback(jobsettingsdata, teacherdata)}>} + {parseInt(tab) === 2 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} - {parseInt(tab) === 3 && this.Getdataback(jobsettingsdata, teacherdata)}>} + {parseInt(tab) === 3 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""}
diff --git a/public/react/src/modules/home/shixunsHome.js b/public/react/src/modules/home/shixunsHome.js index 780691e6c..5400368ec 100644 --- a/public/react/src/modules/home/shixunsHome.js +++ b/public/react/src/modules/home/shixunsHome.js @@ -361,7 +361,7 @@ class ShixunsHome extends Component { - {item.name} + {item.username} ) @@ -375,7 +375,7 @@ class ShixunsHome extends Component { - {item.name} + {item.username} ) @@ -389,7 +389,7 @@ class ShixunsHome extends Component { - {item.name} + {item.username} ) @@ -405,7 +405,7 @@ class ShixunsHome extends Component {
  • - {item.name} + {item.username}
  • ) @@ -437,7 +437,7 @@ class ShixunsHome extends Component { - {item.name} + {item.username} ) @@ -451,7 +451,7 @@ class ShixunsHome extends Component { - {item.name} + {item.username} ) @@ -465,7 +465,7 @@ class ShixunsHome extends Component { - {item.name} + {item.username} ) @@ -481,7 +481,7 @@ class ShixunsHome extends Component {
  • - {item.name} + {item.username}
  • ) diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js new file mode 100644 index 000000000..ec7bebcda --- /dev/null +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -0,0 +1,722 @@ +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: props.user_phone_binded, + 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, + }) + } + + + } + + + } + + + //初始化数据 + componentDidMount() { + // console.log("53"); + // + // console.log(this.props.isRenders); + + 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.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 ( +
    + { + isRenders === false ? "" : + +
    + + + + + +
    { + this.handleDialogClose() + }}> + +
    +
    + +
    +
      + 试用申请 +
    + +
    +
    + 您尚未获得访问权限,请如实填写下述信息 +
    +
    + 管理员审核批准后,即可继续访问网站 +
    + + { + user_phone_binded === true ? "" : +
    + this.inputOnBlur(e)} + style={{"height": "38px",}} + className={Phonenumberisnotco && Phonenumberisnotco !== ""?borredss:""} + name="myiphone" + > + { + Phonenumberisnotco && Phonenumberisnotco != "" ? +

    + {Phonenumberisnotco} +

    + :
    + } +
    + } + + + { + user_phone_binded === true ? "" : +
    + + + + + { + getverificationcodes === undefined ? + + : getverificationcodes === true ? + + : + + } +
    + } + + + { + Phonenumberisnotcocodes && Phonenumberisnotcocodes != "" ? +

    + {Phonenumberisnotcocodes} +

    + :
    + } +
    + + { + Phonenumberisnotcoreason && Phonenumberisnotcoreason !== "" ? +

    + {Phonenumberisnotcoreason} +

    + :
    + } +
    + + + + +
    + + +
    + +
    +
    + + } +
    + + + ) + + + } + + +} + +export default Trialapplicationysl; diff --git a/public/react/src/modules/page/main/CodeEvaluateView.js b/public/react/src/modules/page/main/CodeEvaluateView.js index 16932b818..a121a53d5 100644 --- a/public/react/src/modules/page/main/CodeEvaluateView.js +++ b/public/react/src/modules/page/main/CodeEvaluateView.js @@ -184,9 +184,9 @@ class CodeEvaluateView extends Component { { headIconClass && } { _headLockIconClass && } - { item.ts_mem && 消耗内存{item.ts_mem}MB } - { item.ts_mem && item.ts_time && } - { item.ts_time && 代码执行时长:{item.ts_time}秒 } + { !!item.ts_mem && 消耗内存{item.ts_mem}MB } + { !!item.ts_mem && !!item.ts_time && } + { !!item.ts_time && 代码执行时长:{item.ts_time}秒 }

    diff --git a/public/react/src/modules/page/taskList/TaskList.css b/public/react/src/modules/page/taskList/TaskList.css index b8899ddc1..46dfd5076 100644 --- a/public/react/src/modules/page/taskList/TaskList.css +++ b/public/react/src/modules/page/taskList/TaskList.css @@ -26,7 +26,7 @@ height: 22px; width: 0px; position: absolute; - top: 13px; + top: 8px; } #all_task_index .grades { diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 44a1ebbbd..fccfb06d6 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -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); @@ -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 (
    @@ -629,7 +636,7 @@ submittojoinclass=(value)=>{ {/* />*/} {/* :""*/} {/*}*/} - this.cancelModulationModels()} > + this.cancelModulationModels()} >
    {/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} @@ -676,9 +683,12 @@ submittojoinclass=(value)=>{ {/*
  • 教学案例
  • */} -
  • 在线竞赛
  • +
  • + 在线竞赛 + +
  • 教学案例
  • -
  • 众包社区
  • +
  • 众包创新
  • 交流问答
  • { {/**/} -
    +
    console.log(value)} onPressEnter={this.onKeywordSearchKeyDown} - style={{ width: 295 }} + style={{ width: 300 }} />
    @@ -737,11 +746,11 @@ submittojoinclass=(value)=>{ <%= link_to '注册', user_join_path, :className => "ml5" %> */} { user===undefined? - + this.educoderlogin()} className="mr5 color-white">登录 注册 - :user.login===""? + :user.login===""? this.educoderlogin()} className="mr5 color-white">登录 注册 @@ -774,7 +783,7 @@ submittojoinclass=(value)=>{
    } {/*href="https://www.educoder.net/login"*/} - { user===undefined?"":user.login===""?"":
    +
  • 新建课堂
  • }
  • 新建实训
  • 新建实践课程
  • -
  • 新建项目
  • +
  • 新建项目
    • @@ -862,7 +871,7 @@ submittojoinclass=(value)=>{
    -
    +
    { user===undefined?"":user.login===""?"": {
    -
    } + diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index c9404a792..68113f133 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -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, @@ -466,6 +476,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 +850,7 @@ class TPMBanner extends Component { /> -
    12?"cdefault mb20":"cdefault mb50"}> +
    12?"cdefault ":"cdefault "}>
      @@ -855,8 +866,8 @@ class TPMBanner extends Component {
    - -
    + {this.state.Senttothevcaluetype===true?
    请选择你要发送的课堂
    :""} +
    12 ? "block" : "none"}} showQuickJumper defaultCurrent={1} current={pages} pageSize={12} total={courses_count} onChange={this.onChangesendeSenttothe}/> diff --git a/public/react/src/modules/tpm/TPMIndex.css b/public/react/src/modules/tpm/TPMIndex.css index 655f58637..94d7cb0d7 100644 --- a/public/react/src/modules/tpm/TPMIndex.css +++ b/public/react/src/modules/tpm/TPMIndex.css @@ -191,4 +191,10 @@ body>.-task-title { .HeaderSearch .ant-input-search .ant-input-suffix{ background: transparent !important; +} + +.roundedRectangles{ + position: absolute; + top: 10px; + right: -22px; } \ No newline at end of file diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index d87bb6a4a..fef1e75ac 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -505,7 +505,7 @@ class LoginRegisterComponent extends Component { // height: 346px; return ( -
    +
    this.StudyMakeMoney()} @@ -537,8 +537,8 @@ class LoginRegisterComponent extends Component { `} -
    -
    +
    +
    找回密码
    diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index efd04db70..6a1ef1288 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -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, + }) } diff --git a/public/react/src/modules/user/Notcompletedysl.js b/public/react/src/modules/user/Notcompletedysl.js new file mode 100644 index 000000000..cc7a78e13 --- /dev/null +++ b/public/react/src/modules/user/Notcompletedysl.js @@ -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( + + + + ) + } +} + +export default Notcompletedysl; \ No newline at end of file diff --git a/public/react/src/modules/user/ReadPassword.js b/public/react/src/modules/user/ReadPassword.js index 68072657a..6beab8e62 100644 --- a/public/react/src/modules/user/ReadPassword.js +++ b/public/react/src/modules/user/ReadPassword.js @@ -14,7 +14,7 @@ class ReadPassword extends Component { setDownload=()=>{ //立即联系 - this.props.StudyMakeMoney() + window.location.href = "/login" } diff --git a/public/react/src/modules/user/common.css b/public/react/src/modules/user/common.css index 7dba8a4e5..f88bde127 100644 --- a/public/react/src/modules/user/common.css +++ b/public/react/src/modules/user/common.css @@ -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; @@ -159,7 +165,7 @@ display: flex; justify-content:center; width: 60px; - margin-left: 21px; + margin-left: 26px; } .yslgouxuanimg{ diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index 7bb86eb06..2c9dd5bd3 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -253,22 +253,34 @@ class Infos extends Component{ { data && is_current == false && data.identity =="学生" ? "" : {data && data.identity} } - + - + - + - + @@ -276,7 +288,9 @@ class Infos extends Component{ {/* */} { data && data.college_identifier && - + diff --git a/public/react/src/modules/user/usersInfo/InfosProject.js b/public/react/src/modules/user/usersInfo/InfosProject.js index cfd2bc443..33eac0e6b 100644 --- a/public/react/src/modules/user/usersInfo/InfosProject.js +++ b/public/react/src/modules/user/usersInfo/InfosProject.js @@ -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( -
    - - - { - is_current && - - } -

    - 共参与{totalCount}个{category?category=="manage"?"发布":"学习":"项目"} - 时间最新 -

    -
    - { - !isStudent && page == 1 && !category && is_current && - - } - { - (!data || data.projects.length==0) && (isStudent || category) && - } - { - data && data.projects && data.projects.map((item,key)=>{ - return( -
    this.turnToCourses(`${this.props.Headertop && this.props.Headertop.old_url}/projects/${item.id}`,item.can_visited)} style={{"cursor": "pointer"}}> - { - item.is_public==1 && - -
    - - 公开 -
    - } - { - item.can_visited ==false? -
    - -

    非成员不能访问

    -
    :"" - } -
    -

    - {item.name} -

    - 用户 -

    {item.owner.real_name}

    -

    {item.owner.school_name}

    -
    -
    -
    - { - item.members_count> 0 && - - {item.members_count} - } - { - item.issues_count> 0 && - - {item.issues_count} - } - { - item.changesets_count> 0 && - - {item.changesets_count} - } -
    -
    -
    - ) - }) - } -
    - { - totalCount > 15 && -
    - -
    - } - -
    - ) - } -} +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( +
    + + + { + is_current && + + } +

    + 共参与{totalCount}个{category?category=="manage"?"发布":"学习":"项目"} + 时间最新 +

    +
    + { + !isStudent && page == 1 && !category && is_current && + + } + { + (!data || data.projects.length==0) && (isStudent || category) && + } + { + data && data.projects && data.projects.map((item,key)=>{ + return( +
    this.turnToCourses(`/projects/${item.id}`,item.can_visited)} style={{"cursor": "pointer"}}> + { + item.is_public==1 && + +
    + + 公开 +
    + } + { + item.can_visited ==false? +
    + +

    非成员不能访问

    +
    :"" + } +
    +

    + {item.name} +

    + 用户 +

    {item.owner.real_name}

    +

    {item.owner.school_name}

    +
    +
    +
    + { + item.members_count> 0 && + + {item.members_count} + } + { + item.issues_count> 0 && + + {item.issues_count} + } + { + item.changesets_count> 0 && + + {item.changesets_count} + } +
    +
    +
    + ) + }) + } +
    + { + totalCount > 15 && +
    + +
    + } +
    +
    + ) + } +} export default InfosProject; \ No newline at end of file diff --git a/public/react/src/search/SearchPage.js b/public/react/src/search/SearchPage.js index 990700983..2b5f3cbee 100644 --- a/public/react/src/search/SearchPage.js +++ b/public/react/src/search/SearchPage.js @@ -228,8 +228,10 @@ class SearchPage extends Component{
    -
    - 主讲:{item.author_name}{item.author_school_name} 任务:{item.challenges_count===undefined?0:item.challenges_count} 学习人数:{item.study_count===undefined?0:item.study_count} +
    +
    主讲:{item.author_name}
    +
    {item.author_school_name}
    任务:{item.challenges_count===undefined?0:item.challenges_count}
    +
    学习人数:{item.study_count===undefined?0:item.study_count}
    diff --git a/public/react/src/search/searchc.css b/public/react/src/search/searchc.css index c73680ecb..4b31e7c5d 100644 --- a/public/react/src/search/searchc.css +++ b/public/react/src/search/searchc.css @@ -126,4 +126,9 @@ .ziticor{ color: #777777; font-size: 13px; +} +.foohter{ + margin-top: 20px; + display: flex; + flex-direction:row; } \ No newline at end of file