From 985f70ad180b1ce396cf03e29cc2551a0bd892a2 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期一, 25 三月 2024 18:28:48 +0800
Subject: [PATCH] 删除多余文件

---
 packageBookService/pages/bookServices/list/index.js |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/packageBookService/pages/bookServices/list/index.js b/packageBookService/pages/bookServices/list/index.js
index 4fa9702..7fd0570 100644
--- a/packageBookService/pages/bookServices/list/index.js
+++ b/packageBookService/pages/bookServices/list/index.js
@@ -45,8 +45,10 @@
     sort: '', // 鎺掑簭
     enable: false,
     loadingProps: {
-      size: '50rpx',
+      size: '50rpx'
     },
+    loading: false,
+    noData: false
   },
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
@@ -138,7 +140,6 @@
    * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
    */
   onReachBottom(e) {
-    console.log('搴曢儴');
     const flag = this.data.bookList.length < this.data.pageCount.total
     if (flag) {
       this.setData({
@@ -275,6 +276,10 @@
   },
   // 鑾峰彇鍥句功鍒楄〃
   getBookList(path) {
+    this.setData({
+      loading: true,
+      noData: false
+    })
     let sort;
     let pathObj = {};
     if (this.data.pathList.length) {
@@ -318,7 +323,7 @@
       ],
       sort,
       coverSize: {
-        height: 145,
+        width: 105
       },
       paging: {
         start: 0,
@@ -336,9 +341,15 @@
       this.setData({
         bookList: res.datas,
         enable: false,
-        "pageCount.total": res.total
+        "pageCount.total": res.total,
+        loading: false
       });
-      console.log('鍥句功鍒楄〃', res, this.data.pageCount);
+      console.log('鍥句功鍒楄〃', res.datas);
+      if (!res.datas.length) {
+        this.setData({
+          noData: true
+        })
+      }
     });
   },
   // 涓�绾у垎绫诲垏鎹�
@@ -371,7 +382,6 @@
       pathList: pathList,
       'secondList.value': e.detail.value,
     });
-
   },
   // 
   onConfirmSecond() {

--
Gitblit v1.9.1