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

chromesetting
daiao 5 years ago
commit 2e86d14d9c

@ -25,23 +25,22 @@ class NewShixunModel extends Component{
} }
componentDidMount() { componentDidMount() {
let{page,type,keyword,order,diff,limit,status,sort}=this.state; let{page,type,keyword,order,diff,limit,status,sort}=this.state;
let newsort=sort
if(this.props&&this.props.user.course_name===undefined){
newsort="created_at";
}else{
newsort="publish_time";
}
if(this.props.type==='shixuns'){ if(this.props.type==='shixuns'){
this.getdatalist(page,type,status,keyword,order,diff,limit,undefined,newsort); this.getdatalist(page,type,status,keyword,order,diff,limit,undefined,sort);
}else{ }else{
this.getdatalist(page,type,undefined,keyword,order,undefined,limit,undefined,sort); this.getdatalist(page,type,undefined,keyword,order,undefined,limit,undefined,sort);
} }
} }
getdatalist=(page,type,newstatus,keyword,order,diff,limit,pagetype,sort)=>{ getdatalist=(page,type,newstatus,keyword,order,diff,limit,pagetype,sorts)=>{
let newsort=sorts;
if(this.props.type==="shixuns"&&type==="mine"){
if(this.props&&this.props.user.course_name===undefined){
newsort="created_at";
}else{
newsort="publish_time";
}
}
this.setState({ this.setState({
isspinning:true isspinning:true
}) })
@ -53,14 +52,14 @@ class NewShixunModel extends Component{
url="/subject_lists.json"; url="/subject_lists.json";
} }
axios.get(url,{params:{ axios.get(url,{params:{
page, page:page,
type, type:type,
status, status:status,
keyword, keyword:keyword,
order, order:order,
diff, diff:diff,
limit, limit:limit,
sort sort:newsort
}}).then((response) => { }}).then((response) => {
if(response.data){ if(response.data){
if(pagetype===undefined){ if(pagetype===undefined){

@ -502,6 +502,7 @@ class DetailCardsEditAndAdd extends Component{
<a className={ "paragraph_name paragraph_nameid"} <a className={ "paragraph_name paragraph_nameid"}
href={/shixuns/+item.shixun_identifier} href={/shixuns/+item.shixun_identifier}
target="_blank"
> >
<span className="subject_stage_shixun_index"> <span className="subject_stage_shixun_index">

@ -504,6 +504,7 @@ class DetailCardsEditAndEdit extends Component{
<a className={ "paragraph_name paragraph_nameid"} <a className={ "paragraph_name paragraph_nameid"}
href={/shixuns/+item.shixun_identifier} href={/shixuns/+item.shixun_identifier}
target="_blank"
> >
<span className="subject_stage_shixun_index"> <span className="subject_stage_shixun_index">

@ -1307,7 +1307,7 @@ class TPMBanner extends Component {
} }
</style>:"" </style>:""
} }
<Modal {Forkvisible===true?<Modal
keyboard={false} keyboard={false}
title="Fork原因" title="Fork原因"
visible={Forkvisible} visible={Forkvisible}
@ -1338,8 +1338,11 @@ class TPMBanner extends Component {
</Radio> </Radio>
{this.state.Radiovalue === 4 ? {this.state.Radiovalue === 4 ?
<TextArea className={this.state.TextAreaintshow===true?"bor-red mt10":"mt10"} <TextArea className={this.state.TextAreaintshow===true?"bor-red mt10":"mt10"}
placeholder="请填写fork原因60字以内"
value={this.state.TextArea} value={this.state.TextArea}
rows={4} style={{ width: '85%', marginLeft: '30px' }} onInput={this.changeTextArea}/>: null} rows={4} style={{ width: '85%', marginLeft: '30px' }} onInput={this.changeTextArea}
maxlength={60}
/>: null}
{this.state.TextAreaintshow===true?<div className={"color-red ml30"}>不能为空</div>:""} {this.state.TextAreaintshow===true?<div className={"color-red ml30"}>不能为空</div>:""}
</Radio.Group> </Radio.Group>
</div> </div>
@ -1351,7 +1354,7 @@ class TPMBanner extends Component {
} }
</Modal> </Modal>:""}
<Modal <Modal
keyboard={false} keyboard={false}

@ -65,7 +65,8 @@ export default class Shixuninformation extends Component {
oldscope_partment: [], oldscope_partment: [],
scope_partment: [], scope_partment: [],
loading: false, loading: false,
opening_timetype:false opening_timetype:false,
use_scope_type:false
} }
} }
@ -80,6 +81,7 @@ export default class Shixuninformation extends Component {
timetype=true; timetype=true;
} }
this.setState({ this.setState({
use_scope_type:this.props&&this.props.status>1&&this.state.use_scope===0&&this.props&&this.props.identity>2||this.props&&this.props.public===2&&this.state.use_scope===0&&this.props&&this.props.identity>2?true:false,
can_copy: this.props.data && this.props.data.shixun.can_copy === undefined ? false : this.props.data && this.props.data.shixun.can_copy, can_copy: this.props.data && this.props.data.shixun.can_copy === undefined ? false : this.props.data && this.props.data.shixun.can_copy,
use_scope: this.props.data && this.props.data.shixun.use_scope, use_scope: this.props.data && this.props.data.shixun.use_scope,
opening_time: this.props.data && this.props.data.shixun.opening_time, opening_time: this.props.data && this.props.data.shixun.opening_time,
@ -115,6 +117,7 @@ export default class Shixuninformation extends Component {
timetype=true; timetype=true;
} }
this.setState({ this.setState({
use_scope_type:this.props&&this.props.status>1&&this.state.use_scope===0&&this.props&&this.props.identity>2||this.props&&this.props.public===2&&this.state.use_scope===0&&this.props&&this.props.identity>2?true:false,
can_copy: this.props.data && this.props.data.shixun.can_copy === undefined ? false : this.props.data && this.props.data.shixun.can_copy, can_copy: this.props.data && this.props.data.shixun.can_copy === undefined ? false : this.props.data && this.props.data.shixun.can_copy,
use_scope: this.props.data && this.props.data.shixun.use_scope, use_scope: this.props.data && this.props.data.shixun.use_scope,
opening_time: this.props.data && this.props.data.shixun.opening_time, opening_time: this.props.data && this.props.data.shixun.opening_time,
@ -194,7 +197,7 @@ export default class Shixuninformation extends Component {
SelectOpenpublic = (e) => { SelectOpenpublic = (e) => {
this.setState({ this.setState({
use_scope: e.target.value use_scope: e.target.value,
}); });
} }
@ -311,7 +314,7 @@ export default class Shixuninformation extends Component {
</div>} </div>}
<div className="edu-back-white mb10 ml30 mt20"> <div className="edu-back-white mb10 ml30 mt20">
{this.props&&this.props.status>1&&this.state.use_scope===0&&this.props&&this.props.identity>2||this.props&&this.props.public===2&&this.state.use_scope===0&&this.props&&this.props.identity>2?"":<div> {this.props&&this.props.status>1&&this.state.use_scope===0&&this.props&&this.props.identity>2&&this.state.use_scope_type===true||this.props&&this.props.public===2&&this.state.use_scope===0&&this.props&&this.props.identity>2&&this.state.use_scope_type===true?"":<div>
<span className="color-grey-6 mt5 fl font-16" style={{minWidth: '45px'}}>公开程度:</span> <span className="color-grey-6 mt5 fl font-16" style={{minWidth: '45px'}}>公开程度:</span>
<span className="fl mt8 ml20"> <span className="fl mt8 ml20">
<RadioGroup onChange={this.SelectOpenpublic} value={this.state.use_scope}> <RadioGroup onChange={this.SelectOpenpublic} value={this.state.use_scope}>

@ -155,7 +155,7 @@ class ShixunCard extends Component {
<p className="font-14 color-white">非试用内容需要授权</p> <p className="font-14 color-white">非试用内容需要授权</p>
</div> </div>
<a href={"/shixuns/"+item.identifier+"/challenges"} className="square-img"> <a href={"/shixuns/"+item.identifier+"/challenges"} className="square-img" target="_blank">
{/*<img src={getImageUrl("images/"+item.pic+"?1540534846")}/>*/} {/*<img src={getImageUrl("images/"+item.pic+"?1540534846")}/>*/}
<img src={setImagesUrl(`${item.pic}`)}/> <img src={setImagesUrl(`${item.pic}`)}/>
</a> </a>
@ -163,7 +163,7 @@ class ShixunCard extends Component {
<div className="square-main"> <div className="square-main">
<p className="task-hide"> <p className="task-hide">
<a href={"/shixuns/"+item.identifier+"/challenges"} className="justify color-grey-name" title={item.name}> <a href={"/shixuns/"+item.identifier+"/challenges"} className="justify color-grey-name" title={item.name} target="_blank">
{item.name} {item.name}
</a> </a>
</p> </p>

Loading…
Cancel
Save