<template>
  <div class="yanxue_page">
    <p class="item" v-for="(item,index) in listData" :key="index" @click="handleItem(item.title)">{{item.title}}</p>
  </div>
</template>
<script>
import axios from 'axios'
export default {
  data() {
    return {
      listData:[]
    }
  },
  mounted() {
    this.getList()
  },
  methods: {
    getList() {
      this.$toast.loading('加载中...')
      axios.get(`https://payment.myjxt.com/zlb_assets/yanxue.json`).then((res) => {
        this.$toast.clear()
        console.log('列表：', res.data)
        this.listData = res.data
      })
    },
    handleItem(image){
      this.$router.push({ name: 'YanxueDetail' ,query:{image:image}})
    }
  },
}
</script>
<style lang="scss">
.yanxue_page {
  .item{
    font-size: 30px;
  }
}
</style>
