From 7abb0d5782d1d1f1d8285cdf1ebe0175777a8e0a Mon Sep 17 00:00:00 2001 From: hiyu Date: Tue, 18 Jun 2024 18:50:13 +0700 Subject: [PATCH] fix: confirm order --- src/components/lottery/LotteryGame.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/lottery/LotteryGame.vue b/src/components/lottery/LotteryGame.vue index 049da72..c40d045 100644 --- a/src/components/lottery/LotteryGame.vue +++ b/src/components/lottery/LotteryGame.vue @@ -120,6 +120,13 @@ const confirmOrder = () => { isShowConfirmOrder.value = true; }; +const cancelOrder = () => { + choices.value.forEach((c) => { + c.active = false + }); + amount.value = "" +} + const submit = () => { const data = { id, @@ -135,6 +142,7 @@ const submit = () => { showFailToast("Thành công"); amount.value = 0; choices.value.forEach((e) => (e.active = 0)); + isShowConfirmOrder.value = false; } else { showFailToast(res.message ?? "Lỗi bình chọn"); } @@ -398,8 +406,8 @@ const formatResultText2 = (r) => {
- Hủy bình chọn - Xác nhận + Hủy bình chọn + Xác nhận