From bd3a9d7086f5a428b385599ba2cb08299b22c0df Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 15 九月 2022 09:26:18 +0800
Subject: [PATCH] 2022.9.14
---
pages/m_consult/c_result-item-search/c_result-item-search.js | 41 +++++++++++++++++++++++++----------------
1 files changed, 25 insertions(+), 16 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..fabb3ed 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
@@ -21,38 +21,47 @@
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) {
+ 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