diff --git a/app/controllers/gits_controller.rb b/app/controllers/gits_controller.rb index 850458e65..bbb0e293e 100644 --- a/app/controllers/gits_controller.rb +++ b/app/controllers/gits_controller.rb @@ -69,7 +69,7 @@ class GitsController < ApplicationController else uid_logger_error("shixun is not exist") # result = false - result = false # 为了测试跳出 + result = true # 为了测试跳出 end end end diff --git a/app/views/comments/_discuss.json.jbuilder b/app/views/comments/_discuss.json.jbuilder index 63bebc5a7..e9f983a47 100644 --- a/app/views/comments/_discuss.json.jbuilder +++ b/app/views/comments/_discuss.json.jbuilder @@ -1,7 +1,6 @@ json.id discuss.id json.content content_safe(discuss.content) json.time time_from_now(discuss.created_at) -json.position discuss.position json.hack_id discuss.dis_id # 主贴和回复有一些不同点 if discuss.parent_id diff --git a/config/routes.rb b/config/routes.rb index 19500a235..86bac4533 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -47,7 +47,7 @@ Rails.application.routes.draw do delete :delete_set end resources :comments do - + post :reply end end diff --git a/public/images/educoder/index/subject/subject0.jpg b/public/images/educoder/index/subject/subject0.jpg index fe81e407b..08278bef5 100644 Binary files a/public/images/educoder/index/subject/subject0.jpg and b/public/images/educoder/index/subject/subject0.jpg differ diff --git a/public/react/src/App.js b/public/react/src/App.js index 6b4ba7399..75eb03aad 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -20,6 +20,7 @@ import Trialapplicationysl from './modules/login/Trialapplicationysl'; import Trialapplicationreview from './modules/user/Trialapplicationreview'; import Addcourses from "./modules/courses/coursesPublic/Addcourses"; import AccountProfile from "./modules/user/AccountProfile"; +import Accountnewprofile from './modules/user/Accountnewprofile'; import Trialapplication from './modules/login/Trialapplication'; import Certifiedprofessional from './modules/modals/Certifiedprofessional'; import NotFoundPage from './NotFoundPage' @@ -348,6 +349,7 @@ class App extends Component { }); } componentDidMount() { + document.title = "loading..."; this.disableVideoContextMenu(); // force an update if the URL changes history.listen(() => { @@ -466,6 +468,7 @@ class App extends Component { + this.Modifyloginvalue()}> diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 503c73a10..5f3704a33 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -130,16 +130,28 @@ class CoursesBanner extends Component { axios.get(url,{params: dataqueryss }).then((result) => { - if( result!=undefined){ - let data = result.data; - this.setState({ - coursedata: data, - excellent:data.excellent, - }) - this.props.ispostexcellenttype(data.excellent) + if(result.data.status===-2){ + // this.setState({ + // AccountProfiletype:true, + // content:result.data.message, + // okText:"立即认证", + // cannelText:"稍后认证", + // okHref:`/account/certification`, + // Accounturltype:true + // }) }else{ - this.onloadupdatabanner() + if( result!=undefined){ + let data = result.data; + this.setState({ + coursedata: data, + excellent:data.excellent, + }) + this.props.ispostexcellenttype(data.excellent) + }else{ + this.onloadupdatabanner() + } } + }) }; foo=(url)=> { @@ -452,7 +464,12 @@ class CoursesBanner extends Component { hideAccountProfile=()=>{ this.setState({ - AccountProfiletype:false + AccountProfiletype:false, + content:undefined, + okText:undefined, + okHref:undefined, + cannelText:undefined, + Accounturltype:undefined }) }; ysljoinmodalCancel=()=>{ diff --git a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js index 5fe9c8aa0..99a8ad232 100644 --- a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js +++ b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js @@ -616,7 +616,7 @@ class NewShixunModel extends Component{ } - {shixun_list===undefined||shixuns_count===undefined?"":shixun_list.length===0||shixuns_count===0?"":shixuns_count>15?
+ {shixun_list===undefined||shixuns_count===undefined?"":shixun_list.length===0||shixuns_count===0?"":shixuns_count>15?
-
成员可以通过邀请码主动加入课堂
+
成员可以通过邀请码主动加入分班
点击立刻复制邀请码
}> diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js b/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js index 5430b9e8c..8d678f335 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js +++ b/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js @@ -1,6 +1,6 @@ import React, {Component} from "react"; import {WordsBtn} from 'educoder'; -import {Table,Tooltip,} from "antd"; +import {Table,Tooltip} from "antd"; import {Link,Switch,Route,Redirect} from 'react-router-dom'; class ConclusionEvaluation extends Component { @@ -23,10 +23,10 @@ class ConclusionEvaluation extends Component { dataIndex: 'type', key: 'type', render: (text, record) => ( - {record.type} + {record.type} ), }, { - title: '获得经验值', + title:'获得经验值', dataIndex: 'empirical', key: 'empirical', render: (text, record) => ( diff --git a/public/react/src/modules/courses/statistics/Statistics.js b/public/react/src/modules/courses/statistics/Statistics.js index bb1ed9a09..00a47a81d 100644 --- a/public/react/src/modules/courses/statistics/Statistics.js +++ b/public/react/src/modules/courses/statistics/Statistics.js @@ -72,32 +72,34 @@ class Statistics extends Component{ }) } - getDynamiclistdatas=(group_ids)=>{ - - let courseId=this.props.match.params.coursesId; - let url=`/courses/${courseId}/act_score.json`; - let data={ - group_ids:group_ids, - } - axios.get(url,{params: - data - }).then((result) => { - if (result) { + getDynamiclistdatas=(group_ids,key)=>{ + if(key==='2') { + let courseId = this.props.match.params.coursesId; + let url = `/courses/${courseId}/act_score.json`; + let data = { + group_ids: group_ids, + } + axios.get(url, { + params: + data + }).then((result) => { + if (result) { + this.setState({ + course_members: result.data.course_members, + bomisSpin: false + }) + } + }).catch((error) => { + console.log(error); this.setState({ - course_members:result.data.course_members, - bomisSpin:false + bomisSpin: false, }) - } - }).catch((error) => { - console.log(error); - this.setState({ - bomisSpin:false, }) - }) + } } - getwork_scoredata=(page,group_ids,sort)=>{ - let {activeKey}=this.state; + getwork_scoredata=(page,group_ids,sort,key)=>{ + this.setState({ page:page, sort:sort, @@ -105,7 +107,7 @@ class Statistics extends Component{ bomisSpin:true, }) - if(activeKey==='1'){ + if(key==='1'||key===undefined){ let courseId=this.props.match.params.coursesId; let url=`/courses/${courseId}/work_score.json`; let data={ @@ -141,10 +143,10 @@ class Statistics extends Component{ if(key==="1"){ let {page,group_ids,sort}=this.state; // this.getdatas() - this.getwork_scoredata(page,group_ids,sort) - }else{ + this.getwork_scoredata(page,group_ids,sort,key) + }else if(key==="2"){ let{group_ids}=this.state; - this.getDynamiclistdatas(group_ids) + this.getDynamiclistdatas(group_ids,key) } this.setState({ activeKey:key diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index a4e9c0c4f..af0b7ed1e 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -386,6 +386,7 @@ class LoginDialog extends Component { axios.interceptors.response.use((response) => { if(response!=undefined) if (response&&response.data.status === 401) { + document.title = "提示"; this.setState({ isRender: true }) diff --git a/public/react/src/modules/osshackathon/Osshackathon.css b/public/react/src/modules/osshackathon/Osshackathon.css index 679f4afb0..227bd1150 100644 --- a/public/react/src/modules/osshackathon/Osshackathon.css +++ b/public/react/src/modules/osshackathon/Osshackathon.css @@ -37,11 +37,9 @@ } .OsshackathonCardtitle{ - height:24px; font-size:24px; font-weight:400; color:rgba(5,16,26,1); - line-height:24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; diff --git a/public/react/src/modules/osshackathon/Osshackathon.js b/public/react/src/modules/osshackathon/Osshackathon.js index 7edc18d63..67c81381c 100644 --- a/public/react/src/modules/osshackathon/Osshackathon.js +++ b/public/react/src/modules/osshackathon/Osshackathon.js @@ -119,14 +119,11 @@ class Osshackathon extends Component { } //判断是否绑定邮箱 - if(this.props.user.email===null){ - this.props.showhideAccountPhoneemailDialog() - return - } - if(this.props.user.phone===null){ + if(this.props.user.email===null&&this.props.user.phone===null){ this.props.showhideAccountPhoneemailDialog() return } + this.props.confirm({ content: `是否确认报名?`, onOk: () => { @@ -357,6 +354,7 @@ class Osshackathon extends Component { + 报名人数:{item.hack_users_count} {item.entry_info===true?:} diff --git a/public/react/src/modules/user/AccountPhoneemail.js b/public/react/src/modules/user/AccountPhoneemail.js index cab70205d..a589d780a 100644 --- a/public/react/src/modules/user/AccountPhoneemail.js +++ b/public/react/src/modules/user/AccountPhoneemail.js @@ -65,7 +65,7 @@ class AccountPhoneemail extends Component { width="530px" >
-

您需要完成手机号码和邮箱的绑定,才能使用此功能

+

您需要完成手机号码或者邮箱的绑定,才能使用此功能

this.gotoback()}>稍后绑定 {'立即绑定'} diff --git a/public/react/src/modules/user/AccountProfile.js b/public/react/src/modules/user/AccountProfile.js index ea8d20b8a..ed8f94fcd 100644 --- a/public/react/src/modules/user/AccountProfile.js +++ b/public/react/src/modules/user/AccountProfile.js @@ -19,6 +19,7 @@ class AccountProfile extends Component { axios.interceptors.response.use((response) => { if (response != undefined) if (response && response.data.status === 402) { + document.title = "提示"; this.setState({ AccountProfiletype: true }) @@ -31,18 +32,23 @@ class AccountProfile extends Component { } - gotoback=()=>{ - if(this.props.AccountProfiletype!=undefined){ - this.setState({ - AccountProfiletype:false - }) - this.props.hideAccountProfile() - }else{ + gotoback=(type)=>{ + if(type===true){ window.location.href="/"; - this.setState({ - AccountProfiletype:false - }) + }else{ + if(this.props.AccountProfiletype!=undefined){ + this.setState({ + AccountProfiletype:false + }) + this.props.hideAccountProfile() + }else{ + window.location.href="/"; + this.setState({ + AccountProfiletype:false + }) + } } + } @@ -52,7 +58,7 @@ okText: '立即完成', okHref: '/account/certification' */ render() { - const { content, okText, okHref } = this.props; + const { content, okText, okHref,cannelText,Accounturltype} = this.props; return(

{content || '您需要去完善您的个人资料,才能使用此功能'}

diff --git a/public/react/src/modules/user/Accountnewprofile.js b/public/react/src/modules/user/Accountnewprofile.js new file mode 100644 index 000000000..ee8039857 --- /dev/null +++ b/public/react/src/modules/user/Accountnewprofile.js @@ -0,0 +1,71 @@ +import React, { Component } from 'react'; +import {getImageUrl} from 'educoder'; +import {Modal} from 'antd'; +import axios from 'axios'; +class Accountnewprofile extends Component { + constructor(props) { + super(props); + this.state = { + newAccountProfiletype:false + } + } + componentDidMount() { + + axios.interceptors.response.use((response) => { + if(response!=undefined) + if (response&&response.data.status === 411) { + document.title = "提示"; + this.setState({ + newAccountProfiletype:true, + content:response.data.message, + okText:"立即认证", + cannelText:"稍后认证", + okHref:`/account/certification`, + }) + } + return response; + }, (error) => { + + }); + } + + gotoback=()=>{ + window.location.href="/"; + this.setState({ + newAccountProfiletype:false + }) + } + + + + /** + content: '您需要去完成您的职业认证,才能使用此功能', + okText: '立即完成', + okHref: '/account/certification' + */ + render() { + const { content, okText, okHref,cannelText} = this.state; + return( + + + + ) + } +} + +export default Accountnewprofile; \ No newline at end of file diff --git a/public/react/src/modules/user/account/common.css b/public/react/src/modules/user/account/common.css index c0da6f6c7..e3bdb24fd 100644 --- a/public/react/src/modules/user/account/common.css +++ b/public/react/src/modules/user/account/common.css @@ -80,4 +80,39 @@ button.ant-btn.ant-btn-primary.grayBtn { } .courseNormalForm input { height: 40px; +} +.autoModal .ant-modal-body{ + height: auto; + overflow-y: auto; +} + +@media screen and (max-height: 765px) { + .autoModal .ant-modal-body { + height: 670px; + overflow-y: auto; + } +} +@media screen and (max-height: 735px) { + .autoModal .ant-modal-body { + height: 600px; + overflow-y: auto; + } +} +@media screen and (max-height: 635px) { + .autoModal .ant-modal-body { + height: 500px; + overflow-y: auto; + } +} +@media screen and (max-height: 566px) { + .autoModal .ant-modal-body { + height: 465px; + overflow-y: auto; + } +} +@media screen and (max-height: 472px) { + .autoModal .ant-modal-body { + height: 360px; + overflow-y: auto; + } } \ No newline at end of file diff --git a/public/react/src/modules/user/modal/RealNameCertificationModal.js b/public/react/src/modules/user/modal/RealNameCertificationModal.js index 52fcfa405..2d37c4449 100644 --- a/public/react/src/modules/user/modal/RealNameCertificationModal.js +++ b/public/react/src/modules/user/modal/RealNameCertificationModal.js @@ -516,7 +516,7 @@ class RealNameCertificationModal extends Component{ {...this.state} onOk={this.onOk} okText="保存" - className="applyForModal certificationModal courseNormalForm" + className="applyForModal certificationModal courseNormalForm autoModal" width="660px" bottomRender={ certification && certification == 1? @@ -534,6 +534,8 @@ class RealNameCertificationModal extends Component{ 5.我们会确保你所提供的信息均处于严格的保密状态,不会泄露;

6.如存在恶意乱填写姓名,证件号,及上传与实名认证证件无关图片者,一经发现将冻结EduCoder账号。 +

+ 7.提交实名认证后系统会自动将状态改为已认证,你将可以体验平台需要实名认证的功能;如果在认证后的使用过程中未通过审核,你将不能继续体验需要认证的功能。

:
@@ -551,6 +553,9 @@ class RealNameCertificationModal extends Component{

6.如存在恶意乱填写姓名,学号,及上传与职业证件无关图片者,一经发现将冻结EduCoder账号。

+

+ 7.非老师身份提交职业认证后系统会自动将状态改为已认证,你将可以体验平台需要职业认证的功能;如果在认证后的使用过程中未通过审核,你将不能继续体验需要认证的功能。 +

} >