From 437634b6c3f4fb1fd05a64f62feb0d8501e0360d Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期五, 29 三月 2024 16:03:20 +0800 Subject: [PATCH] yangshi --- pages/home/home.js | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/pages/home/home.js b/pages/home/home.js index 58b5b7a..5122f72 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -520,8 +520,24 @@ // 鐩戝惉婊氬姩鏉� onScroll(e) { + console.log(e) this.setData({ - isWhite: e.detail.scrollTop > 20 ? true : false + isWhite: true + }) + if (e.detail.scrollTop == 0) { + this.setData({ + isWhite: false + }) + } + // this.setData({ + // isWhite: e.detail.scrollTop > 20 ? true : false + // }) + }, + + onScrollToTop(e) { + + this.setData({ + isWhite: e.detail.scrollTop > 50 ? true : false }) }, onRetrievalPage() { -- Gitblit v1.9.1