yuany 3 лет назад
Родитель
Сommit
be3c683400
1 измененных файлов с 16 добавлено и 11 удалено
  1. 16 11
      src/views/Store.vue

+ 16 - 11
src/views/Store.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="explore_content" :class="collections.length < 5 ? 'shop_list_one' : ''">
+    <div class="explore_content">
         <van-pull-refresh
             class="load_refresh"
             success-text="加载成功"
@@ -16,7 +16,7 @@
                                 <div
                                     class="collection_switching_con"
                                     :class="{ active: active === 0 }"
-                                    @click="active = 0"
+                                    @click="getCollectionOne"
                                 >
                                     持有藏品
                                 </div>
@@ -124,7 +124,7 @@
                 </van-list>
                 <div class="van_empty_con">
                     <van-empty
-                        v-if="showList.length === 0"
+                        v-if="empty && showList.length === 0"
                         :image="require(`@assets/empty-collection.png`)"
                         :image-size="`172`"
                     >
@@ -159,6 +159,7 @@ export default {
             collections: [],
             isLoading: true,
             active: 0,
+            scrollTop: 0,
             selectOptions: [
                 {
                     label: '全部',
@@ -201,6 +202,10 @@ export default {
             this.active = 1;
             this.init();
         },
+        getCollectionOne() {
+            this.active = 0;
+            this.getAllCollections()
+        },
         init(loading = true) {
             if (!this.isLogin) {
                 this.empty = true;
@@ -276,6 +281,7 @@ export default {
             this.tabLabel = info.name;
             this.page = 0;
             this.loading = true;
+            this.change()
             this.getAllCollections();
         },
         beforeQuery() {
@@ -296,7 +302,8 @@ export default {
                 form = {
                     ...form,
                     publicShow: false,
-                    consignment: false
+                    consignment: false,
+                    status: 'NORMAL'
                 };
             } else {
                 form = {
@@ -334,8 +341,10 @@ export default {
     // margin-top: 44px;
     box-sizing: border-box;
     background: #191d27;
+    height: calc(var(--app-height));
+    position: relative;
     .explore_content_top {
-        padding: 0px 15px 15px;
+        padding: 0px 15px 10px;
         box-sizing: border-box;
         background: #191d27;
         .explore_content_top_one {
@@ -429,10 +438,10 @@ export default {
         }
     }
     .data_display {
-        padding: 0px 15px 16px;
+        padding: 5px 15px 16px;
         box-sizing: border-box;
         // background: #0F0F27;
-        min-height: calc(var(--app-height) - 100px);
+        // min-height: calc(var(--app-height) - 100px);
         margin-bottom: 80px;
         .data_display_fanter {
             width: 100%;
@@ -461,10 +470,6 @@ export default {
 .van_empty_con {
     padding-top: 18px;
 }
-.shop_list_one {
-    height: 100%;
-    position: absolute;
-}
 .explore_content_con {
     position: relative;
     z-index: 10;