|
@@ -13,11 +13,21 @@
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
import { defineComponent, ref, watch, watchEffect } from "vue";
|
|
import { defineComponent, ref, watch, watchEffect } from "vue";
|
|
import { useMainStore } from "@/store";
|
|
import { useMainStore } from "@/store";
|
|
|
|
+import { useTimers } from "./setups/useTimers";
|
|
|
|
+import { getToken } from "./auth/auth";
|
|
|
|
+import { httpApp } from "./plugins/axiosApp";
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: "App",
|
|
name: "App",
|
|
|
|
|
|
setup() {
|
|
setup() {
|
|
|
|
+ const { addInterval } = useTimers();
|
|
|
|
+ addInterval(() => {
|
|
|
|
+ if (getToken()) {
|
|
|
|
+ httpApp.post("/api/ess/user/online/signal");
|
|
|
|
+ }
|
|
|
|
+ }, 10 * 1000);
|
|
|
|
+
|
|
let spinning = $ref(false);
|
|
let spinning = $ref(false);
|
|
const mainStore = useMainStore();
|
|
const mainStore = useMainStore();
|
|
|
|
|