From 6acd7e65798e46513fb88aac15b26d9ebbd527ad Mon Sep 17 00:00:00 2001 From: e <2432808546@qq.com> Date: Fri, 3 Dec 2021 16:55:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=87=BB=E9=80=80=E5=87=BA=E8=B7=B3?= =?UTF-8?q?=E5=9B=9E=E5=AF=B9=E5=BA=94=E7=9A=84=E8=81=8C=E7=AB=99=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/case/index.vue | 7 +------ src/layouts/header/index.vue | 5 +++-- src/pages/index/list/index.vue | 4 ---- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/components/case/index.vue b/src/components/case/index.vue index 5c27c0d..6554a06 100644 --- a/src/components/case/index.vue +++ b/src/components/case/index.vue @@ -245,7 +245,6 @@ export default { let stopTime = this.getQueryVariable('stopTime') let timestamp = +stopTime; if (timestamp != null){ - sessionStorage.setItem('timestamp', timestamp) }else{ sessionStorage.setItem('timestamp', null) } @@ -253,16 +252,12 @@ export default { sessionStorage.setItem('token', token) sessionStorage.setItem('cid', cid) sessionStorage.setItem('systemId', systemId) - } - if (projectId){ + sessionStorage.setItem('timestamp', timestamp) sessionStorage.setItem('projectId', projectId) sessionStorage.setItem('assessmentId', assessmentId) sessionStorage.setItem('classId', classId) this.assessmentId = assessmentId this.classId = classId - }else{ - // this.assessmentId = '' - // this.classId = '' } let tokens = sessionStorage.getItem('token') if(tokens || token){ diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index bd896cb..0ce171f 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -33,8 +33,9 @@ export default { }) }, exit(){ - let stopTime = sessionStorage.getItem('timestamp') - if (stopTime){ + let assessmentId = sessionStorage.getItem('assessmentId') + console.log(assessmentId) + if (assessmentId != 'null' && assessmentId != null && assessmentId != ''){ window.location = 'http://39.108.250.202/student/#/ass/list' }else{ let cid = sessionStorage.getItem('cid') diff --git a/src/pages/index/list/index.vue b/src/pages/index/list/index.vue index aa00e68..239da81 100644 --- a/src/pages/index/list/index.vue +++ b/src/pages/index/list/index.vue @@ -46,11 +46,7 @@ export default { sessionStorage.setItem('token', token) sessionStorage.setItem('cid', cid) sessionStorage.setItem('systemId', systemId) - } - if (timestamp != null){ sessionStorage.setItem('timestamp', timestamp) - }else{ - sessionStorage.setItem('timestamp', null) } }, methods: {