BUG修复
This commit is contained in:
23
src/util.js
23
src/util.js
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user