d54f3680 by yyx

1

1 parent 240ef2b3
......@@ -62,20 +62,24 @@ const props = defineProps({
let timer = null;
const startCheckSuccessListener = (orderSn, actId) => {
console.log(123);
timer = setInterval(() => {
checkPaySuccess({ orderSn }).then((res) => {
if (res.data) {
checkPaySuccess({ orderSn })
.then((res) => {
if (res.data) {
clearInterval(timer);
timer = null;
// 支付成功
detail.showCodeDialog = false;
detail.fetchData();
ElMessage({ type: "success", message: "支付成功" });
} else {
return false;
}
})
.catch((e) => {
clearInterval(timer);
timer = null;
// 支付成功
detail.showCodeDialog = false;
detail.fetchData();
ElMessage({ type: "success", message: "支付成功" });
} else {
return false;
}
});
});
}, 3000);
};
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!