|
|
@@ -85,27 +85,41 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <van-tabs v-model:active="salable" :ellipsis="false" @change="getList" line-width="16" line-height="2">
|
|
|
+ <van-tabs
|
|
|
+ v-model:active="salable"
|
|
|
+ :ellipsis="false"
|
|
|
+ @change="getData(true)"
|
|
|
+ line-width="16"
|
|
|
+ line-height="2"
|
|
|
+ >
|
|
|
<van-tab title="全部" name=""></van-tab>
|
|
|
<van-tab title="寄售" :name="true"></van-tab>
|
|
|
</van-tabs>
|
|
|
</van-sticky>
|
|
|
- <div class="list">
|
|
|
- <template v-for="(item, index) in list" :key="index">
|
|
|
- <product-info v-model:info="list[index]"></product-info
|
|
|
- ></template>
|
|
|
+ <van-list
|
|
|
+ style="padding-bottom: 100px;"
|
|
|
+ class="list"
|
|
|
+ v-model:loading="loading"
|
|
|
+ :finished="finished"
|
|
|
+ finished-text=""
|
|
|
+ @load="getData"
|
|
|
+ >
|
|
|
+ <template v-for="(item, index) in list" :key="item.id">
|
|
|
+ <product-info v-model:info="list[index]"></product-info>
|
|
|
+ </template>
|
|
|
<van-empty
|
|
|
v-if="empty"
|
|
|
:image="require('@assets/kong_png_yongyoude (1).png')"
|
|
|
description="没有任何收藏品哦~"
|
|
|
/>
|
|
|
- </div>
|
|
|
+ </van-list>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { mapState } from 'vuex';
|
|
|
import productInfo from '../../components/product/productInfo.vue';
|
|
|
+import list from '../../mixins/list';
|
|
|
export default {
|
|
|
components: { productInfo },
|
|
|
computed: {
|
|
|
@@ -127,6 +141,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
inject: ['bar'],
|
|
|
+ mixins: [list],
|
|
|
data() {
|
|
|
return {
|
|
|
info: {},
|
|
|
@@ -135,7 +150,8 @@ export default {
|
|
|
stiky: null,
|
|
|
list: [],
|
|
|
empty: false,
|
|
|
- hots: []
|
|
|
+ hots: [],
|
|
|
+ url: '/collection/all'
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -143,6 +159,18 @@ export default {
|
|
|
this.getHot();
|
|
|
},
|
|
|
methods: {
|
|
|
+ beforeData() {
|
|
|
+ return {
|
|
|
+ query: {
|
|
|
+ type: this.type,
|
|
|
+ salable: this.salable,
|
|
|
+ minterId: this.info.id,
|
|
|
+ del: false,
|
|
|
+ source: 'OFFICIAL,USER'
|
|
|
+ },
|
|
|
+ sort: this.sort
|
|
|
+ };
|
|
|
+ },
|
|
|
copy() {
|
|
|
this.$copyText(this.info.id).then(
|
|
|
e => {
|
|
|
@@ -162,7 +190,6 @@ export default {
|
|
|
});
|
|
|
this.$http.get('/user/get/' + this.$route.query.id).then(res => {
|
|
|
this.info = res;
|
|
|
- this.getList();
|
|
|
});
|
|
|
},
|
|
|
follow() {
|
|
|
@@ -178,37 +205,9 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- getList() {
|
|
|
- this.$toast.loading({
|
|
|
- message: '加载中...',
|
|
|
- forbidClick: true
|
|
|
- });
|
|
|
- this.$http
|
|
|
- .post(
|
|
|
- '/collection/all',
|
|
|
- {
|
|
|
- page: 0,
|
|
|
- size: 20,
|
|
|
- query: {
|
|
|
- type: this.type,
|
|
|
- salable: this.salable,
|
|
|
- minterId: this.info.id,
|
|
|
- del: false,
|
|
|
- source: 'OFFICIAL,USER'
|
|
|
- },
|
|
|
- sort: this.sort
|
|
|
- },
|
|
|
- { body: 'json' }
|
|
|
- )
|
|
|
- .then(res => {
|
|
|
- this.list = res.content;
|
|
|
- this.empty = res.empty;
|
|
|
- this.$toast.clear();
|
|
|
- });
|
|
|
- },
|
|
|
changeMenu(menu) {
|
|
|
this.type = menu;
|
|
|
- this.getList();
|
|
|
+ this.getData(true);
|
|
|
},
|
|
|
getHot() {
|
|
|
this.$http
|