1
Showing
1 changed file
with
15 additions
and
11 deletions
| ... | @@ -62,20 +62,24 @@ const props = defineProps({ | ... | @@ -62,20 +62,24 @@ const props = defineProps({ |
| 62 | 62 | ||
| 63 | let timer = null; | 63 | let timer = null; |
| 64 | const startCheckSuccessListener = (orderSn, actId) => { | 64 | const startCheckSuccessListener = (orderSn, actId) => { |
| 65 | console.log(123); | ||
| 66 | timer = setInterval(() => { | 65 | timer = setInterval(() => { |
| 67 | checkPaySuccess({ orderSn }).then((res) => { | 66 | checkPaySuccess({ orderSn }) |
| 68 | if (res.data) { | 67 | .then((res) => { |
| 68 | if (res.data) { | ||
| 69 | clearInterval(timer); | ||
| 70 | timer = null; | ||
| 71 | // 支付成功 | ||
| 72 | detail.showCodeDialog = false; | ||
| 73 | detail.fetchData(); | ||
| 74 | ElMessage({ type: "success", message: "支付成功" }); | ||
| 75 | } else { | ||
| 76 | return false; | ||
| 77 | } | ||
| 78 | }) | ||
| 79 | .catch((e) => { | ||
| 69 | clearInterval(timer); | 80 | clearInterval(timer); |
| 70 | timer = null; | 81 | timer = null; |
| 71 | // 支付成功 | 82 | }); |
| 72 | detail.showCodeDialog = false; | ||
| 73 | detail.fetchData(); | ||
| 74 | ElMessage({ type: "success", message: "支付成功" }); | ||
| 75 | } else { | ||
| 76 | return false; | ||
| 77 | } | ||
| 78 | }); | ||
| 79 | }, 3000); | 83 | }, 3000); |
| 80 | }; | 84 | }; |
| 81 | 85 | ... | ... |
-
Please register or sign in to post a comment