From 47e86f543415585ab1e1b2b1ed1d98830817a1be Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 19 九月 2022 09:41:07 +0800
Subject: [PATCH] 2022.9.16

---
 pages/m_consult/c_result-item-search/c_result-item-search.js |   45 ++++++++++++++++++++++++++++-----------------
 1 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/pages/m_consult/c_result-item-search/c_result-item-search.js b/pages/m_consult/c_result-item-search/c_result-item-search.js
index e4a710b..d970f83 100644
--- a/pages/m_consult/c_result-item-search/c_result-item-search.js
+++ b/pages/m_consult/c_result-item-search/c_result-item-search.js
@@ -14,45 +14,56 @@
     keyobj: {
       type: Object,
       value: {
-        keyword: '',
+        keyword: null,
         type: undefined
       },
     },
     reachBottom: {
       type: Boolean,
       value: false
+    },
+    scrollable: {
+      type: Boolean,
+      value: true
+    },
+    sPerPage: {
+      type: Number,
+      value: 10
     }
   },
 
   observers: {
-    'keyobj': function(keyobj) {
-      this.search(keyobj)
+    'keyobj': function (keyobj) {
+      if (keyobj != null && keyobj.keyword != null) {
+        this.search(keyobj, 1, this.data.sPerPage)        
+      }
     },
-    // 'reachBottom': function(reachBottom) {
-    //   if (reachBottom) {
-    //     this._onReachBottom()
-    //   }
-    // }
   },
 
   /**
    * 缁勪欢鐨勫垵濮嬫暟鎹�
    */
   data: {
-    
+
   },
 
   /**
    * 缁勪欢鐨勬柟娉曞垪琛�
    */
   methods: {
-    // _onReachBottom() {
-    //   console.log('_onReachBottom');
-    //   let {cPage, tPage} = this.data
-    //   console.log(this.data);
-    //   if (cPage < tPage) {
-    //     this.search(this.data.keyobj, ++cPage)
-    //   }
-    // }
+    gotoMore() {
+      this.triggerEvent('gotoMore')
+      const {keyword, type} = this.data.keyobj
+      wx.navigateTo({
+        url: '/pages/m_consult/consultresultmore/consultresultmore',
+        success: (res) => {
+          // 閫氳繃 eventChannel 鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+          res.eventChannel.emit('acceptDataFromOpenerPage', {
+            typeId: type,
+            keyword: keyword
+          })
+        },
+      })
+    }
   }
 })
\ No newline at end of file

--
Gitblit v1.9.3