feat: 增加界面

This commit is contained in:
2021-11-25 21:13:38 +08:00
parent 52c1603176
commit 29da9c7746
33 changed files with 1896 additions and 870 deletions
+5 -3
View File
@@ -3,8 +3,8 @@
<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>
<buddha-process v-for="(p, i) in list" :key="i" :data="p" :show-goods-btn="!query.goods_id"></buddha-process>
<div v-if="total === list.length && list.length > 3" class="no-more">没有更多了</div>
</scroll-view>
</div>
</div>
@@ -16,7 +16,9 @@ import { getDynamicData } from "@/api"
export default {
props: ['data'],
data(){
const { query } = this.$route;
return {
query,
size: 10,
page: 1,
total: 0,
@@ -29,7 +31,7 @@ export default {
},
methods: {
async getDynamicData(){
const res = await getDynamicData(this.page, this.size)
const res = await getDynamicData(this.page, this.query.goods_id, this.size)
console.log(res)
this.total = res.total;
this.list = res.results;