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

76 lines
1.4 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() {
uni.showLoading({
title: "加载中...",
mask: true,
});
try {
const { data } = await uni.$http.post("/gunshiApp/tsg/resPerson/page", {
pageSo: {
pageSize: 999,
pageNumber: 1,
},
});
if (data.code == 200) {
uni.hideLoading();
this.list = [...data.data.records];
}
} 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>