Jelajahi Sumber

Merge branch 'master' of http://git.izouma.com/xiongzhu/9th

xuqiang 4 tahun lalu
induk
melakukan
9d00af0a6b
1 mengubah file dengan 17 tambahan dan 9 penghapusan
  1. 17 9
      src/main/nine-space/src/views/Discover.vue

+ 17 - 9
src/main/nine-space/src/views/Discover.vue

@@ -52,7 +52,10 @@
             </div>
         </div>
         <div class="box" v-if="products.length > 0">
-            <page-title title="本期推荐" :to="{ path: '/productList' }"></page-title>
+            <page-title
+                title="本期推荐"
+                :to="{ path: '/productList', query: { type: 'DEFAULT', source: 'OFFICIAL' } }"
+            ></page-title>
             <div class="box-list">
                 <template v-for="(item, index) in products" :key="item.id">
                     <product-info v-model:info="products[index]"></product-info
@@ -60,7 +63,10 @@
             </div>
         </div>
         <div class="box" v-if="hots.length > 0">
-            <page-title title="最HOT收藏品" :to="{ path: '/productList', query: { type: 'DEFAULT' } }"></page-title>
+            <page-title
+                title="最HOT收藏品"
+                :to="{ path: '/productList', query: { type: 'DEFAULT', source: 'OFFICIAL' } }"
+            ></page-title>
             <div class="box-list">
                 <template v-for="(item, index) in hots" :key="item.id">
                     <product-info v-model:info="hots[index]"></product-info
@@ -78,7 +84,7 @@
         <div class="box">
             <page-title title="更多藏品" :isLink="false"></page-title>
             <van-list
-                style="padding-bottom: 100px;"
+                style="padding-bottom: 100px"
                 class="box-list"
                 v-model:loading="loading"
                 :finished="finished"
@@ -148,7 +154,7 @@ export default {
             this.getProduct('BLIND_BOX').then(res => {
                 this.box = res;
             });
-            this.getProduct('DEFAULT').then(res => {
+            this.getProduct('DEFAULT', 'likes,desc;sort,desc;createdAt,desc').then(res => {
                 this.hots = res;
             });
             this.getProduct().then(res => {
@@ -156,7 +162,7 @@ export default {
             });
             this.getMiner();
         },
-        getProduct(type = '') {
+        getProduct(type = '', sort = 'sort,desc') {
             return this.$http
                 .post(
                     '/collection/all',
@@ -166,9 +172,10 @@ export default {
                         query: {
                             type: type,
                             onShelf: true,
-                            del: false
+                            del: false,
+                            source: 'OFFICIAL'
                         },
-                        sort: 'sort,desc'
+                        sort: sort
                     },
                     { body: 'json' }
                 )
@@ -208,9 +215,10 @@ export default {
                         size: 20,
                         query: {
                             onShelf: true,
-                            del: false
+                            del: false,
+                            source: 'OFFICIAL'
                         },
-                        sort: 'createdAt,desc'
+                        sort: 'sort,desc'
                     },
                     { body: 'json' }
                 )