<template>
  <div class="pad-lr-30">
    <div class="product-analysis">
      <h5>选择一款金融产品进行分析吧。</h5>
      <ul class="list">
        <li class="item" v-for="(item, index) in list" :key="index" @click="handleClick(item)">
          <span class="btn">{{ item.label }}</span>
          <img :src="item.image" />
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import fundIcon from '@/assets/images/fund_icon.png'
import financeIcon from '@/assets/images/finance_icon.png'
import insuranceIcon from '@/assets/images/insurance_icon.png'
export default {
  data() {
    return {
      list: [
        { label: '基金', image: fundIcon, type: '1' },
        { label: '理财', image: financeIcon, type: '2' },
        { label: '保险', image: insuranceIcon, type: '3' }
      ]
    }
  },
  mounted() {
    console.log(this.$store.state.case, '123')
  },
  methods: {
    handleClick(item) {
      this.$router.push({ path: '/product-analysis/case-select', query: { type: item.type } })
    }
  }
}
</script>

<style scoped>
.pad-lr-30{
  padding: 0 30px;
}
.product-analysis {
  background: #fff;
  /* width: 1340px; */
  height: 552px;
  margin: 24px auto 60px;
}
h5 {
  font-size: 22px;
  font-weight: normal;
  text-align: center;
  color: #666;
  padding-top: 56px;
}
.list {
  display: flex;
  overflow-x: auto;
  padding-top: 56px;
}
.item {
  width: 33.3%;
  text-align: center;
}
.item .btn {
  display: inline-block;
  width: 97px;
  height: 40px;
  background: #c7d4d5;
  font-size: 22px;
  line-height: 40px;
  color: #fff;
  margin-bottom: 40px;
  cursor: pointer;
}
.item img {
  display: block;
  margin: 0 auto;
}
</style>
