natasha 1 неделя назад
Родитель
Сommit
06f256e189
2 измененных файлов с 16 добавлено и 5 удалено
  1. 1 1
      src/components/Header.vue
  2. 15 4
      src/views/bookShelf/index.vue

+ 1 - 1
src/components/Header.vue

@@ -443,7 +443,7 @@ export default {
       font-size: 40px;
       position: absolute;
       bottom: -40px;
-      left: 50px;
+      left: 30px;
     }
   }
 }

+ 15 - 4
src/views/bookShelf/index.vue

@@ -105,7 +105,6 @@
             <div
               v-for="(item, index) in BookList"
               :key="index + 'todayNew'"
-              v-infinite-scroll="load"
               infinite-scroll-disabled="disabled"
               :class="[item.type === 3 ? 'book-item-peruse' : '']"
             >
@@ -145,7 +144,20 @@
               </template>
             </div>
             <p v-if="loading" class="tips">加载中...</p>
-            <p v-if="noMore" class="tips">没有更多了</p>
+            <template v-else>
+              <p v-if="noMore" class="tips">没有更多了</p>
+              <p
+                v-else
+                class="tips"
+                style="cursor: pointer"
+                @click="
+                  pageNumber++;
+                  getList();
+                "
+              >
+                点击加载更多
+              </p>
+            </template>
           </div>
           <div class="nodata" v-else>
             <img src="../../assets/nodata.png" />
@@ -324,7 +336,6 @@ export default {
       if (item.hasOwnProperty("value")) {
         this.typeValue = item.value;
         if (item.value === -2) return;
-        console.log(item.value);
         if (item.number > 0 || item.value === 3 || item.value === -1) {
           this.BookList = [
             {
@@ -495,7 +506,7 @@ export default {
               } else if (res.cur_page !== 1) {
                 this.BookList = this.BookList.concat(res.goods_list);
               }
-              if (res.total_page * this.pageSize <= res.cur_page_end_index) {
+              if (res.total_count <= res.cur_page_end_index) {
                 this.noMore = true;
               }
             } else {