倒计时结束的处理

This commit is contained in:
ywyonui 2025-08-30 13:43:39 +08:00
parent 6b935abf5e
commit 2e334807bc
2 changed files with 20 additions and 3 deletions

View File

@ -74,12 +74,20 @@ const startCountdown = () => {
seconds--;
if (seconds <= 0) {
clearInterval(timer);
await jzXkCancelApi({
xsId: getData.xsId,
xkId: getData.xkId
});
uni.showToast({
title: "已取消报名",
icon: "success",
});
uni.showModal({
title: "支付超时",
content: "支付已超时,请重新选课",
showCancel: false,
success: () => {
cancelRegistration();
success: async () => {
goBack();
},
});
return;

View File

@ -152,12 +152,21 @@ const startCountdown = () => {
seconds--;
if (seconds <= 0) {
clearInterval(timer);
await jzXkCancelApi({
xsId: getData.xsId,
xkId: getData.xkId
});
uni.showToast({
title: "已取消报名",
icon: "success",
});
uni.showModal({
title: "支付超时",
content: "支付已超时,请重新选课",
showCancel: false,
success: () => {
cancelRegistration();
goBack();
},
});
return;