From a9dd6ff57b19823880284aad527a54f7e8321653 Mon Sep 17 00:00:00 2001 From: kola-web Date: Wed, 11 Dec 2024 18:45:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=94=E9=A2=98=E9=98=B2=E6=AD=A2=E8=BF=9E?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/my/index.ts | 4 +--- src/pages/topic/index.ts | 5 +++-- src/pages/topic/index.wxml | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/pages/my/index.ts b/src/pages/my/index.ts index c9522f6..f29ea60 100644 --- a/src/pages/my/index.ts +++ b/src/pages/my/index.ts @@ -83,9 +83,7 @@ Page({ this.setData({ toastShow: false, }); - setTimeout(() => { - wx.showTabBar({}); - }, 1000); + wx.showTabBar({}); }, handleTopic() { wx.navigateTo({ diff --git a/src/pages/topic/index.ts b/src/pages/topic/index.ts index 04d3f8c..4c4c021 100644 --- a/src/pages/topic/index.ts +++ b/src/pages/topic/index.ts @@ -1,4 +1,5 @@ const app = getApp(); +const licia = require('miniprogram-licia'); Page({ data: { @@ -29,7 +30,7 @@ Page({ }); }); }, - handleBtn(e) { + handleBtn: licia.debounce(function (e) { const { index, id } = e.currentTarget.dataset; const { question, nav } = this.data; question[index].answer = id; @@ -38,7 +39,7 @@ Page({ nav: nav === question.length - 1 ? nav : nav + 1, percentage: ((nav + 1) / question.length) * 100, }); - }, + }, 200), handlePrev() { this.setData({ nav: this.data.nav - 1, diff --git a/src/pages/topic/index.wxml b/src/pages/topic/index.wxml index 15aac9b..f3fabad 100644 --- a/src/pages/topic/index.wxml +++ b/src/pages/topic/index.wxml @@ -31,7 +31,7 @@ class="btn {{questionItem.answer==='1' && 'active'}}" bind:tap="handleBtn" data-id="1" - data-index="{{index }}" + data-index="{{index}}" > 非常了解