<template>
  <div class="search" @click="handleToSearch">
    <div class="search-wrapper">
      <i class="iconfont icon-search" />
      <span>搜索商品</span>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    handleToSearch() {
      this.$store.commit('DEL_KEEP_ALIVE', 'search');
      this.$track.registeredEvents('H5_HomePageBannerExposure', {
        page_name: '新人专区'
      });
      setTimeout(() => {
        this.$router.push({ name: 'search' });
      }, 200);
    }
  }
};
</script>

<style lang="less" scoped>
.search {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0 2 * @padding-sm;
  height: 30px;
  border-radius: @border-radius-lg + 222;
  background-color: rgba(177, 101, 9, 0.2);
  color: #fff;
  .text-size(12);
  text-align: center;
  margin-bottom: 168px;
  .iconfont {
    margin-right: @padding-unit;
    .text-size(16);
    color: #fff;
  }
  .item-center {
    display: flex;
    align-items: center;
    border-left: 1px solid #dcdee0;
    padding-left: 8px;
    &-btn {
      color: #333;
      .text-size(12);
    }
    span:last-child {
      color: #666;
    }
  }
  .brand-img {
    margin-right: 8px;
    max-height: 28px;
  }
  &-wrapper {
    height: 100%;
    display: flex;
    align-items: center;
  }
}
</style>
