feat: 增加防抖
This commit is contained in:
@@ -11,6 +11,7 @@ import orderService, {
|
||||
OrderStatus,
|
||||
refundTextMap,
|
||||
} from "@/services/orderService";
|
||||
import { debounce } from "@tarojs/runtime";
|
||||
import {
|
||||
payOrder,
|
||||
delay,
|
||||
@@ -615,7 +616,7 @@ const OrderCheck = () => {
|
||||
}
|
||||
|
||||
//TODO: get order msg from id
|
||||
const handlePay = async () => {
|
||||
const handlePay = debounce(async () => {
|
||||
// 检查登录状态和手机号
|
||||
if (!requireLoginWithPhone()) {
|
||||
return; // 未登录或未绑定手机号,已跳转到登录页
|
||||
@@ -654,7 +655,8 @@ const OrderCheck = () => {
|
||||
init();
|
||||
setPaying(false);
|
||||
}
|
||||
};
|
||||
}, 300);
|
||||
|
||||
if (!id && !gameId) {
|
||||
return (
|
||||
<View className={styles.errorTip}>
|
||||
|
||||
Reference in New Issue
Block a user