<template>
  <view class="scroll-table">
    <view v-for="(item,index) in list" :key="index" style="margin:5px 20px 5px 10px">
    <Card :info="item" />
    </view>
    <view style="height:50px"></view>
  </view>
</template>

<script>
  import Card from "./card.vue"
  export default {
    components:{
      Card
    },
    data() {
      return {
        list:[]
      }
    },
    
    methods: {
      async getData(){
        try{ 
          const {data} = await uni.$http.post(
          "/gunshiApp/tsg/resSafePersonB/list",
          {
           resCode:"42120250085"
          })
          if(data.code == 200){
            this.list = [...data.data];
          }
        }catch(e){
         uni.$showMsg();
        }
      },
    },
    mounted() {
      this.getData()
    }
  }
</script>

<style lang="scss" scoped>
    .scroll-table{
    height: calc(100vh - 100px);
    overflow-y: auto;
    width:100%;
    padding: 10px 5px;
  }
</style>
