From b7fd27a4a7ac72eef5fc142cae9bb63fe69ef233 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 22 七月 2024 15:34:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
wechat_jiaxuan/pages/userinfo/mysub.js | 84 ++++++++++++-----------------------------
1 files changed, 25 insertions(+), 59 deletions(-)
diff --git a/wechat_jiaxuan/pages/userinfo/mysub.js b/wechat_jiaxuan/pages/userinfo/mysub.js
index 49e9b87..c545e33 100644
--- a/wechat_jiaxuan/pages/userinfo/mysub.js
+++ b/wechat_jiaxuan/pages/userinfo/mysub.js
@@ -5,79 +5,45 @@
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
- activeTabs: '0',
+ activeTabs: '1',
dataList: [],
total: 0,
- page: 0,
+ page: 1,
capacity: 10,
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
- */
onLoad(options) {
this.getList()
},
+ onReachBottom() {
+ console.log('瑙﹀簳浜嬩欢');
+ const { total, dataList, page } = this.data
+ if(total > dataList.length){
+ this.setData({ page: page + 1 })
+ this.getList()
+ }else{
+ wx.showToast({
+ title: '鏆傛棤鏇村鏁版嵁',
+ icon: 'none'
+ })
+ }
+ },
getList() {
- const { page, capacity} = this.data
+ const { page, capacity, activeTabs} = this.data
customerLogPage({
- model: {},page,capacity
+ model: {
+ type: activeTabs
+ },page,capacity
}).then(res => {
- this.setData({ dataList: res.data.records })
+ this.setData({
+ dataList: res.data.records,
+ total: res.data.total,
+ })
})
},
tabsChange(e) {
const activeTabs = e.currentTarget.dataset.val
- this.setData({ activeTabs })
- },
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
- */
- onReady() {
-
- },
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
- */
- onShow() {
-
- },
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
- */
- onHide() {
-
- },
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇
- */
- onUnload() {
-
- },
-
- /**
- * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
- */
- onReachBottom() {
-
- },
-
- /**
- * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
- */
- onShareAppMessage() {
-
+ this.setData({ activeTabs, dataList: [], total: 0, page: 0, })
+ this.getList()
}
})
\ No newline at end of file
--
Gitblit v1.9.3