|
|
|
@ -73,11 +73,21 @@ class InfosTopics extends Component{
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpin:true
|
|
|
|
|
})
|
|
|
|
|
let user_id=this.props.match.params&&this.props.match.params.username;
|
|
|
|
|
let types=this.props.match.params.topicstype;
|
|
|
|
|
let user_id="";
|
|
|
|
|
|
|
|
|
|
if(types==="publicly"){
|
|
|
|
|
user_id=this.props.current_user&&this.props.current_user.login;
|
|
|
|
|
}else{
|
|
|
|
|
user_id=this.props.match.params&&this.props.match.params.username;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(user_id!=undefined){
|
|
|
|
|
console.log(user_id)
|
|
|
|
|
let {per_page}=this.state;
|
|
|
|
|
let url=`/users/${user_id}/question_banks.json`;
|
|
|
|
|
axios.get(url,{params:{
|
|
|
|
|
|
|
|
|
|
axios.get(encodeURI(url),{params:{
|
|
|
|
|
type,
|
|
|
|
|
object_type:category,
|
|
|
|
|
course_list_id,
|
|
|
|
@ -396,6 +406,13 @@ class InfosTopics extends Component{
|
|
|
|
|
.marright0{
|
|
|
|
|
margin-right: 0px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.gongkais{
|
|
|
|
|
min-width: 50px;
|
|
|
|
|
height: 22px !important;
|
|
|
|
|
line-height: 22px !important;
|
|
|
|
|
color: #fff !important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
@ -404,7 +421,7 @@ class InfosTopics extends Component{
|
|
|
|
|
<div className="clearfix topicsbox">
|
|
|
|
|
{types==="publicly"?<div className={"topcschild"}>
|
|
|
|
|
<a className={types==="personal"?"topicstopfont fr ":"topicstopfont fr topcsactive"}
|
|
|
|
|
href={`/users/${username}/topics/personal`}>我的题库</a>
|
|
|
|
|
href={`/users/${this.props.current_user&&this.props.current_user.login}/topics/personal`}>我的题库</a>
|
|
|
|
|
<div className={types==="publicly"?"topicstopfont fl ":"topicstopfont fl topcsactive"}
|
|
|
|
|
>公共题库</div>
|
|
|
|
|
</div>:<div className={"topcschild"}>
|
|
|
|
@ -455,7 +472,7 @@ class InfosTopics extends Component{
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{isshowprofes===false?<div className="clearfix font-12 mt20">
|
|
|
|
|
{isshowprofes===false?data&&data.count===undefined?"":data&&data.count===0?"":<div className="clearfix font-12 mt20">
|
|
|
|
|
<p className="font-12 ml5 fl">
|
|
|
|
|
<span className="fl color-grey-9 mr20">共 <span className={"color-orange"}>{data&&data.count===undefined?0:data&&data.count}</span> 个</span>
|
|
|
|
|
<span className="fr color-grey-9">已选择 <span className={"color-orange"}>{checkBoxValues.length}</span> 个 (不支持跨页勾选)</span>
|
|
|
|
@ -513,7 +530,7 @@ class InfosTopics extends Component{
|
|
|
|
|
{item.name}
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
{item.is_public===true?types==="publicly"?"":<span className="edu-filter-btn edu-filter-btn-4CACFF ml15 fl typestyle mt3">公开</span>:""}
|
|
|
|
|
{item.is_public===true?types==="publicly"?"":<span className="edu-filter-btn edu-filter-btn-4CACFF ml15 fl gongkais mt3">公开</span>:""}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|