fix: 支付防抖

This commit is contained in:
2025-12-22 18:51:28 +08:00
parent 8be21f8307
commit 37192b0ba4
4 changed files with 6 additions and 34 deletions

View File

@@ -27,6 +27,7 @@
<script setup>
import { defineProps, defineEmits, computed } from "vue";
import { orderPayNow } from "@/request/api/OrderApi";
import { DebounceUtils } from "@/utils";
const props = defineProps({
orderData: {
@@ -64,7 +65,7 @@ const buttonText = computed(() => {
const emit = defineEmits(["refund", "refresh"]);
// 处理按钮点击事件
const handleButtonClick = async (orderData) => {
const handleButtonClick = DebounceUtils.createDebounce(async (orderData) => {
try {
// 再次预定跳转商品详情
if (["1", "2", "3", "4", "5", "6"].includes(statusCode.value)) {
@@ -130,7 +131,7 @@ const handleButtonClick = async (orderData) => {
console.error("操作失败:", error);
uni.hideLoading();
}
};
}, 1000);
</script>
<style lang="scss" scoped>