|
@@ -16,6 +16,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="has-more" v-if="!hasMore">
|
|
|
+ —————— 暂无更多反馈 ——————
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -29,8 +32,8 @@ export default {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10
|
|
|
},
|
|
|
- // 总数据
|
|
|
- total: 0,
|
|
|
+ // 是否有更多
|
|
|
+ hasMore: false,
|
|
|
// 列表
|
|
|
tableData: [],
|
|
|
// 状态
|
|
@@ -43,18 +46,26 @@ export default {
|
|
|
beforeCreate() {
|
|
|
document.querySelector('body').setAttribute('style', 'background-color:#FAFAFA;')
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ onLoad() {
|
|
|
this.getDetail()
|
|
|
},
|
|
|
methods: {
|
|
|
getDetail() {
|
|
|
detail(this.form).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
- this.tableData = res.data.data.records
|
|
|
- this.total = res.data.data.total
|
|
|
+ res.data.data.records.map(i => {
|
|
|
+ this.tableData.push(i)
|
|
|
+ })
|
|
|
+ this.hasMore = res.data.data.hasMore
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+ onReachBottom() {
|
|
|
+ if (this.hasMore) {
|
|
|
+ this.form.pageNum += 1
|
|
|
+ this.getDetail()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -104,5 +115,11 @@ export default {
|
|
|
padding: 20rpx;
|
|
|
border-radius: 16rpx;
|
|
|
}
|
|
|
+
|
|
|
+ .has-more{
|
|
|
+ color: #999;
|
|
|
+ font-size: 24rpx;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|