searchHistory.vue 2.62 KB
<template>
  <div class="qulification_search_container">
    <NafmHeader navClass="nafmii-head-bg3" title="资质查询" />
    <main class="qulification_content">
      <section class="logo">
      </section>
      <h3 class="search_title">{{$t('qulification.title')}}</h3>
      <search @select="searchSelect"></search>
      <section class="search_history">
        <div class="history_header">
          <span>{{$t('qulification.history')}}</span>
          <span class="delete_circle">
            <van-icon name="delete" />
          </span>
        </div>
        <div>
          <span class="history_item" v-for=" item in historyItems" :key="item.id" @click="toDetail">{{item.name}}</span>
        </div>
      </section>
    </main>
  </div>
</template>
<script>
export default {
  name: 'QulificationSearch',
  components: {
    search: ()=>import('./components/search.vue')
  },
  data() {
    return {
      historyItems: [{
        name: 'jdnskjfnjkds',
        id:11111
      }, {
        name: 'dksjnjkfdskjnkf',
        id: 2222
      }, {name: 'jdnskjfnjkds',
        id:111112
      }, {
        name: 'dksjnjkfdskjnkf',
        id: 22222
      }]
    }
  },
  created() {
    this.searchSelect()
  },
  methods: {
    defaultInput() {
      this.qulificationType = this.$t('qulification.searchAction').org.name
      this.placeholdTxt = this.$t('qulification.searchAction').org.placeholder
    },
    toDetail() {
      this.$router.push({name: 'QulificationDetail'})
    },
    searchSelect(seachType) {

    }
  }
}
</script>
<style lang="less" scoped>
.qulification_search_container {
  width: 384px;
  margin: 0 auto;
  .logo {
    display: block;
    width: 100px;
    height: 100px;
    margin: 15px auto;
    background: url(../../assets/icon/logo.png) no-repeat;
    background-size: contain;
  }
  .search_title {
    font-size: 16px;
    font-family: PingFangSC-Semibold;
    color: #333333;
    text-align: center;
  }
  .search_history {
    .history_header {
      line-height: 25px;
      margin-bottom: 5px;
      font-size: 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .delete_circle {
        display: inline-block;
        width: 25px;
        height: 25px;
        border-radius: 50%;
        background-color: #f6f6f6;
        text-align: center;
        line-height: 25px;
        // .van-icon-delete {
        //   align-self: middle;
        // }
      }
    }
    .history_item {
      display: inline-block;
      font-size: 12px;
      color: #666666;
      padding: 6px 20px;
      border-radius: 50px;
      background-color: #f6f6f6;
      margin: 10px 10px 0 0;
    }
  }
}
</style>