From b3a0c1bd0e6a8d007d93cf73deced8e4d55d9f37 Mon Sep 17 00:00:00 2001 From: tk Date: Wed, 5 Jun 2024 19:00:42 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=09=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afix=20=E3=80=90=E4=B8=BB=09=E9=A2=98=E3=80=91=EF=BC=9A?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AE=A2=E5=8D=95=E6=8C=89=E9=92=AE=20?= =?UTF-8?q?=E9=98=B2=E6=AD=A2=E9=87=8D=E5=A4=8D=E6=8F=90=E4=BA=A4=20?= =?UTF-8?q?=E3=80=90=E6=8F=8F=09=E8=BF=B0=E3=80=91=EF=BC=9A=20=09[?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0]=EF=BC=9A=E8=B7=B3=E8=BD=AC=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=97=B6=E5=BC=82=E6=AD=A5=E7=9A=84=20=E7=8B=82?= =?UTF-8?q?=E7=82=B9=E6=8C=89=E9=92=AE=E4=BC=9A=E8=87=B4=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=A4=9A=E6=9D=A1=E8=AE=A2=E5=8D=95=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=20=09[=E8=BF=87=E7=A8=8B]=EF=BC=9A=E7=BB=99=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=8A=A0=E7=8A=B6=E6=80=81=20=E5=A4=84=E4=BA=8E=E6=8C=89?= =?UTF-8?q?=E8=BF=87=E7=9A=84=E7=8A=B6=E6=80=81=20=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AE=A2=E5=8D=95=20=09[=E5=BD=B1=E5=93=8D]?= =?UTF-8?q?=EF=BC=9A=20=E3=80=90=E7=BB=93=09=E6=9D=9F=E3=80=91?= 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:构建过程或辅助工具的变动 --- pages/main/order.vue | 27 +++++++++++++++++++++++++++ pages/shop/order.vue | 10 ++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 pages/main/order.vue diff --git a/pages/main/order.vue b/pages/main/order.vue new file mode 100644 index 0000000..b086607 --- /dev/null +++ b/pages/main/order.vue @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/pages/shop/order.vue b/pages/shop/order.vue index 4c54641..cd6ebc7 100644 --- a/pages/shop/order.vue +++ b/pages/shop/order.vue @@ -44,8 +44,8 @@ 合计: ¥{{total | formatPrice}} - + 提交订单 Checkout @@ -64,6 +64,7 @@ export default { data() { return { + isPressed: false, //提交按钮是否锁定 remark: '' //用户备注 } }, @@ -90,6 +91,10 @@ totalPrice, //提交订单 handleCheckout() { + if (this.isPressed) {//防止提交订单按钮重复点击 + return + } + this.isPressed = true //提交订单 uni.$u.http.post('/Api/Check/checkout', { cartList: JSON.stringify(this.cartList), //购物车列表 @@ -126,6 +131,7 @@ title: res.data.msg, icon: 'error' }) + this.isPressed = false } }) }