fix: 修复在线问题

This commit is contained in:
橙子
2024-01-15 00:25:25 +08:00
parent cf793c198f
commit e64b12097a
6 changed files with 52 additions and 23 deletions

View File

@@ -213,13 +213,11 @@ import RecommendFriend from "./components/RecommendFriend/index.vue";
import ThemeData from "./components/RecommendTheme/index.vue";
import Skeleton from "@/components/Skeleton/index.vue";
import useSocketStore from "@/stores/socket";
import signalR from "@/utils/signalR";
import useAuths from "@/hooks/useAuths";
const router = useRouter();
const { getToken } = useAuths();
const token = getToken();
const plateList = ref([]);
const discussList = ref([]);
@@ -310,15 +308,7 @@ watch(
{ deep: true }
);
watch(
() => token,
async (val) => {
if (val) {
await signalR.init(`main`);
}
},
{ immediate: true }
);
</script>
<style scoped lang="scss">
.home-box {