|
|
@@ -33,7 +33,7 @@
|
|
|
>
|
|
|
</van-tab>
|
|
|
</van-tabs> -->
|
|
|
- <van-search v-model="value" :left-icon="require('@assets/icon_sosuo@3x.png')" placeholder="搜索该类目下的元域名"
|
|
|
+ <van-search v-model="value" :clearable="false" :left-icon="require('@assets/icon_sosuo@3x.png')" placeholder="搜索该类目下的元域名"
|
|
|
show-action @search="getSearch">
|
|
|
<template #action>
|
|
|
<div>.nft</div>
|
|
|
@@ -106,123 +106,159 @@
|
|
|
<script>
|
|
|
import ProductInfo from '../../components/product/productInfo.vue';
|
|
|
export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- domainNameType: 'LIKE',
|
|
|
- rarityType: 'ONE',
|
|
|
- show: false,
|
|
|
- domainNameList: [
|
|
|
- {
|
|
|
- name: '最多点赞',
|
|
|
- type: 'LIKE'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '最新发布',
|
|
|
- type: 'RELEASE'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '寄售中',
|
|
|
- type: 'SELL'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '仅展示',
|
|
|
- type: 'SEE'
|
|
|
- }
|
|
|
- ],
|
|
|
- rarityList: [
|
|
|
- {
|
|
|
- name: '1个字符',
|
|
|
- type: 'ONE'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '2个字符',
|
|
|
- type: 'TWO'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '3个字符',
|
|
|
- type: 'THREE'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '4个字符',
|
|
|
- type: 'FOUR'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '5个字符',
|
|
|
- type: 'FIVE'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '6个字符及以上',
|
|
|
- type: 'SIX'
|
|
|
- }
|
|
|
- ],
|
|
|
- loading: false,
|
|
|
- finished: false,
|
|
|
- page: 0,
|
|
|
- empty: false,
|
|
|
- list: []
|
|
|
- };
|
|
|
- },
|
|
|
- components: {
|
|
|
- ProductInfo
|
|
|
- },
|
|
|
- methods: {
|
|
|
- domainName(value) {
|
|
|
- this.payType = value;
|
|
|
- },
|
|
|
- getSearch() { },
|
|
|
- refreash() {
|
|
|
- (this.domainNameType = ''), (this.rarityType = '');
|
|
|
- },
|
|
|
- submit() {
|
|
|
- if (this.domainNameType == '' || this.rarityType == '') {
|
|
|
- this.$toast('请选择筛选分类');
|
|
|
- return;
|
|
|
- }
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ domainNameType: 'LIKE',
|
|
|
+ rarityType: '',
|
|
|
+ show: false,
|
|
|
+ domainNameList: [
|
|
|
+ {
|
|
|
+ name: '最多点赞',
|
|
|
+ type: 'LIKE'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '最新发布',
|
|
|
+ type: 'RELEASE'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '寄售中',
|
|
|
+ type: 'SELL'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '仅展示',
|
|
|
+ type: 'SEE'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ rarityList: [
|
|
|
+ {
|
|
|
+ name: '1个字符',
|
|
|
+ type: 'RID1'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '2个字符',
|
|
|
+ type: 'TWO'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '3个字符',
|
|
|
+ type: 'THREE'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '4个字符',
|
|
|
+ type: 'RID4'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '5个字符',
|
|
|
+ type: 'RID5'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '6个字符及以上',
|
|
|
+ type: 'SIX'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ loading: false,
|
|
|
+ finished: false,
|
|
|
+ page: 0,
|
|
|
+ empty: false,
|
|
|
+ list: [],
|
|
|
+ dressing: false,
|
|
|
+ search: '',
|
|
|
+ value: ''
|
|
|
+ };
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ ProductInfo
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ domainName(value) {
|
|
|
+ this.payType = value;
|
|
|
+ },
|
|
|
+ getSearch(value) {
|
|
|
+ console.log("dhdgdgddg",value)
|
|
|
+ this.search = value
|
|
|
+ console.log("ajhasdgasdgag",this.search)
|
|
|
+ this.getList(true);
|
|
|
},
|
|
|
+ refreash() {
|
|
|
+ (this.domainNameType = 'LIKE'), (this.rarityType = '');
|
|
|
+ this.dressing = false;
|
|
|
+ this.getList(true);
|
|
|
+ },
|
|
|
+ submit() {
|
|
|
+ this.dressing = true;
|
|
|
+ this.getList(true);
|
|
|
+ this.show = false;
|
|
|
+ },
|
|
|
getList(isFirst = false) {
|
|
|
- if (isFirst) {
|
|
|
- this.page = 0;
|
|
|
- this.list = [];
|
|
|
- }
|
|
|
- this.loading = true;
|
|
|
- this.finished = false;
|
|
|
- this.empty = false;
|
|
|
- let query = {
|
|
|
- type: 'DOMAIN'
|
|
|
- };
|
|
|
- let sort = 'createdAt,desc';
|
|
|
- let url = 'collection/all';
|
|
|
- return this.$http
|
|
|
- .post(
|
|
|
- url,
|
|
|
- {
|
|
|
- page: this.page,
|
|
|
- size: 20,
|
|
|
- query: query,
|
|
|
- sort: sort
|
|
|
- },
|
|
|
- { body: 'json' }
|
|
|
- )
|
|
|
- .then(res => {
|
|
|
- if (res.first) {
|
|
|
- this.list = [];
|
|
|
- this.page = 0;
|
|
|
- }
|
|
|
- this.list = [...this.list, ...res.content];
|
|
|
- this.empty = res.empty;
|
|
|
- this.loading = false;
|
|
|
- this.finished = res.last;
|
|
|
- if (!this.finished) {
|
|
|
- this.page = this.page + 1;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- onRefresh() {
|
|
|
- this.getList(true).then(() => {
|
|
|
- this.isLoading = false;
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
+ if (isFirst) {
|
|
|
+ this.page = 0;
|
|
|
+ this.list = [];
|
|
|
+ }
|
|
|
+ this.loading = true;
|
|
|
+ this.finished = false;
|
|
|
+ this.empty = false;
|
|
|
+ let query = {
|
|
|
+ type: 'DOMAIN'
|
|
|
+ };
|
|
|
+ let sort = 'likes,desc';
|
|
|
+ if (this.dressing) {
|
|
|
+ if (this.rarityType != '') {
|
|
|
+ query = {
|
|
|
+ ...query,
|
|
|
+ prefixName: this.rarityType
|
|
|
+ };
|
|
|
+ }
|
|
|
+ if (this.domainNameType == 'SELL') {
|
|
|
+ query = {
|
|
|
+ ...query,
|
|
|
+ salable: true
|
|
|
+ };
|
|
|
+ }
|
|
|
+ if (this.domainNameType == 'SEE') {
|
|
|
+ query = {
|
|
|
+ ...query,
|
|
|
+ salable: false
|
|
|
+ };
|
|
|
+ }
|
|
|
+ if (this.domainNameType == 'RELEASE') {
|
|
|
+ query = {
|
|
|
+ ...query
|
|
|
+ };
|
|
|
+ sort = 'createdAt,desc';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let url = 'collection/all';
|
|
|
+ return this.$http
|
|
|
+ .post(
|
|
|
+ url,
|
|
|
+ {
|
|
|
+ page: this.page,
|
|
|
+ size: 20,
|
|
|
+ query: query,
|
|
|
+ sort: sort,
|
|
|
+ search: this.search
|
|
|
+ },
|
|
|
+ { body: 'json' }
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ if (res.first) {
|
|
|
+ this.list = [];
|
|
|
+ this.page = 0;
|
|
|
+ }
|
|
|
+ this.list = [...this.list, ...res.content];
|
|
|
+ this.empty = res.empty;
|
|
|
+ this.loading = false;
|
|
|
+ this.finished = res.last;
|
|
|
+ if (!this.finished) {
|
|
|
+ this.page = this.page + 1;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onRefresh() {
|
|
|
+ this.getList(true).then(() => {
|
|
|
+ this.isLoading = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|