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

59 lines
1.2 KiB
Vue
Raw Normal View History

2024-11-13 09:42:42 +08:00
<template>
2024-11-15 16:40:47 +08:00
<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>
2024-11-13 09:42:42 +08:00
</view>
</view>
</template>
<script>
import Card from "./card.vue"
export default {
2024-11-15 16:40:47 +08:00
components: {
2024-11-13 09:42:42 +08:00
Card
},
data() {
return {
2024-11-15 16:40:47 +08:00
list: []
2024-11-13 09:42:42 +08:00
}
},
2024-11-15 16:40:47 +08:00
2024-11-13 09:42:42 +08:00
methods: {
2024-11-15 16:40:47 +08:00
async getData() {
try {
const {
data
} = await uni.$http.post(
"/gunshiApp/tsg/resSafePersonB/list", {
resCode: "42120250085"
})
if (data.code == 200) {
2024-11-13 09:42:42 +08:00
this.list = [...data.data];
}
2024-11-15 16:40:47 +08:00
} catch (e) {
uni.$showMsg();
2024-11-13 09:42:42 +08:00
}
},
},
mounted() {
this.getData()
}
}
</script>
<style lang="scss" scoped>
2024-11-15 16:40:47 +08:00
.scroll-table {
2024-11-13 09:42:42 +08:00
height: calc(100vh - 100px);
overflow-y: auto;
2024-11-15 16:40:47 +08:00
width: 100%;
2024-11-13 09:42:42 +08:00
padding: 10px 5px;
}
2024-11-15 16:40:47 +08:00
</style>