ykzz-app/pages/skDetail/zrtx/zrtx.vue

59 lines
1.2 KiB
Vue

<template>
<view>
<view class="scroll-table" v-if="list.length != 0">
<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>
<view
style="height:calc(100vh - 160px);display: flex;align-items: center;justify-content: center;background-color: #fff;margin-top:10px"
v-else>
<image src="../../../static/empty.png" mode=""></image>
</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/ykz/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>