Merge branch 'develop' into dev_aliyun

chromesetting
daiao 6 years ago
commit 2005886b2f

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

@ -1,7 +1,6 @@
json.id discuss.id json.id discuss.id
json.content content_safe(discuss.content) json.content content_safe(discuss.content)
json.time time_from_now(discuss.created_at) json.time time_from_now(discuss.created_at)
json.position discuss.position
json.hack_id discuss.dis_id json.hack_id discuss.dis_id
# 主贴和回复有一些不同点 # 主贴和回复有一些不同点
if discuss.parent_id if discuss.parent_id

@ -47,7 +47,7 @@ Rails.application.routes.draw do
delete :delete_set delete :delete_set
end end
resources :comments do resources :comments do
post :reply
end end
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 Trialapplicationreview from './modules/user/Trialapplicationreview';
import Addcourses from "./modules/courses/coursesPublic/Addcourses"; import Addcourses from "./modules/courses/coursesPublic/Addcourses";
import AccountProfile from "./modules/user/AccountProfile"; import AccountProfile from "./modules/user/AccountProfile";
import Accountnewprofile from './modules/user/Accountnewprofile';
import Trialapplication from './modules/login/Trialapplication'; import Trialapplication from './modules/login/Trialapplication';
import Certifiedprofessional from './modules/modals/Certifiedprofessional'; import Certifiedprofessional from './modules/modals/Certifiedprofessional';
import NotFoundPage from './NotFoundPage' import NotFoundPage from './NotFoundPage'
@ -348,6 +349,7 @@ class App extends Component {
}); });
} }
componentDidMount() { componentDidMount() {
document.title = "loading...";
this.disableVideoContextMenu(); this.disableVideoContextMenu();
// force an update if the URL changes // force an update if the URL changes
history.listen(() => { history.listen(() => {
@ -466,6 +468,7 @@ class App extends Component {
<MuiThemeProvider theme={theme}> <MuiThemeProvider theme={theme}>
<Accountnewprofile {...this.props}{...this.state}/>
<LoginDialog {...this.props} {...this.state} Modifyloginvalue={()=>this.Modifyloginvalue()}></LoginDialog> <LoginDialog {...this.props} {...this.state} Modifyloginvalue={()=>this.Modifyloginvalue()}></LoginDialog>
<Notcompletedysl {...this.props} {...this.state}></Notcompletedysl> <Notcompletedysl {...this.props} {...this.state}></Notcompletedysl>
<Trialapplicationysl {...this.props} {...this.state}></Trialapplicationysl> <Trialapplicationysl {...this.props} {...this.state}></Trialapplicationysl>

@ -130,6 +130,16 @@ class CoursesBanner extends Component {
axios.get(url,{params: axios.get(url,{params:
dataqueryss dataqueryss
}).then((result) => { }).then((result) => {
if(result.data.status===-2){
// this.setState({
// AccountProfiletype:true,
// content:result.data.message,
// okText:"立即认证",
// cannelText:"稍后认证",
// okHref:`/account/certification`,
// Accounturltype:true
// })
}else{
if( result!=undefined){ if( result!=undefined){
let data = result.data; let data = result.data;
this.setState({ this.setState({
@ -140,6 +150,8 @@ class CoursesBanner extends Component {
}else{ }else{
this.onloadupdatabanner() this.onloadupdatabanner()
} }
}
}) })
}; };
foo=(url)=> { foo=(url)=> {
@ -452,7 +464,12 @@ class CoursesBanner extends Component {
hideAccountProfile=()=>{ hideAccountProfile=()=>{
this.setState({ this.setState({
AccountProfiletype:false AccountProfiletype:false,
content:undefined,
okText:undefined,
okHref:undefined,
cannelText:undefined,
Accounturltype:undefined
}) })
}; };
ysljoinmodalCancel=()=>{ ysljoinmodalCancel=()=>{

@ -616,7 +616,7 @@ class NewShixunModel extends Component{
} }
</Checkbox.Group> </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 <Pagination
showQuickJumper showQuickJumper
defaultCurrent={1} defaultCurrent={1}

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

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

@ -1,6 +1,6 @@
import React, {Component} from "react"; import React, {Component} from "react";
import {WordsBtn} from 'educoder'; import {WordsBtn} from 'educoder';
import {Table,Tooltip,} from "antd"; import {Table,Tooltip} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom'; import {Link,Switch,Route,Redirect} from 'react-router-dom';
class ConclusionEvaluation extends Component { class ConclusionEvaluation extends Component {
@ -26,7 +26,7 @@ class ConclusionEvaluation extends Component {
<span style={{color:'#FF6800'}}>{record.type}</span> <span style={{color:'#FF6800'}}>{record.type}</span>
), ),
}, { }, {
title: '获得经验值', title:'获得经验值',
dataIndex: 'empirical', dataIndex: 'empirical',
key: 'empirical', key: 'empirical',
render: (text, record) => ( render: (text, record) => (

@ -72,32 +72,34 @@ class Statistics extends Component{
}) })
} }
getDynamiclistdatas=(group_ids)=>{ getDynamiclistdatas=(group_ids,key)=>{
if(key==='2') {
let courseId=this.props.match.params.coursesId; let courseId = this.props.match.params.coursesId;
let url=`/courses/${courseId}/act_score.json`; let url = `/courses/${courseId}/act_score.json`;
let data={ let data = {
group_ids:group_ids, group_ids: group_ids,
} }
axios.get(url,{params: axios.get(url, {
params:
data data
}).then((result) => { }).then((result) => {
if (result) { if (result) {
this.setState({ this.setState({
course_members:result.data.course_members, course_members: result.data.course_members,
bomisSpin:false bomisSpin: false
}) })
} }
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);
this.setState({ this.setState({
bomisSpin:false, bomisSpin: false,
}) })
}) })
} }
}
getwork_scoredata=(page,group_ids,sort,key)=>{
getwork_scoredata=(page,group_ids,sort)=>{
let {activeKey}=this.state;
this.setState({ this.setState({
page:page, page:page,
sort:sort, sort:sort,
@ -105,7 +107,7 @@ class Statistics extends Component{
bomisSpin:true, bomisSpin:true,
}) })
if(activeKey==='1'){ if(key==='1'||key===undefined){
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
let url=`/courses/${courseId}/work_score.json`; let url=`/courses/${courseId}/work_score.json`;
let data={ let data={
@ -141,10 +143,10 @@ class Statistics extends Component{
if(key==="1"){ if(key==="1"){
let {page,group_ids,sort}=this.state; let {page,group_ids,sort}=this.state;
// this.getdatas() // this.getdatas()
this.getwork_scoredata(page,group_ids,sort) this.getwork_scoredata(page,group_ids,sort,key)
}else{ }else if(key==="2"){
let{group_ids}=this.state; let{group_ids}=this.state;
this.getDynamiclistdatas(group_ids) this.getDynamiclistdatas(group_ids,key)
} }
this.setState({ this.setState({
activeKey:key activeKey:key

@ -386,6 +386,7 @@ class LoginDialog extends Component {
axios.interceptors.response.use((response) => { axios.interceptors.response.use((response) => {
if(response!=undefined) if(response!=undefined)
if (response&&response.data.status === 401) { if (response&&response.data.status === 401) {
document.title = "提示";
this.setState({ this.setState({
isRender: true isRender: true
}) })

@ -37,11 +37,9 @@
} }
.OsshackathonCardtitle{ .OsshackathonCardtitle{
height:24px;
font-size:24px; font-size:24px;
font-weight:400; font-weight:400;
color:rgba(5,16,26,1); color:rgba(5,16,26,1);
line-height:24px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;

@ -119,14 +119,11 @@ class Osshackathon extends Component {
} }
//判断是否绑定邮箱 //判断是否绑定邮箱
if(this.props.user.email===null){ if(this.props.user.email===null&&this.props.user.phone===null){
this.props.showhideAccountPhoneemailDialog()
return
}
if(this.props.user.phone===null){
this.props.showhideAccountPhoneemailDialog() this.props.showhideAccountPhoneemailDialog()
return return
} }
this.props.confirm({ this.props.confirm({
content: `是否确认报名?`, content: `是否确认报名?`,
onOk: () => { onOk: () => {
@ -357,6 +354,7 @@ class Osshackathon extends Component {
</Col> </Col>
<Col span={6} className={"fr textright"}> <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> {item.entry_info===true?<Button type="primary fr mr20" disabled>
已报名 已报名
</Button>:<Button type="primary fr issignup" onClick={()=>this.Signupentry(item.id)}></Button>} </Button>:<Button type="primary fr issignup" onClick={()=>this.Signupentry(item.id)}></Button>}

@ -65,7 +65,7 @@ class AccountPhoneemail extends Component {
width="530px" width="530px"
> >
<div className="task-popup-content"> <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"> <div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={()=>this.gotoback()}>稍后绑定</a> <a className="task-btn mr30" onClick={()=>this.gotoback()}>稍后绑定</a>
<a className="task-btn task-btn-orange" href={ "/account/secure" }> {'立即绑定'}</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) => { axios.interceptors.response.use((response) => {
if (response != undefined) if (response != undefined)
if (response && response.data.status === 402) { if (response && response.data.status === 402) {
document.title = "提示";
this.setState({ this.setState({
AccountProfiletype: true AccountProfiletype: true
}) })
@ -31,7 +32,10 @@ class AccountProfile extends Component {
} }
gotoback=()=>{ gotoback=(type)=>{
if(type===true){
window.location.href="/";
}else{
if(this.props.AccountProfiletype!=undefined){ if(this.props.AccountProfiletype!=undefined){
this.setState({ this.setState({
AccountProfiletype:false AccountProfiletype:false
@ -45,6 +49,8 @@ class AccountProfile extends Component {
} }
} }
}
/** /**
content: '您需要去完成您的职业认证,才能使用此功能', content: '您需要去完成您的职业认证,才能使用此功能',
@ -52,7 +58,7 @@ okText: '立即完成',
okHref: '/account/certification' okHref: '/account/certification'
*/ */
render() { render() {
const { content, okText, okHref } = this.props; const { content, okText, okHref,cannelText,Accounturltype} = this.props;
return( return(
<Modal <Modal
keyboard={false} keyboard={false}
@ -67,7 +73,7 @@ render() {
<div className="task-popup-content"> <div className="task-popup-content">
<p className="task-popup-text-center font-16"> {content || '您需要去完善您的个人资料,才能使用此功能'}</p> <p className="task-popup-text-center font-16"> {content || '您需要去完善您的个人资料,才能使用此功能'}</p>
<div className="clearfix mt30 edu-txt-center"> <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> <a className="task-btn task-btn-orange" href={ okHref || "/account/profile/edit" }> {okText || '立即完善'}</a>
</div> </div>
</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;

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

Loading…
Cancel
Save