feat: 修复商品下单节流

This commit is contained in:
duanshuwen
2025-10-07 14:26:17 +08:00
parent 56f7f9d426
commit 3646870695
5 changed files with 14798 additions and 703 deletions

View File

@@ -70,6 +70,7 @@ import {
commodityDailyPriceList,
orderPay,
} from "@/request/api/GoodsApi";
import { ThrottleUtils } from "@/utils";
import TopNavBar from "@/components/TopNavBar/index.vue";
import ImageSwiper from "@/components/ImageSwiper/index.vue";
import GoodInfo from "./components/GoodInfo/index.vue";
@@ -164,7 +165,7 @@ const showConfirmPopup = () => {
};
// 处理确认订单
const handleConfirmOrder = async (orderData) => {
const handleConfirmOrder = ThrottleUtils.createThrottle(async (orderData) => {
console.log("确认订单---1:", orderData);
const { goodsData } = orderData;
// 购买的商品id
@@ -260,7 +261,7 @@ const handleConfirmOrder = async (orderData) => {
});
},
});
};
}, 1000);
// 处理关闭弹窗
const handleCloseConfirm = () => {