From 1cee3a660c5f8e5f4290ae894c2898c4966a834d Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 02 八月 2024 18:33:33 +0800
Subject: [PATCH] ''
---
wechat_staff/pages/consult/consult.js | 30 ++++++++++++++++++++++--------
1 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/wechat_staff/pages/consult/consult.js b/wechat_staff/pages/consult/consult.js
index 26539bb..b1f84a0 100644
--- a/wechat_staff/pages/consult/consult.js
+++ b/wechat_staff/pages/consult/consult.js
@@ -1,4 +1,5 @@
import { getZhongTaiProductNewsPage, getCatalogList,actionDo,refreshEnjoy } from '../../api/index'
+let touchDot = 0
Page({
/**
@@ -7,6 +8,7 @@
data: {
category: [],
secondCategory: [],
+ showCate: true,
catalogCode: '',
tagCode: '',
@@ -15,6 +17,7 @@
total: 0,
pageNum: 1,
pageSize: 10,
+ scrollTop: 0
// height: 0,
// top: 0,
@@ -22,12 +25,12 @@
onLoad(options) {
this.getCate()
},
- onReachBottom() {
+ bindscrolltolower() {
console.log('瑙﹀簳浜嬩欢');
const { total, dataList, pageNum } = this.data
if(total > dataList.length){
this.setData({ pageNum: pageNum + 1 })
- this.getList()
+ this.getList(false)
}else{
wx.showToast({
title: '鏆傛棤鏇村鏁版嵁',
@@ -80,7 +83,7 @@
})
}
},
- getList() {
+ getList(showCate = true) {
const { pageNum, pageSize, catalogCode, tagCode, query } = this.data
getZhongTaiProductNewsPage({
pageNum, pageSize, query, catalogCode: tagCode || catalogCode
@@ -88,7 +91,8 @@
if(res.data){
this.setData({
dataList: [ ...this.data.dataList, ...res.data.records ],
- total: res.data.total
+ total: res.data.total,
+ showCate
})
}
@@ -119,10 +123,20 @@
onReady() {
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
- */
+ touchstart(e){
+ // touchDot = e.touches[0].pageY;
+ console.log('寮�濮�', e);
+ },
+ touchmove(e) {
+ // var touchMove = e.touches[0].pageY;
+ console.log('touchMove', e);
+ // if(touchDot - touchMove > 60){
+ // this.setData({ showCate: false })
+ // }
+ // if(touchMove - touchDot > 60){
+ // this.setData({ showCate: true })
+ // }
+ },
onShow() {
refreshEnjoy(this)
},
--
Gitblit v1.9.3