소스 검색

二级市场

xuqiang 4 년 전
부모
커밋
cb24702774
2개의 변경된 파일14개의 추가작업 그리고 6개의 파일을 삭제
  1. 11 3
      src/main/pc-space/src/views/Collection.vue
  2. 3 3
      src/main/pc-space/src/views/Home.vue

+ 11 - 3
src/main/pc-space/src/views/Collection.vue

@@ -99,7 +99,8 @@ export default {
             select: '0',
             url: '/collection/all',
             list: [],
-            type: 'DEFAULT,AUCTION'
+            type: 'DEFAULT,AUCTION',
+            source: ''
         };
     },
     mixins: [pageableTable],
@@ -186,15 +187,22 @@ export default {
                     query: {
                         type: this.type,
                         canResale: this.canResale,
-                        onShelf: true
+                        onShelf: true,
+                        source: ''
                     }
                 };
             } else {
+                this.source = '';
+                if (this.type !== 'BLIND_BOX') {
+                    this.source = 'OFFICIAL';
+                }
                 return {
                     search: this.search,
                     query: {
                         type: this.type,
-                        onShelf: true
+                        onShelf: true,
+                        source: this.source,
+                        del: false
                     }
                 };
             }

+ 3 - 3
src/main/pc-space/src/views/Home.vue

@@ -161,7 +161,7 @@ export default {
     },
     mounted() {
         this.getCreators();
-        this.getProduct().then(res => {
+        this.getProduct('DEFAULT', 'likes,desc;sort,desc;createdAt,desc').then(res => {
             this.products = res;
         });
         this.$http
@@ -225,7 +225,7 @@ export default {
             this.showCreator = (this.showCreator + 1) % this.creators.length;
             this.timer = setTimeout(this.autoChange, 3000);
         },
-        getProduct(type = 'DEFAULT') {
+        getProduct(type = '', sort = 'sort,desc') {
             return this.$http
                 .post(
                     '/collection/all',
@@ -237,7 +237,7 @@ export default {
                             onShelf: true,
                             del: false
                         },
-                        sort: 'createdAt,desc'
+                        sort: sort
                     },
                     { body: 'json' }
                 )