|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="container">
|
|
<div class="container">
|
|
|
<div class="title" ref="anchor">欢迎来到 NFT 市场</div>
|
|
<div class="title" ref="anchor">欢迎来到 NFT 市场</div>
|
|
|
- <el-radio-group class="menu" v-model="type" size="normal">
|
|
|
|
|
|
|
+ <el-radio-group class="menu" v-model="select" size="normal">
|
|
|
<el-radio-button v-for="(item, index) in typeList" :key="index" :label="item.value">
|
|
<el-radio-button v-for="(item, index) in typeList" :key="index" :label="item.value">
|
|
|
<div class="radio-item">
|
|
<div class="radio-item">
|
|
|
<i class="font_family" :class="[item.icon]"></i>
|
|
<i class="font_family" :class="[item.icon]"></i>
|
|
@@ -58,22 +58,22 @@ export default {
|
|
|
{
|
|
{
|
|
|
label: '全部',
|
|
label: '全部',
|
|
|
icon: 'icon-icon-quanbu',
|
|
icon: 'icon-icon-quanbu',
|
|
|
- value: ''
|
|
|
|
|
|
|
+ value: '0'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
label: '新品',
|
|
label: '新品',
|
|
|
icon: 'icon-icon-zuixin',
|
|
icon: 'icon-icon-zuixin',
|
|
|
- value: 'DEFAULT'
|
|
|
|
|
|
|
+ value: '1'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: '盲盒',
|
|
|
|
|
|
|
+ label: '转让',
|
|
|
icon: 'icon-icon-zhuanrang',
|
|
icon: 'icon-icon-zhuanrang',
|
|
|
- value: 'BLIND_BOX'
|
|
|
|
|
|
|
+ value: '2'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
label: '拍卖',
|
|
label: '拍卖',
|
|
|
icon: 'icon-icon-paimai',
|
|
icon: 'icon-icon-paimai',
|
|
|
- value: 'AUCTION'
|
|
|
|
|
|
|
+ value: '3'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
sortList: [
|
|
sortList: [
|
|
@@ -95,33 +95,66 @@ export default {
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
search: '',
|
|
search: '',
|
|
|
- type: '',
|
|
|
|
|
|
|
+ select: '0',
|
|
|
url: '/collection/all',
|
|
url: '/collection/all',
|
|
|
- list: []
|
|
|
|
|
|
|
+ list: [],
|
|
|
|
|
+ type: 'DEFAULT,AUCTION'
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
mixins: [pageableTable],
|
|
mixins: [pageableTable],
|
|
|
watch: {
|
|
watch: {
|
|
|
- type() {
|
|
|
|
|
|
|
+ select() {
|
|
|
|
|
+ switch (this.select) {
|
|
|
|
|
+ case '0':
|
|
|
|
|
+ this.type = 'DEFAULT,AUCTION';
|
|
|
|
|
+ this.canResale = '';
|
|
|
|
|
+ break;
|
|
|
|
|
+ case '1':
|
|
|
|
|
+ this.type = 'DEFAULT';
|
|
|
|
|
+ this.canResale = '';
|
|
|
|
|
+ break;
|
|
|
|
|
+ case '2':
|
|
|
|
|
+ this.type = 'DEFAULT,AUCTION';
|
|
|
|
|
+ this.canResale = true;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case '3':
|
|
|
|
|
+ this.type = 'AUCTION';
|
|
|
|
|
+ this.canResale = '';
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
this.$router
|
|
this.$router
|
|
|
.replace({
|
|
.replace({
|
|
|
query: {
|
|
query: {
|
|
|
...this.$route.query,
|
|
...this.$route.query,
|
|
|
- type: this.type
|
|
|
|
|
|
|
+ type: this.type,
|
|
|
|
|
+ canResale: this.canResale
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
|
|
|
+
|
|
|
|
|
+ this.page = 1;
|
|
|
this.getData();
|
|
this.getData();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
beforeGetData() {
|
|
beforeGetData() {
|
|
|
- return {
|
|
|
|
|
- search: this.search,
|
|
|
|
|
- query: {
|
|
|
|
|
- type: this.type
|
|
|
|
|
- }
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ if (this.canResale) {
|
|
|
|
|
+ return {
|
|
|
|
|
+ search: this.search,
|
|
|
|
|
+ query: {
|
|
|
|
|
+ type: this.type,
|
|
|
|
|
+ canResale: this.canResale
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return {
|
|
|
|
|
+ search: this.search,
|
|
|
|
|
+ query: {
|
|
|
|
|
+ type: this.type
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
setList(list) {
|
|
setList(list) {
|
|
|
this.list = list;
|
|
this.list = list;
|