diff --git a/public/react/src/App.js b/public/react/src/App.js index 28a7e977e..110a46963 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -15,6 +15,7 @@ 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' @@ -266,6 +267,7 @@ class App extends Component { + {/*{*/} {/* isRender === true?*/} {/* : ""*/} diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 63c318f19..528ec6b94 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -13,21 +13,13 @@ function locationurl(list){ if (window.location.port === "3007") { } else { - - if(list===402){ - SetAppModel(402) - }else if(list===407){ - - }else{ window.location.replace(list) - } - } } // TODO 开发期多个身份切换 const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' : - window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' + window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' window._debugType = debugType; export function initAxiosInterceptors(props) { @@ -153,16 +145,16 @@ export function initAxiosInterceptors(props) { locationurl('/500'); } - if (response.data.status === 402) { - 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/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/Challenges.css b/public/react/src/modules/courses/shixunHomework/Challenges.css index dc9ba1ec1..2183fd708 100644 --- a/public/react/src/modules/courses/shixunHomework/Challenges.css +++ b/public/react/src/modules/courses/shixunHomework/Challenges.css @@ -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 } \ No newline at end of file diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index a63db222c..7f9ab561f 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -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) => ( - {record.classroom === undefined ? "--" : record.classroom === "" ? "--" : record.classroom === null ? "--" : record.classroom} @@ -418,7 +419,7 @@ class Listofworksstudentone extends Component { align: 'center', className:'font-14', render: (text, record) => ( - {record.classroom} + {record.classroom} ) }, { @@ -680,7 +681,7 @@ class Listofworksstudentone extends Component { align: 'center', className:'font-14', render: (text, record) => ( - {record.classroom} + {record.classroom} ) }, { @@ -899,9 +900,23 @@ 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){ @@ -954,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, @@ -976,7 +990,6 @@ class Listofworksstudentone extends Component { this.seacthdatas(result.data, result.data.student_works); } - } }).catch((error) => { console.log(error); }) @@ -1008,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({ @@ -1268,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 = []; @@ -1484,7 +1497,6 @@ class Listofworksstudentone extends Component { limit:20, } axios.post(urll, data).then((result) => { - debugger if (result) { // console.log(url) // console.log("作品列表6789077") @@ -1916,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 = []; @@ -2033,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: "提示", @@ -2337,7 +2349,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?
计算成绩
:"") @@ -2456,7 +2468,7 @@ class Listofworksstudentone extends Component {
-

没有数据可以显示!

+

没有数据可以显示.!

@@ -2628,7 +2640,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?
计算成绩 @@ -2793,7 +2805,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 03d69d61c..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, 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 index ec7bebcda..f38804810 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -30,7 +30,7 @@ class Trialapplicationysl extends Component { Phonenumberisnotco: undefined, Phonenumberisnotcobool: false, readonlyInput: true, - user_phone_binded: props.user_phone_binded, + user_phone_binded: undefined, showTrial: false, user: undefined, borredss:"bor-reds", @@ -42,37 +42,51 @@ class Trialapplicationysl extends Component { } Cancel = () => { - this.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, - }) - } - - - } + // 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 @@ -88,9 +102,11 @@ class Trialapplicationysl extends Component { axios.interceptors.response.use((response) => { if (response != undefined) if (response && response.data.status === 407) { + this.getipthon(); this.setState({ isRenders: true }) + } return response; }, (error) => { diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index c404aa8d5..125a96e85 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -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,14 @@ submittojoinclass=(value)=>{ {/*
  • 教学案例
  • */} -
  • 在线竞赛
  • +
  • + 在线竞赛 + +
  • 教学案例
  • -
  • 众包社区
  • +
  • 众包创新
  • 交流问答
  • { // onSearch={value => console.log(value)} onPressEnter={this.onKeywordSearchKeyDown} - style={{ width: 295 }} + style={{ width: 300 }} />
  • @@ -736,11 +748,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">登录 注册 @@ -773,7 +785,7 @@ submittojoinclass=(value)=>{
    } {/*href="https://www.educoder.net/login"*/} - { user===undefined?"":user.login===""?"":
    +
    { loadHeader()} {/*"/images/educoder/icon/search.svg" @@ -861,7 +873,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/tpm/roundedRectangle.png b/public/react/src/modules/tpm/roundedRectangle.png new file mode 100755 index 000000000..0d2d0b0dc Binary files /dev/null and b/public/react/src/modules/tpm/roundedRectangle.png differ 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 6a1ef1288..cf93a781b 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -205,6 +205,9 @@ class LoginRegisterComponent extends Component { //是否验证通过 dragOkCallback = () => { console.log(this.state.logins); + this.setState({ + Phonenumberisnotcosytdhk:undefined, + }) this.Emailphonenumberverification(this.state.logins, 2) } diff --git a/public/react/src/modules/user/common.css b/public/react/src/modules/user/common.css index 5453647aa..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; diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index 2c9dd5bd3..1a321dc51 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -225,24 +225,32 @@ class Infos extends Component{
    {is_current ? "我":"TA"}的金币 - {data && data.grade} + {data && data.grade}
    头像
    {is_current ? "我":"TA"}的粉丝 - {data && data.fan_count} + {data && data.fan_count}
    {is_current ? "我":"TA"}的关注 - {data && data.follow_count} + {data && data.follow_count}
    {data && data.name} diff --git a/public/react/src/modules/user/usersInfo/InfosProject.js b/public/react/src/modules/user/usersInfo/InfosProject.js index 33eac0e6b..06076a3cd 100644 --- a/public/react/src/modules/user/usersInfo/InfosProject.js +++ b/public/react/src/modules/user/usersInfo/InfosProject.js @@ -84,7 +84,7 @@ class InfosProject extends Component{ // 进入项目 turnToCourses=(url,flag)=>{ if(flag){ - this.props.history.push(url); + window.location.href=url; } } diff --git a/public/react/src/search/SearchPage.js b/public/react/src/search/SearchPage.js index 179c4f270..59fee95e9 100644 --- a/public/react/src/search/SearchPage.js +++ b/public/react/src/search/SearchPage.js @@ -305,8 +305,8 @@ class SearchPage extends Component{ 学习人数:{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