
import { View } from '@tarojs/components'
import classnames from 'classnames'
import { useEffect } from 'react'
import styles from './index.module.scss'
import Search from '@/components/search'
import { goLink } from '@/common/common'
import useLogin from '@/use/useLogin'

const SearchBar = () => {
  useLogin()
  return (
    <View className={styles.main}>
      <View className={styles.search}>
        <Search style={{ width: '100%' }} debounceTime={300} changeOnSearch={e => console.log(e)} placeholder="请输入面料关键词" placeIcon="out" showBtn />
      </View>
      <View className={styles.hot}>
        <View className={styles.hot_header}>
          <View className={styles.hot_header_title}>热门面料</View>
          <View className={styles.hot_header_up}>高级搜索</View>
        </View>
        <View className={styles.list}>
          <View className={styles.item}>9265</View>
          <View className={styles.item}>全棉双卫衣</View>
          <View className={styles.item}>全棉双卫衣</View>
          <View className={styles.item}>全棉双卫衣</View>
          <View className={styles.item}>全棉双卫衣</View>
          <View className={styles.item}>26s</View>
        </View>
      </View>
      <View className={styles.history}>
        <View className={styles.history_header}>
          <View className={styles.history_header_title}>历史搜索</View>
          <View className={classnames('iconfont icon-lajixiang', styles.miconfont)}></View>
        </View>
        <View className={styles.list}>
          <View className={styles.item}>9265</View>
          <View className={styles.item}>全棉双卫衣</View>
          <View className={styles.item}>全棉双卫衣</View>
          <View className={styles.item}>全棉双卫衣</View>
          <View className={styles.item}>全棉双卫衣</View>
          <View className={styles.item}>26s</View>
        </View>
      </View>
    </View>
  )
}

export default SearchBar
