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

topic_bank
杨树林 5 years ago
commit 173191e5f7

@ -443,7 +443,9 @@ class CoursesNew extends Component {
}; };
handleSearchschool=(value)=>{ handleSearchschool=(value)=>{
this.setState({
smallspinning:true
})
if(value!="") { if(value!="") {
// this.props.form.setFieldsValue({ // this.props.form.setFieldsValue({
// // school: value, // // school: value,
@ -452,10 +454,13 @@ class CoursesNew extends Component {
this.setState({ this.setState({
fetching: true, fetching: true,
school: value, school: value,
smallspinning:true
}) })
this.getschool(value) this.getschool(value)
}else{
this.setState({
smallspinning:false
})
} }
}; };

@ -563,7 +563,9 @@ class Goldsubject extends Component {
}; };
handleSearchschool=(value)=>{ handleSearchschool=(value)=>{
this.setState({
smallspinning:true
})
if(value!="") { if(value!="") {
// this.props.form.setFieldsValue({ // this.props.form.setFieldsValue({
// // school: value, // // school: value,
@ -572,9 +574,12 @@ class Goldsubject extends Component {
this.setState({ this.setState({
fetching: true, fetching: true,
school: value, school: value,
smallspinning:true
}) })
this.getschool(value) this.getschool(value)
}else{
this.setState({
smallspinning:false
})
} }
}; };

@ -72,16 +72,32 @@ class BanksIndex extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state={ this.state={
crumbData:undefined crumbData:undefined,
publicly:undefined
} }
} }
componentDidMount = () =>{
let pathname = this.props.location.pathname;
this.setState({
publicly:pathname.indexOf("/publicly") > -1
})
}
initPublic = (crumbData) =>{ initPublic = (crumbData) =>{
this.setState({ this.setState({
crumbData crumbData
}) })
} }
componentDidUpdate=()=>{
let { publicly }=this.state
if(this.props.current_user && this.props.current_user.professional_certification == false && publicly){
this.props.history.push(`/topicbank/${this.props.current_user.login}/publicly`);
}
}
render(){ render(){
let { crumbData }=this.state let { crumbData }=this.state
const common = { const common = {

@ -340,11 +340,14 @@
.topicsbtn{ .topicsbtn{
padding: 3px 15px; padding: 3px 15px;
border-radius: 2px; border-radius: 2px;
color: #4C4C4C; /*color: #4C4C4C;*/
cursor: pointer; cursor: pointer;
display: inline-block; display: inline-block;
background-color: #4CACFF!important; /*background-color: #4CACFF!important;*/
color: #fff!important; /*color: #fff!important;*/
border-radius: 11px;
border: 1px solid rgba(76,172,255,1);
color: rgba(76,172,255,1);
} }
.pd1323{ .pd1323{

Loading…
Cancel
Save