This commit is contained in:
2021-11-11 15:10:51 +08:00
parent ec0724c873
commit b4af257c70
63 changed files with 3189 additions and 832 deletions
+35 -6
View File
@@ -1,15 +1,44 @@
<template>
<div class="buddha-activity">
<van-nav-bar left-arrow :title="$route.meta.title" @click-left="$router.back()" :style="{backgroundColor: $route.meta.navBarBackgroundColor}" />
<div class="process-container">
<buddha-process v-for="i in 10" :key="i"></buddha-process>
</div>
<div class="buddha-activity">
<van-nav-bar left-arrow v-if="$route.meta.showNavBar" :title="$route.meta.title" @click-left="$router.back()" :style="{backgroundColor: $route.meta.navBarBackgroundColor}" />
<div div class="process-container">
<scroll-view :height="height - 50" ref="scrollView">
<buddha-process v-for="(p, i) in list" :key="i" :data="p"></buddha-process>
<div v-if="total === list.length" class="no-more">没有更多了</div>
</scroll-view>
</div>
</div>
</template>
<script>
export default {
import { getDynamicData } from "@/api"
export default {
props: ['data'],
data(){
return {
size: 10,
page: 1,
total: 0,
list: [],
height: window.innerHeight
}
},
mounted(){
this.getDynamicData();
},
methods: {
async getDynamicData(){
const res = await getDynamicData(this.page, this.size)
console.log(res)
this.total = res.total;
this.list = res.results;
this.$nextTick(() => {
this.$refs.scrollView.refresh();
})
console.log(res)
}
}
}
</script>