|
|
@@ -26,7 +26,7 @@
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="list" v-loading="fetchingData">
|
|
|
- <template v-if="select === '0'">
|
|
|
+ <template v-if="select === '0' || select === '1'">
|
|
|
<asset-info v-for="(item, index) in list" :key="item.id" :info.sync="list[index]"></asset-info>
|
|
|
</template>
|
|
|
<template v-if="select === '2'">
|
|
|
@@ -108,37 +108,13 @@ export default {
|
|
|
select() {
|
|
|
switch (this.select) {
|
|
|
case '0':
|
|
|
- this.url = '/asset/all';
|
|
|
break;
|
|
|
case '1':
|
|
|
- // this.url = '/asset/all';
|
|
|
break;
|
|
|
case '2':
|
|
|
- // this.url = '/userCoupon/all';
|
|
|
- break;
|
|
|
- case '3':
|
|
|
- this.type = 'AUCTION';
|
|
|
- this.canResale = '';
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
- this.$router
|
|
|
- .replace({
|
|
|
- query: {
|
|
|
- ...this.$route.query,
|
|
|
- type: this.type,
|
|
|
- canResale: this.canResale
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
-
|
|
|
- this.page = 1;
|
|
|
this.getData();
|
|
|
- },
|
|
|
- '$route.query.type'() {
|
|
|
- if (!this.$route.query.type || this.$route.query.type === 'BLIND_BOX') {
|
|
|
- this.init();
|
|
|
- }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -156,12 +132,22 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
beforeGetData() {
|
|
|
- return {
|
|
|
- search: this.search,
|
|
|
- query: {
|
|
|
- userId: this.$store.state.userInfo.id
|
|
|
- }
|
|
|
- };
|
|
|
+ if (this.select === '1') {
|
|
|
+ return {
|
|
|
+ search: this.search,
|
|
|
+ query: {
|
|
|
+ userId: this.$store.state.userInfo.id,
|
|
|
+ consignment: true
|
|
|
+ }
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ search: this.search,
|
|
|
+ query: {
|
|
|
+ userId: this.$store.state.userInfo.id
|
|
|
+ }
|
|
|
+ };
|
|
|
+ }
|
|
|
},
|
|
|
setList(list) {
|
|
|
this.list = list;
|