Files
dvcp_v2_wxcp_app/src/project/qianxinan/AppGirdIntegral/AppGirdIntegral.vue

87 lines
1.6 KiB
Vue
Raw Normal View History

2022-12-22 16:35:53 +08:00
<template>
<div class="AppGirdIntegral">
<AiTopFixed>
</AiTopFixed>
<div class="list-data" v-if="list.length">
</div>
<AiEmpty v-else></AiEmpty>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
appName: '网格员积分',
data() {
return {
current: 1,
list: [],
}
},
computed: {
...mapState(['user']),
},
created() {
this.$dict.load("workTaskType").then(() => {
this.getList()
})
uni.$on('getList', () => {
this.current = 1
this.getList()
})
},
onShow() {
document.title = '网格员积分'
this.current = 1
this.getList()
},
methods: {
getList() {
this.$http.post("/app/appworktaskinfo/list", null, {
params: {
...this.map(this.index),
size: 10,
current: this.current
}
}).then(res => {
if (res && res.data) {
if (this.current > 1 && this.current > res.data.pages) {
this.status = "已经到底啦"
}
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
}
})
}
},
onReachBottom() {
this.current = this.current + 1;
this.getList()
}
}
</script>
<style lang="scss" scoped>
.AppGirdIntegral {
min-height: 100%;
background-color: #F5F5F5;
padding-bottom: 32px;
::v-deep .content {
padding: 0;
}
.list-data {
box-sizing: border-box;
padding: 32px 32px 0 32px;
}
}
</style>