|
|
@ -36,7 +36,7 @@ const $ = window.$
|
|
|
|
// TODO 这部分脚本从公共脚本中直接调用
|
|
|
|
// TODO 这部分脚本从公共脚本中直接调用
|
|
|
|
|
|
|
|
|
|
|
|
const RadioGroup = Radio.Group;
|
|
|
|
const RadioGroup = Radio.Group;
|
|
|
|
const Search = Input.Search;
|
|
|
|
const { Search } = Input;
|
|
|
|
let old_url;
|
|
|
|
let old_url;
|
|
|
|
function loadHeader(){
|
|
|
|
function loadHeader(){
|
|
|
|
//头部导航条的----------显示搜索框
|
|
|
|
//头部导航条的----------显示搜索框
|
|
|
@ -384,7 +384,9 @@ class NewHeader extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onKeywordSearchKeyDown = (e) => {
|
|
|
|
onKeywordSearchKeyDown = (e) => {
|
|
|
|
|
|
|
|
|
|
|
|
window.location.href ="/search?value="+e.target.value;
|
|
|
|
let url="/search?value="+e.target.value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.props.history.push(url)
|
|
|
|
// let code = e.keyCode;
|
|
|
|
// let code = e.keyCode;
|
|
|
|
|
|
|
|
|
|
|
|
// if(code == 13) {
|
|
|
|
// if(code == 13) {
|
|
|
@ -392,9 +394,10 @@ class NewHeader extends Component {
|
|
|
|
// return false;
|
|
|
|
// return false;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onSearchhref = (value) => {
|
|
|
|
onSearchhref = (e) => {
|
|
|
|
debugger
|
|
|
|
let url="/search?value="+e.target.value;
|
|
|
|
window.location.href ="/search?value="+value;
|
|
|
|
|
|
|
|
|
|
|
|
this.props.history.push(url)
|
|
|
|
// let code = e.keyCode;
|
|
|
|
// let code = e.keyCode;
|
|
|
|
|
|
|
|
|
|
|
|
// if(code == 13) {
|
|
|
|
// if(code == 13) {
|
|
|
@ -729,10 +732,9 @@ submittojoinclass=(value)=>{
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Search
|
|
|
|
<Search
|
|
|
|
placeholder="实践课程/翻转课堂/开发社区/交流问答"
|
|
|
|
placeholder="实践课程/翻转课堂/开发社区/交流问答"
|
|
|
|
// onSearch={(value)=>this.onSearchhref(value)}
|
|
|
|
onChange={(e)=>this.onSearchhref(e)}
|
|
|
|
onSearch={value => console.log(value)}
|
|
|
|
|
|
|
|
onPressEnter={this.onKeywordSearchKeyDown}
|
|
|
|
onPressEnter={this.onKeywordSearchKeyDown}
|
|
|
|
style={{ width: 300 }}
|
|
|
|
style={{ width: 300 }}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|