From a3c032b3e4319a3a7310b9986089840e9b936b69 Mon Sep 17 00:00:00 2001 From: 1154079537 <1154079537@qq.com> Date: Sat, 18 May 2024 19:46:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=BB=9A=E5=8A=A8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20=E8=AE=A2=E5=8D=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/recommend/index.vue | 70 ++++++++++++++++++++++---------- pages/users/order_list/index.vue | 7 +++- 2 files changed, 55 insertions(+), 22 deletions(-) diff --git a/components/recommend/index.vue b/components/recommend/index.vue index 26a81fc..4d510c0 100644 --- a/components/recommend/index.vue +++ b/components/recommend/index.vue @@ -64,21 +64,30 @@ - - - - {{item.name}} - {{item.desc}} - - - - - - + + + + {{item.name}} + {{item.desc}} + + + + {{ hotTitle }} + + + + @@ -171,11 +180,19 @@ }], currTabs: 1, list: [], - tabsTop: '' + tabsTop: '', + isShow: true }; }, mounted() { this.getArticleList(); + uni.$on('scroll', res => { + if (res.scrollTop > this.tabsTop) { + this.isShow = false; + } else { + this.isShow = true; + } + }) }, methods: { @@ -197,16 +214,17 @@ limit: 10 }).then(res => { this.list = res.data.list; - setTimeout(() => { this.$util.getDom(this, '.tabs', res => { // #ifdef APP - this.tabsTop = res.top + 10; + this.tabsTop = res.top - 10; // #endif // #ifdef H5 this.tabsTop = res.top; // #endif + + console.log(this.tabsTop); }) }, 300) }) @@ -236,6 +254,11 @@