From 49af4f25059c1d1c48ef1a1e292419b9cff76ecf Mon Sep 17 00:00:00 2001 From: zoujiandong <10130823232@qq.com> Date: Tue, 19 Dec 2023 10:20:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=97=AE=E8=AF=8A=E8=A1=A8?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Pages/yishi/write_sickform/index.js | 4 ++-- utils/debounce.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Pages/yishi/write_sickform/index.js b/Pages/yishi/write_sickform/index.js index 3793e2d..6263f9e 100644 --- a/Pages/yishi/write_sickform/index.js +++ b/Pages/yishi/write_sickform/index.js @@ -74,7 +74,7 @@ Page({ }) }) }, - handleSend(){ + handleSend:debounce(function(){ let {order_inquiry_id,result,obj}=this.data; if(result.length==0){ wx.showToast({ @@ -97,7 +97,7 @@ Page({ wx.navigateBack(); } }) - }, + }), noop() {}, /** * 生命周期函数--监听页面加载 diff --git a/utils/debounce.js b/utils/debounce.js index 3306bdf..7feffaa 100644 --- a/utils/debounce.js +++ b/utils/debounce.js @@ -1,4 +1,4 @@ -function debounce(fn, delay){ +function debounce(fn, delay=800){ let timer = null; return function(){ clearTimeout(timer);