From 6abfd95c8aeb9499115b077025f6f6a3326eb7c0 Mon Sep 17 00:00:00 2001 From: sszdot Date: Wed, 18 Dec 2024 18:35:51 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=20=20=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afactor=20=E3=80=90=E5=8E=9F=20=20=E5=9B=A0=E3=80=91?= =?UTF-8?q?=EF=BC=9A=E9=98=B2=E6=AD=A2=20=E9=87=8D=E5=A4=8D=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E6=8C=89=E9=92=AE=20=E3=80=90=E8=BF=87=20=20=E7=A8=8B?= =?UTF-8?q?=E3=80=91=EF=BC=9A=E7=BB=99=E6=94=AF=E4=BB=98=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=8A=A0=E4=B8=80=E4=B8=AA=E6=A0=87=E8=AE=B0=20=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E4=B9=8B=E5=90=8E=E6=94=B9=E5=8F=98=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=20=E5=B9=B6=E4=B8=94=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E8=BF=87=20=E7=82=B9=E5=87=BB=E8=BF=87=20?= =?UTF-8?q?=E5=88=99=E4=B8=8D=E7=BB=A7=E7=BB=AD=E6=89=A7=E8=A1=8Cpay=20?= =?UTF-8?q?=E5=87=BD=E6=95=B0=20=E3=80=90=E5=BD=B1=20=20=E5=93=8D=E3=80=91?= =?UTF-8?q?=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动 --- components/tabbar/tabbar.vue | 2 +- pages/shop/pay.vue | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/components/tabbar/tabbar.vue b/components/tabbar/tabbar.vue index 052f1c4..7c353e1 100644 --- a/components/tabbar/tabbar.vue +++ b/components/tabbar/tabbar.vue @@ -51,7 +51,7 @@ }) } else if (name === 2) { - uni.redirectTo({ + uni.navigateTo({ url: '/pages/main/index' }) } diff --git a/pages/shop/pay.vue b/pages/shop/pay.vue index 53643d8..d246405 100644 --- a/pages/shop/pay.vue +++ b/pages/shop/pay.vue @@ -27,8 +27,7 @@ - 确认支付 - + 确认支付 @@ -48,6 +47,7 @@ order_time: -1, //订单创建时间 countdown: '', // 用于显示倒计时 timer: null, // 存储计时器 + isPressed: false, //支付按钮是否锁定 } }, onLoad(options) { @@ -113,6 +113,10 @@ formatSeconds, // 支付方法 pay() { + if (this.isPressed) { //防止支付按钮重复点击 + return + } + this.isPressed = true uni.$u.http.post('/Api/Pay/pay', { order_sn: this.order_sn }, {