From 824c4ca70ca73715ad920bde887e11fab69573c1 Mon Sep 17 00:00:00 2001 From: JayChou Date: Fri, 28 Mar 2025 10:01:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=9F=A5=E8=AF=86=E7=82=B9?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/knowledgePage.vue | 1 + src/layout/studyPage.vue | 13 ++++++++----- src/utils/auth.ts | 3 +++ src/views/largeDataScreen/home.vue | 6 ++++++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/layout/knowledgePage.vue b/src/layout/knowledgePage.vue index fb2c847..1f57c29 100644 --- a/src/layout/knowledgePage.vue +++ b/src/layout/knowledgePage.vue @@ -94,6 +94,7 @@ const enter = () => { const allStudied = Knowledges.value.every(item => item.isStudy); if (allStudied) { router.push('/studyPage'); + localStorage.setItem('isStudy', 'true'); } else { ElMessage.error('请先完成所有学习内容') } diff --git a/src/layout/studyPage.vue b/src/layout/studyPage.vue index be80f15..37c90a5 100644 --- a/src/layout/studyPage.vue +++ b/src/layout/studyPage.vue @@ -13,7 +13,11 @@
@@ -22,9 +26,7 @@
@@ -100,8 +102,9 @@ import { submitExperiment, getScore } from "@/api"; import { ElMessage, ElMessageBox } from "element-plus"; const isShowExperiment = Number(localStorage.getItem("activeStepIndex")) == 12 ? true : false; + const isStudy = Boolean(localStorage.getItem("isStudy")) || false; const router = useRouter(); -const complete = localStorage.getItem('complete') +const complete = localStorage.getItem("complete"); const user = userStore(); const loginFn = () => { // user.token ? router.push("/spacePage") : ""; diff --git a/src/utils/auth.ts b/src/utils/auth.ts index 90ca42c..fd8b2af 100644 --- a/src/utils/auth.ts +++ b/src/utils/auth.ts @@ -14,6 +14,9 @@ const clearLocalStorage = () => { localStorage.removeItem("product"); localStorage.removeItem("installationStep"); localStorage.removeItem("stepIds"); + // localStorage.removeItem("wenduCode"); + // localStorage.removeItem("shiduCode"); + localStorage.removeItem('isStudy') } export { diff --git a/src/views/largeDataScreen/home.vue b/src/views/largeDataScreen/home.vue index 984df2c..e553da9 100644 --- a/src/views/largeDataScreen/home.vue +++ b/src/views/largeDataScreen/home.vue @@ -749,6 +749,7 @@
+
返回