添加返回比赛结束跳转结果页

This commit is contained in:
kron
2025-07-24 10:24:16 +08:00
parent b1874ba830
commit 666c95e8b9
2 changed files with 33 additions and 23 deletions

View File

@@ -266,16 +266,19 @@ export const wxShare = async () => {
}
};
export const isGameEnded = async () => {
export const isGameEnded = async (battleId) => {
const isGaming = await isGamingAPI();
if (!isGaming) {
uni.showToast({
title: "比赛已结束",
icon: "none",
// uni.showToast({
// title: "比赛已结束",
// icon: "none",
// });
// setTimeout(() => {
// uni.navigateBack();
// }, 1000);
uni.redirectTo({
url: `/pages/battle-result?battleId=${battleId}`,
});
setTimeout(() => {
uni.navigateBack();
}, 1000);
}
return !isGaming;
};