数据完善

This commit is contained in:
kron
2025-07-01 10:57:49 +08:00
parent a03af4e58c
commit afab40d1a1
5 changed files with 90 additions and 130 deletions

View File

@@ -1,5 +1,14 @@
import websocket from "@/websocket";
export const formatTimestamp = (timestamp) => {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
return `${year}.${month}.${day}`;
};
export const checkConnection = () => {
uni.sendSocketMessage({
data: JSON.stringify({ event: "ping", data: {} }),