Merge branch 'develop' into dev_aliyun

chromesetting
daiao 6 years ago
commit 2005886b2f

@ -69,7 +69,7 @@ class GitsController < ApplicationController
else
uid_logger_error("shixun is not exist")
# result = false
result = false # 为了测试跳出
result = true # 为了测试跳出
end
end
end

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

@ -47,7 +47,7 @@ Rails.application.routes.draw do
delete :delete_set
end
resources :comments do
post :reply
end
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 56 KiB

@ -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 {
<MuiThemeProvider theme={theme}>
<Accountnewprofile {...this.props}{...this.state}/>
<LoginDialog {...this.props} {...this.state} Modifyloginvalue={()=>this.Modifyloginvalue()}></LoginDialog>
<Notcompletedysl {...this.props} {...this.state}></Notcompletedysl>
<Trialapplicationysl {...this.props} {...this.state}></Trialapplicationysl>

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

@ -616,7 +616,7 @@ class NewShixunModel extends Component{
}
</Checkbox.Group>
{shixun_list===undefined||shixuns_count===undefined?"":shixun_list.length===0||shixuns_count===0?"":shixuns_count>15?<div className={" edu-txt-center pd303010"}>
{shixun_list===undefined||shixuns_count===undefined?"":shixun_list.length===0||shixuns_count===0?"":shixuns_count>15?<div className={" edu-txt-center pd303010 newshixunmodels"}>
<Pagination
showQuickJumper
defaultCurrent={1}

@ -5,6 +5,7 @@
.newshixunheadersear{
display: flex;
justify-content: center;
margin: 0 auto;
}
.packinput .ant-input{
height: 55px;
@ -376,3 +377,11 @@
display: flex;
flex-direction:initial;
}
.newshixunheadersear{
margin: 0 auto;
}
.newshixunmodels{
margin: 0 auto;
}

@ -749,7 +749,7 @@ class studentsList extends Component{
{invite_code}
</span>
<Tooltip title={<div>
<div>成员可以通过邀请码主动加入课堂</div>
<div>成员可以通过邀请码主动加入分班</div>
<div>点击立刻复制邀请码</div>
</div>}>
<span>

@ -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) => (
<span style={{color:'#FF6800'}}>{record.type}</span>
<span style={{color:'#FF6800'}}>{record.type}</span>
),
}, {
title: '获得经验值',
title:'获得经验值',
dataIndex: 'empirical',
key: 'empirical',
render: (text, record) => (

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

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

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

@ -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 {
</Col>
<Col span={6} className={"fr textright"}>
<span style={{"line-height":"30px","margin-right": "30px"}}>报名人数{item.hack_users_count}</span>
{item.entry_info===true?<Button type="primary fr mr20" disabled>
已报名
</Button>:<Button type="primary fr issignup" onClick={()=>this.Signupentry(item.id)}></Button>}

@ -65,7 +65,7 @@ class AccountPhoneemail extends Component {
width="530px"
>
<div className="task-popup-content">
<p className="task-popup-text-center font-16"> 您需要完成手机号码邮箱的绑定才能使用此功能</p>
<p className="task-popup-text-center font-16"> 您需要完成手机号码或者邮箱的绑定才能使用此功能</p>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={()=>this.gotoback()}>稍后绑定</a>
<a className="task-btn task-btn-orange" href={ "/account/secure" }> {'立即绑定'}</a>

@ -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(
<Modal
keyboard={false}
@ -67,7 +73,7 @@ render() {
<div className="task-popup-content">
<p className="task-popup-text-center font-16"> {content || '您需要去完善您的个人资料,才能使用此功能'}</p>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={()=>this.gotoback()}>稍后完善</a>
<a className="task-btn mr30" onClick={()=>this.gotoback(Accounturltype)}>{cannelText ||'稍后完善'}</a>
<a className="task-btn task-btn-orange" href={ okHref || "/account/profile/edit" }> {okText || '立即完善'}</a>
</div>
</div>

@ -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(
<Modal
keyboard={false}
title="提示"
visible={this.state.newAccountProfiletype}
closable={false}
footer={null}
destroyOnClose={true}
centered={true}
width="530px"
>
<div className="task-popup-content">
<p className="task-popup-text-center font-16"> {content}</p>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={()=>this.gotoback()}>{cannelText}</a>
<a className="task-btn task-btn-orange" href={ okHref }> {okText}</a>
</div>
</div>
</Modal>
)
}
}
export default Accountnewprofile;

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

@ -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.我们会确保你所提供的信息均处于严格的保密状态不会泄露
</p><p>
6.如存在恶意乱填写姓名证件号及上传与实名认证证件无关图片者一经发现将冻结EduCoder账号
</p><p>
7.提交实名认证后系统会自动将状态改为已认证你将可以体验平台需要实名认证的功能如果在认证后的使用过程中未通过审核你将不能继续体验需要认证的功能
</p>
</div>:
<div className="bottomRender">
@ -551,6 +553,9 @@ class RealNameCertificationModal extends Component{
</p><p>
6.如存在恶意乱填写姓名学号及上传与职业证件无关图片者一经发现将冻结EduCoder账号
</p>
<p>
7.非老师身份提交职业认证后系统会自动将状态改为已认证你将可以体验平台需要职业认证的功能如果在认证后的使用过程中未通过审核你将不能继续体验需要认证的功能
</p>
</div>
}
>

Loading…
Cancel
Save