添加返回比赛结束跳转结果页
This commit is contained in:
17
src/util.js
17
src/util.js
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user