You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
2.0 KiB
82 lines
2.0 KiB
import React,{ Component } from "react";
|
|
import {Checkbox,Input,Table, Pagination,Menu,Icon} from "antd";
|
|
import {Link,NavLink} from 'react-router-dom';
|
|
import { WordsBtn ,ActionBtn,SnackbarHOC} from 'educoder';
|
|
const Search = Input.Search;
|
|
import axios from 'axios';
|
|
import './searchc.css'
|
|
import {TPMIndexHOC} from "../modules/tpm/TPMIndexHOC";
|
|
|
|
class SearchPage extends Component{
|
|
constructor(props) {
|
|
super(props);
|
|
this.state={
|
|
tab:"0",
|
|
count:0,
|
|
}
|
|
}
|
|
//切换tab
|
|
changeTab=(e)=>{
|
|
this.setState({
|
|
tab:e.key
|
|
})
|
|
|
|
|
|
}
|
|
|
|
componentDidMount(){
|
|
// const query =this.props.location.search;
|
|
// const type = query.split('?tab=');
|
|
// let sum = []
|
|
// sum.push(type[1])
|
|
// // console.log("componentDidMountcomponentDidMount");
|
|
// // console.log(sum);
|
|
// this.setState({
|
|
// tab:sum,
|
|
// })
|
|
|
|
}
|
|
setdatafuns =(value)=>{
|
|
|
|
}
|
|
|
|
render(){
|
|
let {tab,count}=this.state;
|
|
console.log(tab);
|
|
return(
|
|
<div className="newMain clearfix">
|
|
<div className="headersear" >
|
|
<div style={{height:"53px"}}></div>
|
|
<Search
|
|
style={{ width: "800px", marginTop:"53px"}}
|
|
className="packinput"
|
|
enterButton={<span><Icon type="search" className="mr5"/> 搜索</span>}
|
|
onSearch={ (value)=>this.setdatafuns(value)} />
|
|
</div>
|
|
|
|
<div className="tabtitle">
|
|
<Menu mode="horizontal" className="tabtitless" selectedKeys={tab} onClick={this.changeTab}>
|
|
<Menu.Item className={"tabtitle1"} key="0">开发社区</Menu.Item>
|
|
<Menu.Item className={"tabtitle2"} key="1">实践课程</Menu.Item>
|
|
<Menu.Item className={"tabtitle2"} key="2">翻转课堂</Menu.Item>
|
|
<Menu.Item className={"tabtitle2"} key="3">交流问答</Menu.Item>
|
|
</Menu>
|
|
</div>
|
|
|
|
<div className="counttit">
|
|
<p className="counttittext">共找到相关结果<span className="counttittexts">{count}</span>个</p>
|
|
</div>
|
|
|
|
<div className="mainx">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
)
|
|
}
|
|
}
|
|
|
|
export default SnackbarHOC() (TPMIndexHOC ( SearchPage )); |