BUG修复

This commit is contained in:
kron
2026-02-10 18:13:11 +08:00
parent 608de34dd3
commit b9bb1e6653
3 changed files with 4 additions and 99 deletions

View File

@@ -1,5 +1,3 @@
import { getUserGameState, getGameAPI } from "@/apis";
export const formatTimestamp = (timestamp) => {
const date = new Date(timestamp * 1000);
const year = date.getFullYear();
@@ -89,27 +87,6 @@ export const wxShare = async (canvasId = "shareCanvas") => {
}
};
// export const isGameEnded = async (battleId) => {
// const state = await getUserGameState();
// if (!state.gaming) {
// const result = await getGameAPI(battleId);
// if (result.mode) {
// uni.redirectTo({
// url: `/pages/battle-result?battleId=${battleId}`,
// });
// } else {
// uni.showToast({
// title: "比赛已结束",
// icon: "none",
// });
// setTimeout(() => {
// uni.navigateBack();
// }, 1000);
// }
// }
// return !state.gaming;
// };
// 获取元素尺寸和位置信息
export const getElementRect = (classname) => {
return new Promise((resolve) => {