yuanyuan 3 years ago
parent
commit
f1d65af3af
4 changed files with 45 additions and 15 deletions
  1. 1 0
      src/router/index.js
  2. 1 0
      src/views/Discover.vue
  3. 5 2
      src/views/Home.vue
  4. 38 13
      src/views/product/MetaDomain.vue

+ 1 - 0
src/router/index.js

@@ -607,6 +607,7 @@ const routes = [{
         name: 'domainname',
         component: () => import('../views/DomainName.vue'),
         meta: {
+            pageType: Page.Every,
             menuPage: true
         }
     },

+ 1 - 0
src/views/Discover.vue

@@ -425,6 +425,7 @@ export default {
 				query = {
 					type: 'DOMAIN'
 				};
+                sort = 'likes,desc';
 			} else if (this.sort === 'art_Exhibition') {
 				url = 'showroom/all';
 				query = {

+ 5 - 2
src/views/Home.vue

@@ -521,8 +521,11 @@ export default {
 				.then(res => {
 					res.forEach(item => {
 						item.name = item.name.split('#')[0].trim();
+                        if(item.pic == null){
+                            item.pic = []
+                        }
 					});
-					this.HotCollects = res.slice(0, 5);
+					this.HotCollects = res.slice(0, 5);    
 					return Promise.resolve();
 				})
 				.catch(() => {
@@ -756,7 +759,7 @@ export default {
     // padding: 16px 0;
     box-sizing: border-box;
     // padding-bottom: 35px;
-    border-radius: 16px 16px 0 0;
+    border-radius: 16px;
 
     .swiper-pagination {
         bottom: 15px;

+ 38 - 13
src/views/product/MetaDomain.vue

@@ -33,12 +33,12 @@
                         >
                         </van-tab>
                     </van-tabs> -->
-                    <van-search v-model="value" :clearable="false" enterkeyhint="search" :left-icon="require('@assets/icon_sosuo@3x.png')"
-                        placeholder="搜索该类目下的元域名" show-action @search="getSearch">
-                        <template #action>
-                            <div>.nft</div>
-                        </template>
-                    </van-search>
+                    <van-field v-model="value" :clearable="false" enterkeyhint="search"
+                        :left-icon="require('@assets/icon_sosuo@3x.png')" placeholder="搜索该类目下的元域名" extra @keyup="onInput">
+                        <template #extra>
+                            <div class="flex_text">.nft</div>
+                        </template>>
+                    </van-field>
                     <div class="page_top_three_btn" @click="screening">
                         <div class="page_top_three_btn_con">筛选</div>
                         <img :src="require('../../assets/shaixuan@3x.png')" alt="" class="page_top_three_btn_img" />
@@ -212,6 +212,14 @@ export default {
 		ProductInfo
 	},
 	methods: {
+		onInput(e) {
+			if (e.key === 'Enter') {
+				this.$nextTick(() => {
+					this.getSearch();
+				});
+			}
+			console.log(e);
+		},
 		priceOrder() {
 			this.source = !this.source;
 			this.getList(true);
@@ -230,8 +238,8 @@ export default {
 			this.payType = value;
 		},
 		getSearch(value) {
-			this.search = value;
-			if (value == '') {
+			this.search = this.value;
+			if (this.search == '') {
 				this.refreash();
 			} else {
 				this.getList(true);
@@ -542,15 +550,20 @@ export default {
             }
         }
 
-        /deep/ .van-search {
+        /deep/ .van-field {
             width: calc(68vw + 10px);
             height: 32px;
             background: #232121;
             border-radius: 8px;
             backdrop-filter: blur(2px);
-            padding: 0;
+            padding: 0px 10px;
 
-            .van-search__content {
+            .van-field__body {
+                height: 32px;
+                line-height: 32px;
+            }
+
+            .van-field__content {
                 border-radius: 8px;
                 height: 32px;
                 padding: 0 10px;
@@ -558,8 +571,9 @@ export default {
             }
 
             .van-field__left-icon {
-                line-height: 32px;
                 margin-right: 6px;
+                display: flex;
+                align-items: center;
             }
 
             .van-search__field {
@@ -574,7 +588,14 @@ export default {
                 color: #ffffff;
             }
 
-            .van-search__action {
+            .flex_text {
+                line-height: 32px;
+                font-size: 12px;
+                font-weight: 400;
+                color: #656464;
+            }
+
+            .van-field__action {
                 height: 32px;
                 font-size: 12px;
                 font-weight: 400;
@@ -591,6 +612,10 @@ export default {
                 color: #656464;
             }
         }
+
+        /deep/ .van-cell:after {
+            border-bottom: none !important;
+        }
     }
 
     .search {