d54f3680 by yyx

1

1 parent 240ef2b3
......@@ -62,9 +62,9 @@ const props = defineProps({
let timer = null;
const startCheckSuccessListener = (orderSn, actId) => {
console.log(123);
timer = setInterval(() => {
checkPaySuccess({ orderSn }).then((res) => {
checkPaySuccess({ orderSn })
.then((res) => {
if (res.data) {
clearInterval(timer);
timer = null;
......@@ -75,6 +75,10 @@ const startCheckSuccessListener = (orderSn, actId) => {
} else {
return false;
}
})
.catch((e) => {
clearInterval(timer);
timer = null;
});
}, 3000);
};
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!