import React, {Component} from 'react'
import {SearchBar} from 'antd-mobile'
import './index.scss'

class HeaderBar extends Component {
    toSearch() {
        window.location.href ='/search'
    }
    return() {
        window.location.href ='/'
    }

    render() {
        return (
            <div className='preferential'>
                <div className="search-nav">
                    <i className={'iconfont iconiconfront-68 return'} onClick={this.return.bind(this)}></i>
                    <SearchBar
                        placeholder="搜索课程"
                        cancelText={" "}
                        onFocus={this.toSearch.bind(this)}
                        showCancelButton={false}
                    />
                    <i className={'iconfont icongouwuche-xianxing shopping-cart'}></i>
                </div>
            </div>
        )
    }

}

export default HeaderBar
