细节调整

This commit is contained in:
kron
2025-06-19 21:03:33 +08:00
parent 595a9802e2
commit 35d544003d
14 changed files with 97 additions and 38 deletions

View File

@@ -5,13 +5,14 @@ import useStore from "@/store";
import { storeToRefs } from "pinia";
const store = useStore();
const { user } = storeToRefs(store);
const { updateConnect } = store;
watch(
() => user.value.id,
(newVal) => {
const token = uni.getStorageSync("token");
if (newVal && token) {
websocket.createWebSocket(token, (content) => {
websocket.createWebSocket(token, updateConnect, (content) => {
uni.$emit("socket-inbox", content);
});
}