Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

video_log
cxt 5 years ago
commit 81f27188a4

@ -81,8 +81,7 @@ class DiscussesController < ApplicationController
begin begin
@discuss = Discuss.create!(:dis_id => params[:container_id], :dis_type => params[:container_type], @discuss = Discuss.create!(:dis_id => params[:container_id], :dis_type => params[:container_type],
:content => params[:content].gsub("&nbsp\;", "").strip, :user_id => current_user.id, :content => params[:content].gsub("&nbsp\;", "").strip, :user_id => current_user.id,
:praise_count => 0, :position => params[:position], :challenge_id => params[:challenge_id], :praise_count => 0, :position => params[:position], :challenge_id => params[:challenge_id])
:hidden => !current_user.admin?) # 管理员回复的能够显示
rescue Exception => e rescue Exception => e
uid_logger_error("create discuss failed : #{e.message}") uid_logger_error("create discuss failed : #{e.message}")
raise Educoder::TipException.new("评论异常,原因:#{e.message}") raise Educoder::TipException.new("评论异常,原因:#{e.message}")

@ -0,0 +1,5 @@
class ModidyHiddenDefaultForDiscusses < ActiveRecord::Migration[5.2]
def change
change_column :discusses, :hidden, :boolean, :default => false
end
end

@ -793,37 +793,37 @@ class App extends Component {
render={ render={
(props) => (<Paperreview {...this.props} {...props} {...this.state} />) (props) => (<Paperreview {...this.props} {...props} {...this.state} />)
}/> }/>
<Route path="/paperlibrary/edit/:id" {/*<Route path="/paperlibrary/edit/:id"*/}
render={ {/* render={*/}
(props) => (<Paperlibraryeditid {...this.props} {...props} {...this.state} />) {/* (props) => (<Paperlibraryeditid {...this.props} {...props} {...this.state} />)*/}
}/> {/* }/>*/}
<Route path="/paperlibrary/see/:id" {/*<Route path="/paperlibrary/see/:id"*/}
render={ {/* render={*/}
(props) => (<Paperlibraryseeid {...this.props} {...props} {...this.state} />) {/* (props) => (<Paperlibraryseeid {...this.props} {...props} {...this.state} />)*/}
}/> {/* }/>*/}
<Route path="/myproblems/:id/:tab?" <Route path="/myproblems/:id/:tab?"
render={ render={
(props) => (<StudentStudy {...this.props} {...props} {...this.state} />) (props) => (<StudentStudy {...this.props} {...props} {...this.state} />)
} /> } />
<Route path="/question/edit/:id" {/*<Route path="/question/edit/:id"*/}
render={ {/* render={*/}
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />) {/* (props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)*/}
} /> {/* } />*/}
<Route path="/question/newitem" {/*<Route path="/question/newitem"*/}
render={ {/* render={*/}
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />) {/* (props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)*/}
} /> {/* } />*/}
<Route path="/question/:type" {/*<Route path="/question/:type"*/}
render={ {/* render={*/}
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />) {/* (props) => (<Headplugselection {...this.props} {...props} {...this.state} />)*/}
} /> {/* } />*/}
<Route path="/paperlibrary" {/*<Route path="/paperlibrary"*/}
render={ {/* render={*/}
(props) => (<Testpaperlibrary {...this.props} {...props} {...this.state} />) {/* (props) => (<Testpaperlibrary {...this.props} {...props} {...this.state} />)*/}
}/> {/* }/>*/}
<Route path="/Integeneration" <Route path="/Integeneration"
render={ render={
@ -835,15 +835,19 @@ class App extends Component {
(props) => (<Developer {...this.props} {...props} {...this.state} />) (props) => (<Developer {...this.props} {...props} {...this.state} />)
}/> }/>
<Route path="/question" {/*<Route path="/question"*/}
render={ {/* render={*/}
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />) {/* (props) => (<Headplugselection {...this.props} {...props} {...this.state} />)*/}
}/> {/* }/>*/}
{/*<Route path="/wxcode/:identifier?" component={WXCode}*/} {/*<Route path="/wxcode/:identifier?" component={WXCode}*/}
{/* render={*/} {/* render={*/}
{/* (props)=>(<WXCode {...this.props} {...props} {...this.state}></WXCode>)*/} {/* (props)=>(<WXCode {...this.props} {...props} {...this.state}></WXCode>)*/}
{/* }*/} {/* }*/}
{/*/>*/} {/*/>*/}
<Route exact path="/" <Route exact path="/"
// component={ShixunsHome} // component={ShixunsHome}
render={ render={

@ -525,7 +525,6 @@ class Coursesleftnav extends Component{
} }
saveNavmodapost=(url,value,positiontype,coursesId)=>{ saveNavmodapost=(url,value,positiontype,coursesId)=>{
debugger;
axios.post(url, axios.post(url,
{name:value}).then((result)=>{ {name:value}).then((result)=>{
if(result!=undefined){ if(result!=undefined){

@ -228,7 +228,7 @@ class GraduateTopicDetailTable extends Component{
</Modal> </Modal>
<Modal <Modal
visible={visible} visible={visible}
title="新建分班2" title="新建分班"
closable={false} closable={false}
footer={null} footer={null}
destroyOnClose={true} destroyOnClose={true}

@ -66,7 +66,7 @@ function CourseGroupListTable(props) {
className:"color-grey-6", className:"color-grey-6",
render: (name, record, index) => { render: (name, record, index) => {
return <WordsBtn title={name.length > 11 ? name : ''} onClick={() => onGoDetail(record)} style={''} return <WordsBtn title={name.length > 11 ? name : ''} onClick={() => onGoDetail(record)} style={''}
className="overflowHidden1" style2={{maxWidth: '180px', verticalAlign: 'bottom'}}> className="overflowHidden1 color-dark" style2={{maxWidth: '180px', verticalAlign: 'bottom'}}>
{name}</WordsBtn> {name}</WordsBtn>
} }
}, },
@ -154,7 +154,7 @@ function CourseGroupListTable(props) {
{!isCourseEnd && isAdmin && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => onDelete(record)} style={'grey'}>删除分班</WordsBtn>} {!isCourseEnd && isAdmin && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => onDelete(record)} style={'grey'}>删除分班</WordsBtn>}
{isStudent && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => addToDir(record)} style={''}>加入分班</WordsBtn>} {isStudent && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => addToDir(record)} style={''}>加入分班</WordsBtn>}
<WordsBtn onClick={() => onGoDetail(record)} style={''}>查看</WordsBtn> <WordsBtn onClick={() => onGoDetail(record)} style={''} className="color-dark">查看</WordsBtn>
</React.Fragment> </React.Fragment>
} }
}) })

@ -396,7 +396,7 @@ class ShixunsIndex extends Component {
} }
.myshixin-head{ .myshixin-head{
width: 100%; width: 100%;
height: 300px; height: 240px;
background-image: url(${getImageUrl(this.props.mygetHelmetapi && this.props.mygetHelmetapi.shixun_banner_url === null ?`images/educoder/courses/courses.jpg`:this.props.mygetHelmetapi&&this.props.mygetHelmetapi.shixun_banner_url)}); background-image: url(${getImageUrl(this.props.mygetHelmetapi && this.props.mygetHelmetapi.shixun_banner_url === null ?`images/educoder/courses/courses.jpg`:this.props.mygetHelmetapi&&this.props.mygetHelmetapi.shixun_banner_url)});
background-color: #081C4B; background-color: #081C4B;
background-position: center; background-position: center;

Loading…
Cancel
Save