This commit is contained in:
姚宇浩 2024-11-15 10:06:22 +08:00
parent 57020922ee
commit a09eedca31
2 changed files with 4 additions and 4 deletions

View File

@ -5,10 +5,11 @@
import { ref, onMounted, onUnmounted, reactive } from "vue"; import { ref, onMounted, onUnmounted, reactive } from "vue";
import { useRouter, useRoute } from "vue-router"; import { useRouter, useRoute } from "vue-router";
import tools from "@/utils/tools"; import tools from "@/utils/tools";
import { ElMessage } from "element-plus";
const router = useRouter(); const router = useRouter();
const inactivityTimer = ref(null); const inactivityTimer = ref(null);
const resetTimer = () => { const resetTimer = () => {
console.log("执行"); // console.log("");
let typeE = tools.data.get("type"); let typeE = tools.data.get("type");
if (typeE == "2") { if (typeE == "2") {
clearTimeout(inactivityTimer.value); clearTimeout(inactivityTimer.value);
@ -32,8 +33,8 @@ const resetTimer = () => {
router.replace({ router.replace({
path: "/guide", path: "/guide",
}); });
window.location.href = // window.location.href =
"http://220.191.238.50:996/api/login?returnURL=" + window.location.href; // "http://220.191.238.50:996/api/login?returnURL=" + window.location.href;
}, 30 * 60 * 1000); // 30 }, 30 * 60 * 1000); // 30
} }
}; };

View File

@ -79,7 +79,6 @@ import png5 from "@/assets/guide/Dp/5.png";
import png6 from "@/assets/guide/Dp/6.png"; import png6 from "@/assets/guide/Dp/6.png";
import png7 from "@/assets/guide/Dp/7.png"; import png7 from "@/assets/guide/Dp/7.png";
import png8 from "@/assets/guide/Dp/8.png"; import png8 from "@/assets/guide/Dp/8.png";
import { ElMessage } from "element-plus";
import tools from "@/utils/tools"; import tools from "@/utils/tools";
import CryptoJS from "crypto-js"; import CryptoJS from "crypto-js";
const router = useRouter(); const router = useRouter();