From feee3428d33df7acd4a1247b1bcff04576fe8417 Mon Sep 17 00:00:00 2001 From: "978184212@qq.com" <978184212@qq.com> Date: Sat, 22 Nov 2025 16:41:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 10 +++++----- pages/index/index.vue | 21 ++++++++++++++++----- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/pages.json b/pages.json index 9110440..d031dce 100644 --- a/pages.json +++ b/pages.json @@ -109,7 +109,7 @@ { "path": "pages/Site/index", "style": { - "navigationBarTitleText": "站点管理", + "navigationBarTitleText": "监测站点", "navigationStyle": "default", "navigationBarBackgroundColor":"#0F6EFF" } @@ -117,7 +117,7 @@ { "path": "pages/Site/detail", "style": { - "navigationBarTitleText": "站点管理", + "navigationBarTitleText": "监测站点", "navigationStyle": "custom", "navigationBarBackgroundColor":"#0F6EFF" } @@ -125,7 +125,7 @@ { "path": "pages/Site/sjdetail", "style": { - "navigationBarTitleText": "站点管理", + "navigationBarTitleText": "监测站点", "navigationStyle": "custom", "navigationBarBackgroundColor":"#0F6EFF" } @@ -133,7 +133,7 @@ { "path": "pages/vidio/index", "style": { - "navigationBarTitleText": "设备管理", + "navigationBarTitleText": "土壤监测", "navigationStyle": "default", "navigationBarBackgroundColor":"#0F6EFF" } @@ -141,7 +141,7 @@ { "path": "pages/vidio/detail", "style": { - "navigationBarTitleText": "设备管理", + "navigationBarTitleText": "土壤监测", "navigationStyle": "custom" } }, diff --git a/pages/index/index.vue b/pages/index/index.vue index 12c89ab..f0f29ae 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -178,7 +178,9 @@ list: [], weather: '', weatherimg: '', - bjnumber: '' + bjnumber: '', + lastClickTime: 0, + throttleDelay: 1000 // 节流时间1秒 } }, onLoad() { @@ -1188,10 +1190,19 @@ return false; }, todetail(item, index) { - // uni.navigateTo({ - // url: '/packDetail/pages/Site/detail?item=' + encodeURIComponent(JSON.stringify(item)) - // }) - this.isAathorize('/packDetail/pages/Site/detail?item=' + encodeURIComponent(JSON.stringify(item))) + const now = Date.now(); + + // 如果距离上次点击时间小于节流时间,则忽略此次点击 + if (now - this.lastClickTime < this.throttleDelay) { + console.log('点击过于频繁,请稍后再试'); + return; + } + + // 更新最后点击时间 + this.lastClickTime = now; + + // 执行原逻辑 + this.isAathorize('/packDetail/pages/Site/detail?item=' + encodeURIComponent(JSON.stringify(item))); }, tologin() { uni.reLaunch({