From e8ec903206cb82e4dbb4687291d5f7788e7ff046 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期一, 06 五月 2024 18:17:47 +0800
Subject: [PATCH] bug修改

---
 pages/bibliographyList/index.js |   91 ++++++++++++++++++++++++++++++++++-----------
 1 files changed, 69 insertions(+), 22 deletions(-)

diff --git a/pages/bibliographyList/index.js b/pages/bibliographyList/index.js
index dc993f6..2a851c7 100644
--- a/pages/bibliographyList/index.js
+++ b/pages/bibliographyList/index.js
@@ -33,6 +33,9 @@
       emailError: false,
       loading: true, //寮�鍚鏋跺睆鍔犺浇
       hidden: true, //鏄惁灞曠ず鍐呭
+      height: '',
+      dialogBox: false,
+      inputStyle: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx; padding: 0 0 0 16rpx;height:70rpx',
     },
 
     /**
@@ -55,6 +58,15 @@
         }
       }
       this.onTabsChange(event)
+      var that = this;
+      // 鍔ㄦ�佽幏鍙栧睆骞曢珮搴�
+      wx.getSystemInfo({
+        success: (result) => {
+          that.setData({
+            height: result.windowHeight
+          });
+        },
+      })
     },
 
     /**
@@ -109,8 +121,16 @@
     onTabsChange(event) {
       const value = event.detail.value
       this.setData({
+        isMore: null,
         tabValue: value,
       })
+      if (value == '0') {
+        this.higherGet()
+      } else if (value == '1') {
+        this.vocationalGet()
+      } else if (value == '2') {
+        this.teacherGet()
+      }
     },
     //楂樼瓑鏁欒偛
     higherGet(keyword) {
@@ -140,7 +160,6 @@
         },
         SysType: 'CmsItem'
       }).then(res => {
-
         res.datas.forEach(item => {
           item.determine = true
         })
@@ -152,6 +171,11 @@
           loading: false, //寮�鍚鏋跺睆鍔犺浇
           hidden: false, //鏄惁灞曠ず鍐呭
         })
+        if (res.datas.length < 7 && res.datas.length > 0) {
+          this.setData({
+            isMore: false
+          })
+        }
       })
       wx.stopPullDownRefresh()
     },
@@ -192,6 +216,11 @@
           vocationalList: res.datas,
           vocationalTotal: res.total
         })
+        if (res.datas.length < 7 && this.datas.length > 0) {
+          this.setData({
+            isMore: false
+          })
+        }
       })
       wx.stopPullDownRefresh()
     },
@@ -232,6 +261,11 @@
           teacherList: res.datas,
           teacherTotal: res.total
         })
+        if (res.datas.length < 7 && this.datas.length > 0) {
+          this.setData({
+            isMore: false
+          })
+        }
       })
       wx.stopPullDownRefresh()
     },
@@ -275,8 +309,6 @@
     //   }, 2000);
     // },
     downloadData(event) {
-      console.log(this.data.isMore);
-      debugger
       const item = event.currentTarget.dataset.item
       if (item.fileType == "pdf") {
         wx.navigateTo({
@@ -385,32 +417,42 @@
       const key = e.currentTarget.dataset.key;
       const item = e.currentTarget.dataset.item;
       this.setData({
-        Md5: item.datas.freeFile.FileList[0].Md5
+        Md5: item.datas.freeFile.FileList[0].Md5,
+        dialogBox: true
       })
-      wx.showModal({
-        title: '璇疯緭鍏ラ偖绠�',
-        content: '',
-        confirmColor: '#ff6c00',
-        cancelColor: '#949494',
-        placeholderText: '璇疯緭鍏ラ偖绠卞彿',
-        editable: true,
-        complete: (res) => {
-          if (res.cancel) {
-            console.log('鍙栨秷');
-          }
-          if (res.confirm) {
-            this.setData({
-              input: res.content
-            })
-            this.confirmM()
-          }
-        }
+      // wx.showModal({
+      //   title: '璇疯緭鍏ラ偖绠�',
+      //   content: '',
+      //   confirmColor: '#ff6c00',
+      //   cancelColor: '#949494',
+      //   placeholderText: '璇疯緭鍏ラ偖绠卞彿',
+      //   editable: true,
+      //   complete: (res) => {
+      //     if (res.cancel) {
+      //       console.log('鍙栨秷');
+      //     }
+      //     if (res.confirm) {
+      //       this.setData({
+      //         input: res.content
+      //       })
+      //       this.confirmM()
+      //     }
+      //   }
+      // })
+    },
+    // 寮圭獥鍙栨秷
+    closeDialog() {
+      this.setData({
+        dialogBox: false
       })
     },
     //鎻愪氦
     confirmM(e) {
       const isEmailValid = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(this.data.input);
       if (isEmailValid && this.data.input) {
+        this.setData({
+          dialogBox: false
+        })
         let query = {
           eMail: this.data.input,
           md5s: [this.data.Md5]
@@ -431,4 +473,9 @@
         });
       }
     },
+    inputChange(e) {
+      this.setData({
+        input: e.detail.value
+      })
+    }
   })
\ No newline at end of file

--
Gitblit v1.9.1